File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Using Operators in Drop down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Using Operators in Drop down" Watch "Using Operators in Drop down" New topic

Using Operators in Drop down

deepa durai

Joined: May 08, 2007
Posts: 18
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">

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}"/>

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("<","<",">"));

I agree. Here's the link:
subject: Using Operators in Drop down
jQuery in Action, 3rd edition