SelectOneChoice and autosubmit

Hi,
I have selectOneChoice which is bounded to an iterator. The selectOneChoice has 5 values, and i have set the selection required option.
The first record is null and then i have my values from the database.
When i select an option and the select back the null value, i get "javax.faces.el.EvaluationException: java.lang.NullPointerException
How can i fix this?
Please someone help.
Antonis

If the value of the list can be null, then you need to include a blank item (either blank or labelled) in the list binding definition. Otherwise, you put the binding in a situation that is illegal with a null value yet the binding doesn't permit null values.

Similar Messages

  • How to make a jsf parameter form with a selectOneChoice and data control

    I want to make a parameter form with a selectOneChoice and store this value in a backing bean, so I can use as a bind variable in query. I already made it happen without data control
    Can someone show how to do it in adf data control. With the wizard it tries put the value
    in a viewobject but I don't have base or destination viewobject. I can change the pagedef
    so it works to fill the selectOneChoice but then I want to store the selected value in a session beab
    here is solution with the application module and request / session bean, I don't
    think it is the right solution
    thanks edwin
    jsf page
    <af:selectOneChoice label="Desk" value="#{selectDesk.desk}"
    id="DeskID"
    binding="#{selectDesk.deskBinding}"
    autoSubmit="true"
    valueChangeListener="#{selectDesk.deskChangeListener}">
    <f:selectItems value="#{selectDesk.deskSelectItems}"/>
    </af:selectOneChoice>
    Selektdesk backing bean
    public SelectDesk(){
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ValueBinding valueBinding = facesContext.getApplication().createValueBinding("#{userInfo}");
    userInfo = (UserInfo) valueBinding.getValue(facesContext);
    public List<SelectItem> getDeskSelectItems() {
    if ( userInfo.getSelectItems() != null ) {
    selectItems = userInfo.getSelectItems();
    return selectItems;
    if ( getBindings() != null ) {
    userInfo.setBindings( getBindings());
    else {
    setBindings(userInfo.getBindings()) ;
    if ( selectItems == null ) {
    selectItems = new ArrayList<SelectItem>();
    DCBindingContainer bc = getBindings();
    SicmaService sicma = (SicmaService)bc.findDataControl("SicmaServiceDataControl").getDataProvider();
    ViewObject desk = sicma.findViewObject("DeskSelectView1");
    desk.executeQuery();
    RowSet rows = desk.getRowSet();
    while (rows.hasNext()) {
    Row a = rows.next();
    String DskId = a.getAttribute(0).toString();
    String DskOms = a.getAttribute(1).toString();
    selectItems.add( new SelectItem(DskId ,DskOms ));
    rows.closeRowSet();
    userInfo.setSelectItems(selectItems);
    return selectItems;
    faces-config.xml
    <managed-bean>
    <managed-bean-name>selectDesk</managed-bean-name>
    <managed-bean-class>org.tennet.sicma.view.backing.SelectDesk</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <property-class>oracle.adf.model.binding.DCBindingContainer</property-class>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>

    The SRDemo has an example of a selectOneRadio bound to a parameter being used to pass to an ExecuteWithParams action (to automatically feed a view object's named bind variable. This is in the SRStaffSearch.jspx page.
    Also, if you check out example # 72 from my blog:
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#72
    There is another example of using a selectOneListbox to do the same type of thing.
    The steps involved in creating something like this are to:
    (1) Define your named bind variables on your view object
    (2) Drop the "ExecuteWithParams" action in the operations folder of that view object from the Data Control Palette to your page as a "Parameter Form"
    (3) Drop the specific attribute (nested child of the "ExecuteWithParams" action from step (2) as whatever kind of selectOneXXXX control you want
    (4) Delete the extra field on the form you don't want.

  • SelectOneChoice and Table

    Hi Experts,
    I have a requirement in which I have to use selectonechoice and on selecting some item in the selectonechoice I have to show the table which is associated with the selected item.
    I am using jdev 11.1.1.6
    Thanks,
    Tarun

    Hi Tarun,
    If you have more than one table and want to choose one of them using a <af:selectOneChoice>, you can do something like this:
    <af:selectOneChoice label="Choose a table" id="soc1" value="#{viewScope.socValue}" autoSubmit="true">
      <f:selectItem itemValue="1" id="si1" itemLabel="Employees"/>
      <f:selectItem itemValue="2" id="si2" itemLabel="Departments"/>
    </af:selectOneChoice>
    <af:panelCollection partialTriggers="::soc1" id="pc1">
      <af:table value="#{bindings.EmployeesView1.collectionModel}" var="row" rows="#{bindings.EmployeesView1.rangeSize}"
                emptyText="#{bindings.EmployeesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                fetchSize="#{bindings.EmployeesView1.rangeSize}" rowBandingInterval="0" id="t1"
                rendered="#{viewScope.socValue eq null or viewScope.socValue eq '1'}">
        <af:column sortProperty="#{bindings.EmployeesView1.hints.EmployeeId.name}" sortable="false"
                   headerText="#{bindings.EmployeesView1.hints.EmployeeId.label}" id="c5">
          <af:outputText value="#{row.EmployeeId}" id="ot5">
            <af:convertNumber groupingUsed="false" pattern="#{bindings.EmployeesView1.hints.EmployeeId.format}"/>
          </af:outputText>
        </af:column>
        <af:column sortProperty="#{bindings.EmployeesView1.hints.FirstName.name}" sortable="false"
                   headerText="#{bindings.EmployeesView1.hints.FirstName.label}" id="c6">
          <af:outputText value="#{row.FirstName}" id="ot6"/>
        </af:column>
        <af:column sortProperty="#{bindings.EmployeesView1.hints.LastName.name}" sortable="false"
                   headerText="#{bindings.EmployeesView1.hints.LastName.label}" id="c7">
          <af:outputText value="#{row.LastName}" id="ot7"/>
        </af:column>
      </af:table>
      <af:table value="#{bindings.DepartmentsView1.collectionModel}" var="row" rows="#{bindings.DepartmentsView1.rangeSize}"
                emptyText="#{bindings.DepartmentsView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                fetchSize="#{bindings.DepartmentsView1.rangeSize}" rowBandingInterval="0" id="t2"
                rendered="#{viewScope.socValue eq '2'}">
        <af:column sortProperty="#{bindings.DepartmentsView1.hints.DepartmentId.name}" sortable="false"
                   headerText="#{bindings.DepartmentsView1.hints.DepartmentId.label}" id="c8">
          <af:outputText value="#{row.DepartmentId}" id="ot8">
            <af:convertNumber groupingUsed="false" pattern="#{bindings.DepartmentsView1.hints.DepartmentId.format}"/>
          </af:outputText>
        </af:column>
        <af:column sortProperty="#{bindings.DepartmentsView1.hints.DepartmentName.name}" sortable="false"
                   headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}" id="c9">
          <af:outputText value="#{row.DepartmentName}" id="ot9"/>
        </af:column>
      </af:table>
    </af:panelCollection>AP

  • Some problems with af:table (new rows with presetting and autosubmit)

    Hi, I'm working with an af:table, but I'm having some troubles.
    Background:
    Jdev 11.1.1.5.0
    Firefox 6.0.2
    In the Bounded Task flow:
    ExecuteWithParams -> fragment < commit/rollback
    ExecuteWithParams: Set a bind variable with a value from bpm payload for get only rows with that value.
    In the fragment:
    An af:table with a button CreateInsert (the new rows need to use the value of the payload in the hidden column, i don't know how do this, assign the value to the #{row.bindings.IdDistribution.inputValue}) [First problem]
    The inputText of the af:table has the autoSubmit in true. The first time that I fill the cells I got this error in each entered value, after press the tab key.
    ADF-FACES- 60097... ADF_FACES-60096:Server Exception during PPR, #n (where n is 1,2,3,4 for each cell). [Second problem]
    When I press the Commit Button, all values from cells dissapears. And I got the message from validator that cells can't be null. [Third problem]
    If I fill cells again, all work right. Validations, no errors ADF_FACES-60096 and a successful commit.
    How I can solve these problems?
    Thanks in advance.

    Hi,
    you need to bind the value property of the selectOneRadio to the row variable. Say the button updates an attribute "q1" then the value property should point to #{row.bindings.q1.inputValue} assuming you use ADF and ADF BC. The question svary I assume., so you need to query thequestion for each row. For this reference a managed bean doe the f:selectItems and in the managed bean use the #{row} attribute to get a hold of the current rendered row (instance of JUCtrlHierNodeBinding if ADF is used. This has a method getRow() to obtain the Row object). The list then returns the answers to select from
    Frank

  • SelectOneChoice and af:Table

    Greetings,
    i have a Object View af:Table in JDeveloper 11.1.2.4.0 JSF form that includes
    3 new columns that have nothing to do with the database xor the Entity Object.
    I bind this 3 columns to a LOV each. The 2 LOVs are normal View Objects, but the 3rd column,
    is a modified View Object that takes a parameter. I add this parameter before i show this table, but my
    3rd SelectOneChoice do not show any data.
    Can you help me on this please?

    Here is what i do to pass parameters to VO and refresh the SelectOneChoice:
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingsEntry();
    oracle.binding.OperationBinding operation = bindings.getOperationBinding("ExecuteWithParams12");
    operation.getParamsMap().put("patient_id", culture_patientid.getValue());
    operation.getParamsMap().put("order_id", culture_orderid.getValue());
    operation.execute();
    RichTable panelTabbed = (RichTable)root.findComponent("t27");
    AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabbed);
    And here the column that includes the SelectOneChoice:
    <af:selectOneChoice value="#{row.bindings.Temp1.inputValue}"
           label="#{row.bindings.Temp1.label}"
           required="#{bindings.MicAntiviogrammaSensView1.hints.Temp1.mandatory}"
           shortDesc="#{bindings.MicAntiviogrammaSensView1.hints.Temp1.tooltip}"
           id="soc28">
           <f:selectItems value="#{row.bindings.Temp1.items}"
           id="si55"/>
    </af:selectOneChoice>

  • ADF selectOneChoice and af:forEach

    Hi,
    I'm atempting to create a data-bound selectOneChoice that displays DepartmentName and selects the corresponding DepartmentId as its value. I've tried using an af:forEach on an f:selectItem with the selectOneChoice, but I'm getting an error with the EL refernces that the the row refernces aren't valid.
    Could anyone provide some insight?
    Thanks,
    Debojit

    Thanks for the prompt reponses.
    Hi Suresh, Rodrigues and Vinod,
    I'm attempting to build my selectOneChoice from the Department table table directly, without code in between AND get back real values for the selections I make, so I'm afraid I can't use any beans, at least not for pouplating the drop-down list.
    Hi Navaneetha,
    I tried your approach, but I'm still getting a "Refrence not Found" error for the EL refernce "#{row.DepartmentName}" , and the drop down is coming up as empty when i run the page.
    Here's the code for the page and the corresponding page def.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:selectOneChoice label="Departments" id="soc1">
    <af:forEach items="#{bindings.DepartmentsView.items}" var="row">
    <af:selectItem label="#{row.DepartmentName}" id="si1"
    value="#{row.DepartmentId}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.60.13" id="DepartmentsViewPageDef"
    Package="view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <iterator Binds="DepartmentsView" RangeSize="10"
    DataControl="HrAppModuleDataControl"
    id="DepartmentsViewIterator"/>
    </executables>
    <bindings>
    <tree IterBinding="DepartmentsViewIterator" id="DepartmentsView">
    <nodeDefinition DefName="model.views.DepartmentsView"
    Name="DepartmentsView0">
    <AttrNames>
    <Item Value="DepartmentId"/>
    <Item Value="DepartmentName"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    </bindings>
    </pageDefinition>

  • SelectOneChoice and selectItem foreach row  - Not selecting current value

    Hi -
    I am having a problem whereby the list that is rendered in the UI is not selecting my current ID...It is just showing the "blank" selection, which is another problem - it must be mandatory.
    The UI shows the list (from my iterator) but nothing is selected on the list, even thow the ROWs do have a ClasscategorytypeId assigned to them.
    My Iterator that feeds the list is defined in the PageDef as follows:
    <iterator id="ClasscategorytypeView1Iterator" Binds="ClasscategorytypeView1"
    RangeSize="-1" DataControl="AppModuleDataControl"/>
    </executables>
    Here is the column definition.
    <af:column sortable="false" headerText="ClassCategory"
    binding="#{backing_svrclass_edit_list.column3}"
    id="column3">
    <af:selectOneChoice value="#{row.ClasscategorytypeId}"
    required="true">
    <af:forEach var="item" items="#{bindings.ClasscategorytypeView1.rangeSet}">
    <af:selectItem
    value="#{item.ClasscategorytypeId}"
    label="#{item.Name}"/>
    </af:forEach>
    </af:selectOneChoice>
    </af:column>

    Hi Frank - thanks for the feedback.
    for #1 - setting the defaults on the entity and view object didn't help. It still shows up with a "BLANK" field (don't want the blank field, since "required"), and it is not selecting the correct option that cooresponds to the ID from the ROW.
    re #2 - I don't understand solution #1 that he mentions? Here is the quote:
    "Create a second binding to the same attribute that the list binding is for. But make this a plain attribute binding. This binding will map direct to the real value of the column so you can use this second binding as a proxy to the list in your expressions. Note the binding just has to be created in the PageDef file, it does not need to be displayed on the page itself." These parts are confusing to me:
    "Create a second binding...", "use this second binding as a proxy"...I thought that you can have only one binding per control, and second, re: the proxy item - is this implying that I have to setup an onload and onclick event, and somehow map the option items (zero based index) to the real value both when showing the list (and selecting the right one) and processing the currently "selected" item? This sounds like a very combursome thing to do...? Can you clarify that for me?
    (if you had a simple example that would be great!)
    Thanks again!
    I really appreciate it.
    ps. I found the #1 scenario (foreach solution) from the Steve Muench blog here, and if I am to understand this correctly - even his sample is misleading, since the list values returned from the query are zero based, and NOT value based.. so he must have aligned these values in the database to be ZERO based and coorespond to the behaviour of rendering the list... This is very misleading.
    Here's the URL:
    http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/editabletabledropdown/dropdownlistineditabletable.html?_template=/ocom/technology/content/print

  • ADF FACES: af:messages and autosubmit

    Using EA14.
    I have a view comprised of a main .jspx and two included .jspx files that each contain a f:subview. The main .jspx uses an af:panelPage with a "messages" facet containing an af:messages element. An af:inputText field in a subview has the autoSubmit atrribute set "true". In a valueChangeListener on that field the value entered may be incorrect and a global error message is created by calling
    FacesMessage fmsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, message, detail);
    getFacesContext().addMessage(null, fmsg);
    I give all this as prelude to asking why the message added above would not be displayed. If I add a message to the specific component, it appears properly. If I add a global message (clientid=null), the message does not appear. I even tried adding a partialTriggers to the af:messages element, but that didn't work either.
    So, is there anything obvious that would be preventing the error message from being displayed?
    Thanks.

    Are you saying that, whether or not you specify a null clientId, it won't appear in the <af:messages>? When it's non-null, and refers to a specific component, does it appear both by the component or in <af:messages>, or only by the component?

  • Reg SelectOneChoice and SelectManyShuttle combination

    Dear Experts,
    I have a scenario, where the shuttle component's leading list will be changing according to the value selection of the selectonechoice. And i need to preserve the trailing list values and need to add it to the trailing list once if the user changes the selection of the value in the selectonechoice. That means, whatever the value selected from the selectone choice, the trailing list of the shuttle component should not chnage.
    I have followed frank's blog, http://thepeninsulasedge.com/frank_nimphius/2007/07/15/adf-faces-adf-faces-shuttle-with-pre-selected-values-from-a-selectoncechoice/
    i didnt get what i have expected..
    Please advise me how to achieve this.
    Appreciate your solutions.
    Regards,
    R N V Prasad.

    The shuttle's valueChangeListener event fires when you click >  >>  <  << buttons.
    You can collect all the values and append to a list (using vector) whenever the trailing list changes.
    In the backing bean
    private List shuttleValues = null;
    generate accessors.
    The below code may not fit for your needs, but you have to do similar stuff.
            RequestContext requestContext = RequestContext.getCurrentInstance();
            shuttleValues = (ArrayList)requestContext.getPageFlowScope().get("rhsList"); //gets existing values
            if (shuttleValues == null){
                shuttleValues = new ArrayList();
            }else{
                Vector vec = new Vector();
                DCIteratorBinding iter= getItrtBindings(iteratorName);
                int startIdx = iter.getRangeSize();
                iter.setRangeSize(-1);
                Row[] rows = iter.getAllRowsInRange();
                if(rows != null && rows.length > 0){
                   for(int i=0; i<rows.length; i++){
                       Row r = rows;
    vec.add(r.getAttribute(loadAttr));
    shuttleValues.addAll(vec); //collecting new values
    requestContext.getPageFlowScope().put("rhsList", shuttleValues);
    Shuttle's value attribute:
    value="#{backingBeanScope.backing_MaintainProf.shuttleValues}"
    I have added partialTarget at the end of the valueChangeEvent method:
    RequestContext.getCurrentInstance().addPartialTarget(selectOrderShuttle3);

  • Clear the SelectOneChoice and InputText

    Hi,
    I am using Jdev10g.
    In my search page there are 3 selectOneChoice fields and InputText fields.
    Before search button clicking if i select any value from selectOneChoice lovs its clearing by rollback button.
    But if once click on search button(ExeWithParms) its not clearing by rollback button.
    Is there any way or any seperate button to clear.
    Thanks
    NR

    Hi,
    No its not working.
    I need to write any code to this button?. I simply drag and drop on my page. but it working before going to search button same as rollback.
    Thanks
    NR

  • Validating components even with autosubmit and immediate

    Greetings:
    I am working in a application using ADF 11g. In my page, I have a <af:selectOneRadio> with two options (selectItem). These selectItem's have both immediate and autoSubmit attributes equal to true. Next, there is a <af:panelGroupLayout> which partialTriggers attribute points to prior selectOneRadio. Inside panelGroupLayout, there are some <af:inputText>'s. All of them are required. Depending of selectOneRadio value, some inputs will have their label changed, while others will be (or not) renderized. After this panelGroupLayout, I have a <af:commandButton>, where there will be the real submission.
    What I was expecting was, when I changed the select value, a partial submission would be done, without validation, and changed the labels or rederization of components inside panelGroupLayout. However, the components are being validated. The error messages are shown and the components chagings are not happening.
    Googling for some solution (https://www.google.com.br/search?q=adf+not+validate+at+partial+submit) , I found some suggestions that either did not work or thought too complicated (e.g. Use a subform and configure the page definition XML (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/40-ppr-subform-169182.pdf)). I think that there is a simpler solution, but I could not found it.
    Below my JSF code:
       <af:form id="formCadastroUsuarioLicitacoes" usesUpload="true">
           <af:panelGroupLayout halign="end" id="pnGL1">
                <af:selectOneRadio id="radioType" value="#{viewScope.myManagedBean.type}" immediate="true" required="true"
                                        styleClass="radioType" autoSubmit="true">
                   <f:selectItem itemLabel="Type A" itemValue="a" id="itemA"/>
                   <f:selectItem itemLabel="Type B" itemValue="b" id="itemB"/>
                </af:selectOneRadio>
                   <af:panelGroupLayout id="panelGroupForm" partialTriggers="radioType" styleClass="AFStretchWidth">
                     <af:inputText id="txfDoc" value="#{viewScope.myManagedBean.document}"
                                       label="#{(viewScope.myManagedBean.type == 'b')? 'Doc B': 'Doc A'}" required="true"
                                       />
                     <af:inputText id="txfcompany" value="#{viewScope.myManagedBean.company}" label="company"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                     <af:inputText id="txfName" value="#{viewScope.myManagedBean.name}"
                                       label="#{(viewScope.myManagedBean.type == 'b')? 'Your Name': 'Name'}" required="true" />
                     <af:inputText id="txfEmail" value="#{viewScope.myManagedBean.email}" label="Email" required="true" />
                     <af:inputText id="txfEmailConfirm" value="#{viewScope.myManagedBean.emailConfirm}" label="Confirm your Email"
                                       required="true" />
                     <af:inputText id="txfphine" value="#{viewScope.myManagedBean.phine}" label="phine"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                     <af:inputText id="txfFax" value="#{viewScope.myManagedBean.fax}" label="Fax"
                                       rendered="#{(viewScope.myManagedBean.type == 'b')}" required="true" />
                   </af:panelGroupLayout>
                <af:commandButton text="Submit" id="btnsubmit" action="#{viewScope.myManagedBean.save}"/>
           </af:panelGroupLayout>
      </af:form>Thanks,
    Rafael Afonso
    Edited by: 993323 on 04/04/2013 13:50

    Hey,
    I hate to be the one to link Oracle docs. Have you read this part though? http://docs.oracle.com/cd/E23549_01/web.1111/b31973/af_lifecycle.htm#CIAIDFGC
    I also know that one of the Oracle Ace people wrote a blog on this. I think it was Timo, but I couldn't track it down. It has been awhile since I read it.
    Anyhow, my suggestion would be to look into the lifecycle methods that get skipped when the immediate value is set and see if that makes your problem any clearer to you.
    I am sorry I couldn't be of more help, I have only looked a little bit into field validations and the immediate field.
    Best of luck,
    Dustin

  • Null Value in af:SelectOneChoice

    HI,
    I want to fetch value from a selectone choice,in backing bean.
    following is my binding.
    <af:selectOneChoice value="#{bindings.ExcelVOCode.inputValue}"
    label="#{bindings.ExcelVOCode.label}"
    validator="#{FileProcessor.selectOneChoice_validator}"
    id="excelTypeList" autoSubmit="true" valuePassThru="true"
    immediate="true"
    binding="#{FileProcessor.excelTypeList}">
    <f:selectItems value="#{bindings.ExcelVOCode.items}" id="selectItems1"
    binding="#{FileProcessor.selectItems1}"/>
    </af:selectOneChoice>
    And i have tried following method to get the values.
    1
    CoreSelectOneChoice exe=getexcelTypeList();
    System.out.println("Id"+exe.getValue().toString());
    2 FacesContext fc = FacesContext.getCurrentInstance();
    ValueBinding vb = fc.getApplication().createValueBinding("#{bindings.ExcelVOCode.inputValue}");
    System.out.println("Value"+vb.getValue(fc));
    But each of these method returns me null,
    Following is my page defination.
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.39.81" id="FileUploadPageDef"
    Package="xml.pageDefs">
    <parameters/>
    <executables>
    <iterator id="ExcelVOIterator" RangeSize="10" Binds="ExcelVO"
    DataControl="AppModuleDataControl"/>
    <iterator id="ExcelVO2Iterator" RangeSize="-1" Binds="ExcelVO2"
    DataControl="AppModuleDataControl"/>
    </executables>
    <bindings>
    <list id="ExcelVOCode" IterBinding="ExcelVOIterator" StaticList="false"
    ListOperMode="0" ListIter="ExcelVO2Iterator">
    <AttrNames>
    <Item Value="Code"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="Code"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="Name"/>
    </ListDisplayAttrNames>
    </list>
    </bindings>
    </pageDefinition>
    Please help me with it,
    Thanks

    Hi,
    Any how i was finally able to get the value by implementing somthing like this in the jsp
    <af:selectOneChoice value="#{bindings.ExcelVOCode.inputValue}"
    label="#{bindings.ExcelVOCode.label}"
    id="excelTypeList" autoSubmit="true" valuePassThru="true"
    immediate="false"
    binding="#{FileProcessor.excelTypeList}"
    simple="true" required="false"
    partialTriggers="excelTypeList">
    <af:forEach items="#{bindings.ExcelVO.rangeSet}" var="item">
    <af:selectItem value="#{item.Code}" label="#{item.Name}"
    binding="#{FileProcessor.selectItem}"/>
    </af:forEach>
    </af:selectOneChoice>
    and this in the backing bean.
    CoreSelectItem seq=getSelectItem();
    System.out.println("Item"+seq.getLabel());
    But the problem is when i attach a binding to Selectitem,it doesn't show me all the values in the drop down it only shows the last value in the table ,i.e the drop down have a single entry.
    Please provide some indicator.
    Thanks

  • How to use af:selectOneChoice

    hi,
    i want to use a <af:selectOneChoice>
    <af:selectOneChoice id="navListCountry" autoSubmit="false" binding="#{SomeBean.Department}"
    valuePassThru="true">
    <f:selectItems value="#{bindings.DepartmentVo.items}"/>
    </af:selectOneChoice>
    i use bindings.DepartamentosVo.items from a table that has 2 fields(id,name_deparment ) i want to show the name of department and get the id of department and with this id to filter the city`s in another selectOneChoice and get the id of the deparment and id of the city to insert in another table from a bean with another data
    1. how to get the values with a bean
    thansk

    http://thepeninsulasedge.com/frank_nimphius/2008/05/16/blogbuster-treasures-hunt-blog-entries-from-the-lost-orablogs-blog-for-download/

  • Error window while changing the value in SelectOneChoice.

    Hi I am facing a problem on change of values in SelectOneChoice, "ERROR For input string: "N"
    Below is how i am implementing SelectOneChoice:
    I am creating values for SelectOneChoice in a Java class:
    *SelectItem itemY=new SelectItem();*
    *itemY.setLabel("Yes");*
    *itemY.setValue("Y");*
    *confirmation.add(itemY);*
    *SelectItem itemN=new SelectItem();*
    *itemN.setLabel("No");*
    *itemN.setValue("N");*
    *confirmation.add(itemN);*
    Using this values in JSFF like this:
    *<af:selectOneChoice value="#{bindings.confURLSubmitted.inputValue}"*
    *label="Conference Website URL Submitted"*
    *required="#{bindings.confURLSubmitted.hints.mandatory}"*
    *shortDesc="#{bindings.confURLSubmitted.hints.tooltip}"*
    *binding="#{backingBeanScope.EditComplianceDetails.confURLSubmitted}"*
    *id="confURLSubmitted"*
    *unselectedLabel="Select One"*
    *autoSubmit="true"*
    *valueChangeListener="#{backingBeanScope.EditComplianceDetails.OnConfURLSubChange}">*
    *<f:selectItems value="#{pageFlowScope.generalLists.confirmation}"*
    *binding="#{backingBeanScope.EditComplianceDetails.si1}"*
    *id="si1"/>*
    *</af:selectOneChoice>*
    And in bean method i am trying to print the selected value in SelectOneChoice:
    *public void OnConfURLSubChange(ValueChangeEvent valueChangeEvent) {*
    *// Add event code here...*
    *System.out.println("this.confURLSubmitted.getValue() "+this.confURLSubmitted.getValue());*
    Now when i try to change the value in SelectOneChoice:
    I am getting an error window "ERROR For input string: "N"
    Any idea y i am getting this error.
    Thanks in Advance

    Remove selectOneChoice value binding and set static value and try
    *<af:selectOneChoice value="XXX"*
    label="Conference Website URL Submitted"
    required="#{bindings.confURLSubmitted.hints.mandatory}"
    shortDesc="#{bindings.confURLSubmitted.hints.tooltip}"
    binding="#{backingBeanScope.EditComplianceDetails.confURLSubmitted}"
    id="confURLSubmitted"
    unselectedLabel="Select One"
    autoSubmit="true"
    valueChangeListener="#{backingBeanScope.EditComplianceDetails.OnConfURLSubChange}">
    <f:selectItems value="#{pageFlowScope.generalLists.confirmation}"
    binding="#{backingBeanScope.EditComplianceDetails.si1}"
    id="si1"/>
    </af:selectOneChoice>

  • OutputLabes, values in selectOneChoice are appearing twice in the jspx page

    Hi All,
    In a Jspx Page, there are two menu tabs. Each Tab has a PanelForm and each panelform has certain components.
    By default the first panelform in the first tab will be shown on page load and while clicking on second tab, the second panelform will be shown.
    The first panelform has three selectonechoices and three command buttons.
    If i click on reset button, these 3 selectonechoices are set to null by backing bean.
    Here comes the problem, after clicking on reset, if you click on second tab where the second panel form available, certain components like outputLabel and the values in selectOnechoice, are appearing twice on the page.
    Can anyone suggest me how to get rid of this problem..
    Here is my Jspx Page..
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:loadBundle basename="GeneralAdmin" var="gadmin"/>
    <f:loadBundle basename="HoldCapabilites" var="holdc"/>
    <f:view>
    <afh:html>
    <afh:head title="editManualProfileAttributes">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <script type="text/javascript">
    function cancel() {
    var flag = false;
    flag=window.confirm('You want to discard the entered data');
    return flag;
    </script>
    </afh:head>
    <afh:body>
    <af:messages/>
    <h:form>
    <afh:tableLayout>
    <afh:rowLayout width="100%">
    <jsp:include page="/jsps/webutils/template/header.jsp"/>
    </afh:rowLayout>
    <afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:menuPath>
    <af:commandMenuItem text="#{gadmin.admin}" action="adminHome"/>
    <af:commandMenuItem text="#{gadmin.epaAttr}" selected="true"/>
    </af:menuPath>
    </afh:rowLayout>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="20"/>
    </afh:rowLayout>
    <afh:rowLayout halign="center" valign="bottom">
    <afh:cellFormat width="20%" height="20px" valign="bottom">
    <af:menuTabs>
    <af:commandMenuItem text="#{gadmin.epAttr}"
    action="#{EditManualProfileAttributes.firstTab}"
    binding="#{EditManualProfileAttributes.commandMenuItem2}"
    id="commandMenuItem2"/>
    <af:commandMenuItem text="#{gadmin.auditHistory}"
    action="#{EditManualProfileAttributes.secondTab}"
    binding="#{EditManualProfileAttributes.commandMenuItem1}"
    id="commandMenuItem1"/>
    </af:menuTabs>
    </afh:cellFormat>
    <afh:cellFormat styleClass="bottomLine" width="80%"
    height="20px" valign="bottom">
    <af:objectSpacer height="1" width="1"/>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="100%" height="10"/>
    </afh:rowLayout>
    <af:panelForm id="panelForm1" width="100%"
    binding="#{EditManualProfileAttributes.panelForm1}">
    <afh:rowLayout width="100%">
    <afh:cellFormat width="15%">
    <af:outputText value="#{gadmin.mpAttr}"
    inlineStyle="font-family:Arial; font-size:9.0pt; font-weight:bold;"/>
    </afh:cellFormat>
    <afh:cellFormat width="85%">
    <f:verbatim>
    <hr align="left"
    style="border-width:2.0px; color:rgb(219,238,243);"/>
    </f:verbatim>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="20"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="5%"/>
    <afh:cellFormat width="15%">
    <af:outputText value="#{gadmin.refName}"
    styleClass="outputText"/>
    <af:outputText value=" * "
    inlineStyle="font-size:10.0pt; font-family:Arial; color:rgb(255,0,0);"/>
    </afh:cellFormat>
    <afh:cellFormat width="80%">
    <af:selectOneChoice id="navList1" autoSubmit="true" partialTriggers="commandButton2"
    valuePassThru="true" unselectedLabel="Select"
    binding="#{EditManualProfileAttributes.navList1}"
    valueChangeListener="#{EditManualProfileAttributes.getDetails}">
    <af:forEach var="li"
    items="#{bindings.GetRefNamesVO1.rangeSet}">
    <af:selectItem label="#{li.ReferenceName}"
    value="#{li.Id}"/>
    </af:forEach>
    </af:selectOneChoice>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="10"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="5%"/>
    <afh:cellFormat width="15%">
    <af:outputText value="#{gadmin.refId}"
    styleClass="outputText"/>
    <af:outputText value=" * "
    inlineStyle="font-size:10.0pt; font-family:Arial; color:rgb(255,0,0);"/>
    </afh:cellFormat>
    <afh:cellFormat width="15%">
    <af:selectOneChoice id="navList2" autoSubmit="true"
    partialTriggers="navList1 commandButton2"
    binding="#{EditManualProfileAttributes.navList2}"
    valueChangeListener="#{EditManualProfileAttributes.getColumns}">
    <af:forEach var="li"
    items="#{bindings.LookupRefTableVO1.rangeSet}">
    <af:selectItem label="#{li.LookupDesc}"
    value="#{li.LookupId}"/>
    </af:forEach>
    </af:selectOneChoice>
    </afh:cellFormat>
    <afh:cellFormat width="15%">
    <af:selectOneChoice id="navList3"
    binding="#{EditManualProfileAttributes.navList3}"
    partialTriggers="navList1 navList2 commandButton2">
    <af:forEach var="li"
    items="#{bindings.EditRefColumnVO1.rangeSet}">
    <af:selectItem label="#{li.DetailDesc}"
    value="#{li.DetailsId}"/>
    </af:forEach>
    </af:selectOneChoice>
    </afh:cellFormat>
    <afh:cellFormat width="50%"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="10"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="5%"/>
    <afh:cellFormat width="6%">
    <af:outputText value="#{gadmin.stDt}"
    styleClass="outputText" id="outputText1"
    binding="#{EditManualProfileAttributes.outputText1}"/>
    </afh:cellFormat>
    <afh:cellFormat halign="left">
    <af:outputText value=" * " id="outputText2"
    binding="#{EditManualProfileAttributes.outputText2}"
    inlineStyle="font-size:10.0pt; font-family:Arial; color:rgb(255,0,0);"/>
    </afh:cellFormat>
    <afh:cellFormat width="4%"/>
    <afh:cellFormat width="80%">
    <af:selectInputDate id="startDate"
    binding="#{EditManualProfileAttributes.startDate}"
    partialTriggers="navList1 commandButton1 commandButton2">
    <af:convertDateTime pattern="dd/MMM/yy"/>
    </af:selectInputDate>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="10"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="5%"/>
    <afh:cellFormat width="15%">
    <af:outputText value="#{gadmin.edDt}"
    styleClass="outputText" id="outputText3"
    binding="#{EditManualProfileAttributes.outputText3}"/>
    </afh:cellFormat>
    <afh:cellFormat width="80%">
    <af:selectInputDate id="endDate"
    binding="#{EditManualProfileAttributes.endDate}"
    partialTriggers="navList1 commandButton1 commandButton2">
    <af:convertDateTime pattern="dd/MMM/yy"/>
    </af:selectInputDate>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="10"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="20%"/>
    <afh:cellFormat width="7%">
    <af:commandButton text="#{gadmin.save}"
    action="#{EditManualProfileAttributes.save}"
    id="commandButton1"
    binding="#{EditManualProfileAttributes.commandButton1}"/>
    </afh:cellFormat>
    <afh:cellFormat width="7%">
    <af:commandButton text="#{gadmin.reset}"
    action="#{EditManualProfileAttributes.reset}"
    id="commandButton2"
    binding="#{EditManualProfileAttributes.commandButton2}"/>
    </afh:cellFormat>
    <afh:cellFormat width="7%">
    <af:commandButton text="#{gadmin.cancel}"
    id="commandButton3"
    binding="#{EditManualProfileAttributes.commandButton3}"
    action="adminHome"
    onclick="return cancel()"/>
    </afh:cellFormat>
    <afh:cellFormat width="59%"/>
    </afh:rowLayout>
    </af:panelForm>
    <af:panelForm id="panelForm2" rendered="false" width="100%"
    binding="#{EditManualProfileAttributes.panelForm2}">
    <afh:rowLayout width="100%">
    <afh:cellFormat width="15%">
    <af:outputLabel value="#{holdc.mpaAttr}" id="abc"
    inlineStyle="font-family:Arial; font-size:9.0pt; font-weight:bold;"/>
    </afh:cellFormat>
    <afh:cellFormat width="85%">
    <f:verbatim>
    <hr align="left"
    style="border-width:2.0px; color:rgb(219,238,243);"/>
    </f:verbatim>
    </afh:cellFormat>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <af:objectSpacer width="10" height="20"/>
    </afh:rowLayout>
    <afh:rowLayout width="100%">
    <afh:cellFormat width="15%">
    <af:outputLabel value="#{holdc.refeName}"
    styleClass="outputText"/>
    <af:outputLabel value=" * "
    inlineStyle="font-size:10.0pt; font-family:Arial; color:rgb(255,0,0);"/>
    </afh:cellFormat>
    <afh:cellFormat width="85%">
    <af:selectOneChoice id="navList4" autoSubmit="true"
    unselectedLabel="Select"
    valuePassThru="true"
    binding="#{EditManualProfileAttributes.navList4}"
    valueChangeListener="#{EditManualProfileAttributes.getVersions}">
    <af:forEach var="li"
    items="#{bindings.AuditRefNamesVO1.rangeSet}">
    <af:selectItem label="#{li.ReferenceName}"
    value="#{li.Id}"/>
    </af:forEach>
    </af:selectOneChoice>
    </afh:cellFormat>
    </afh:rowLayout>
    </af:panelForm>
    </afh:tableLayout>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    </jsp:root>

    Hi Puthanampatti,
    Thanks a lot for your reply, but i am using JDev 10.1.3.3. There is no panelFormLayout component and i am not using that component.
    Even i am strange this duplicating of components and values in selectoneChoice occuring from past 2 days in the old file. I am wondering whether my file got corrupted by any sort.
    Regards,
    R N V Prasad

Maybe you are looking for