Pass the data back from the jsp page to the java code

Hi,
I have written an iView that receives an event using EPCF and extracts data from the client data bag.
I need this iView to pass the data back from the jsp page to the java code.
I am trying to do this using a hidden input field, but I cannot get the code to work.
Here is the code on the jsp page.
<%@ taglib uri="tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
  <hbj:page title="PageTitle">
   <hbj:form id="myFormId">
<hbj:inputField id="myInputField" type="string" maxlength="100" value="" jsObjectNeeded="true">
<% myInputField.setVisible(false);%>
</hbj:inputField>      
   </hbj:form>
  </hbj:page>
</hbj:content>
<script language=JavaScript>
EPCM.subscribeEvent("urn:com.peter", "namedata", window, "eventReceiver");
function eventReceiver(eventObj) {
     var url = eventObj.dataObject;
     var funcName = htmlb_formid+"_getHtmlbElementId";
     func = window[funcName];
     var ipField = eval(func("myInputField"));
     ipField.setValue(url);
     var form = document.all(htmlb_formid);
     form.submit();
</script> 
Here is my java code
package com.sap.training.portal;
import com.sapportals.htmlb.InputField;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.htmlb.page.PageException;
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.portal.htmlb.page.PageProcessorComponent;
public class ListSalesOrder extends PageProcessorComponent {
  public DynPage getPage(){
    return new ListSalesOrderDynPage();
  public static class ListSalesOrderDynPage extends JSPDynPage{
     private String merong;
    public void doInitialization(){
    public void doProcessAfterInput() throws PageException {
          InputField reportfld = (InputField) getComponentByName("myInputField");
          if (reportfld != null)      merong = reportfld.getValueAsDataType().toString();
    public void doProcessBeforeOutput() throws PageException {
          if ( merong != null ) setJspName("merong.jsp");
          else setJspName("ListSalesOrder.jsp");
Here is DD
<?xml version="1.0" encoding="utf-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
    <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
  </application-config>
  <components>
    <component name="SearchSalesOrder">
      <component-config>
        <property name="ComponentType" value="jspnative"/>
        <property name="JSP" value="/pagelet/SearchSalesOrder.jsp"/>
      </component-config>
      <component-profile>
        <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
      </component-profile>
    </component>
    <component name="ListSalesOrder">
      <component-config>
        <property name="ClassName" value="com.sap.training.portal.ListSalesOrder"/>
      </component-config>
      <component-profile>
        <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
      </component-profile>
    </component>
  </components>
  <services/>
</application>
After receive event, then call java script function "eventReceiver" and call "form.submit()".
But .. PAI Logic in Java code doesn't called ...
Where is my problme ?
Help me ...
Regards, Arnold.

Hi Arnold,
you should not do a form.submit yourself. Instead you can put a component called ExternalSubmit to your page:
ExternalSubmit exSubmit = new ExternalSubmit("EX_SUBMIT"));
exSubmit.setServerEventName("MyEvent");
This results in a java script funtion on the page which is called "_htmlb_external_submit_". If you call this function the the form gets submitted and your event handler is called.
regards,
Martin

Similar Messages

  • How can I get the data back from my game

    How can I get the data back from minecraft if I deleted the app and bought with a different Apple ID

    No, they are tied to the ID that purchased them, and cannot be transferred to anyone else.

  • How to get the view tree from a jsp page

    Hi,
    I would like to get the view tree of a jsp page. The idea is to dynamically include the content of one or more jsf pages into a UIPanel during a "value changed" event.
    So, i could get from an arbitrary page like ...
    <%@ taglib uri="http://java.sun.com/jsf/core"   prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html"   prefix="h" %>
    <h:panelGrid columns="3" width="100%" rowClasses="gridTop">
        <h:outputText value="#{someBean.someValue}"/>
    </h:panelGrid>... the corresponding List of components...
    Any idea?

    Thanks for your answer Jayashri,
    The view tree can be retrieved by this way during the page is parsed, for example with scriptlets <%%>, or once the page has been parsed (the view has been builded and attached to the FacesContext).
    My problem is to get the view tree of a page from another Context.
    The idea is to build a dynamic layout of some pages that represents "views". I can imagine this like the concept of perspectives and views of Eclipse IDE.
    Because of the difficulty to build it with pure JSP (cannot use dynamic ID nor JSTL ForEach), I try to build it into my backing bean and to bind it with a <h:panelGrid/>. By this way, I'm not able to use the <jsp:include/> tag as I usually did to include some content into the view tree.
    Sorry for my english ;)
    - Renaud.

  • I have updated my mac from snow leopard to mountain lion 3 days back. I had some important data in my library folder and it got overwritten. Is there any way i can get the data back from my snow leopard library folder?

    I have updated my mac from snow leopard to mountain lion 3 days back. I had some important data in my library folder and it got overwritten. Is there any way i can get the data back from my snow leopard library folder?
    I tried mackeeper to recover files but it could not. Any other way any one has tried to recover a system library folder after OS upgrade?

    No, it doesn't store a clone. You would have needed to make one with either SuperDuper or CarbonCopy Cloner.
    If the files were in your ~/Library folder then they may still be there. As I said, you can access it by
    going to your Finder "Go" menu hold the option key to choose "Library". I wouldn't think an upgrade would overwrite anything in ~/Library.
    If you have a Time Machine backup you may also be able to use that to retrieve them.

  • How can i pass the same parameter from 1 jsp page to many jsp page?

    hello.....
    how can i actually pass a parameter from 1 jsp file to many other jsp files? pls help......
    thanx

    Hi
    Save the information which u want to pass to various JSP's inside Session Object.
    There is an Object called HttpSession and u can store information inside which other jsp pages within the same domain and same browser instance can use it.
    commands which are for ur interests are
    <Session Object>.setAttribute("<object name>", <value>);
    Example
    HttpSession objsession =request.getSession(true); String strName="NEED_HELP":
    objSession.setAttribute("Name", strName);
    And then u can retreive that information in your n pages.
    Read any JSP/Servlet Books and u will know about them
    Bye.

  • Passing between date paramters to a different page in the application

    Hi,
    I'm woking on a drill down report in Apex 4.0.
    Page1: (standard Report)
    select transactiondate, storenumber, count(amount) as Count from transactions (transactiondate data type is DATE).
    Created two items :P1_From_Date and :P1_To_Date
    When i run the Page1 with the from_date and to_date given, reports populate the data for the particular date,(eg: 15-NOV-2011).
    Until this point everything is fine.
    In Page 2, I need to show the detail of every transactions for a particular store.
    Created a hidden item in page 2 as :P2_storenumber
    created a link on the Count column in Page1, select :P2-storenumber corresponding to the #COUNT#
    Query on page 2 is : select transactiondate, storenumber,amount from transactions
    here i want to get the transaction for a day (between 15-NOV-2011 00:00 and 15-NOV-2011 23:59 ).
    How can I accomplish this requirement, by passing the date parameters from the Page1 for any date in Page2.
    Please help.
    thanks in advance.

    Hi user13561710,
    Assuming the items on page 1 are populated with date values, you can simply reference them in the query on page 2:
    select transactiondate, storenumber,amount from transactions where storenumber = :P2_storenumber and transaction_date between :P1_from_date and :P1_to_date
    If need be, you could always explicitly convert the date items to a date (and not rely upon the implicit conversion), for example:
    select transactiondate, storenumber,amount from transactions where storenumber = :P2_storenumber and transaction_date between to_date(:P1_from_date,'DD-MON-RRRR') and to_date(:P1_to_date,'DD-MON-RRRR')
    assuming the formart of the date value on page 1 is DD-MON-RRRR.
    I hope this helps.
    Joel

  • How to retrieve the parameter names from a JSP page ? Urgent Please

    Hello,
    Can anybody tell me how to retrieve the parameter names from the JSP
    page. (without using getParameterNames() method.)
    The problem with the getParameterNames() method is I get the Jumbled output.
    I need it very badly
    With regards
    Ananth R
    email:[email protected]
    [email protected]

    Dear duffymo,
    My primary intention is to convert the JSP form information into a XML file.
    If I do not get the Parameter names in the correct order how can I maintain
    tag order in XML file.
    For ex: (JSP PAGE VIEW)
    Name--
    FirstName
    MiddleName
    LastName
    Address--
    Street1
    Street2
    City
    Country
    &so on
    (XML File to be generated)
    <Name>
    <FirstName>Value</FirstName>
    </Name>
    <Address>
    <street1>value</street1>
    </Address>
    & so on
    If I use getParameterNames() to get all the parameter names(Which form the tag names in the XML file ) the Enumeration object it returns will not be in the same order as the text fields in JSP.From this I can not construct a meaningful XML file.
    order means: Order of entry on the page, from top to bottom
    That's it
    Waiting for your responses

  • ABAP proxy client sending to XI   and Receive the data back from the DB

    Hi
    I am new to XI need a clarification on the following scenario
    I have a scenarion where ABAP Proxy (Clinet) from ECC will be sending the data to Data base server via XI,  and needs to return the values back to ECC
    ECC -
    > XI/PI -
    > Remote server  (Database)
          <-- XI/PI <--
    Can anyone give idea how can I develop this scenario.
    I am sure I would be using the Proxy BADI to send the data from ECC to XI in Asyscrounous mode,
    Thanks
    PR

    Hi,
    As you said the data will be sent asynchronously from BAPI to XI which means you will have to split up the scenario into two.
    First One -
    Sender Proxy - XI - Receiver JDBC.
    Second -
    Sender JDBC - XI - Receiver Proxy.
    You can set a flag to"1" when you insert data into table. the run a query on the database which will fetch record whose flay is set to "1" and also simultaneously rest the flag to "0" to indicate that this record is already send to SAP.You can make use of stored procedures too.
    Please award points if the reply is useful.
    Regards,
    Pragati

  • Two lost iphones.  How to get the data back from icloud backup/.

    Icloud shows my backup data in storage from two lost iphones. YesI was having too much of a good time.   How do I download this data to my Mac?  I didnt back up the data to itunes previsouly.?

    You cannot download data from an icloud backup (of a device) to a mac.  You can buy a new device and while doing the initial setup in itunes, be sure to perform a restore from the icloud backup.

  • Opening a Java Window from a jsp page on the client side

    Hi all,
    Thanks in advance to all who could help me for this problem.
    I've written some jsp pages. In one of them, I open a new Java Window,
    which is a simple Java Frame. If I test this directly on the Tomcat
    server, everything works well.
    But when I call the jsp page through a web browser of a distant client
    (normal use), and when I want to see the java window, no window pops
    up. It appears that the Java Window pops up on the server, and not on
    the client side, which is what I wanted.
    Could someone tell me how to make the Java frames appear on the client
    side ? (Is it linked to the code or to the configuration of Tomcat ?)
    Thanks in advance,
    Alexis.

    JSP always run on the server. On the client you only see the results.
    But you can use applets on the client side: http://java.sun.com/docs/books/tutorial/uiswing/components/applet.html

  • Getting the data back from pdf form.

    Hi all,
    I am generating a pdf form an ABAP program using the function module- FP_FUNCTION_MODULE_NAME.
    The form is getting generated properly.Some of the fields in thid form is editable.
    I want to get this values back to the ABAP program for further processing.
    Please let me know how this can be done.
    Regards,
    Rupesh R Nair.

    Hi,
    Have you choose your scenario for updating value according to the value set in the PDF forms ( Download, mail ... )
    If you want user send the forms by back mail or by download it thru an abap program let me know.
    Best regards

  • How can I pass a variable  value from first jsp page to thired jsp page

    In my program ,threr are three jsp pages . I want the first pages's variable value in to thired page .How can I acess.
    I used the request.getparameter() ,but when I print the value , null value is getting .

    request parameters only last for one request.
    To save them longer than that you need to save them somewhere.
    Couple of alternatives
    1 - store them to session
    session.setAttribute("username", request.getParameter("username");
    2 - create a hidden field on page 2 and store the value from page 1 there. When you submit page2, you can get it on page3 with request.getParameter again.
    <input type="hidden" name="username" value="<%= request.getParameter("username") %>">

  • How can I rollback from Yosemite to Lion? I need to do this as I purchased a newer iMac and I have the old 17" iMac HD that I want to get the data migrated from. When I start the Migration Assistant it tells me that the OS X version is too old. Help!

    I have purchased a newer mid 2011 iMac for my wife to replace her dead 17"iMac from 2006. It was running Snow Leopard. The new iMac has Yosemite and when I go into Migration Assistant it tells me that the OS X is too old, implying that I cannot get the data from it. How can I migrate this data to the new iMac? I have the hard drive removed and in an external enclosure connected to the new iMac.
    Thanks,
    Bill Stratman

    Since any OS since Lion does not support Rosetta or PPC applications, you may want to check her apps for compatibility.
    Have you tried to follow all the instructions here:
    OS X Yosemite: Transfer your info from a computer or storage device
    Also, as a general note: when you got the 2011 iMac did it have the original OS installed as required by the SLA? The seller is to remove any OS version obtained at the app store since the license is not transferable - did he do that? If not, as the OS download is tied to the Apple ID used to obtain it, you will not be able to update apps or reinstall the OS, so may I suggest you do this step now before you start porting over all the files. Use Internet Recovery: Hold Command + Option + R while restarting/rebooting until you see a spinning globe and a progress bar. After 2 - 10 minutes, you'll be connected to Apple's servers and see a Utilities window. Go to Disk Utility and choose erase your drive; once finished, go back to the window and choose to reinstall OS X. This should install a fresh original OS version which you can then update and tie to your wife's Apple ID.

  • Calling a servlet from a JSP page using the J2EE reference implementation

    I have a JSP with an include tag as follows: <jsp:include page="servlet/ConnectionServlet" flush="true" />
    When I use JRUN it works fine. I created an ear file and ported
    the application to the J2EE reference implementation. When running the app under the J2EE reference implementation the ConnectionServlet is never called. I figured it must a deployment issue. I tried adding the ConnectionServlet.class file to the WEB-INF\classes file as servlet\ConnectionServlet.class but the JSP still can't find the servlet. Any ideas where I've gone wrong? TIA, Joe

    I have a JSP with an include tag as follows:
    <jsp:include page="servlet/ConnectionServlet"
    flush="true" />Basically, WEB-INF/classes gets added to the classpath, so the directory structure under this folder should be identical to your package structure. If the ConnectionServlet.class is not actually in a package, then it should be directly in WEB-INF/classes (ie if "servlet" isn't actually the name of your package, don't use a WEB-INF/classes/servlet/" directory).
    Then try taking out the "servlet" from your include tag, so you just have page="/ConnectionServlet" (not sure about the leading slash - try experimenting!)
    if this doesn't work, try adding this to your WEB-INF/web.xml file:
    <web-app><!-- the web-app tags may already be there - don't add more -->
    <servlet>
    <servlet-name>ConnectionServlet</servlet-name>
    <servlet-class>your.full.package.here.ConnectionServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ConnectionServlet</servlet-name>
    <url-pattern>/ConnectionServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    Good Luck!

  • Calling function from Backing Bean or JSP page

    We are on Jdeveloper 10.1.3.3.0, ADF Faces, JSF Faces .., Currently there is a function call from Javascript event (onmouseover) in the JSP page. I want to call this function from a backing bean or JSP page, as I have to pass some values to this function.
    For Ex., I have a function call like return submit('A','B','Test'); on the Javascript event (onmouseover) in jsp page. I want to remove this function from the javascript event and call from backing bean or jsp page to pass some values into the submit() function. I appreciate if anyone can give some example of how to call this function from backing bean or jsp page in the <SCRIPT> or <SCRIPTLET>
    Thanks,
    Ram

    A use case would be helpful so that we can get a better idea of what you want to do.
    As a general rule, there is no way to call a client side Javascript function from a backing bean, which is server side. However, there are ways to inject information from a backing bean into your Javascript call. For instance, I have an application that uses Google Maps API. It has an onload call to a Javascript function that builds the map and designates it's center point. The center point comes from a backing bean as latitude and longitude properties. So here is my body tag:
    <afh:body onload="initialize(#{backing_searchResults.latitude},#{backing_searchResults.longitude},#{searchCriteria.distance})"
              onunload="GUnload()">onload calls the Javascript function called initialize, and passes the latitude, longitude, and distance from the bean. Is the function really being called from my backing bean? No - the parameters are hard coded into the onload event code when the page is rendered. Does it do the job? Sure it does.

Maybe you are looking for

  • Check-in tab is not working in NWDI

    Hi Gurus, We have one NWDI (SP9) server instance installed on our EP Box(SP11),both of them have common oracle database.we have upgraded the patch level of NWDI also to SP11,run the template installer,configured the SLD and CMS.Our SLD is the XI box

  • Issue with Substitution in UWL

    Hi Friends, I have a problem with the substitution rules within the EP7.0 (our back end system is ECC6.0). I have created a substitution rule and have set it active. When I have a look later on to the management of substitution rules, i always get an

  • Recording color bars to a CF card

    want to record color bars from Premier to a CF card to play back from Canon 5d iii. i choose Export and then H.264 format, but it won't play back from the card,on the camera.

  • Retrieve Height of an expandable text field

    Hi, I have a table in a dynamic interactive PDF form. When the user enters text into a text field of the table, the field can expand over multiple lines. I want to know how I can retrieve the height of the expanded field so that I can resize other el

  • IWeb doesn't recognize my iPhoto library

    I am trying to add photos from my iPhoto library to iWeb. Although iWeb does show a listing of my iPhoto albums, nothing happens when I select the album. G5   Mac OS X (10.4.6)   G5   Mac OS X (10.4.4)