UI Component SelectManyChoice is showing some selected values by default

Hi,
I am working on JDeveloper 11.1.1.4.
I created a viewObject DepartmentVO which fetches the distinct department values in a table.
I created a Department.jsff fragment and its backing bean Department.java. And created a RichSelectManyChoice smc1 component in Department.jsff.
DepartmentVO is binded to smc1 so that when the fragment loads smc1 component fetches the all department values. And the user can select many depatments.
I am calling this fragment in Home.jspx page using bounded taskflow. The taskflow behaviour is set as "Always begin with new transaction" and "Share data control with calling taskflow" is checked because I am calling another taskflow which requires the data in this fragment. It is working and I am able to select multiple departments.
Suppose I selected two departments Finance and HR. But the problem is that when I come to this page again (I mean when departments.jsff loads again) it is showing Finance and HR as selected. But it shoud show the list of vallues as none selected.
Please suggest how can I achieve this.
Thanks
Edited by: 976777 on Dec 13, 2012 8:30 AM

Hi,
Check
How to reset ADF SelectOneChoice?

Similar Messages

  • Showing the selected value in h:selectOneMenu

    Hi All JSF Gurus,
    Actually I am populating the list in a h:selectOneMenu from the database. I am facing the following problems:
    1. I have initialzed a variable in the faces-config/managed bean(neither of them works) and mapped it to the value in my JSP but by default it displays the last record in the database and not the value being initialized.
    2. In case of an error, I am displaying the error message in the same page being refreshed. All the other h:selectOneMenu with the values being populated hard=coded and not from database show the stored values that were set by the user previously but this h:selectOneMenu filled from database simply displays the default value as the last entry from database.
    I am stuck past 2 days
    Please help me friends :(
    My code looks like this...
    JSP:
    <td>
                   <h:selectOneMenu id="clientFirm" value="#{pmtBean.paymentTypeDesc}" required="true" >
                                  <f:selectItems value="#{pmtBean.paymentTypesList}" />
                                  </h:selectOneMenu>
                             </td>
    Bean
    private String paymentTypeDesc;
    private Collection paymentTypesList;
         public Collection getPaymentTypesList() {
              if (null == paymentTypesList) {
                   paymentTypesList = Collections
                             .synchronizedList(new java.util.ArrayList());
              } else {
                   paymentTypesList.clear();
              try {
              CashwebDAO dao = CashwebDAO.getInstance();
              StringBuffer where = new StringBuffer();
              where.append(" where payment_type = '");
              where.append("WT");
              where.append("'");
              System.out.println(" INSIDE getPaymentTypesList paymentType ---------" );
              dao.setupPaymentTypes(new CashwebDAOBridgeAdapter() {
                   public void processPaymentTypes(ResultSet rs) throws SQLException {
                        System.out.println(" INSIDE processPaymentTypes ---------");
                        System.out.println(" <><><><><><><><> getPaymentTypeType ---------" +getPaymentTypeType());
                        String finalPaymentType;
                        //paymentTypesList.add(new SelectItem(" ", " ", " "));
                        valuesMap = new HashMap();
                        while (rs.next()) {
                                  paymentTypeType = rs.getString("payment_code");
                                  setPaymentTypeType(paymentTypeType);
                                  paymentTypeDesc = rs.getString("description");
                                  finalPaymentType = paymentTypeType + " " + paymentTypeDesc;
                                  paymentTypesList.add(new SelectItem(paymentTypeDesc, paymentTypeDesc, paymentTypeDesc));          
                                            /*if(null != getPaymentTypeType() && !"null".equals(getPaymentTypeType()) && !"".equals(getPaymentTypeType())){
                             //If a Payment Type was selected, then get its desc and set the default
                             finalPaymentType = paymentTypeType;
                             paymentTypesList.add(new SelectItem(finalPaymentType, finalPaymentType, finalPaymentType));
              }, where);
         } catch (Exception exc) {
              MasterBean.log("Exception getting Payment Types List.", exc);
         return paymentTypesList;
         public void setPaymentTypesList(Collection paymentTypesList) {
              this.paymentTypesList = paymentTypesList;
         public String getPaymentTypeDesc() {
              return paymentTypeDesc;
         public void setPaymentTypeDesc(String paymentTypeDesc) {
              this.paymentTypeDesc = paymentTypeDesc;
    faces-config
         <managed-bean>
              <managed-bean-name>pmtBean</managed-bean-name>
              <managed-bean-class>com.daiwausa.cashweb.jsf.mbeans.PaymentBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         <managed-property>
    <property-name>paymentTypeDesc</property-name>
    <property-class>java.lang.String</property-class>
    <value>Margin Excess - 01</value>
         </managed-property>
         </managed-bean>     
    Thanks in advance,
    Ruhi

    Do you still have the problem?

  • No case for some selected values

    Hi, I need some help on create VI model.
    I need create model shown on Pic. 1.png, but I have problems with case structure, it report "Case Structure: No Case for Some Selector Values".
    P. S. Sory for bad English 
    Attachments:
    Pic. 1.png ‏51 KB
    DAC 8 bit.vi ‏49 KB
    zavd5.vi ‏33 KB

    Hi Orochimarko,
    your uploaded picture is not the same as the VIs you also uploaded. Atleast when opening them with LV2011 they differ from the pic...
    The case structure in your VI only has one case ("True"), but there is no False-case. So you get the error "no case for some values"...
    Btw.  both VIs are crowded with Rube-Goldbergs. Even considering the old LV version they are saved with wouldn't allow for such bad programming behaviours...
    @V-F:
    What's the sense of making the only case of that case structure a "default" one? What's the sense of that case structure at all???
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Custom Flag field show's blank value by default instead of yes or no

    Hi TechNet users.
    I see this behaviour in a number of my environments (RTM, CU April, ProjectOnline). I have a Flag custom field on task level, these should alway's have a value (No or Yes).
    So I create a Project schedule using the browser and add some auto scheduled tasks by just filling in the taskname column. I can view the flag field being populated with a No. Now I publish this project and check it in to the server.
    If I now look at that new project schedule using the PWA interface and I do not edit the project but just view the schedule with that flag column I just see a blank cell with the new task.
    If I edit the project and Manually change the flag field to say No and publish/check in the project the value is correctly displayed.
    But is this by design? To my knowledge a flag field always have a "No" value by default and should be "No" already when I just fill in the task name field. I think this is something the Schedule webpart on PPM doesn't do correctly? Can
    any of you reproduce the situation?

    Hello Erik
    Until you choice a value, the value is NULL.
    cheers!
    Michael Wharton, MVP, MBA, PMP, MCT, MCTS, MCSD, MCSE+I, MCDBA
    Website http://www.WhartonComputer.com
    Blog http://MyProjectExpert.com contains my field notes and SQL queries

  • How to display selected value in MessageChoice

    HI,
    I have a messageChoice on my Update screen. I need to display the selected value when the user comes to update the data on the screen. In the Process Request when i am printing the stmt
    System.out.println("The type of bean is PortletItemID::"+webBean.findIndexedChildRecursive("PortletItemID"));
    The output is The type of bean is PortletItemID:: OAFormValueBean
    How can i set the value that is coming from database in order to show the selected value in the message choice when the user is coming to the screen for updating the data.
    Thanks,
    Mohammadi

    Hi Tapash,
    In my case, i have mentioned the value in picklist View Definition ,picklist display attribute and picklist Value attribute. Where should i be providing my database value so that i can compare and display it as selected value.
    Thanks,
    Mohammadi

  • Prerequisites for multi selection value help

    Hi everyone,
    a couple of blogs and forum entries show multi selection value helps in VC. I, on the other hand, have so far been unable to do this. The only option I get in the first step of the value help wizard is the "single selection" type. Even if I start off with a blank form view and add a text input field I cannot choose anything apart from a single selection value help. Is there something I am completely missing? I stumbled upon a note bringing this into connection with OLAP source systems, but I can't quite see why this should change anything since the source system is not selected until step 2 of the wizard.
    Any idea on this? Thanks a lot,
    Tilman

    Hi Mario,
    thanks for the hints, I got it working now, regardless of whether you use an OLAP source system, variables or the respective input port, though. It seems to suffice to connect the query directly to a form view to get the additional options. My problem was then that I had a form view connected to a nested iview. I should be able to connect it to both a query and the iview, though.
    Thanks for your help,
    Tilman

  • Getting selected values from selectManyChoice component inside valueChangeListener

    Hwo do I get the selected values from the selectManyChoice component inside the valueChangeListener.
    The API docs for valueChangeEvent.getNewValue() show the return type as java.lang.object. This is good for single value what does it return in case of multiple values.
    My drop down has string values so I am expecting a set of string values.

    JDev - 11.1.2.3
    public void onRegionSelect(ValueChangeEvent event) {
    event.getComponent().processUpdates(FacesContext.getCurrentInstance());
    if (!PhaseId.INVOKE_APPLICATION.equals(event.getPhaseId())) {
    event.setPhaseId(PhaseId.INVOKE_APPLICATION);
    event.queue();
    } else {
    List<Object> values = Arrays.asList(event.getNewValue());
    System.out.println("Value changed ==>> "+values.size());
    DCBindingContainer dc =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iter = dc.findIteratorBinding("RegVO1Iterator");
    ViewObject vo = iter.getViewObject();
    StringBuffer regions = new StringBuffer();
    for(Object index : values){
    String iIndex = (String)index;
    Row row  = vo.getRowAtRangeIndex(Integer.parseInt(iIndex));
    regions.append((String)row.getAttribute("Region")+",");
    String reg = regions.toString();
    if(reg.endsWith(","))
    reg = reg.substring(0,reg.lastIndexOf(","));
    System.out.println(reg);

  • [SOLVED] - Clear SelectManyChoice selected values

    I am using JDeveloper 11.1.1.3.
    I have a selectManyChoice on multiple pages throughout my app. Some selectManyChoice utilize the same Iterator.
    Scenero 1 :
    I go to a page A, select values from the selectManyChoice drop down, and click a commandButton to execute code in the backing bean (to iterate over the selected values and build a whereClause).
    I then navigate to page B (which utilizes the same Iterator). The selectManyChoice drop down, on Page B, has the same values checked that were checked on page A.
    Scenero 2 :
    If I select values on page A and do not click the commandButton, then the values are NOT checked when I navigate to page B.
    How do I clear checked values in a selectManyChoice drop down?
    Edited by: Kennith B on Mar 16, 2011 12:17 PM
    Edited by: Kennith B on Mar 16, 2011 12:17 PM

    I was nulling out the selected values using the setValue() on the component; however, the selected values were still being displayed on the screen. To actually null out and make the selected values disappear from the screen , I had to set the value binding of the selectManyChoice (#{bindings.Category.inputValue}) to null. The code is below:
    <b>Code in JSFUtils</b>
        public static void setExpressionValue(String expression,
                                              Object newValue) {
            FacesContext ctx = getCurrentFacesContext();
            Application app = ctx.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();           
            ELContext elContext = ctx.getELContext();                  
            ValueExpression valueExp = elFactory.createValueExpression(elContext, expression, Object.class);
            valueExp.setValue(elContext, newValue);
    }<b>Code in backing bean</b>
      public void doClear_action(ActionEvent actionEvent) {
        JSFUtils.setExpressionValue("#{bindings.Category.inputValue}", null);
      }<b>Code in JSPX</b>
                          <af:selectManyChoice value="#{bindings.Category.inputValue}"
                                               label="Category"
                                               binding="#{backingBeanScope.backing_reports_openDispatchRequests.smc1}"
                                               id="smc1"
                                               contentStyle="width:800.0px;"
                                               valuePassThru="true">
                            <f:selectItems value="#{bindings.Category.items}"
                                           binding="#{backingBeanScope.backing_reports_openDispatchRequests.si1}"
                                           id="si1"/>
                          </af:selectManyChoice>
                          <af:commandButton text="Clear"
                                          binding="#{backingBeanScope.backing_reports_openDispatchRequests.cb3}"
                                          id="cb3"
                                          actionListener="#{backingBeanScope.backing_reports_openDispatchRequests.doClear_action}"/>Also, the value binding needs to be initialized on page load when switching between pages that utilize the same Iterator . When values are selected and the clear button is not clicked, then the values will be displayed on all pages that utilize that Iterator.
    To correct this, the following code needs to be added to the accessor of the selectManyChoice component:
    public RichSelectManyChoice getSmc1(){
        JSFUtils.setExpressionValue("#{bindings.Category.inputValue}", null);
    }Edited by: Kennith B on Mar 16, 2011 12:39 PM
    Edited by: Kennith B on Mar 16, 2011 1:01 PM

  • Is there a way to hide some reports based on the selected values in prompt.

    Hi Experts,
    Is there a way to hide some reports based on the selected values in prompt.
    For ex. if a year is selected in the prompt then the report should display year wise report.
    If a year and half year both are selected in the drop down from prompt section then 2 reports should come.. One for year wise and another for half year wise.Kindly look into this.
    Regards
    Ashish

    Hi,
    Use presentation values in prompts for year,half,qtr and month.Example- For year-y is presentation variable in the same way for halfyear-h,qtr-q and month-m.
    create four intermediate reports.Example-Report r1 with only year column,r2 with only halfyear column,r3 with qtr column and r4 with month column.
    Make column in each report(r1,r2,r3,r4) is equal to their presentation variables(y,h,q,m).
    Use four sections.
    Section1-Place report that should come when only year.
    section2-Place report that should come for year and halfyear.
    Section3-Place report that should come for year,halfyear and qtr.
    Section4-Place report that should come for year,halfyear,qtr and month.
    Apply guided navigation for each section selecting guided navigation-
    For section1-
    properties->Guided navigation->check this Reference Source Request(Yes)->select report r1(year)->check this Show Section(if request returns row)
    In the same way do for remaining section2(select r2),section3(select r3) and section4(select r4)
    Thanks,
    Srikanth
    http://bintelligencegroup.wordpress.com/

  • How to get the index of selected values in SelectManyChoice...

    How to get the index of selected values in SelectManyChoice... the value which i get is coming when i submit the value second time

    By using the given code i get the value of the selected indices, but problem here is i get the value when it get submits at the second time... First time the length of that int array is 0.
    Second time it shows the value two times (i.e) First time submitted value and the second time submitted value. After that it works fine.. I have problem while clicking first time only..
    The Following error also raises.. One multiselect is dependent on other multiselect.
    DF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
    java.lang.ArrayIndexOutOfBoundsException: 6
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.findObjectFromIndex(FacesCtrlListBinding.java:334)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.getInputValue(FacesCtrlListBinding.java:199)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2416)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.internalGet(JUCtrlListBinding.java:3717)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlListBinding.internalGet(FacesCtrlListBinding.java:500)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)

  • How can we show selected values of a tree in a selectmanylistbox

    how can we show selected values of a tree in a selectmanylistbox??

    Hi,
    you can use a reference to a RichTree component instance and call  getSelectedRowKeys on it. The selected rowKey then allow you to look-uo the nodes in the tree. You can use a custom selection listener on the tree to be notified about each selection. There also is an API for the de-selected row keys, which you need to remove nodes from the select many list. The select many list will get its data from a managed bean in view scope (so the values survive subsequent requests)
    Frank

  • Variable entry screen for query doesnt show selection values.

    Hi,
    I've created a query with date varibale Quarter From-To. When i execute this query, the variable entry screen pops up but when i try to select values just shows ??? and not the text.
    if i run the same query in RSRT the variable entry screen pops up but here the selection values are present for me to choose from.
    can anyone tell why the values arent showing when the query is executed.
    Thanks

    yes, it seems to be a problem with NetWeaver BI BEx Java Web runtime as it works in RSRT and web analyzer. Found a note on marketplace note 125357 - No values displayed for attributes in input help but this did not resolve issue.
    A call has been raised now as it seems to be a product fault

  • Show selected value from multi-selected parameter in crystal report

    Dear Experts!
         i would like to ask how to catch selected value from multi-selected parameter to show in report header section.
    Thanks in advance.

    Hi Dara,
    If this is a string prompt then you could simply create a formula with this code and place it on the report header:
    Join({?Prompt name},", ")
    -Abhilash

  • Multi-select lists, their return values and showing their display value

    I have a multi select list which is dynamic. The display and return values are pulled from a table where the return value is the Primary Key.
    When people select a few options, the value is stored in session state as 11:12:13 (etc...). From here, I run these numbers through a process which takes a report ID and the multi-select string, and saves individual rows as Report_id, individual multi select value until there are no more multi select values.
    This is great, they're tied in as a foreign key to the LOV lookup table, and they are easily search able.
    I have trouble where I want to list a report's entire multi-select list. I have a function combine the numbers with a : in between them and RTRIM the last one, so I have an identical string to what a multi-select table uses. 11:12:13 (etc..)
    When I assign it to display as an LOV in a report, it just shows the 11:12:13 instead of listing out the values.
    Single number entries, where someone only selected one option in a multi select, display fine.
    Am I doing this wrong?

    Scott - you're right on the money. I did this initially because I thought assigning an LOV display value to a report column would yield the results I wanted.
    I want to do this without referring to the original table... meaning I don't want a function to have to go out and get the names, I'd like my LOV assignment to do it. This saves headache of having to change something in 2 places if it ever changed.
    Am I not going to be able to do this?
    I created a test multi-LOV page, it doesn't work with original(not processed in my function) LOV assignments either, unless you only select one.

  • How can add some suggested value to a propert on a Declarative Component,

    how can add some suggested value to a propert on a Declarative Component?

    kenyatta,
    Where you want to add the value ?
    If you want put some UIComponent(Value) to your declarative Component than follow my blog ( http://jneelmani.blogspot.com/2009/02/11g-how-to-create-declarative-component.html ) and add your value in STEP-5.
    You can watch live-demo at http://www.oracle.com/technology/products/jdev/viewlets/viewlet.html
    --Neelmani Jaiswal
    Edited by: Neelmani Jaiswal on Mar 23, 2009 11:11 AM

Maybe you are looking for

  • Satellite A300-1ND - can I use SATA2 HDD?

    Hi. Is there reason to upgrade A300-1NDs SATA HDD to SATA2 HDD? I know that SATA2 is faster and is backward compatible with SATA, but dont know if laptop would be able to use full speed of SATA2. thx all

  • I cannot open HELP in Lightroom 3.6.

    When I go to Lightroom HELP it will not open. I have been able to open it in the past without any problem. I'm using Windows XP and Lightroom 3.6. If I have changed anything I'm not aware that I did that. Any suggestion greatly appreciated.

  • Package sun.jdbc.rowset does not exist

    Hi, I am tryng to use a CachedRowSet in a JSP page. I got rowset.jar from sun and I put it in my classpath. When I try to import sun.jdbc.rowset I have the message "package sun.jdbc.rowset does not exist". Please, could someone help me? Tanks, Celso

  • CAN'T REGISTER MY MACBOOK AIR 11". INVOICE LOST.

    HI, my attempt to register my MACBOOK AIR 11" (Late 2010 version ) failed becaiuse I am unable to provide the date of acquisition as I lost the Invoice. How to do ? any solution. Thanks.

  • 10.5.7 finder text disappeared

    I installed 10.5.7 this morning. Worked great, except now i have no text beneath the icons on my desktop, no text above the icons in the dock, and no text anywhere in finder, just icons. makes finding the right file a mite trickier! any thoughts?