Collapsible block with dynamic content

This forum contains topics that were moved from Get Satisfaction
Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Collapsible block with dynamic content

Post by Deon »

Hi

I have a collapsable set. The collapseblock header is dynamically populated with a description from the collection. This works perfectly.

Now I am trying to get a listview in the content of the collapseblock to display data based on the collapseblockheader text value.

I have mapped the collapseblockheader text to the Where Paramer in the Query service.

I invoke the service on expansion of the collapseblock, but the list is empty.
It works.

Is it correct to map against the CollapseBlock Header Text?

If I put a label containing the same text as the Cllapseblock header on the outside of the Collapseblock and change the Mapping it works but obviously not dynamically.

Please can you let me know if my mapping is correct.

My JS for the mapping is...
return ('{ $and: [ { "Category": "'+value+'" }, { "Property": "' + localStorage.getItem("PropertyName") + '" } ] }');

As I said this works with a label containing the Category Value.

Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Collapsible block with dynamic content

Post by Illya Stepanov »

Hello Deon,

[quote:]
If I put a label containing the same text as the Cllapseblock header on the outside of the Collapseblock and change the Mapping it works but obviously not dynamically.
[/quote]

can you clarify how it's not working as you need it? some screenshots would help -- how it's working now and how you want to get it working.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Collapsible block with dynamic content

Post by Deon »

Hi Illya

It is very simple. I basically need to render the listview based on the collapsebloack header.

Similar to this link...
https://getsatisfaction.com/apperyio/...

Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Collapsible block with dynamic content

Post by Illya Stepanov »

I mean when you telling - it is working, but not dynamically, what do you mean by that?
Can you show the result you are getting now?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Collapsible block with dynamic content

Post by Deon »

Sorry for the confusion. It is not working. The content area is empty. The listview is not being displayed/empty.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Collapsible block with dynamic content

Post by Illya Stepanov »

What is the response when you test the where clause with your query in the service test tab?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Collapsible block with dynamic content

Post by Illya Stepanov »

Are you sure you are defining the localStorage variable 'PropertyName' before executing the service?

Can you provide some steps to check this in your app?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Collapsible block with dynamic content

Post by Deon »

This is the problem.

Image

As you can see the query returns all the ColapseBlock Headers as well as the structure of it.

How would one only return the value of the ColapseBlockHeader that was expanded? This code below works with other elements (ie. Select), but does not work for the collapseblock element?

return ('{ $and: [ { "Category": "'+value+'" }, { "Property": "' + localStorage.getItem("PropertyName") + '" } ] }');

What needs to change in the code only to extract the expanded collapseblockheader value?

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Collapsible block with dynamic content

Post by Deon »

Any news here?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Collapsible block with dynamic content

Post by Alena Prykhodko »

Hi Deon, sorry, not yet. Working to resolve it.

Post Reply