Can't set a hidden field value from onClick event with a runtime expression

Hi,
I need to set a hidden field in an onClick event of button but it's not working.
<html:submit styleClass="btnLink" onclick="document.empForm.hidden.value='<%= empID%>'">
<%= empID%>
</html:submit>
Althought the second expression is evaluated and written successfully "the button value"
I heard that this is because you can't mix the value of an attribute of a custom tag with both string literal and run time expressions.
Is there any work around to solve that?
I can't use EL as I'm using old JSP version

I guess, it should work; instead of html:submit, try with button.

Similar Messages

  • How can we read the screen field values from the report selection screen wi

    Hi expart,
    How can we read the screen field values from the report selection screen with out having an ENTER button pressed  .
    Regards
    Razz

    use this code...
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
    **Read the Values of the SCREEN FIELDs
    CALL FUNCTION 'DYNP_VALUES_READ'

  • Can not set OARG.cstAllcAcc field value with CustomsGroups Object

    Can not set OARG.cstAllcAcc field value with CustomsGroups Object, please open this field in this Object because it is a key field related to financial system.

    I guess, it should work; instead of html:submit, try with button.

  • How to get-set Hidden field value from JSP ?

    Hii,
    I am quite newbie about jsp and looking for some help..
    I have several url links on my jsp page.
    I when I click one of them, I want to reload my page with new request parameter(s) but also keep the older one(s) in hidden field(s)...
    but I dont know how to set and get hidden field value "syntax" and I am not sure about where/when should I do this... at first I though that I can do it in "onClick" property of url..
    Thanks..

    Hy,
    I have a problem just like that. I am trying to send the value of an subdomain is to another page to be able to modify an entry.
    So in listsubdomains.jsp I have
    <input type = "hidden" name = "subdomainid" value="<%=subdomains.SubdomainID%>"><%=subdomains[i].SubdomainID%>.
    This shouls send the id of the subdomain.
    I an sending this to modifysubdomain.jsp with <form name = "listsubdomains" method = "post" action = "modifysubdomain.jsp">
    and there I retrieve the value like this:
    Integer id = new Integer (request.getParameter("subdomainid"));
              out.println(request.getParameter("subdomainid"));
    My problem is that no matter what is the value I chose to modify it always sends the first value. If I another value manually it works, but just then.
    Please give me some ideas.

  • In OBIEE 11g, how can you set a presentation variable value from javascript ?

    I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?

    SriniVEERAVALLI,
    Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
    I just want to make my post looks simple and focus on the specific problem.
    Anyways, thanks a lot for taking time to reply. Appreciate your help.

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • Set the default field value to transaction code field, when calling from WD

    Hi all,
    Can we pass the value in a input field of a standard transaction calling from WD application. Suppose we are calling a transaction VA03 in an external window, then how will be pass the value in the VBAK_VBELN screen field.
    Is there any way to pass the value to this transaction field. I have also tried out to set the parameter ID 'AUN' for VA03 transaction VBELN field. But it did not work for me.
    Is there any way to set the default field value to transaction code field, when calling from WD?
    Please suggest, if anyone have any idea.
    Thanks
    Sanket

    Hi,
    I am using the below code to open a standard transaction. It will help you to explain my point more easily.
    DATA: url TYPE string,
              host TYPE string,
              port TYPE string.
    *Call below method to get host and port
      cl_http_server=>if_http_server~get_location(
         IMPORTING host = host
                port = port ).
    *create URL
      CONCATENATE 'http'
      '://' host ':' port
      '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'VA03'
       INTO url.
    *get the window manager as we are opening t code in external window.
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component TYPE REF TO if_wd_component.
      DATA lo_window TYPE REF TO if_wd_window.
      lo_api_component = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
    call the url which we created above
      lo_window_manager->create_external_window(
      EXPORTING
      url = url
      RECEIVING
      window = lo_window ).
      lo_window->open( ).
    Note*
    One more query I want to add to this thread, that is there any possibility to call a custom transaction as well?

  • Hidden field value init. by a var in Netscape && MSIE ...

              Hi there,
              I have a hidden field specified this way :
              <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              Suppose that myValue is 'Ionut RUSUBOCA'
              If I run this with Netscape 4.75 it works just fine.
              If I run this with Microsoft IE 5.50.4522.1800 I get an error that points to the
              way the hidden field value is specified.
              If I change ...... value = "<%=myValue%>" ..... to .... value = <%=myValue%>
              ... ( that is, if I remove the double quotes ) then MSIE is Ok but ... instead
              of 'Ionut RUSUBOCA' I only get 'Ionut'.
              Could you, please, help me make MSIE see the correct value that is 'Ionut RUSUBOCA'
              ? ( like Netscape )
              Which browser are not W3C compliant in this matter ?
              Thank you,
              rivisa
              

              Thanks for the reply.
              Well, I quoted everything and still does not work with MSIE.
              Indeed, when I quote value="<%=myValue%>", I get in MSIE value = "Ionut RUSUBOCA"
              but it does not make any difference : it breaks.
              If I take out the quotes ( value = <%=myValue%> ) then the source is viewed as
              value = Ionut RUSUBOCA and when the form
              gets submitted I only get 'Ionut' as value.
              This is weird, so to speak.
              Can you reproduce this thing in your system ?
              Thanks,
              rivisa
              "Cameron Purdy" <[email protected]> wrote:
              >> <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              >
              >All attributes should be quoted.
              >
              ><input type="hidden" name="<%=myName%>" value="<%=myValue%>">
              >
              >Look at the result by choosing "View Source" from the MSIE context menu.
              >
              >Peace,
              >
              >--
              >Cameron Purdy
              >Tangosol, Inc.
              >http://www.tangosol.com
              >+1.617.623.5782
              >WebLogic Consulting Available
              >
              >
              >"_rivisa_" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >>
              >> Hi there,
              >>
              >> I have a hidden field specified this way :
              >>
              >> <input type = "hidden" name = <%=myName%> value = "<%=myValue%>">
              >>
              >> Suppose that myValue is 'Ionut RUSUBOCA'
              >>
              >> If I run this with Netscape 4.75 it works just fine.
              >>
              >> If I run this with Microsoft IE 5.50.4522.1800 I get an error that
              >points
              >to the
              >> way the hidden field value is specified.
              >>
              >> If I change ...... value = "<%=myValue%>" ..... to .... value =
              ><%=myValue%>
              >> ... ( that is, if I remove the double quotes ) then MSIE is Ok but
              >...
              >instead
              >> of 'Ionut RUSUBOCA' I only get 'Ionut'.
              >>
              >> Could you, please, help me make MSIE see the correct value that is
              >'Ionut
              >RUSUBOCA'
              >> ? ( like Netscape )
              >>
              >> Which browser are not W3C compliant in this matter ?
              >>
              >> Thank you,
              >> rivisa
              >>
              >>
              >
              >
              

  • How to get POF object's field value from query result

    hi,all:
    I want to get field value from the query result, my code is below
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
    Contact c=(Contact)iter.next();
    System.out.println ("firstame####=" + c.getFirstName());
    * but I get error*
    Exception in thread "main" java.lang.ClassCastException: com.tangosol.util.ConverterCollec
    tions$ConverterEntrySet$ConverterEntry cannot be cast to com.oracle.handson.Contact
    at com.oracle.handson.QueryExample.printResults(QueryExample.java:159)
    at com.oracle.handson.QueryExample.query(QueryExample.java:86)
    at com.oracle.handson.QueryExample.main(QueryExample.java:43)
    who can tell me how to get POF object's field value from query result

    Hi,
    If you look at the Java Doc for the entrySet method here http://download.oracle.com/docs/cd/E15357_01/coh.360/e15725/com/tangosol/util/QueryMap.html#entrySet_com_tangosol_util_Filter_ you will see that it returns a Set of Map.Entry instances so you need to do this...
    Set setResults = cache.entrySet(createFilter("homeAddress.state = 'MA'"));
    for (Iterator iter = setResults.iterator(); iter.hasNext(); )
        Map.Entry entry = iter.next();
        Contact c=(Contact)entry.getValue();
        System.out.println ("firstame####=" + c.getFirstName());
    }JK

  • To find a field value from a table

    i want to get some field value from a data dictionary table.
    for eg Tragr from Mara. in Fields list it shows the field is in Mara table. but in content screen it does not showing the field at all. Actually of 220 fields of mara table only 99 fields are shown. how to view all the fields of a particular field. is there any setting is there.

    Hi Deva,
    When we execute any table by default SAP will display only few columns.(90 i guess) If we want to view all the columns of the table then do like this after executing the table i.e in ur table output.
    Menupath->Settings->User parameters->choose radiobotton
    Grid display Here u can see all the fields.
    If u don't want to see all the fields then do like this.
    Settings->listformat->Choosefields->Deselectall->Select what
    ever fields u want using the search button in bottom and press enter. It will display only selected fields.
    Some times we will come up with strange situations.
    EG: In the field list some field will be there. But if u select that field from that table in select query it will give u syntax error saying field xxx does't exist in table yyy. This field is nothing but text table field. If u want to select this field then u have to select it from the text table. U can find the text table exist for some table or not in
    Menupath->goto->text table. (In this case makt is text table for mara)
    Just check below code for ur reference.
    DATA: wa_mara TYPE  mara.
    SELECT SINGLE * INTO wa_mara FROM MARA .
    Here if u go to mara table u have field MAKTX But above select will not return the field maktx even we are refering wa_mara to data base table mara. We have to explicitly select it from MAKT.
    Hope this clarified all ur doubts.
    Thanks,
    Vinod.

  • Not able to retrieve netui hidden field values in java script

    I have problem in retrieving hidden field values in javascript
    I have declared hidden field as below,
    <netui:hidden dataSource="actionForm.selectedColumns" tagId="hiddenSelectedfield"></netui:hidden>
    and retrieving with tagId in javascript as below,
    obj1 = document.getElementById(tagId).style;
    its not getting value with tagId defined in netui tag.
    Any suggestion...
    Thanks,
    Amit

    Hi,
    I'm a new bee to this adobe forms and VBS.Could you explain more on that Fdf file or Can you send some documentation where i can go through of.
    Even i'm very much happy to share the pdf file..the problem is it is binded with the SAP browser.So i cant make a copy to my local system,But i can explain all the technical stuffs inside the form.
    The form is developed using adobe lifecycle designer,i can see the fields are defined in the design view.
    The fields which i'm accessing to enter the values are visible & Set user defined values..
    when you access through the SAP portal,it opens up inside the browser ..so every field you choose or select additional fields get added based on the selection..
    The "GetField" code you have shared works perfectly fine..i could read all data,or i could select a particular field to retrieve the field.
    But the "SetField" code you have shared locating the field but it is not writing the value into the field.I called a setfocus method on the particular field as well..then put f.value = fieldvalue still it chooses the particular field but didnt feed the value...
    is it possible to call a keystroke to the particular field?
    if you have any ideas please throw it up on me..i'll try all my possibilities.
    Thanks for your time !

  • Retrieving lookup field values from a main table using MDM JAVA APIs

    Hi all,
    am trying to retrieve the main table data...., i could able to retrieve all the data except lookup field values..., iam facing some runtime exceptions and i dont know why exactly it is throwing this exception..., i pasted piece of code where exactly the error is and the exception also.
    in the below sode i set some result set definitions and passing them to retrieveLimitedRecordsCommand. it is showing some exception at retrieveLimitedRecordsCommand.execute(); command.
    //*** Code  ***//
      supportingMainResultDefinitions = new ResultDefinition[] { rdQual ,rdFlat, rdqFlat  };
                                            retrieveLimitedRecordsCommand.setResultDefinition(rd);
                                            retrieveLimitedRecordsCommand.setSearch(new Search(tableId));
                                            retrieveLimitedRecordsCommand.setSession(sessionId);
                                            retrieveLimitedRecordsCommand.setSupportingResultDefinitions(supportingMainResultDefinitions);
                                            try {
                                            retrieveLimitedRecordsCommand.execute();
                                                    PrintRecords.toConsole(retrieveLimitedRecordsCommand.getRecords());
                                                    } catch (CommandException e) {
                                                    e.printStackTrace();
    //***  Below is the Exception raised ***//
    java.lang.UnsupportedOperationException: Unexpected field type -1
            at com.sap.mdm.internal.schema.PropertiesHelper.createField(PropertiesHelper.java:274)
            at com.sap.mdm.internal.schema.PropertiesHelper.convertFrom(PropertiesHelper.java:281)
            at com.sap.mdm.internal.data.RecordMetadata.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordsLoader.<init>(Unknown Source)
            at com.sap.mdm.internal.data.RecordResultSetHelper.convertFrom(Unknown Source)
            at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(Unknown Source)
            at com.sap.mdm.apitutorial.lesson2.RecordsDisplay.getDisplayRecords(RecordsDisplay.java:303)
            at org.apache.jsp.Sample_jsp._jspService(Sample_jsp.java:190)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
            at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
            at java.lang.Thread.run(Thread.java:534)
    If anyonw worked on this concept..., please provide me the solution
    Regards
    Praveen k

    Which version are you using?  Can you please try and narrow down to the offending field?  You can do this by limiting the fields you provide to ResultDefinition.

  • How to pass field value from popup window to oninput processing of other pg

    Hi,
    I want to pass a field value from the popup window to oninput processing of main page ( from where popup window is triggered). and need to close the popup window. How to do it ?
    In the popup window's oninputprocessing, im doing some validation checks. If it passes all the validations, then only the control shd come to main page ..else it should stay in popup window only .
    Regards,
    Jothi.

    Hi Jothi,
    you can use java script to pass the value and close your popup window. use the following code.
    in your popup window:
    function passData(h1)
             window.opener.document.getElementById('var1').value = h1 ;
             window.close();
    then call this function when you finish your validations.
    in your main page layout create an input field with id as passed in the function above "var1".
    In the value attribute give it your variable as follow:
    <htmlb:inputField id      = "var1"
                              value   = "<%= var2 %>"
                              visible = "false" />
    "var2" will be assigned the value from your popup window.
    I hope this will help you..
    Regards,
    Husain

  • How to set a payload field value only once for multiple instances selected?

    The user needs to set a payload field value and then he can approve the task so the task can continue through the process, that's fine when the user selects one instance and sets the value in the task details section and then clicks the approve button, but how do we achieve the same behavior in a multiple way?, I mean the user can select multiple tasks in the workspace (in this case the details task page is not available and instead the following label appear "Multiple tasks selected") then if the user clicks the Actions drop down -> APPROVE he only gets the message "your request was processed successfully", so how can the user modify the payload field value only once for all the selected tasks so when he clicks APPROVE the value is populated in all the instances selected.
    Thanks,
    Carlos.

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • Steps for replicating GR custom field values from EBP to SAP R/3

    Dear SRM Gurus,
    We wre using SRM 5.0 extended classic scenario..
    We are having 3 custom fields for GR in SRM, we want to replicate these values to 3 other standard fields in SAP R/3..
    Can you pls tell us the Procedure, Steps and standard objects that has to be changed for replicating the GR field values from SRM to SAP R/3(4.6C).
    Thanks in advance,
    Chandra Sekhar.

    Hi
    <b>Please go through the following links -></b>
    Re: Confirmation screen field to be mapped to backend field
    Re: Creating Confirmations in SRM - What is the preferred method
    Re: GRN IDOC Transfer to ERP  - MBGMCR01 ( 2 IDOCS created)
    Re: Problem to send idoc for a Good Receipt created
    GR IDOC Number
    Re: Idoc error in Goods confirmation - urgent
    Re: Delete goods confirmation in SRM3.0
    Re: SRM / MM integratuion: goods receipt
    IDOC MBGMCR01: CO Ctd-pedido exceeded by 1 UN:
    <b>Some useful SAP OSS Notes to refer -></b>
    Note 521488 - FAQ: MB_CREATE_GOODS_MOVEMENT
    Note 521427 - FAQ: IDocs for goods movements
    Note 521488 - FAQ: MB_CREATE_GOODS_MOVEMENT
    Hope this will definitely help.
    Regards
    - Atul

Maybe you are looking for

  • Zen Vision:m 30gb doesn't work properly with Windows 7 64bit

    I recently upgraded my pc from an old xp machine to a new one running windows 7 ultimate. Creative says their media player software that originally shipped with the zen does not support windows 7, so i should use windows media player (the version tha

  • MSI's Geforce FX 5200-T128 = FX 5200 Ultra !!

    I recently bought an MSI Geforce FX 5200-T128 and decided to OC it and replace the stock heatsink to help the OC'ing a bit. It comes with a heatsink only and no fan. I got this cooler from an old Macintosh machine that could fit perfectly into the GP

  • Changing Status of document should start workflow

    Hi WF-experts, another issue I have to deal with: My WF should start after the status of a document has been changed. The process is that the customer creates a document and saves the entries (status is "in process"). Later he wants to have the oppor

  • Can we run export_monitor.sh multiple times?

    Hi! We use export_monitor.sh  to export a DB. It processed many packages and finished, but several packages have "export package: ERROR". If I do some change in the DDLORA.TPL,  may I run export_monitor.sh again? I hope it will ONLY processs those ER

  • Which factory calendar is valid for a certain user

    Hi all, is there a way to get the factory calendar for a certain user. E.g. if the user works in Germany, I want the german factory calendar, and if he lives in India, I want the Indian calendar. Regards, Daniel