Binding values to dropdown in javascript

Hi to all!
I  am in desperate need of help .
I am creating an adobe interactive form and i am stuck at a point.
I need a dropdown in which when some one selects a particular  country ,he should only get  the states for that country in other dropdown of state.
I got the solution of this ,but i am not able to bind the values to the list of dropdown . So it is useless without binding.
So please help me what should I do in that case.

Hi,
Basically there has to be a text and a value that you need to bind to a dropdown. First of all prepare these two fields in an internal table and make it available in the data view of Adobe lifecycle designer.
Drag and drop a dropdown control from the library palette into the layout.
Select the dropdown and goto object palette --> Binding. Click on the small icon on the right top corner of the object palette (Just below the close button of the object palette). Check the dynamic property from the menu.
It will display a new link 'item values' in the object palette. Click on that link which will give you a provision to bind text and value to the dropdown.
Alternatively you can loop the hidden table in the layout, fetch the values one by one, and bind to the dropdown using javascript. Let me know if you need any help.
Thanks & Regards,
Sanoosh

Similar Messages

  • How to pass a binding value to a Javascript function?

    Hi, I have this:
    A binding: #{bindings.DOCUMENT_ID.inputValue}
    A javascript inserted into the page in this way:
    <af:commandButton text="Ver Documento" id="cb1"
    icon="/Images/Document-Preview-icon.png">
    <af:clientListener method="openViewer('#{bindings.DOCUMENT_ID.inputValue}')"
    type="click"/>
    <af:resource type="javascript" source="/openViewer.js"/>
    </af:commandButton>
    But doing this generates this error: Error(44,34): Static attribute must be a String literal, its illegal to specify an expression.
    Any suggestions?
    Thanks in advance.

    First solution doesn't work:
    OracleJSP error: oracle.jsp.parse.JspParseException:
    /PantallaSup.jspx: Line # 45, <af:clientListener method="openViewer('${bindings.DOCUMENT_ID.inputValue}')" type="click" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"/>
    Error: Expression Language not supported in compile time attribute method

  • How to insert new values in dropdown box through coding

    hi,
      I want to insert new values in dropdown box in a table.
    Please provide me the corresponding coding.i already did this code but result is empty dropdown.I mapped the context properly..
    int sklength=wdContext.nodeSkills().size();
          for(int i=0;i<sklength;i++)
        String getsub=wdContext.currentSkillsElement().getSubject();
        if(getsub.equals("50000138"))
             //IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
             List lis=new ArrayList();
             //lis.add("Abap");
             //lis.add("Workflow");
             IPrivateDetails1.INewskillElement el=wdContext.createNewskillElement();
             el.setTskill("abap");
             lis.add(el);
              el.setTskill("workflow");
              lis.add(el);
              wdContext.nodeNewskill().bind(lis);
              //wdContext.nodeMonthsOfYear().bind(MonthsOfYear);
              wdContext.nodeNewskill().setLeadSelection(1);
        else
              wdContext.currentNewskillElement().setTskill("C++");
    waiting for a positive reply......
    with regards,
    S.Kiruthika

    kiruthika,
    Too many logical errors to explian.
    Should be:
    IPrivateDetails1.ISkillsNode nSkills = wdContext.nodeSkills();
    IPrivateDetails1.INewskillNode nNewSkill = wdContext.nodeNewskill();
    int sklength = nSkills.size();
    boolean cppAdded = false;
    for(int i=0;i<sklength;i++)
      String getsub=nSkills.getSkillsElementAt(i).getSubject();
      if(getsub.equals("50000138"))
        List lis=new ArrayList();
        IPrivateDetails1.INewskillElement el1 = nNewSkill.createNewskillElement();
        el1.setTskill("abap");
        lis.add(el1);
        IPrivateDetails1.INewskillElement el2 = nNewSkill.createNewskillElement();
        el2.setTskill("workflow");
        lis.add(el2);
        nNewSkill.bind(lis);
        nNewSkill.setLeadSelection(1);
      else if (!cppAdded)
        cppAdded = true;
        IPrivateDetails1.INewskillElement elCpp = nNewSkill.currentNewskillElement();   
        if (null ==  elCpp) {
          elCpp = nNewSkill.createNewskillElement();
          nNewskill.addElement(elCpp);
          nNewskill.setLeadSelection( nNewskill.size() - 1);
        elCpp.setTskill("C++");
    VS

  • Disable HTMLB dropdown with JavaScript

    Hi All,
    I ran into the following issue:
    I have a BSP page that used HTMLB dropdowns and some custom javascript that disabled those dropdowns interactively when a user clicked on a checkbox.
    Example: tempDropdown.disabled = true;
    Unfortunately, as soon as I changed the control rendering attribute to "SAP", the look&feel of dropdowns changed and they no longer appear to be based on "select-one" HTML object. Therefore, my custom JavaScript no longer works.
    Do you know how I could visually (interactively) disable the "SAP" rendered HTMLB dropdown with a custom javascript?
    Thanks!
    Roman

    here is the complete code of my sample.
    <b><u>page attribute</u></b>
    tab1     TYPE     TIHTTPNVP
    tab1_wa     TYPE     IHTTPNVP
    tab2     TYPE     TIHTTPNVP
    tab2_wa     TYPE     IHTTPNVP
    <b><u>layout</u></b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003"  controlRendering="SAP" >
      <htmlb:page title=" " >
        <htmlb:form>
          <%
      clear tab1_wa .
      refresh tab1 .
      move: 'PRI' to tab1_wa-name ,
      'Printer' to tab1_wa-value .
      append tab1_wa to tab1 .
      move: 'FAX' to tab1_wa-name ,
      'Fax' to tab1_wa-value .
      append tab1_wa to tab1 .
      move: 'EMA' to tab1_wa-name ,
      'Email' to tab1_wa-value .
      append tab1_wa to tab1 .
          %>
          <%
      clear tab2_wa .
      refresh tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Some One' to tab2_wa-value .
      append tab2_wa to tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Mr X' to tab2_wa-value .
      append tab2_wa to tab2 .
      move: '[email protected]' to tab2_wa-name ,
      'Mr Y' to tab2_wa-value .
      append tab2_wa to tab2 .
          %>
    <script language="javascript">
      function SetDisabled(elem,disable)
      var ip = document.getElementById(elem);
      ip.disabled = disable ;
    </script>
          <htmlb:label for  = "DDLB1"
                       text = "Carrier" />
          <htmlb:dropdownListBox id                = "DDLB1"
                                 nameOfKeyColumn   = "NAME"
                                 nameOfValueColumn = "VALUE"
                                 table             = "<%= tab1 %>"
                                 onClientSelect    = "javascript:dd = document.forms[0].DDLB1; alert(dd.options[dd.selectedIndex].value);"
                                 width             = "150" />
          <htmlb:dropdownListBox id                = "DDLB2"
                                 nameOfKeyColumn   = "NAME"
                                 nameOfValueColumn = "VALUE"
                                 table             = "<%= tab2 %>"
                                 width             = "150" />
          <htmlb:button text          = "Press Me"
                        onClientClick = "javascript:SetDisabled('DDLB2', 'true');" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    try this in your system and let me know whether it works or not
    Regards
    Raja

  • Displaying ui element when selecting value from dropdown

    hi,
    i have a requirement when user select value from dropdown( some x from dropdown) textedit ui(where user can enter some text) should be displayed and submitted. please give some idea

    Hi Babanmohi     ,
    First create a node in your context and under that create an attribute. Then add a Dropdown by Index and TextEdit UI on to your view. Bind both the UI element with the same attribute.
    Then create an action on onSelect event of the DropDown UI element. Go to its implementation and write the following:
    wdContext.current<Node name>Element.set<attribute name>(wdContext.current<Node name>Element.get<attribute name>)
    For example, if in my context there is a node called testnode and under that if im having an attriburte called name, then do the following coding in the onSelect method of dropdown:
    wdContext.currentTestnodeElement().setName(wdContext.currentTestnodeElement().getName());
    Reply me if you have any issues
    Regards,
    Jithin

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?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:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • How to get the bind value of a portlet in a page.

    I want to get the bind value of a portlet on a page. Can you tell me how can I get that.
    I used :
    portal30.wwv_name_value.get_string( l_arg_names, l_arg_values, '');
    It works ok when we run the report alone .But when we add the report as a portlet in page , it does not return any value. Can you tell me which Api does it.
    null

    Here is an example...
    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
    out = out.concat(zeroPad(d2h(reqHex[No]),2));
    return out;
    function eyeDropperRGB(x,y) {
    var x2 = x + 1;
    var y2 = y + 1;
    var out = new Array(3);
    activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
    for(ch in list = ["Red", "Green", "Blue"]) {
    histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
      return out; 
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;

  • Pass bind value to a variable

    How possible is it to pass a bind value to a variable?
    <cfselect id="addo" name="addo"
    bind="cfc:asproxy.getRList()"display="ListName" value="ListID"
    BindOnLoad="true" />
    The above bind value in addo then passed to the below, making
    available to the whole page as "valueaddo"
    <cfset valueaddo =#addo#>

    Thank you Bitaites.
    I tried to add a new action in the page definitions --> bindings --> insert inside binding create new action --> and then choose the data collection --> select an Action as "ExecuteWithParams" --> in the Value field I put the value e.g. 'APPROVER'.
    Is something I did wrong? Because it seems not work... =(
    Can you explain a little bit about how to do it?
    Thanks a lot!!

  • Error creating index (trailing null missing from STR bind value)

    I'm having the following error:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: interMedia Text error:
    DRG-50857: oracle error in dreii0fsh
    ORA-01480: trailing null missing from STR bind value
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176
    ORA-06512: at line 1
    my script is:
    create index IDX_XML on EN_TESTE_XML(TXT_XML_CURRICULO)
    indextype is ctxsys.context;
    My Oracle is 9.0.1
    TXT_XML_CURRICULO -> XMLTYPE then
    the section group is PATH_SECTION_GROUP by default.
    thanks.
    Marlon

    If you get an OCI error when simply updating a record in PL/SQL Developer, it sounds like a PL/SQL Developer issue, although not one I've come across. You might try Allround Automations tech support. They'll need your exact versions of Oracle server, Oracle client and PL/SQL Developer.
    SQL*Plus is part of the Oracle Client software so you should have it somewhere, or you can download it free.

  • Get values in dropdown field based on f4 help in another field

    Hi Experts,
    How to Get values in dropdown field based on another field which is F4 Help. If I select one value in f4 help field(ex: 1) I need to get values in dropdown field (ex:a, b, c),If I select another value in f4 help (ex:2) I need to populate different values (ex: d). Can any one please provide sample code that can help more.
    Thanks,
    Ashok.
    Moderation: Kindly search and find the solution, before you post.

    Dear Ashok,
    You can take help from this program in SAP named BCALV_EDIT_08.
    Thanks.
    With regards.

  • SQL Developer 3.0.04 does not aks for bind values (update / delete)

    Hi there!
    When i issue a select statement like
    SELECT * FROM tablename where column = :bind;
    a window pops up asking for the bind value. It does not for similar delete or update statements.
    Background: I just migrated from Developer 2.1.1.64. In the old version I used that kind of bind a lot.
    Is there any way I can recinfigure this? Is it a bug?
    Thanks in advance.

    It's a bug: Bug EA 4 (3.0.03.97) Bind Variable Not Declared on Insert from select
    Let's hope we see improvement in next patch release,
    K.

  • 1.5.1: Bug with single keystroke bind value being displayed but ignored

    I just ran into a bug with using with bind values (run as statements) using SQL Developer 1.5.1.54.40, JDK 1.6.0_04, Win XP SP 2.
    If the bind value was previously Null (NULL checkbox checked), then typing one (and only one!) character into the Value field displays the character and deselects the NULL checkbox but is ignored when running the statement - the bind variable is treated as Null. Running the statement again redisplays the bind dialog and the NULL checkbox is deselected but there is no value in the Value field.
    For example: select rpad(dummy, :length, dummy) from dual;
    When running this as a statement and typing a value between 0 and 9 into the Value field results in null (ie select rpad(dummy, null, dummy) from dual). Running again and leaving the Null checkbox unchecked and typing the single character again produces the correct result (ie 9 produces 9 Xs). Running again and checking the Null checkbox and typing the single character again produces null again.
    This only occurs where you type a single key stroke in your bind value. If you type two characters and then delete one, the bind value is used correctly.
    theFurryOne

    Bug 7229257 - entering only one character in bind dialog value field is ignored
    logged.
    -Raghu

  • SQL Trace and Bind Values

    I need to capture bind values in SQL Trace. I am running Oracle 9.2.0.8. I will be running my queries from an application, not SQL Plus. I can use a after log on trigger to turn on trace. Has anyone done this with success? Are there any other ways to do this at the server level?
    Thank you for your input
    David

    Hello David,
    it is such easy ... you wouldn't believe it.
    Have a look at the pl/sql procedure "dbms_system.set_ev", with this one you can do this on session level: http://www.oracleadvice.com/Tips/dbms_system.htm#SET_EV
    There are also some other possibilities... but this should hit your question..
    To turn on:
    SQL> exec dbms_system.set_ev(<SID>, <SERIAL>, 10046, 12, '');
    To turn off:
    SQL> exec dbms_system.set_sql_trace_in_session(<SID>, <SERIAL>, FALSE);
    Regards
    Stefan

  • Setting bind values in where clause in ViewObjectImpl

    We want customize our views in a special manner. To look up for instance a text in the session langauge, we add a bind variable to the declared where clause of a VO:
    and text.lang = :lang
    Let's suppose, the actual value of the session language be known within ViewObjectImplementations. I want to set the bind value transparently within the ViewObjectImplementation rather than having to do it in every UI related client using this VO. Until now, I set the bind value whenever getViewObject or BuildWhereClause is called. This is sufficient for the AM Tester, but not for JClient forms using this VO (as a Not-all-values-bound exception is thrown), and I am not able to figure out by the documentation which methods of a VO are called when it is created and queried by a JClient form.

    See this web log posting on providing automatic default values for VO bind variables:
    http://radio.weblogs.com/0118231/2003/08/01.html#a127

  • Add values in Dropdown list

    Hi,
    My reqiurement is to add values in Dropdown list which is standard one. Already threre some values are there, like
    hourly,daily,wekly.
    Now I need to add montly value to the above dropdown list.How this can be done.
    Suggest me.
    Thanks,
    Brahmaji

    Hi,
    Expand the Attribute Period_type and double click on its GET_V method.
    You will find following code line :
    lr_ddlb->set_selection_table( me->job_wizard ).
    Double click on the Set_selection_table method to open the method code.
    You will find a LOOP.. ENDLOOP there. Here,to remove the values, comment out this LOOP- ENDLOOP.
    and  add following lines
             ls_ddlb-key   = 'Y'.
            ls_ddlb-value = 'Yearly'.
            APPEND ls_ddlb TO me->ddlb.
    Thats All .
    Hope it Helps.
    Regards,
    Suchita

Maybe you are looking for

  • How to delete an .xml file from xmltype table?

    Hi expert, I am in I am in Oracle Enterprise Manager 11g 11.2.0.1.0. SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 22 11:40:23 2011 I have inserted 3 .xml files into an xmltype table: DOCUMENT SQL> SELECT OBJECT_VALUE FROM document; OBJECT_VALUE

  • Restoring Woes

    My Mac laptop just died on me, so I have to use a pc. I really want to get some new stuff on my ipod (Nano, 1st Gen) but don't want to get rid of all my songs by restoring to factory settings. I have no way of backing up any of my music. Is there a w

  • Qik video chat on Revolution

     Ok now I'm getting tired of video chat not working at all on Revolution. I click on it and open and then click video chat and a box pops up saying it has stopped unexpectedly and I have to force close. Went in for help and it sys have gps on so I en

  • Using regular expressions to get a customized output

    Hi, I have a string/varchar variable with the data ',a,b,c,' in it. I want the display as follows: a b c I would like to get the similar output using regular expressions. How do I get this output using REGEXP_REPLACE or REGEXP_SUBSTR? Please do the n

  • How can i contact customer service?

    How can I talk or chat with a support person for photoshop elements? I bought the serial number and I'm having so much trouble.