How to set the intial value in dropdownbyindex?

Hi All,
I have a small problem for initializing the dropdownbyindex value.
I have created Dropdownbyindex and map the texts value from context value attribute here Context attribute is in inside the three nodes. how can I capture the inside value attribute and how to intialize the value.
My Context nodes are --MainNode 
                          --childnodeOne
                               --childNode2
                                    --valueAttribute.
The above way my context node strucure and I have mapped this value attribute to dropdownbyindex for this how to initilze the value.
Advance thanks.
Kris.

Hi
Assumung you have context structure as follows:
MainNode(Cardinality 1..1, Sigleton)
|_ChildNode1(Cardinality 1..1,Non Sigleton)
    |_ChildNode2(Cardinality 0..n,Non Sigleton)
        |_ValueAttribute
As you said that you have mapped the value attribute which is inside three nodes.
You can create the values as follows:
e.g.
for(int i =0;i < 5; i++)
     IChildNode2Element cn2 = wdContext.createChildNode2Element();
     cn2.setValueAttribute("VA"+i);
     wdContext.currentMainNodeElement().nodeChildNode1().currentChildNode1Element().nodeChildNode2().addElement(cn2);
This will create 5 values in the drpdown.
Now to initialize the value you can set the leadselection for the node ChildNode2:
e.g
wdContext.nodeChildNode2().setLeadSelection(3);
This will display the 4th value in the drpdown ibitially.
To get the value currently selected in dropdown you can write something like this:
wdContext.currentMainNodeElement().nodeChildNode1().currentChildNode1Element().nodeChildNode2().currentChildNode2Element().getValueAttribute());
Regards,
Ajay

Similar Messages

  • How to set the intial Value for a single radiobutton in a Radio Group

    Hi All,
    I have a radiogroup with 3 buttons. The Names of the RadioGroup are driven from a XXVO.
    3 Radion Buttons:
    * X
    * XX
    * XXX
    When the Page loads i want to make one Radio button XXX to be the default , please suggest how do i do it.
    Note : The radiobutton values are coming from VO
    Thanks

    Hi ,
    As AJ said create 3 radio buttons in ur page and assign to one radio group,,
    OAMessageRadioButtonBean appleButton3 =
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonOne21");
    appleButton3.setName("serviceAgreementGroup");
    appleButton3.setValue("RW");
    OAMessageRadioButtonBean orangeButton3 =
    (OAMessageRadioButtonBean)webBean.findChildRecursive("GroupButtonTwo21");
    orangeButton3.setName("serviceAgreementGroup");
    orangeButton3.setValue("NW");
    ---For radio button u can check in page it self.
    Regards
    Meher Irk
    Edited by: Meher Irk on Nov 23, 2010 2:47 PM

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to set the default value of an item type DATE PICKER to the day of yest

    Hi
    How to set the default value of an item type DATE PICKER to the day of yesterday ?
    Thank you very much !
    Christian.

    Hi Christian,
    Have a look at this thread Re: Default the Date Picker to Today
    It covers this issue in detail.
    Regards
    Paul

  • How to set the default value in dashboard prompt?

    Hi there,
    In my Dashboard prompt I'm getting values like:
    Mar 2010
    Apr 2010
    May 2010
    Jun 2010
    How to set the default value to the current month (Jun 2010). I don't want to use "specific value". I want to use the "SQL Result" for populating the default value.
    Appreciate your help

    hi,
    you can create a Repository variable current_month with the expression as
    select to_char(trunc(sysdate),'Mon')from dual
    and use this in the prompt "Default to" Server variable and use this repository variable.
    hope this helps.
    cheers,
    vineeth

  • How to set the Default value in the picklist and LOV

    Hi All,
    I have created a table with some of the columns as picklist and some of the columns as Lovs to insert some data into the tables as per the client requirement.
    I want to make one value as default for the picklist and one value as default for the Lov.
    Could you please let me know how can we show one value as default in the pick list or Lov.
    thanks in advance.
    jay

    can u please help how can we set the initial value dynamically with the userid
    For that i was passing the value from process Request of the lovCO by using the get user id to the vo query in the vo
    but its not giving the initial value as default dynamically depending on the user id
    could you please let me know the solution.
    Thanks
    Ajay

  • How to set the default value of selectOneChoice

    Hi All,
    I have two selectOneChoice(soc1 and soc2) in two respective pages with the same datacontrol.Now i need to set the default value of soc2 as per the value selected in soc1.
    For eg:-
    if user has selected a value in soc1 say "Bag" in the list then it should set the default value in soc2 as "Bag" when the second page loads.As both the selectOneChoice has been created using same data contol.
    How can i achieve this?
    Please suggest.

    Hi PR/Suresh,
    Thanks for your reply.
    My soc1 shows the employeeId like 100,101,102,103 but it holds the value as employeeName like Navn,Joy,Steve,Mark. I have used valuechangeevent to get the current selected value from soc1 but when i set the value in soc2 in its set property then the log says :-
    *<SimpleSelectOneRenderer> <_getSelectedIndex> Could not find selected item matching value "Navn" in RichSelectOneChoice[UIXEditableFacesBeanImpl, id=soc2]*
    My jspx page code of soc2 is :-
    <af:selectOneChoice binding="#{backingBeanScope.backing_temp2.soc2}"
    id="soc2"
    label="#{bindings.FirstName.label}">
    <f:selectItems value="#{bindings.FirstName.items}"
    binding="#{backingBeanScope.backing_temp2.si2}"
    id="si2"/>
    </af:selectOneChoice>
    and in my bean where i am accessing the value from valuechangeevent from soc1:-
    public void getValue(ValueChangeEvent valueChangeEvent) {
    BindingContext bindingContext = BindingContext.getCurrent();
    oracle.binding.BindingContainer bindings = bindingContext.getCurrentBindingsEntry();
    //for iterator name click binding tab in the jsf page
    DCIteratorBinding iter = (DCIteratorBinding) bindings.get("Employees1View1Iterator");
    int curIndex = (Integer)valueChangeEvent.getNewValue();
    Row datRow = iter.getRowAtRangeIndex(curIndex);
    String name = (String)datRow.getAttribute("FirstName");
    System.out.println("the new value is"+name);
    RequestContext requestContext = RequestContext.getCurrentInstance();
    requestContext.getPageFlowScope().put("value", name);
    and then i am setting it to the soc2 in backing bean :-
    public void setSoc2(RichSelectOneChoice soc2) {
    this.soc2 = soc2;
    RequestContext requestContext = RequestContext.getCurrentInstance();
    String val = requestContext.getPageFlowScope().get("value").toString();
    this.soc2.setValue(val);
    In this error i can predict that it is not able to find the 'Navn' in the list of soc2 because in the list it has employeeId which has corresponding value as name of that employee but how do i set the value in soc2 then.
    *<SimpleSelectOneRenderer> <_getSelectedIndex> Could not find selected item matching value "Navn" in RichSelectOneChoice[UIXEditableFacesBeanImpl, id=soc2]*
    Any ideas??
    Thanks

  • How to set the default values of the field of the context.

    Hi Experts ,
    I want to set the default value of the field of the context.
    Where and how this declaration should be done.
    Thanks in Advance.

    In the context tab of the view. Select the attribute for which you want to set the default value.it will show the properties at the bottom. set the Default value property to the value which you want to set as the default value.
    Regards
    Naresh

  • How to set the Selectonechoice Value associated with MethodAction

    Hi All,
    I am using Jdeveloper 11.1.1.5 and i have a two textbox on my page and one selectonechoice.I am fetching the values from the Master Table in the dropdown by sending the supplierVatId and SupplierPostCode and the base dataSource of the selectonechoice is my transaction table(InvoiceHeaderTable).
    My jspx page source is :-
    <af:inputText value="#{bindings.Suppostcode.inputValue}"
    binding="#{backingBeanScope.backing_parkSupplierId.it7}"
    id="it7">
    </af:inputText>
    <af:inputText value="#{bindings.Suppvatid.inputValue}"
    binding="#{backingBeanScope.backing_parkSupplierId.it8}"
    id="it8">
    <f:validator binding="#{bindings.Suppvatid.validator}"/>
    </af:inputText>
    </af:panelFormLayout>
    <af:selectOneChoice value="#{bindings.supplierid.inputValue}"
    binding="#{GeneralManagedBean.suppid}"
    id="soc1">
    <f:selectItems value="#{bindings.supplierid.items}"
    binding="#{GeneralManagedBean.suppiditems}"
    id="si1"/>
    </af:selectOneChoice>
    and this is my pageDef code :-
    <attributeValues IterBinding="InvoiceheaderView1Iterator" id="Suppostcode">
    <AttrNames>
    <Item Value="Suppostcode"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="InvoiceheaderView1Iterator" id="Suppvatid">
    <AttrNames>
    <Item Value="Suppvatid"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="getSupplierIdfromDB" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="getSupplierIdfromDB"
    IsViewObjectMethod="false" DataControl="SupplierDetailImpl"
    InstanceName="SupplierDetailImpl.dataProvider"
    ReturnName="data.SupplierDetailImpl.methodResults.getSupplierIdfromDB_SupplierDetailImpl_dataProvider_getSupplierIdfromDB_result">
    <NamedData NDName="supplierpostcode"
    NDValue="#{bindings.Suppostcode.inputValue}"
    NDType="java.lang.String"/>
    <NamedData NDName="suppliervatid"
    NDValue="#{bindings.Suppvatid.inputValue}"
    NDType="java.lang.String"/>
    </methodAction>
    <list IterBinding="InvoiceheaderView1Iterator" id="supplierid"
    DTSupportsMRU="true" StaticList="false"
    ListIter="getSupplierIdfromDBIterator">
    <AttrNames>
    <Item Value="Suppid"/>
    </AttrNames>
    <ListAttrNames>
    <Item Value="supplierid"/>
    </ListAttrNames>
    <ListDisplayAttrNames>
    <Item Value="supplierid"/>
    </ListDisplayAttrNames>
    </list>
    </bindings>
    And i have a button on the page called as "Clear DropDown".Now on click of Clear DropDown button  i need to clear the dropdown list and need to set a new value in the SupplierId selectonechoice.For the testing purpose it can be a static value like "Shah".
    I am trying to do like this but no help ..
    public String clearDropDown() {
    ValueExpression suppid1 = null;
    String id = "Shah";
    suppid1 =
    elFactory.createValueExpression(elContext, "#{bindings.supplierid.attributeValue}",
    Object.class);
    suppid1.setValue(elContext,id);
    AdfFacesContext.getCurrentInstance().addPartialTarget(suppid);
    AdfFacesContext.getCurrentInstance().addPartialTarget(suppiditems);
    return null;
    Please suggest!!!
    Regards,
    Shah

    While setting the value, it is giving me this warning in the logs :-
    *<FacesCtrlListBinding> <getInputValue> ADFv: Could not find selected item matching value Shah of type: java.lang.String in the list-of-values*.
    I know that the Shah is not present in the List but how do i clear the list and set the New Value which is "Shah".
    Please Suggest!!
    Regards,
    Shah

  • How to set the default value of a LOV that is found in a view criteria

    HI,
    I need to set the default value of an LOV that is found in a view criteria. I tried to set a groovy expression but unfortunately it wasn't read. i also tried to bind the LOV to a bind variable and set the value of the bind variable in the constructor of my backing bean but unfortunately the default value appeared the second time i entered the screen and not on page load.
    Can anyone advise where can i set the default value,
    Thanks

    if you want some default value in LOV. you go to edit list of value wizard-> UI hint->include no selection Item checkbox -checked.use labeled item first of list- and beside that put the label. but when you try to get value, it will show null.but you can manipulate in ur java , if it default value

  • How to set the default value of a database column to NULL

    Hello,
    I want to set the default value of a column (VARCHAR2(20) to NULL, nut I cannot figure out to do this. I tried the following editing the offline table with JDeveloper:
    Default Value : <empty> -> On database NULL
    Default Value: '' -> On database ''
    When I create a new column, there is no default value on the database side and when I open the tabe properties in the database navigator I can see that the default value is (null). This is what I want to see in the other column as well. I don't know why sometimes a default value is visible on the database side (when generating form offline tables to database tables) and sometimes not.
    Perhaps sombody can bring some light in this issue.
    Thanks Thomas

    Hello Shay,
    I have the impression that you don't understand my problem. So here step by step:
    1. Create a offline Table TEST with one column TEST: VARCHAR2(20). nullable=true, no default value.
    2. Generate the table to the database
    3. When you look at the table properties (columns) with the database navigator the following information is displayed (sorry for the formatting):
    Column Name | Data Type | Nullable | Data Default | COLUMN ID| Primary Key | COMMENTS
    TEST | VARCHAR2(20 BYTE | Yes | (null) | 1 | (null) | (null)
    4. Now set the default value for the column TEST in the offline table for example to 'Test'
    5. Generate the table to the database.
    6. When you have a look at the database table, the default value is now 'Test' (as expected)
    7. Now remove the default value of the column TEST in the offline table
    8. Generate the table to the database
    9. When you have a look at the database table, the default value is now NULL (in uppercase letters without parenthesis)
    And this is where the problem starts!
    When you generate the table again with the options "Alter/Manual Reconcile" the default value of the column test is considered to be different! But in fact it should'nt be different because nothing has been changed.
    Best regards Thomas
    Edited by: thmayr on May 28, 2009 9:05 AM
    Edited by: thmayr on May 28, 2009 9:31 AM

  • How to set the initial value of of a poplist dynamical

    Hi,
    I've got a poplist that is populated by a recordgroup. This is done by the following pre-form trigger:
    DECLARE
         l_query_ok NUMBER;
         l_group_id RecordGroup;
         l_it_id     item;
         l_int_value VARCHAR2(2);
    BEGIN
         l_it_id := Find_item('MERGED_ISSUER.product_code');
         l_group_id := FIND_GROUP('RG_PRODUCT_CODE');
         l_query_ok := POPULATE_GROUP(l_group_id);
         -- Populate list 'Product Code'
         CLEAR_LIST (l_it_id);
         POPULATE_LIST(l_it_id,l_group_id);
    END;
    I've tried to set the initial value by adding following lines to the trigger above but I receive the frm-41084 error. This code assigns the first value of the recordgroup to a hidden text item. In the properties of the poplist the value of the hidden text field is set as initial value.
    -- Set initial value
    l_int_value := Get_Group_Char_Cell('RG_PRODUCT_CODE', 1);
    :MERGED_ISSUER.int_value := l_int_value;
    Any help?
    thx

    Hello Ken,
    you can set an initial value for a poplist with the copy command.
    You could use a procedure like this:
    PROCEDURE P_FILL_LBX
         lbx_ITEM_IN                 VARCHAR2,
         grp_DATA_GROUP_IN  VARCHAR2,
         flg_DEL_NULL              BOOLEAN,
         str_WERT_IN               VARCHAR2
    ) IS
      ERROR_ID NUMBER;
    BEGIN
      CLEAR_LIST(lbx_ITEM_IN);
      ERROR_ID := populate_group(grp_DATA_GROUP_IN);
      populate_list(lbx_ITEM_IN,grp_DATA_GROUP_IN);
      IF flg_DEL_NULL = TRUE THEN
        DELETE_LIST_ELEMENT(lbx_ITEM_IN,GET_LIST_ELEMENT_COUNT(lbx_ITEM_IN));
      END IF;
      IF str_WERT_IN IS NOT NULL THEN
        COPY(str_WERT_IN,''||lbx_ITEM_IN||'');
      END IF;
    END;Bernd

  • How to set the LOV value programmatically?

    Hello,
    I have a LOV (select list with submit) the value (displayed and corresponding returned) of which I would like to set by selecting a row in a report.
    What is the event I use to catch the selection of the row in the report and what would be the sample code to set the LOV values?
    Thanks a lot!
    Gabor

    Perhaps a more detailed explanation of the issue helps:
    I am developing an online internet bookmarking application. It basically contains a folder tree and bookmarks within the folders.
    The folder tree is implemented by a table referencing itself (main columns are: ID, NAME, PARENT_ID).
    The LOV lists the NAMEs (actually, the full path of each folder as returned by a function) and returns the IDs.
    When the user selects a NAME, folders and bookmarks contained in that folder are listed in a report (non-recursively).
    The action of the user clicking a folder in the report should simulate the above as if they selected the name manually. This is where I need help!
    I hope this helps. Thanks!
    Gabor

  • How to set the default values for print options

    Hi all,
    We can set the default value for print options, just like Logical destination、numbers of messages、print immediately and so on, so where we should to maintain these default?

    Hi Sandy,
    This can be done by an abaper by making changes in the driver program. The Driver program feeds all the data which u have mentioned for printing.
    if the driver program is standard. copy to an z type and make modification on printer settings on the driver program code.
    this will surely solve the issue.
    Regards
    Gunaseelan

Maybe you are looking for

  • Can't compile.

    Hi, I was a VB developer and started to develop using java recently. I had to do some modification in a existing java project uses tomcat as the web server. I'm using Jbuilder 9 toas my editor. what I'm doing is open files using jbuilder and do the m

  • Does drag & drop create a link or duplicate footage?

    Hi I have an external drive. trying to clear some space on one of the internal drives. when you drag and drop from say disk 2 (internal) to external drive, is that duplicating the footage or only creating a link? if its only a link, then where is the

  • Ship to Address in Logistics tab of  Purchasing docs

    Hi experts I understand the Ship to address in the Logistics tab links to the company warehouse selected on the row on the document. Our clients do not want to use Drop Ship even although the purchased stock is going straight to a customer.   Is ther

  • Mail crashes & settings don't take

    I just upgraded from 1.1.3 to 2.0. I did the restore from backup then upgrade. All seemed to go well, except when I try tto use the mail app it starts to open then closes. In the mail settings if I try to make any changes like deactivate an account o

  • "There were problems downloading some purchased items."? Itunes problem.

    Can't get my previously purchased songs in my library because they won't download. The error code is err = -3523? I think. I already reinstalled Itunes. Running this on Windows 7. Just recently got a new computer and am trying to get my songs on this