Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Operators in Drop down

 
deepa durai
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
There is a requirement in my project to add and delete a row onclick of a button.
Each row has a drop down which displays ("<",">","<=",">=") operators.

When i am using the below HTML code for displaying dropdowns ,add and delete functionalities working fine..
<select name="select13" class="TextBlackNormal">
<option>></option>
<option><</option>
<option>>=</option>
<option><=</option>
</select>

But in case of JSF dropdown tag,add and delete fucntionalites are not working onclick of a button.But it displays the dropdown List.

<h:selectOneMenu value="#{ruleBlock.priceRangeFromOperator}">
<f:selectItems value="#{PriceVarianceRuleBean.priceRangeOpeList}"/>
</h:selectOneMenu>


I configured the priceRangeOpeList as
priceRangeOpeList.add(new SelectItem("<","<","<"));
priceRangeOpeList.add(new SelectItem(">",">",">"));

Add and delete functionlaites are working fine if i use below configuration for the drop down.but the the values in the drop down are dispalyed as (>,< like this instead of < , >).So i think the problem is with the operators.Can you please tell me how to display these opearators in the dropdown.
priceRangeOpeList=new ArrayList();
priceRangeOpeList.add(new SelectItem(">",">",">"));
priceRangeOpeList.add(new SelectItem("<","<",">"));


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic