Invoking the Dynamically Created JNLP

Unfortunately I do not seem to be getting any responses to my questions in this group:( However, I am still hoping that someone may know the answer to this.
I have a portlet that is forwarding the request to a JSP file that creates the dynamic JNLP file.
I see the contents of this JNLP file in the source of the page served, but I was hoping that the forwarding of the request will launch Java Web Start.
The contents of the JSP file are
<%@ page session="false"%>
<%@ page contentType="application/x-java-jnlp-file" info="My JNLP"%>
<%
StringBuffer codebaseBuffer = new StringBuffer();
codebaseBuffer.append(!request.isSecure() ? "http://" : "https://");
codebaseBuffer.append(request.getServerName());
if (request.getServerPort() != (!request.isSecure() ? 80 : 443))
codebaseBuffer.append(':');
codebaseBuffer.append(request.getServerPort());
codebaseBuffer.append('/');
%>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="<%= codebaseBuffer.toString() %>"
     href="<%= request.getRequestURI() %>">
     <information>
          <title>Sample</title>
          <vendor>Sample Web Start Application</vendor>
          <offline-allowed/>
          <icon href="salpro-icon.gif"/>
     </information>
     <resources>
          <j2se version="1.4+"/>
          <jar href="resources/JNLPTime.jar"/>
     </resources>
<application-desc main-class="J2.ws.TheTime"/>
</jnlp>
A portion of the source page that is served :
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="http://mharidasa.almaden.ibm.com:8421/"
     href="/ibm/PA_1_0_2B4/resources/J2JWS.jsp">
     <information>
          <title>Sample</title>
          <vendor>Sample Web Start Application</vendor>
          <offline-allowed/>
          <icon href="salpro-icon.gif"/>
     </information>
     <resources>
          <j2se version="1.4+"/>
          <jar href="resources/JNLPTime.jar"/>
     </resources>
<application-desc main-class="J2.ws.TheTime"/>
</jnlp>
How can I make the server invoke the JNLP as opposed to serving it back?
Your suggestions are very much appreciated.
thank you - Minnie

Hi! I am doing a similar project where I have a jsp
that calls the jnlp using this url:
http://c37ts014/myserver/server/servlet/WebStartUpload.
nlp?documentid=123&documentname=test
How can I get the values of my parameters namely
documentid and documentname inside my app? Is there a
way where I need not have to create my jnlp
dynamically then? If not, would it be ok to ask how
you did your dynamic loading through jsp?
Hope you can help me. Thanks.I experimented with this heavily yesterday (using oracle app server , but it is the same idea) and could not get it to work with parameters on both the jnlp and jar resource hrefs, however it can work with parameters on the homepage href. Too bad, there seems to be no reason why it shouldn't work with parameters in all situations unless it has some security implication that I'm not aware of.

Similar Messages

  • Custom splash screen not appearing in the Dynamic created jnlp()

    Hi,
    I am not able to show my custom splash screen while starting the webstart application, instead getting the "sun webstart logo". I am dynamically generating the jnlp file using jsp (struts application). Application is working perfectly except custom splash screen. Below is my jsp which will generate the jnlp on fly. The test.gif file is in place.
    <% response.setContentType("application/x-java-jnlp-file");
      response.setHeader( "Pragma", "no-cache");
      response.setDateHeader( "Expires", 0 );%>
    <%@ page import="java.io.*" %> 
    <%String baseURL = WebUtil.webUrlParser(request.getRequestURL().toString(),request.getContextPath(),request.getServerPort());%>
    <jnlp      spec="1.0+" codebase="<%=baseURL%>/cs_jnlp">
    <information>
        <title>Launching JNLP</title>
        <vendor>Satyasai</vendor>
        <icon href="/images/test1.jpg"/>
        <homepage href="docs/help.html"/>
       <description>test</description>
            <icon kind="splash" href="images/test.gif" />
       </information>
          <security>
            <all-permissions/>
         </security>
         <resources>
       <j2se version="1.6+"/>
       <jar href="<%=baseURL%>/cs_jnlp/AppLaunch.jar"/>
      </resources>
           <application-desc main-class="Launch" >
           <%
           int roleId = (Integer)session.getAttribute(Constant.USER_TYPE);
           String sessionID=(String)request.getAttribute("SELECTION_SESSION_ID");
           String action=(String)request.getAttribute("action");
           String userID = (String)session.getAttribute(Constant.LOGIN_ID);       
           String sessionType=(String)request.getAttribute("sessionType");        
           %>
           <argument><%=sessionID%></argument>
           <argument><%=action%></argument>
           <argument><%=userID%></argument>
           <argument><%=sessionType%></argument> 
    </application-desc>
    </jnlp>If I use normal servlet - jsp using RequestDispatcher to forward request to a jsp which on fly creates jnlp, it shows the my custom splash screen. I am not very sure where is the difference. If I look at both generated jnlps they are almost one and the same. Can any one throw some insight on this.
    Thanks & Regards,
    Satyasai

    Hi Andrew,
    Thanks for your response.
    1. I have launched it number of times but no luck.
    2. I have written a jsp (using servlet + jsp no struts frame work) which will create jnlp on fly, which is showing my custom splash screen. If you refer in the initial post, it is not working with struts kind of framework. See the below jsp which shows custom splash screen. It worked without href.
    3. All jnlps are well formed and perfectly working in my development environment. For security purposes I have not shown some of the texts and logos.
    <% response.setContentType("application/x-java-jnlp-file");
      response.setHeader( "Pragma", "no-cache");
      response.setDateHeader( "Expires", 0 );%>
    <%@page import="java.util.ArrayList" %>
    <%
    String client = (String)request.getAttribute("clientLocation");
    String fileNames = (String)request.getAttribute("filenames");
    String url= (String)request.getAttribute("serverFilesLocation");
    String baseURL = "http://"+request.getLocalAddr()+":"+request.getServerPort()+request.getContextPath();
    %>
    <jnlp spec="1.0+" codebase="<%=baseURL%>/sw_jnlp"> 
      <information>
        <title>Softwares Download</title>
        <vendor>test</vendor>
        <icon href="/images/test1.jpg"/>
        <homepage href="docs/help.html"/>
       <description>Software Downloads </description>
            <icon kind="splash" href="images/logo_small.gif" />
       </information>
       <update check="timeout" policy="always"/>
          <security>
          <all-permissions/>
      </security>
      <resources>
        <j2se version="1.6+"/>        
        <jar href="mod.jar"/>  
      </resources> 
      <application-desc main-class="InstallSW">
      <argument><%=client%></argument>
      <argument><%=fileNames%></argument>
      <argument><%=url%></argument>
      </application-desc>
    </jnlp>Thanks & Regards,
    Satyasai

  • Formatting value in the dynamically created table

    Hi,
    I have created table dynamically.
    In that, if the columns going to be number datatype,
    <af:convertNumber pattern="##########"/> , i want to apply this pattern,
    if the column going to be date,
    <af:convertDateTime pattern="DD/mm/yyyy" /> , i want to apply this pattern.
    Code Snippet for dynamically created UI table,
    <af:table rows="#{bindings.DynamicVO.rangeSize}"
    fetchSize="#{bindings.DynamicVO.rangeSize}"
    emptyText="#{bindings.DynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    var="row" rowBandingInterval="0"
    value="#{bindings.DynamicVO.collectionModel}"
    selectedRowKeys="#{bindings.DynamicVO.collectionModel.selectedRow}"
    selectionListener="#{bindings.DynamicVO.collectionModel.makeCurrent}"
    rowSelection="single" id="t1">
    <af:forEach items="#{bindings.DynamicVOIterator.attributeDefs}" var="def">
    <af:column headerText="#{def.name}" sortable="true" rendered="#{def.hints.displayHint!='Hide'}"
    sortProperty="#{def.name}" id="hisc1">
    <af:outputText value="#{row[def.name]}" id="othis1">
    </af:outputText>
    </af:column>
    </af:forEach>
    </af:table>
    How to apply the pattern for the ouput text dynammically depending on the data type.
    My Jdeveloper version is 11.1.1.3.0
    Reg,
    vini

    Any help on the above scenario?

  • How to run dynamically created jnlp?

    Hi,
    I'm learning how to run a dynamic jnlp file create by a cgi program.
    I have a jnlp file, which can be executed by the in the
    HTML file. Then my experiment is to write a perl script to print
    exactly the same content as the jnlp file, and then the href is
    re-directed to the cgi. But Then I got an error complaining
    the first line:
    Bad header = <?xml version="1.0+" .... ?>Is there anything else I should add in the header?
    Thanks.

    To be more specific about my question, here is the perl script I used
    to generate the jnlp file. What should I add to it?
    Thanks.
    #!/usr/bin/perl
    use CGI;
    ## Read parameters
    $query = new CGI;
    $SecID    = $query->param("SECID");
    $PlayName = $query->param("PlayName");
    $PlayFile = $query->param("PlayFile");
    $PlayFrom = $query->param("PlayFrom");
    $PlayTo   = $query->param("PlayTo");
    $CodeBase = $query->param("CodeBase");
    # Generating jnlp
    print "Content-Type: application/x-java-jnlp-file \n";
    #print '<%page contentType="application/x-java-jnlp-file" %>'."\n";
    print '<?xml version="1.0" encoding="utf-8"?>'."\n";
    print "<jnlp spec=\"1.0+\"  codebase= \"$CodeBase\" />\n";
    print "  <information> \n";
    print "    <title> $PlayName </title> ";
    print "    <vender>  </vender> \n";
    print "    <description> </description>
    print "    <offline-allowed/>
    print "  </information> \n";
    print "  <security>\n";
    print "     <all-permissions> \n";
    print "  </security>\n";
    print "  <resource>\n";
    print '     <jar href="Java/Piano/MidiBox.jar" />'."\n";
    print '     <j2se version="1.2+"
    href="http://java.sun.com/products/autodl/j2se"/> '."\n";
    print "  </resource>\n";
    print '  <application-desc main-class="eng.midi.MidiBoxGUI">'."\n";
    print "     <argument>-px</argument> \n";
    print "     <argument>-Ud</argument> \n";
    print "     <argument>$PlayFile</argument> \n";
    if ($PlayFrom)
    print "     <argument>-from $PlayFrom </argument> \n";
    if ($playTo)
    print "     <argument>-to $PlayTo </argument> \n";
    print "  </application-desc> \n";
    print "</jnlp> \n";

  • Prob in displaying the dynamically created ui elements on click of a button

    hi all
    i created 1 inputfield, 2 buttons & i wrote the following code in wddomodifyview() of view.
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
        inf1.bindValue("Student.name");
        IWDButton but1=(IWDButton)view.createElement(IWDButton.class,"button1");
        but1.setText("Button1");
        IWDButton but2=(IWDButton)view.createElement(IWDButton.class,"button2");
        but2.setText("Button2");
        IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("TransparentContainer");
         tc.addChild(inf1);
        tc.addChild(but1);
        tc.addChild(but2);
         IWDButton button1= (IWDButton) view.getElement("button1");
         IWDAction theAction=wdThis.wdCreateAction(IPrivateDynCompView.WDActionEventHandler.DISPLAY,"");
                        but1.setOnAction(theAction);
                             IWDParameterMapping bm1 = button1.mappingOfOnAction();
                             bm1.addParameter("id", "b1");
                   IWDButton button2= (IWDButton) view.getElement("button2");
                   IWDParameterMapping bm2 = button1.mappingOfOnAction();
                   bm1.addParameter("id", "b2");
    and i wrote the following code in onactiondisplay()
    if (id.equals("b1"))
         wdContext.currentStudentElement().setName("First Button Clicked");
         else
         wdContext.currentStudentElement().setName("Second Button Clicked");
    when i run the application, the following error is displaying.....
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
        at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
        at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
        at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
        at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
        ... 35 more
    com.sap.tc.webdynpro.services.exceptions.WDCreationFailedException: Cannot create view element implementation com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:75)
         at com.sap.tc.webdynpro.progmodel.view.View.createElement(View.java:89)
         at com.sap.dynactions.DynCompView.wdDoModifyView(DynCompView.java:140)
         at com.sap.dynactions.wdp.InternalDynCompView.wdDoModifyView(InternalDynCompView.java:240)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
         at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:190)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:398)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.modifyView(ClientApplication.java:679)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:381)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.view.ViewElementFactory.createElement(ViewElementFactory.java:65)
         ... 30 more
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: View: Cannot add element with duplicate ID "inf1" of type com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField
         at com.sap.tc.webdynpro.progmodel.view.View.addElement(View.java:481)
         at com.sap.tc.webdynpro.progmodel.view.ViewElement.<init>(ViewElement.java:43)
         at com.sap.tc.webdynpro.progmodel.view.UIElement.<init>(UIElement.java:188)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.AbstractInputField.<init>(AbstractInputField.java:143)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.InputField.<init>(InputField.java:71)
         ... 35 more
    pls tell me how to run this application without errors.....
    thanks & regards,
    vila.

    Hi Vila,
    Issue here is you are trying to create Input field with already used id "inf1" in first line of code
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf1");
    Please change it to
    IWDInputField inf1=(IWDInputField)view.createElement(IWDInputField.class,"inf2");
    and correspondingly line
    tc.addChild(inf2);
    Your code will work.
    Please note that you should follow....following code style in wdDoModifyview
    if(firstTime)
    //dynamic view elements creation

  • How to create table field inside the dynamically created table?

    Hi, All!
    I have created dynamic internal table (using field catalog and CALL METHOD cl_alv_table_create=>create_dynamic_table )
    and put this table  into FM REUSE_ALV_GRID_DISPLAY. ALV grid work. Now I need to color rows of my ALV, therefore  I have to insert new column with name "COLORS" and type lvc_t_scol. I  see three ways to do it , but all ones are unsuccessful:
    1. Insert column into field catalog. FM REUSE_ALV_FIELDCATALOG_MERGE does not return info about "COLORS" I guess because COLORS is a table.
    2. Insert column into field catalog manually. It provides a short dump during dynamic table creating or during call of REUSE_ALV_GRID_DISPLAY.
    3. Create dyn table first, then add new field . I could not find a way how to do it :(((((((
    Can somebody help me?
    Tatiana

    Hi,
    Here is the solution for this problem, Sample code:
    *& Report  ZCHA_ALV_GRID_CELL_COLOR                                    *
    REPORT  ZCHA_ALV_GRID_CELL_COLOR                .
    TABLES:MARA.
    DATA: W_CONTAINER         TYPE SCRFNAME VALUE 'ALV_CONTAINER',
          W_GRID              TYPE REF TO CL_GUI_ALV_GRID,
          W_CUSTOM_CONTAINER  TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
         W_EVENT_RECEIVER    TYPE REF TO LCL_EVENT_RECEIVER.
    *layout
    DATA: WA_LAYOUT           TYPE LVC_S_LAYO.
    *field catalog
    DATA: IT_FIELDCAT_WRT_OFF TYPE LVC_T_FCAT,
          WA_FIELDCAT_WRT_OFF TYPE LVC_S_FCAT.
    DATA:BEGIN OF IT_MARA OCCURS 0,
         MATNR LIKE MARA-MATNR,
         MAKTX LIKE MAKT-MAKTX,
         CELLCOLORS TYPE LVC_T_SCOL,
         END OF IT_MARA.
    SELECT P~MATNR
           Q~MAKTX
           INTO CORRESPONDING FIELDS OF TABLE IT_MARA
           FROM MARA AS P INNER JOIN
                MAKT AS Q ON
                PMATNR = QMATNR.
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
    SET TITLEBAR 'xxx'.
      IF NOT W_CONTAINER IS INITIAL.
        CREATE OBJECT W_CUSTOM_CONTAINER
                 EXPORTING CONTAINER_NAME = W_CONTAINER.
        CREATE OBJECT W_GRID
                 EXPORTING I_PARENT = W_CUSTOM_CONTAINER.
      ENDIF.
      CLEAR IT_FIELDCAT_WRT_OFF.
      REFRESH IT_FIELDCAT_WRT_OFF.
      WA_FIELDCAT_WRT_OFF-FIELDNAME = 'MATNR'.
      WA_FIELDCAT_WRT_OFF-COL_POS   = '1'.
      WA_FIELDCAT_WRT_OFF-OUTPUTLEN = '35'.
      WA_FIELDCAT_WRT_OFF-SCRTEXT_L = 'Material No'.
      APPEND WA_FIELDCAT_WRT_OFF TO IT_FIELDCAT_WRT_OFF.
      CLEAR WA_FIELDCAT_WRT_OFF.
      WA_FIELDCAT_WRT_OFF-FIELDNAME = 'MAKTX'.
      WA_FIELDCAT_WRT_OFF-COL_POS   = '2'.
      WA_FIELDCAT_WRT_OFF-OUTPUTLEN = '45'.
      WA_FIELDCAT_WRT_OFF-SCRTEXT_L = 'Material Desc'.
      APPEND WA_FIELDCAT_WRT_OFF TO IT_FIELDCAT_WRT_OFF.
      CLEAR WA_FIELDCAT_WRT_OFF.
      DATA LS_CELLCOLOR TYPE LVC_S_SCOL.
      READ TABLE IT_MARA INDEX 5 .
      LS_CELLCOLOR-FNAME = 'MATNR'.
      LS_CELLCOLOR-COLOR-COL = '3'.
      LS_CELLCOLOR-COLOR-INT = '1'.
      APPEND LS_CELLCOLOR TO IT_MARA-CELLCOLORS.
      MODIFY IT_MARA INDEX 5.
      WA_LAYOUT-CTAB_FNAME = 'CELLCOLORS'.
      CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IS_LAYOUT       = WA_LAYOUT
        CHANGING
          IT_FIELDCATALOG = IT_FIELDCAT_WRT_OFF
          IT_OUTTAB       = IT_MARA[].
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Try to assign appropriate points.
    Regards,
    Suman

  • How to append the dynamically created sequence in to the main sequence

    i have created a sequence dynamically using c# with myEngine.NewSequence(). I  am loading this sequence into a sequence file created using myEngine.NewSequenceFile(). every sequence file has a main sequence by default. Now I need to append the created sequence in to the main sequence. can you please help me to solve this issue?

    1. Sequence seqMain = seqFile.GetSequenceByName("MainSequence");  2. Your stuff that creates a SequenceStuff e.g. "Hello"3. Step stepSeqCall = engine.NewStep(AdapterKeyNames.SequenceAdapterKeyName, "SequenceCall"); 4.stepSeqCall.Name = "HELLO" or sequenceStuff.Name;5. objModule.UseCurrentFile = true;
    6.objModule.SequenceName = stepSeqCall.Name ;
    7.seqMain.InsertStep(stepSeqCall, nSeq, StepGroups.StepGroup_Main);
    Greetings from Germany
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=

  • Getting values from the dynamically created textboxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with 2 textboxes in each row. and
    after entering data into those rows , user clicks on save button
    and page is submitted. I want to capture all this data of dynamically
    added rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    U can do something like......
    class MatrixData{
    public myMethod(){
    Arraylist list_of_rows=new Arraylist ();
    JTextBox 11=new JTextBox (); // matrix position (1,1)
    JTextBox 12=new JTextBox ();// matrix position (1,2)
    addRow(new RowData(11,12)
    public addRow(RowData data){
    list_of_rows.add(data);
    class RowData{
    Arraylist txtBoxList=new Arraylist ();
    public JTextBox getOne(){
    return txtBoxList.get(0);
    public JTextBox getTwo(){
    return txtBoxList.get(1);
    public setOne(JTextBox comp){
    txtBoxList.add(comp);
    public setTwo(JTextBox comp){
    txtBoxList.add(comp);
    Hope it helps.
    Best Regards
    Mohit

  • Help needed in getting values from the dynamically created text boxes

    Hello,
    I am developing one jsp page using struts. In the page i m
    dynamically adding some rows with two text boxes in each row. and after entering data into
    those textboxes , user clicks on save button and page is submitted.
    I want to capture all this data of dynamically added
    rows so that i can enter those rows into DB.
    how can i acheive this using struts?.
    Have anyone had tried doing it?. Please help.
    Thanx in advance
    Deepali Naik

    Hi,
    1. If you give these textBoxes the same name, then in your action you can call request.getParameterValues(paramName) - it returns String[ ] of values.
    2. You can give form textBox names like "name"+index or something like this in <logic:iterate> tag
    Good luck!

  • How to Access the Dynamically created form element

    Hi friends,
    I have generated a dynamic form in flex using xml and i want to save the all the elements of the form with there label and entered data in the formItem.
    so i m getting how to save the data.
    anybody have idea about this?????
    Thanking you
    Gajanan

    Thanks for your reply.
    as u said i have done this
    for each(var formItem:FormItem in form.getChildren()){
                            formItem.label //The FormItem's label's text
                            formItem.getChildAt(0) //The first child - TextInput, ComboBox or whatever you got
                            Alert.show(formItem.getChildAt(0).toString());
                            return;
    my first child formitem is TextInput and i entered some value in tat textInput but i m printing this i m getting the "dynamicform.ApplicationSkin3._ApplicationSkin_Group1.contentGroup.grp.Form0.FormItem15.txt studentfname"  i m getting this output
    i want to access the entered value of in the textInput.
    Thanks,
    gajanan

  • Problem with embeding the same view in dynamically created view container

    Hello Experts,
                  I am getiing a dump when i try to embed the same view inside the dynamically created view container of
    dynamically created tabs of a tabstrip
    The requirement go like this, i have 2 views in which i have have to embed the 2nd view to view1 where i have an empty
    tabstrip without tabs. During runtime i create tabs as well as view containers accordingly and then try to embed view2 in tabs.
    I have put the below mentioned code in HANDLEIN,
      DATA: lref_vcntlr  TYPE REF TO if_wd_view_controller,
            lref_comp    TYPE REF TO if_wd_component_usage,
            lv_embed_pos TYPE string.
      lref_vcntlr = wd_this->wd_get_api( ).
      lv_embed_pos = 'FILE_PERS_EDIT/VC_GENERAL'.
      TRY.
          CALL METHOD lref_vcntlr->do_dynamic_navigation
            EXPORTING
              source_window_name        = 'FILE_PERSISTENCE_WND'          " Window
              source_vusage_name        = 'FILE_PERS_EDIT_USAGE_1'       " Source View usage
              source_plug_name          = 'TO_EDIT_LAYOUT'                       " Outbound plug
              target_view_name          = 'PERS_EDIT_LAYOUT'                  " Second view to be embedded
              target_plug_name          = 'IN'                                                  " Second view inboun plug
              target_embedding_position = lv_embed_pos
            RECEIVING
              component_usage           = lref_comp.
        CATCH cx_wd_runtime_repository .
      ENDTRY.
      wd_this->fire_to_edit_layout_plg( ).
    This works fine for the first time.
    However onaction tab select i change the embeding position( 'FILE_PERS_EDIT/view container name of different tab') of the view2 an try to embed view2 in a different tab.
    At this point i get a dump stating View2 already present in the window 'FILE_PERSISTENCE_WND' of component.
    I think, the view2 embediing has to be removed before i add the view2 in a different tab
    Kindly let me know how to remove view2 embedding from tab1 before i add a view2 to a different tab or is there any other
    means to handle this problem?
    Thanks & Best Regards,
    Srini.

    Hello Srini,
    I found a solution to your problem, because I had a similar task.
    In WDDOINIT I changed the method do_dynamic_navigation to if_wd_navigation_services_new~prepare_dynamic_navigation:
    DATA:
        l_view_controller_api TYPE REF TO if_wd_view_controller.
      l_view_controller_api = wd_this->wd_get_api( ).
      TRY.
          CALL METHOD l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation
            EXPORTING
              source_window_name        = 'WDW_MAIN'
              source_vusage_name        = 'VW_SUB_USAGE_1'
              source_plug_name          = 'TO_VW_CONTENT'
              target_component_name     = 'ZTEST_DYNAMIC'
              target_view_name          = 'VW_CONTENT'
              target_plug_name          = 'DEFAULT'
              target_embedding_position = 'VW_MAIN/VC_TAB.VW_SUB/TAB1_VC'
            RECEIVING
              repository_handle         = wd_this->g_rep_handle.
        CATCH cx_wd_runtime_repository .
      ENDTRY.
      wd_this->fire_to_vw_content_plg( param1 = 'TAB1' ).
    In the action I first deleted the navigation targets, then navigated to the empty-view and last I called my target view:
      DATA:
        lv_position           TYPE string,
        l_view_controller_api TYPE REF TO if_wd_view_controller,
        lr_view_usage         TYPE REF TO if_wd_rr_view_usage,
        lr_view_***_t         TYPE wdrr_vca_objects,
        lr_view_***           LIKE LINE OF lr_view_***_t.
      l_view_controller_api = wd_this->wd_get_api( ).
      lr_view_usage = wd_this->g_view->get_view_usage( ).
      lr_view_usage->delete_all_navigation_targets( plug_name = 'TO_VW_CONTENT' ).
      CLEAR lv_position.
      CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' old_tab '_VC' INTO lv_position.
      TRY.
          l_view_controller_api->if_wd_navigation_services_new~do_dynamic_navigation(
          source_window_name = 'WDW_MAIN'
          source_vusage_name = 'VW_SUB_USAGE_1'
          source_plug_name   = 'TO_EMPTYVIEW'
          target_component_name = 'ZTEST_DYNAMIC'
          target_view_name   = 'EMPTYVIEW'
          target_plug_name   = 'DEFAULT'
          target_embedding_position = lv_position ).
        CATCH cx_wd_runtime_repository.
      ENDTRY.
      CLEAR lv_position.
      CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' tab '_VC' INTO lv_position.
      TRY.
          wd_this->g_rep_handle = l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation(
            source_window_name = 'WDW_MAIN'
            source_vusage_name = 'VW_SUB_USAGE_1'
            source_plug_name   = 'TO_VW_CONTENT'
            target_component_name = 'ZTEST_DYNAMIC'
            target_view_name   = 'VW_CONTENT'
            target_plug_name   = 'DEFAULT'
            target_embedding_position = lv_position ).
        CATCH cx_wd_runtime_repository.
      ENDTRY.
      wd_this->fire_to_vw_content_plg( param1 = tab ).
    Ann.: I my example, I had 3 views: VW_MAIN which embedds VW_SUB. VW_SUB has the tabs in it and VW_SUB embedds VW_CONTENT.
    BR,
    Roland

  • How to set the cardinality property as 1..n for a dynamically created node

    Hi...everybody
        I am creating Dropdown by index UI element and the
    context atrributes dynamically.To bind multiple data to a dropdown
    the cardinality property of the node should be 0..n or 1..n,
    But i could not set the property of the dynamically created context node to 0..n ...
    can any body suggest me..
    I implemented the following code in WDDoModify View
    IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("RootUIElementContainer");
    IWDNodeInfo node = wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,
              null,null);
    IWDAttributeInfo strinfo=node.addAttribute("Value","ddic:com.sap.dictionary.string");
    dbyindex.bindTexts(strinfo);
    tc.addChild(dbyindex);
    I could successfully display one value in the drop down,by adding the following code before the line tc.addchild(dbyindex);
    IWDNode node1=wdContext.getChildNode("DynamicNode",0);
    IWDNodeElement nodeElement=node1.createElement();
    nodeElement.setAttributeValue("Value","Hello");
    node1.addElement(nodeElement);
    but when
    i am trying to bind multiple values i am getting Exception ,,,,

    hi
    you are getting the exception because of cardinality property.
    i.e   true,false and
    you are trying to add morethan one element.
    so,if you want to add morethan one than one element you have to set the cardinality property to true,true (or) false,true.
    In your code do the following modification for changing the cardinality.
    For 0..n -->false,true
          1..n-->true,true
    IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("RootUIElementContainer");
    IWDNodeInfo node = wdContext.getNodeInfo().addChild("DynamicNode",null,true,true,false,false,false,true,null,
    null,null);
    IWDAttributeInfo strinfo=node.addAttribute("Value","ddic:com.sap.dictionary.string");
    dbyindex.bindTexts(strinfo);
    tc.addChild(dbyindex);
    hope this will solve your problem.
    In addchild(..) the parameters are
    addChild("Name ,
                    Element class for model node ,
                    Is singleton? ,
                    Cardinality ,
                    Selection cardinality ,
                    Initialise lead selection? ,
                    Datatype ,
                    Supplier function ,
                     Disposer function);
    Regards
    sowmya

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

  • How to synch values of fields (cbo & text) in Master Pages section in dynamically created pages?

    HI folks,
    I have a requirement for a form that has a common master page with a checkbox and text field in it.   The document is basically a table that dynamically adds rows as the user adds entries.   When the first page is full, a second page is dynamically created and the Master page format (including the checkbox & text field) applied to it. 
    When the user sets the checkbox on one page and/or adds text, all of the checkboxes on all of the dynamically created pages (in the master section) and all of the text boxes need to change to show the same values.   
    However, I can't figure out how to address the fields on the other pages.   The number of pages changes from user to user, so I can't address them with a static reference.
    Does anyone know how to keep these fields in synch?
    Thanks in advance!

    It woudl be easier to show than to explain it ...can you share the file? You can send it to [email protected] Include a description of the issue with your email please.
    Paul

  • Passing variables from a dynamically created textinput in AS2?

    Hey everyone,
    I have a contact form in my flash file with name/email/message fields which a user can fill out and then click send, which passes these to a php script which then emails the information that they entered. This works fine when the text inputs are manually placed on the stage and all the information is passed to the php script and emailed to me. I am just updating it so the textinputs are created via AS2 so that I can style them more easily etc. This is fine however when created via script they no longer get passed to my php file. I am creating the textinput using the following code (which works fine):
    var my_fmt:TextFormat = new TextFormat();
    my_fmt.bold = false;
    my_fmt.font = "Arial";
    my_fmt.color = inputcol;
    contact_form.createTextField("contact_name", getNextHighestDepth(),112.6, 27, 174, 20);
    contact_form.contact_name.wordWrap = true;
    contact_form.contact_name.multiline = false;
    contact_form.contact_name.border = true;
    contact_form.contact_name.borderColor = inputcol;
    contact_form.contact_name.type = "input";
    contact_form.contact_name.setNewTextFormat(my_fmt);
    contact_form.contact_name.text = "";
    FYI I am creating this outside the movieclip containing the form (called contact_form) and then adding it into that mc specifically because I thought this may be necessary as doing it within the mc itself (using this.createTextField....) didn't work, however both seem to have the same effect.
    I am then doing various checks on the input box contents (to make sure it's not empty etc), this also works fine and gives me the relevant error if it is empty so it's accessing it correctly. I then use the following code to submit the variables and check_status checks the success/failure of the php script and alerts the user accordingly:
    loadVariables("http://www.makeaportfolio.com/send_email.php?flashmo=" + random(1000), this, "POST");
    message_status.text = "sending....";
    var interval_id = setInterval(check_status, 400);
    This works fine however does not pick up the value of the dynamically created text input (however does pick up all the text inputs that are manually added to the stage). I am rather confused as to why it's not picking this up and am not sure how I set it to do so, i would be immensely grateful if someone could point me in the right direction?
    Thanks so much for your help as ever,
    Dave

    Hi kglad,
    I'm sorry but i still don't understand what you mean? They are all text inputs which are defined in AS2 (you can see the code in my first post), the values (inputtext.text) are surely set by the user when they enter information into the input boxes. Accessing these works fine within my flash file, they just don't get passed to my php file. I got round this by manually creating duplicate textinputs on the stage for each dynamically created textinput which are all hidden, then assigning the values of the dynamically created inputs to the manually created inputs before loading the php file. This works fine as it picks up the manually placed inputs as local. I assume it's something to do with the scope of the dynamically created inputs but I cannot work out how you would ensure they would be picked up as even when you explicitly create them within the relevant mc it doesn't pick them up. As I say i've managed to get it working in a rather convoluted way which is good but would be most interested to understand why the other method doesn't work.
    Thanks so much for your help,
    Dave

Maybe you are looking for

  • 10.4.7/10.4.8 internet and airport extrme

    I recently upgraded to 10.4.7 from previous OS when HD went out in powerbook - I also am on 10.4.7 on my new MBP. The internet is very slow and stalls all the time since using this - when I was in 10.2.8 it was fast! so is there a problem? I am plugg

  • 10g to 11gR2 Upgrade using Data Pump Import

    Hi, I am intending to move a 10g database from one windows server to another. However there is also a requirement to upgrade this database to 11gR2. Therefore I was going to combine the 2 in one movement by - 1. take a full data pump export of the so

  • Photo Downloader freezes while Devicelist is loading

    Hi there, on my iMac (OSX 10.5.8) the Photo Downloader works well when the system is "freshly started". At any uncertain point in time, when I launch Bridge and the Photo Downloader, the window "Device list is loading" (actually "Geräteliste wird gel

  • Camera raw nik efex pro 2 and photoshop elements 11

    I've just dowloaded ps elements 11 I cannot open camera raw and I don't see nik efex pro2 filter what to do thank pf

  • V11.1.2 - Configurator error

    Hi all, WE need to run the configurator so that we can update our database connections after upgrading from MS SQL 2005 to 2008. When we run the configurator we get the following error: Running Inventory Existence Check.... FATAL ERROR: Inventory Exi