Skip to main content

Dojo.Accordion: Dynamically Set VALUE property

1 reply [Last post]
groverblue
Offline
Joined: 2006-06-23
Points: 0

I want to use the Accordion widget, but the number of rows will be dynamic.

I have the following in my jsp page:

and here is my backing bean (the faces-config file points dah to DAH):

public class DAH {

public DAH() {}

public String getServicesAsAccordion(){
return "{items : [{label : 'Main ', content : 'Service Status: INACTIVE" +
"{id : 'bar', label : 'Magazines', include : 'test.jsp', lazyLoad : true}," +
"{label : 'Newspaper', content : 'Newspaper content', selected : true}]}";
}
}

But, I get the following error:
java.lang.ClassCastException: com.sun.el.ValueExpressionImpl cannot be cast to java.lang.String

So, how can dynamically add rows and their content?

Thanks.

Message was edited by: groverblue

Message was edited by: groverblue

Message was edited by: groverblue

Message was edited by: groverblue

Message was edited by: groverblue

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
groverblue
Offline
Joined: 2006-06-23
Points: 0

Well, I ended up using a service (Servlet) that outputs the formatted json.