cancel
Showing results for 
Search instead for 
Did you mean: 

A problem about ListBox

Former Member
0 Kudos

Hi, everyone.

I want to assign my listBoxItem`s value dynamically.

So i try the codes is below:

String a = "Hellow"

<hbj:listBoxItem key="<%=a%>" value="<%=a%> " />

But the resulet will show "<%=a%>",not "Hellow".

How should i correct my codes?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

TRY

<%@ taglib uri="tagLib" prefix="hbj" %>

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<hbj:form id="myFormId" >

<% String a = "hello" ; %>

<hbj:dropdownListBox

id="Class1Select"

selection="<%=a%>"

onSelect="Class1_Selection"

>

<hbj:listBoxItem key="<%=a%>" value="<%=a%>" />

<hbj:listBoxItem key="NB" value="NB" />

<hbj:listBoxItem key="Mp3 "value="MP3" />

<hbj:listBoxItem key="LCD" value="LCD" />

</hbj:dropdownListBox>

</hbj:form>

</hbj:page>

</hbj:content>

Answers (0)