m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

How to get Collapsible List Label Text after populated by database list service

I have two labels located in a collapsible list header that are populated from a list service. The information is mapped correctly and is displayed properly after the list service completes. However, when I try to use the "expand" event to return the label text, I get the default label values set before the list service runs.

When I try the same code with a "static" collapsible list (not populated by a database service), I can easily get the label text.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to get Collapsible List Label Text after populated by database list service

Hello,

Could you show us you code?

m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

How to get Collapsible List Label Text after populated by database list service

it's very straight forward. I just have an alert in java script.

This is in the dynamic collapsible expand event:
alert(Appery('labelModel').text());
alert(Appery('labelId').text());

This is in the static collapsible expand event:
alert(Appery('labelTest').text());

Here are some screen shots of the result:

Image Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to get Collapsible List Label Text after populated by database list service

If you want to get all labels text, you can map the same service response parameters to the page elements and to the localStorage variable. After that you can get this values from local storage.

m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

How to get Collapsible List Label Text after populated by database list service

OK, I'll try this. But why is the dynamic control not working as expected? Is it a bug? I should be able to get the label text when the expand event is triggered.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to get Collapsible List Label Text after populated by database list service

No. it isn't a bug. Dynamic control not working because you are trying to get value using static component name. For dynamic components there is some index at the end of the component name. You can try to debug your app and see the dynamic component names . http://docs.appery.io/documentation/d...

m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

How to get Collapsible List Label Text after populated by database list service

Thanks for the clarification. This is from the debugger.

Back-up VOC Carbon System

How would I read back "Back-up VOC Carbon System" within Appery using Javascript? This is in array value 2 of the list.

m z
Posts: 0
Joined: Sat Nov 02, 2013 1:39 am

How to get Collapsible List Label Text after populated by database list service

Let me try with screen capture

Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

How to get Collapsible List Label Text after populated by database list service

Could you post public link to your app?

Return to “Issues”