Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

A problem about ListBox

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?

replied

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>

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question