How to refresh the list of select one choice which is inside a table?

Hello I am using Jdeveloper Version 11.1.2.1.0.
The table is a normal table that is made to look like a treeTable.
For some rows are or can be parents with Parent_vo_group_id = null and other are children with parent_vo_group_id = vo_group_id of the parent...
If a children changes its parent_vo_group_id to null it can become a parent as well.
I am having a select one choice inside a table column. The list comes from the same table with column Name:
<af:table value="#{bindings.VoGroupAdminView2.collectionModel}" var="row"
                                                  rows="#{bindings.VoGroupAdminView2.rangeSize}"
                                                  contentDelivery="immediate"
                                                  visible="#{bindings.VoGroupAdminView2Iterator.currentRow != null}"
                                                  fetchSize="#{bindings.VoGroupAdminView2.rangeSize}"
                                                  partialTriggers="::soc1" styleClass="AFStretchWidth"
                                                  rowBandingInterval="0" editingMode="clickToEdit"
                                                  binding="#{adminGroupManagementBean.groupTable}"
                                                  selectionListener="#{adminGroupManagementBean.groupSelectionListener}"
                                                  rowSelection="single" id="t5">
                                            <af:column sortProperty="#{bindings.VoGroupAdminView2.hints.Name.name}"
                                                       sortable="false" styleClass="columnData"
                                                       headerClass="tableHeader"
                                                       headerText="#{bindings.VoGroupAdminView2.hints.Name.label}"
                                                       id="c1">
                                                <af:inputText value="#{row.bindings.Name.inputValue}"
                                                              requiredMessageDetail="Please enter a group name"
                                                              label="#{bindings.VoGroupAdminView2.hints.Name.label}"
                                                              required="true" id="it7" immediate="true" autoSubmit="true"
                                                              columns="#{bindings.VoGroupAdminView2.hints.Name.displayWidth}"
                                                              maximumLength="#{bindings.VoGroupAdminView2.hints.Name.precision}"
                                                              shortDesc="#{bindings.VoGroupAdminView2.hints.Name.tooltip}"
                                                              contentStyle="#{row.ParentVoGroupId eq null? 'font-weight:bold' : 'padding-left:20px'}"
                                                              valueChangeListener="#{adminGroupManagementBean.groupNameChangeListener}"
                                                              partialTriggers="soc2">
                                                    <f:validator binding="#{row.bindings.Name.validator}"/>
                                                </af:inputText>
                                            </af:column>                                   
                                            <af:column sortProperty="#{bindings.VoGroupAdminView2.hints.ParentVoGroupId.name}"
                                                       sortable="false" styleClass="columnData"
                                                       headerClass="tableHeader"
                                                       headerText="#{bindings.VoGroupAdminView2.hints.ParentVoGroupId.label}"
                                                       id="c4">
                                                <af:selectOneChoice value="#{row.bindings.ParentVoGroupId.inputValue}"
                                                                    label="#{row.bindings.ParentVoGroupId.label}"
                                                                    simple="true" immediate="true"
                                                                    required="#{bindings.VoGroupAdminView2.hints.ParentVoGroupId.mandatory}"
                                                                    shortDesc="#{bindings.VoGroupAdminView2.hints.ParentVoGroupId.tooltip}"
                                                                    id="soc2" autoSubmit="true"
                                                                    unselectedLabel="&lt;null&gt;"
                                                                    valueChangeListener="#{adminGroupManagementBean.parentIdValueChangeListener}"
                                                                    visible="#{row.bindings.ChildrenCount.inputValue eq 0 ? true : false}">
                                                    <f:selectItems binding="#{adminGroupManagementBean.selectOneChoiceList}"
                                                                    value="#{row.bindings.ParentVoGroupId.items}"
                                                                   id="si2"/>
                                                </af:selectOneChoice>
                                            </af:column>
                                        </af:table> My select one choice uses the same iterator as the table.
<iterator Binds="VoGroupAdminView2" RangeSize="-1" DataControl="AppModuleDataControl"    id="VoGroupAdminView2Iterator"/>The table uses this view called VoGroupAdminView:
Select t1.vo_Group_id,     
       t1.name,
       t1.Vehicle_Owner_Id,
       t1.Graphical_Symbol,
       t1.Lm_Comment,
       t1.Parent_Vo_Group_Id ,
       decode (t2.children_count, null, 0, t2.children_count) as children_count
       from
(SELECT VoGroup.vo_Group_id,     
       VoGroup.name,
       VoGroup.Vehicle_Owner_Id,
       VoGroup.Graphical_Symbol,
       VoGroup.Lm_Comment,
       VoGroup.Parent_Vo_Group_Id
  FROM VO_GROUP VoGroup
START WITH VoGroup.Parent_Vo_Group_Id IS NULL
CONNECT BY VoGroup.Parent_Vo_Group_Id = PRIOR VoGroup.Vo_Group_Id
order SIBLINGS by VoGroup.name) t1,
(select parent_vo_group_id, count (parent_vo_group_id) as children_count from vo_group
group by parent_vo_group_id) t2
where t1.vo_group_id = t2.parent_vo_group_id (+)the ParentVoGroupId attribute has list of values from this view object called VoGroupAdminLov:
SELECT
    VO_GROUP.NAME,
    VO_GROUP.VEHICLE_OWNER_ID,
    VO_GROUP.PARENT_VO_GROUP_ID,
    VO_GROUP.VO_GROUP_ID
FROM
    VO_GROUP
WHERE  VO_GROUP.PARENT_VO_GROUP_ID is null
and VO_GROUP.VO_GROUP_ID <> ?
order by  VO_GROUP.NAMEI want to refresh the list of values in the select one choice everytime when i add a new row in the table, delete row in the table or change the value of select one choice component.
What I have tried:
    public void parentIdValueChangeListener(ValueChangeEvent valueChangeEvent) {
        this.setValueToEL("#{row.bindings.ParentVoGroupId.inputValue}", valueChangeEvent.getNewValue());
        BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding voGroupAdminIterator = (DCIteratorBinding)bc.get("VoGroupAdminView2Iterator");
        Key selectedGroupKey = voGroupAdminIterator.getCurrentRow().getKey();
        AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
        am.getTransaction().postChanges();
        am.getVoGroupAdminView2().executeQuery(); //refresh the table view object;
        am.getVoGroupAdminLov1().executeQuery(); //refresh the list of values view object
        voGroupAdminIterator.invalidateCache();  //remove the cache of the iterator
        voGroupAdminIterator.setCurrentRowWithKey(selectedGroupKey.toStringFormat(true)); // set the selected row again.
        RichSelectOneChoice soc =
            (RichSelectOneChoice)FacesContext.getCurrentInstance().getViewRoot().findComponent(":pt1:t5:soc2");
        AdfFacesContext.getCurrentInstance().addPartialTarget(soc);
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.groupTable);    
    }When i am adding a new row to the table its select one choice list is refreshed but only for the new row. The rest rows have not updated list of values for their select one choice components.
    public String addGroupButtonAction() {
        AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
        ViewObjectImpl voGroupAdminView = am.getVoGroupAdminView2();
        Row newRow = voGroupAdminView.createRow();
         newRow.setNewRowState(Row.STATUS_INITIALIZED);
        voGroupAdminView.insertRowAtRangeIndex(0, newRow);
        am.getTransaction().postChanges();
        return "null";
    }Edited by: 897833 on Mar 19, 2012 9:07 AM

I made a button to refresh the value of select one choice and it doesn't work yet.
So I just move one of the
    public String refreshParentIdSOCButtonAction() {
        BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
        DCIteratorBinding voGroupAdminIterator = (DCIteratorBinding)bc.get("VoGroupAdminView2Iterator");
        Key selectedGroupKey = voGroupAdminIterator.getCurrentRow().getKey();
        AppModuleImpl am = (AppModuleImpl)ADFUtils.getApplicationModuleForDataControl("AppModuleDataControl");
        am.getTransaction().postChanges();
        am.getVoGroupAdminView2().executeQuery();
        am.getVoGroupAdminLov1().executeQuery();
        voGroupAdminIterator.invalidateCache();
        voGroupAdminIterator.setCurrentRowWithKey(selectedGroupKey.toStringFormat(true));
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.parentIdSelectOneChoice);  //refresh the binded SOC as you said
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.parentIdSelectOneChoiceList); //refresh the binded list even
        AdfFacesContext.getCurrentInstance().addPartialTarget(this.groupTable); //refresh the table it is in;
        return null;
    }Edited by: 897833 on Mar 23, 2012 2:58 AM

Similar Messages

  • How to prevent flushing out the value in Select one choice on page refresh

    Hi All,
    I am using Jdeveloper 11.1.1.4.0. In my page fragment I am using select one choice ADF component. I have a requirement that unless one fills all details on 1st fragment he/she cant move to next fragment.
    So validations are there to check that mandatory fields filled or not. If not than I am showing message to fill the mandatory fields when user press on "Review " Button.
    But the value in select one choice is getting cleared while other input values like date fields or input text are not(The input information stored in static variables)
    How can I prevent flushing out of select one choice value .
    Thanx
    kanika

    Kanika,
    You don't have value property set due to which the selected value doesn't get stored and looses its value on refresh.
    When you drop attribute as select one choice on page, the value property get bounded to some value, did you remove it intentionally?
    If so, can you try keeping the property and see if you see the intended behavior?
    Sireesha

  • How to get a value from  select one choice (created by static view)

    Hi,
    Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
    Edited by: 874530 on Jul 22, 2011 11:05 PM

    Thnax for your quick reply..
    Iam using 11.1.1.3.0 version.
    My code is
    <af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
    label="#{bindings.DenialLevel.label}"
    required="#{bindings.DenialLevel.hints.mandatory}"
    shortDesc="#{bindings.DenialLevel.hints.tooltip}"
    id="soc2"
    valuePassThru="true"
    binding="#{backing_denialcomment.denialLevelList}">
    <f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
    </af:selectOneChoice>
    and in bean am not able to get value of attribute .Iam getting only index...

  • How to get a value for Select One Choice in the backing bean

    Friends,
    Does any one have any idea, how to get the value of a selected item value from the Select One Choice component in the backing bean iin valueChangeListener method. Right now I am always getting the sequence of the selected item, instead the actual selected value. I tried using 'ValuePassTrhough=true' also.. but didn't help
    Below is the my code snippet
    <af:selectOneChoice value="#{bindings.country.inputValue}"
    required="#{bindings.country.hints.mandatory}"
    shortDesc="#{bindings.country.hints.tooltip}"
    id="soc1" autoSubmit="true" valuePassThru="true"
    valueChangeListener="#{pageFlowScope.Bean.onValueChange
    <f:selectItems value="#{bindings.country.items}" id="si2"/>
    </af:selectOneChoice>
    Thanks in advance.

    check my other post at Re: Pass data from a variable to another page

  • How to refresh the list of SCs?

    Hello All,
    Here's what I have done so far.
    -Installed NWDI.
    -Ran the configuration wizard which created MYCOMPONENT, MYPRODUCT and SANDBOX track.
    -When I go to SLD, I see that MYCOMPONENT has 3 "BuildTime" "Dependencies" 1) DI BUILD TOOL 7.0 2) SAP J2EE Engine 7.0 3) SAP JAVA TECH SERVICES 7.0.
    - When I go to my CMS Track, landscape configurator, I see "MYCOMPONENTS" listed in the table of "Developed Software Components"
    - When I go to CMS - Transport Studio - I see the 3 SCAs in the CHECKIN tab and I checked them in and later IMPORTed to Development. Import finished fine.
    Now, my goal is to load the CRM Java Components 7.0, CRM Java Web Components 7.0, SAP Shared Java Components 7.0, SAP Shared Web Java Components 7.0, Tealeaf and CRM IPC Mobile into the SANDBOX track so that I can view the source code of the CRM application through NWDS.
    I have all the SCAs downloaded. I imagine I should go to SLD, Components and add the above "new" dependencies to MYCOMPONENT. When I try to do that now, I get a screen where I have to search for the components and when I search for "shared", I get search results showing version 5.0 of the Shared components, even though I have copied them onto the inbox folder folder (I only see the older three SCs in the track Checkin and not the newly downloaded ones).
    As you know I downloaded version 7.0. But How can I load them up so that the list shows the newly downloaded ones?
    Please help!
    Kiran

    Satya,
    Thanks for answering.
    I guess my question is two folds -
    1) How do I make the newly downloaded (now on my desktop) SCAs to appear in the SLD > Components so I can add them as dependencies for MYCOMPONENT.
    After downloading the SCAs, what do I do with them? I probably should upload them somewhere? or copy them to some area so SLD is aware? something else, may SDM?
    At this point, when I go to SLD > Components > pick MYCOMPONENT and try to add dependencies, I see a lot of CRM stuff in the search table - but not 7.0.
    2) If I can accomplish the above task, I am sure as per the note you mentioned, they would appear under CMS > Transport Studio > CheckIn tab.
    I hope I am clear in explaining what I am looking for.
    Thank you Satya.
    Kiran

  • How to get the list of Infocube/DSO in which one nav-attr is used

    Hi all,
    i have a requirement to find the list of all infocubes and DSO in which a particular navigational attribute  say:xxx_yyy   [i have list of 50 nav attr for which i have to do this] is used.
    i need ur help on this.
    i need the distinct list of infocubes and DSO

    guys, 80% of my problem got solved.
    here is the solution list as u all have suggested and that i have checked it also.
    RSDCUBEIOBJ     - infocube list for any nav-attr 
    RSDODSOATRNAV  - DSO list for any nav-attr
    ODSOIOBJ. - DSO list for any infoobj
    but in these tables, one thing i observe is that each infocube/DSO name is repeated multiple times. why is that? from where it populate?

  • How to get the list of all process order which are settled?

    Hello Friends,
    Is there any  standard report available to get the list of all settled  Process Order or  Production order?
    Thanking all of you in advance.
    Regards,
    Jitendra

    Hi,
    You can the below standardreports for knowing the list of Settled Process Orders :
    1. Use Tcode : COOIS and in the selection fields provide the Process Order Type, Plant and System Status As " SETT" and execute the same . System will list all the Process Orders which were settled so far.
    2. Use Tcode : CO26 with selection fields as above.
    Hope this will suffice your reqt.
    Regards
    radhak mk

  • How do I get an LOV / Select One Choice label / Display Attribute in bean?

    Guys and Gals,
    Using Studio Edition Version 11.1.1.3.0
    I must have read and tried to implement 15/20 different threads looking for the answer to this question and didn't find anything suitable so I thought I'd post the code I finally cobbled together. The closest thing I got was ( http://blogs.oracle.com/jdevotnharvest/2010/11/how-to_get_the_selected_afselectonechoicelabel.html ) but it gave me class casting errors. Hopefully this post will help others along the way.
      public void onCategoryChangeListener(ValueChangeEvent valueChangeEvent)
        RichSelectOneChoice rsoc = (RichSelectOneChoice) valueChangeEvent.getSource();
        List childList = rsoc.getChildren();
        Integer newVal = (Integer) valueChangeEvent.getNewValue();
        Integer oldVal = (Integer) valueChangeEvent.getOldValue();
        System.out.println("Old: " + oldVal + ", New:" + newVal);
        String newCategory = "";
        String oldCategory = "";
        for (int i = 0; i < childList.size(); i++)
          UISelectItems items = (UISelectItems) childList.get(i);
          List children = (List)items.getValue();
          for (int j = 0; j<children.size(); j++)
            SelectItem item = (SelectItem)children.get(j);
            System.out.println(item.getLabel());
            System.out.println(item.getDescription());
            System.out.println(item.getValue());
            System.out.println();
            if (newVal.equals((Integer) item.getValue()))
              newCategory = item.getLabel();
            if (oldVal.equals((Integer) item.getValue()))
              oldCategory = item.getLabel();
        updateNotes = "category changed from " + oldCategory + " to " + newCategory;
        System.out.println(updateNotes);
      }Output
    Old: 7, New:13
    null
    0
    Castings
    null
    1
    Coil Springs
    null
    2
    Finished Goods
    null
    3
    Hardware Bags
    null
    4
    Instruction Packets
    null
    5
    Kit Boxes
    null
    6
    Masterpacks
    null
    7
    Operations
    null
    8
    Packaging Supplies
    null
    9
    Parts
    null
    10
    Powdercoated Brackets
    null
    11
    Raw Brackets
    null
    12
    Raw Goods
    null
    13
    Raw Shock Absorbers
    null
    14
    Services
    null
    15
    Shocks Absorber Kits
    null
    16
    Spacers
    null
    17
    U-Bolts
    null
    18
    category changed from Masterpacks to Raw Goods

    Hahahahaha ..... sigh.
    Thanks Amit. That works perfectly. Here's my slightly modified code following your directions.
        Integer oldValue = (Integer)valueChangeEvent.getOldValue();
        Integer newValue = (Integer)valueChangeEvent.getNewValue();
        List<SelectItem> silist = (List<SelectItem>) getCategorySOCItems().getValue();
        String oldCategory = silist.get(oldValue.intValue()).getLabel();
        String newCategory = silist.get(newValue.intValue()).getLabel();
        System.out.println("category changed from " + oldCategory + " to " + newCategory);I should have just broken down and asked the forums two days ago. But thank you again. Your example was exactly what I was looking for and eventually ended up hacking together.

  • How to get the global location of a component which is inside some containers.....

    Hai,
    I have a texInput component,which is placed inside containers like following
    1) Bordercontainer start....
    2) Vbox start...............
    3) Hbox start..............
    ..........Here My TextInput.........
    3) Hbox end..............
    2) Vbox end...............
    1) Bordercontainer end....
    Now after initialization i want to get the location of my textInput with respect to Application.
    I tried with with localToGlobal(PointofLocalCoridnate), then it is not giving the correct location of textInput..Please suggest me....
    Thank you...

    What are you calling localToGlobal on?  It should be on the parent of the TextInput itself

  • ADF Dependent select one choice list

    hi all
    i have two lists in my page, and the second one takes value from the first, but it is not working, the second list is empty always whatever i select in the first one.
    i have searched many threads and it is not working. i also did the steps in the page http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html#t2
    this what i have did in details:
    first list : LevelComboVO
    select distinct group_level from mrcps_group_link
    second list: GroupComboVO
    select large_group_seq, group_level, symbol
    from mrcps_group_link
    where group_level = :selectedLevel
    then i made a bind variable for the second list GroupComboVO named selectedLevel
    for the first list LevelComboVO i made the following:
    press plus on the ListOfValues:GroupLevel and for the list data source i have made new one for GroupComboVO and choosen the list attribute groupLevel and for ui hent i chosed groupLevel
    then i have tested the AM but no data returned for GroupComboVO
    please help

    first i have done the 2 view objects and the corresponding two select one choice list
    for the first list i have made a managed bean for valueChangedListener -- > #{GrouplLevelBean.passLevel}
    and i have put code as you told me :
    package mrcps.view;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.jbo.ViewObject;
    public class GrouplLevelBean {
    public GrouplLevelBean() {
    public void passLevel(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    DCIteratorBinding testListIter1 = getItrtBindings("GroupComboVOObj1Iterator");
    ViewObject vo1 = testListIter1.getViewObject();
    vo1.setNamedWhereClauseParam("selectedLevel", valueChangeEvent);
    vo1.executeQuery();
    getItrtBindings( is giving me a red underline indication that method not found
    Edited by: user604057 on Apr 3, 2009 3:27 PM

  • How to get the dialog of select ODBC source

    how to get the dialog of select ODBC source which system provide.

    JNI.
    Or buy/find a library that does it for you (using JNI.)

  • Select One Choice shows 25 items I need about 100.

    Hi, I'm new to Jdeveloper 11g and ADF.
    I'm building an application that requires "select one choice", "Select Many Shuttle" and some others, but they only show 25 items. If I add a "Next Set" button I can retreive the next set of 25 items, but I don't like it this way. I would like that the controls display all the items at once (about 70 items).
    Thanks,
    Mike.

    Hi Mike,
    You can implement the suggestions given by Timo and Puthanampatti for fetching all the rows and display in list. However, having more items in the list would make the selection of an item from the list difficult for the users. Instead, you might want to implement List Of Values instead of a Select one choice. List Of Values has a search capability inbuilt which would help the users to narrow down the selection, instead of scrolling through all the records in select one choice.
    To implement that, instead of setting the list type to select one choice (in your model - for the attribute for which you've defined list of values), change it to input text with list of values.
    HTH.
    -Arun

  • Inserting in table but ADF Select One Choice data is lost

    hi I'm using Jdev 11g
    I've fusion web App
    which handling purchase Invoices
    contains a form for master table purchase
    and a af:table for Invoice detatils table purchase_items
    I'm tring to insert data in af:table detail table which contain ADF Select One Choice. for produc names
    and text box for both cost and quantity and groovy based colum for the amount of (cost * quantity)
    the property auto submit for both columns cost and quantity is set to true
    to update the amount value when user makes any changes on the cost or quantity
    my Problem that
    when I Insert new record and I select value from the product column( Select One Choice )
    and when i type the cost or the quntity I loos the selected value before in the product ( Select One Choice )
    and this is not accebtable for the end user to select the product tow times
    any one could help about this
    thanks

    I'm sorry but it seems it is have solution
    I test it agin with auto submit for cost and quntity set to true
    and still losing data in ADF Select One Choice
    there are no coding used in my App
    and ther are no value on value change listener on cost or quantity
    i think it hapen because i have mandatory fileds like product and cost
    it's firing validation of filed is requierd
    Edited by: user451648 on 11/03/2013 11:58 م

  • How can i show the first item in the list as selected item

    Aslam o Alikum (Hi)
    Dear All
    How can i show the first item in the list as selected item when user click on the list. Right now when user click the list the list shows the last item in the list as selected or highlighted. Furthermore if the list item have large no of value and a scroll bar along with it then the list scroll to last item when user click it with mouse. I want that when user click the list item with mouse list should show the first item as highlighted.
    Take Care
    Allah Hafiz

    Hi!
    You can set list "initial value" using When-Create-Record trigger.
    I.g.
    :<Block_name>.<list_item_name> := Get_List_Element_Value('<Block_name>.<list_item_name>', 1);

  • How to refresh the filed catalog of POWL

    Hi all,
    How to refresh the field catalog of POWL?  The requirement is that the result list should meet the selection/query criteria. Even the system has executed the mehod GET_FIELD_CATALOG in feeder class, the filed catalog still keep the the original look. I have to switch to other query and then reswith back, then the field catalog changed to the new one.
    Thanks & best regards
    Julia

    Hello,
    When you refresh the query, only then it goes to the method you have mentioned.
    Also when you switch between the query, you have to do the refresh manually or there is personalization for query, On every visit of page, This option is avaible from 7.02 release.
    Best regards,R
    Rohit

Maybe you are looking for