Submit struts portlet in same window

hi,
i develop a portlet in struts and its running ok, but i click in button submit the portlet is process in full window and not in same page in portlet.

Download the PDK software and extract it. You find a sample portlet in the following path:
pdksoftware\pdk\jpdk\v2\jpdk\pdkstruts\htdocs\struts
For your convenience, I pasted here one of the JSPs:
<%@ page contentType="text/html;charset=ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/pdk-struts-html.tld" prefix="pdk-html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<h2>
    <bean:message key="addCustomer.title"/>
</h2>
<p>
<pdk-html:form action="updateCustomerStore.do">
    <table border="1">
        <tr>
            <td><bean:message key="general.name"/></td>
            <td><html:text property="name"/></td>
        </tr>
        <tr>
            <td><bean:message key="general.address"/></td>
            <td><html:text property="address"/></td>
        </tr>
    </table>
    <html:submit/>
</pdk-html:form>
<p>
<pdk-html:img page="/htdocs/struts/struts-power.gif" alt="Powered by Struts"/>Peter

Similar Messages

  • Struts portlet- value lost in dropdown on submit

    Hi ,
    I have developed a struts portlet .it works fine in Oc4j environment.
    I have a dropdown with static values when submitted from a portal container the value gets cleared.
    the PDK Version is : 10.1.2.0.2
    my jsp code is
    <html:select property="feedbackreason">
    <html:option value="Technician's Willingness to Help">Technician's Willingness to Help</html:option>
    <html:option value="Technician Knowledge">Technician Knowledge</html:option>
    <html:option value="Technician's Demeanor">Technician's Demeanor</html:option>
    </html:select>
    Please suggest

    Hi,
    The issue was solved by oracle portal support team .
    In Metalink Note:357760.1
    please refer to ethe exaample below:
    <select name='<%=
    PortletRendererUtil.portletParameter(pReq, "preferred")%>'>
    <option value ="">Please SelectOption </option>
    <option value="P">Personal</option>
    <option value="O">Official</option>
    </select>
    Regards
    Prem

  • Struts portlet url posting

    Hi all,
    I am experimenting with a struts file upload portlet, trying to work around the fact that file upload directly to the PPE is not supported. Things work (quite) fine when I use the Struts HTML form (instead of the PDK Struts HTML) tag for the form element and add target=_new, so the page submits to a new window. This popup can be closed after a succesful file upload and we're (quite) fine.
    However, I'd like to submit to a struts (non-portal) page in the same window and return to a portal page afterwards. Using the non-pdk struts tags like mentioned above does already provide me the ability to treat the file as I wish, but I just don't find a way to get back into the portal. I could just try and do with javascript back-navigation, but this is not really desirable as it just takes me back to the form. What I'd like to do is to go to just another struts action from the Action class to which the page is submitted, for example by using a response.sendRedirect() command. The thing is I haven't found a way to get the appropriate URL there. If I could just have it as an extra property of the form I'm submitting, that'd be dead simple, but doing it inside a hidden-tag (or any other) in a JSP document seems to have the side-effect that it's overwritten by the default form value from the form bean (which cannot be page dependent). If I add the value as a plain HTML variable (no struts or other tags at all, just HTML), it doesn't show up in request.getParameter(parname)...
    Does anyone have any suggestions on how to take the value of <phtml:rewrite forward="ok" /> or mappings.findForward("ok") into my action class at runtime ?
    Or has anyone any better ideas on how to circumvent the upload limitations for java portlets ?
    Thanks in advance !
    Best regards
    Benjamin

    When constructing links, you have to use the pdk-specific struts tags, for example:
    <pdk-struts-html:link href="/portal/menuPage.do">Also, you need to use the pdk struts tag library:
    <%@ taglib uri="/WEB-INF/pdk-struts-html.tld" prefix="pdk-struts-html" %>Peter

  • Struts Portlet to Struts Portlet Communication

    Hello,
    We have two struts portlets (portlet1, portlet2) in our page. We have the following queries:
    1. When user performs some action (submit) in portlet1, can we render the second porlet (portlet2). Second portlet should be visible only after submit in first portlet.
    2. We are trying to pass objects between two struts portlets. Can some one provide an idea on how to achieve this. We are trying to set the objects to be passed in request object, but they are not visible in the second portlet.
    Basically, our requirement is portlet1 will contain the search criteria and when the user clicks on submit, the results should be displayed in another portlet. Both these portlets are struts enabled.

    1. You can create your security manager to dynamically control whether the portlet is displayed or not on the portal page. You can refer to the Portal Developer's Guide to learn more about security managers.
    2. You can use the page parameters and portlet parameters to pass this information from one portlet to the other. The Portal Developer's Guide discusses how to do this.
    If this doesn't work for some reason (the string is way too long - or for any other reason), you can try to save the information to the session context. The session can be shared between two portlets if they belong to the same provider.
    Hope this helps,
    Peter

  • Force Flash weblink to open in SAME window as movie

    I'm using Adobe Encore CS4 to create a project that I want to export to Flash. However, I want one of my menus to be replaced by a web site.
    The goal is to have a flow such that:
    Menu 1.
    <User Clicks Item #1>
    Timeline plays
    user is forwarded to a website
    I have implemented this as follows:
    Menu 1.
    Button 1 --> Timeline --> Menu 2
    on menu 2, I set the description to:
    <weblink href="webpage.html">
    as suggested in the manual.
    This works, apart from the fact that after the timeline ends, the flash movie goes black, and a new window is opened with webpage.html (which is blocked by popup blockers unless specifically allowed).
    What I would like is for webpage.html to be opened in the same window, so that the flash movie is no longer visible.
    I have tried modifying the description field to
    <weblink href="webpage.html" target="_self">
    but it doesn't help. In the generated AuthoredContent.xml, I've tried changing the <action> item:
    <Action type='Link' url='webpage.html'>
    to:
    <Action type='Link' url='webpage.html' target='_self'>
    to no avail. I can't seem to find any documentation on these fields.
    Is anyone able to help?
    Thanks in advance!

    Hi,
    I'm not aware to force this behaviour, but if it is a regular link you can drag the link onto the same tab heading you are currently looking at. Obviously this won't work for form submissions where there is no link to drag as such

  • Open documents in same window (Adobe Reader 9)

    Dear forum,
    I would like to set up Adobe Reader 9, that it opens all documents in the same window. This is much easier to handle, when you have multiple documents opened.
    Does anybody know how to set up Adobe Reader 9 in this manner ?
    Thanks for your answers,
    Theklum

    This is the worst thing to happen to acrobat, in my opinion.
    The clutter that it creates on my computer and the fact that i cant even see the document title when I have a bunch of them open (because the task bar is too full) is unacceptable.
    I never would have changed from Acrobat 8 if I had known, and now I cant switch back (company license).
    The latest thing i can find about addressing it is here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405108&sliceId=1
    which was in november 2008....
    why hasnt any thing else been done about it?  I just spent 45 minutes being sent to different departments over the phone, only to be told to submit a feature request.
    Please do this if you havent already:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How do I display multiple pdf documents in the same window?

    I am sure that this question has been asked many times before, but I have searched the forums and the online help documentation for nearly 45 minutes without a satisfactory answer.
    I have just installed the trial version of acrobat pro and I want to open multiple documents in the same window but I can't seem to find out how to do it.
    Can someone tell me how?
    Thanks

    This is the worst thing to happen to acrobat, in my opinion.
    The clutter that it creates on my computer and the fact that i cant even see the document title when I have a bunch of them open (because the task bar is too full) is unacceptable.
    I never would have changed from Acrobat 8 if I had known, and now I cant switch back (company license).
    The latest thing i can find about addressing it is here:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=kb405108&sliceId=1
    which was in november 2008....
    why hasnt any thing else been done about it?  I just spent 45 minutes being sent to different departments over the phone, only to be told to submit a feature request.
    Please do this if you havent already:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • Error after creating a struts portlet in weblogic 8.1 SP 5

    Hi,
    I am using weblogic 8.1 SP 5, to develop an struts-portlet.
    I tested my struts application and it is working fine.
    I have one action i.e firstAction and 2 jsp's in my struts application.
    The action just forwards to the one jsp through struts-config.
    However, when i try to start the server after creating the struts-portlet i get the following error:
    The source of this error is com.bea.netuix.nf.UIControlException: For portlet [portlet_1_1], could not retrieve a result for the given action [firstAction] in the given PageFlow: [null]. at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:443) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:718) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender
    Please Help !!!

    Hi,
    Even I am facing the same issue could any body help me out to solve this issue.

  • Trouble with console-extension using struts portlet

    hello everyone,
    I'm developing a console-extension for wls9.2 but couldn't get is to work despite all the documentation available. The console-ext is a struts portlet which gathers data from custom mbeans via jmx and renders the result with a jsp. What already works is fetching the data from the MBeans in the struts action. What does not work is the display of the results in the admin console. So I removed all the stuff from the jsp to just display "Hello World" which should be displayed on the desktop in the admin console, but even this didn't work (it's just a blank spot). Having a look at the log file I get the following:
    e.netui.pageflow.internal.AdapterManager ERROR ServletContainerAdapter manager not initialized correctly.
    e.netui.pageflow.internal.AdapterManager INFO No ServletContainerAdapter specified or discovered; using class org.apache.beehive.netui.pageflow.DefaultServletContainerAdapter
    tui.util.config.parser.NetUIConfigParser INFO NetUIConfigParser -- load config: /WEB-INF/beehive-netui-config.xml
    e.netui.pageflow.internal.AdapterManager INFO No ServletContainerAdapter specified or discovered; using class org.apache.beehive.netui.pageflow.DefaultServletContainerAdapter
    netui.pageflow.AutoRegisterActionServlet INFO Dynamically registering module /loggingController, config XML /WEB-INF/struts-auto-config-loggingController.xml
    netui.pageflow.AutoRegisterActionServlet INFO Dynamically registering module /loggingController, config XML /WEB-INF/struts-auto-config-loggingController.xml
    (...other debug output from my struts action...)
    .wls.web.actions.LoggingControllerAction DEBUG Going to /ext_jsp/helloWorld.jsp using module null
    flow.scoping.internal.ScopedResponseImpl INFO ScopedResponse error 404:
    .netui.pageflow.PageFlowRequestProcessor WARN Struts module is configured to use com.bea.console.internal.ConsolePageFlowRequestProcessor as the request processor, but the <controller> element does not contain a <set-property> for "controllerClass". Page Flow actions in this module may not be handled correctly.
    .netui.pageflow.PageFlowRequestProcessor INFO Attempting to instantiate SharedFlowControllers for request /console/ChangeManagerAction.do
    ive.netui.pageflow.FlowControllerFactory INFO No Global.app was found in /console
    Despite the errors it seems to find my struts config (struts-auto-config-loggingController.xm) and execute the action, but then it seems to have trouble findingd/displaying the jsp (helloWorld.jsp). I tried to set various controller-elements in the struts config, like this ([url http://edocs.bea.com/wlp/docs92/portals/integrate.html#wp1005659]source):
    <controller inputForward="true" processorClass="com.bea.struts.adapter.action.AdapterRequestProcessor" />
    but this didn't work either (and results in other errors). The log from above was created with a config without any controller element (since this is never mentioned in the eDocs for console extensions).
    Despite spending several hours trying to figure out what goes wrong here I wasn't able to get one step closer to a solution. Does anyone have a clue what I did wrong (please ask if you need further information)? Thanks a lot!
    Btw. Sorry if this is the wrong forum, I could't find another one which matches better. Feel free to move the topic to a more appropriate place. thx.
    ====================================
    Struts config:
    <struts-config>
         <form-beans>
              <form-bean name="loggingForm" type="...web.forms.LoggingControllerForm" />
         </form-beans>
         <action-mappings>
              <action path="/LoggingControllerAction"
                   type="...web.actions.LoggingControllerAction"
                   name="loggingForm"
                   scope="request"
                   validate="false"
                   input="/ext_jsp/helloWorld.jsp">
                   <forward name="success" contextRelative="true"
                        path="/ext_jsp/helloWorld.jsp" />
              </action>
         </action-mappings>
    </struts-config>

    The problem could be solved by adding the "handle" property (of type com.bea.console.handles.Handle) to the form bean.
    This is stated on page 7-4 in the "Extending the admin console" guide or [url http://e-docs.bea.com/wls/docs92/console_ext/simpleext.html#wp1083856]here
    In addition the following controller element must be used in the struts config: <controller inputForward="true" processorClass="com.bea.struts.adapter.action.AdapterRequestProcessor" />
    This is not mentioned anywhere and should definitely be added to the guide.
    Hope this helps someone encountering the same problem.

  • Open another JSP in same window

    Hello. I am new to JSP. I have the following basic
    question:
    How do I open another JSP in the same window when a button is clicked?
    Please include code.
    Thanks in advance,
    Alexander.

    There is an easier way to do this
    that doesnt limit you to a form submit
    button. Remember that jsp is just a
    way of getting a servlet to send dynamic
    html back to a browser as a response.
    So in that case, anything you include
    on the .jsp page that's not surrounded by
    the declaration, expression, directive or
    scriplet tag will be will be included in the
    response sent. This includes regular html
    and also javascript. So why not use js!
    The following code lets you open any type
    of file (including .jsp) in any sort of window
    that you want:
    function newWindow (jspPage){
    popup=window.open(jspPage,"","toolbar=yes,menubar=no,width=600,height=400,resizable=yes,scrollbars=yes")
    Then on your page you put a link such as:
    Click here for new window
    This is set up to work with a link but you can also have
    it work with a button.(ignore the link, the jsp forum server
    does that automatically)

  • Struts Portlet With Input Parameters

    Hi Everyone,
    Am I able to write a struts portlet that has input parameters? Right now, I have a struts portlet with a provider.xml that looks like this:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>ManageQuotes</name>
    <title>Manage Quotes Portlet</title>
    <description>Manage Quotes Portlet</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>encryptedDealerNumber</name>
    <displayName>encryptedDealerNumber</displayName>
    </inputParameter>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
    <defaultAction>/viewquotes.do</defaultAction>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    The <session>true</session> and <passAllUrlParams>true</passAllUrlParams> need to be there to have a struts portlet. The problem is when I put my portlet on a page and then check out 'Page Properties', 'Portlet Parameters', there are no parameters that show up for my portlet. Can anyone help me?
    Thanks
    Cory

    I just went through this two days ago. I ended up logging a TAR/SR with Oracle and it turns out Struts portlets do not support input parameters. Instead you have to set the passAllUrlParams tag to true and then just use portletRequest.getParameter("parameterName") to retrieve page parameters. You have to be careful here because in this older style of doing parameters you have to manage all the uniqueness in naming parameters in case you have more than one portlet on the same page. However, it seems that if all you want to do is read the portal page parameters that unique naming doesn't come into play.
    In my case I have an OmniPortlet setting some Page Parameters via an Event. Then in my struts portlet I just do:
    String foo = "";
    String bar = "";
    PortletRenderRequest portletRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    if ( portletRequest != null ) {  
    foo = portletRequest.getParameter("Foo"));
    bar = portletRequest.getParameter("Bar"));
    That seems to work just fine for me, but in my case I will only ever use my portlet once per page so this fine. If you wanted the same portlet to have different page parameters fed to it for different instances on the same page this style won't work since all the portlets would just read the same page parameters since those page parameters names are coded in the implementation code.
    Hope that helps,
    David

  • Displaying a page in the same window

    Hi,
    I have a submit button in the jsp page. When I click on that button the jsp page should be displayed in the same window. And also the page shouldn't have the toolbar and the menu bar displayed i.e., it should be full screen in the same window.
    I am able to to the full screen portion but, it is appearing in a new window. It's a java scipt code:
    code]
    <script>
    <!--
    /*Full screen window opener script: Written by JavaScript Kit (www.javascriptkit.com) More free scripts here*/
    function winopen(){
    var targeturl="start.jsp"
    newwin=window.open("start.jsp","","scrollbars")
    newwin.moveTo(0,0)
    newwin.resizeTo(screen.width,screen.height)
    parent.exit()
    return false;
    newwin.location=targeturl
    //-->
    </script>
    <form>
    <input type="button" onClick="winopen()" value="Open window">
    </form>
    How will I do this?
    Shipf1.

    Hi,
    I have a submit button in the jsp page. When I click on that button the jsp page should be displayed in the same window. And also the page shouldn't have the toolbar and the menu bar displayed i.e., it should be full screen in the same window.
    I am able to to the full screen portion but, it is appearing in a new window. It's a java scipt code:
    code]
    <script>
    <!--
    /*Full screen window opener script: Written by JavaScript Kit (www.javascriptkit.com) More free scripts here*/
    function winopen(){
    var targeturl="start.jsp"
    newwin=window.open("start.jsp","","scrollbars")
    newwin.moveTo(0,0)
    newwin.resizeTo(screen.width,screen.height)
    parent.exit()
    return false;
    newwin.location=targeturl
    //-->
    </script>
    <form>
    <input type="button" onClick="winopen()" value="Open window">
    </form>
    How will I do this?
    Shipf1.

  • Headerless Portal window - Same window

    Hi ALL,
    I want to open a headerless portal window on clicking on a hyperlink in the application .
    But I want this to opened in the same window.  I do NOT want this window to be opened in a new window.
    Please let me know your thoughts.
    Thanks in Advance...

    HI Sona,
    You may try this -
    1. You have a dynpro application. There is a link to open EP application.
    2. On this wd application view, add a ViewContainerUI Element. Add a view2 here
    3. While clicking on the link, navigate controls to view2.
    4. Do a form submit there, to open your EP application. (you may set this view invisible as per your req.)
    5. while creating the iview, set the property of the iview to open the view in content area only.
    Hope that will result in what you expect. Thanks,
    Best Regards
    Chander Kararia

  • Http Submit Form Button to New Window

    Hello,
    Does anyone know how to make a HTTP Submit Button open in a new window rather than the same window?
    I have a form that I need the user to print off as well as click a link so they can pay with Paypal. The problem is that if the user clicks the pay with paypal button before the print button, they will lose all of their data in the form.
    Here is the form if needed: http://staging.ebizresults.info/wsra-pdf/membership_flat.pdf
    Any help would be great. I am using Acrobat 8.
    Thanks,
    Pat

    Somethings I forgot to mention. First, I'm fairly new to Acrobat, so I'm not really sure what you're talking about.
    Second, I imported HTML code into Acrobat to get the form. Then I opened the form in LiveCycle because I didn't know how to get the email buttons and submit buttons on the page. So, I am working with a flattened PDF.
    I'm not sure if this make a difference or not, but it's a button not a link.
    I still have the unflattened pdf available to me. Is it in my best interest to avoid flattening the file? If this is the case, any advise on making submit buttons and whatnot myself?
    Thanks,
    Pat

  • Struts Portlet does not show images when it is accessed outside the domain

    Hi all,
    I am using Oracle 10.1.2. I have created a Struts portlet. When I view the struts portlet from my office domain (University domain) it works well and shows the images properly. However, if I try to access the same page containing the struts portlet from some other domain (my home), I cannot see the images and CSS associated with the page. This might be a firewall issue. Is there any way out?
    Best regards,
    Omer

    I fixed the problem.  (YAY!)
    It was the way I embedded the files -- the Dreamweaver default does not work properly so I used the embed from this generator: http://www.bobbyvandersluis.com/swfobject/generator/index.html#alternativeContentHelp which now lets my navbar and swfobjects load properly.  I also made sure that my slideshow (loader.swf) was set with wmode = opaque while the navbar is set to wmode = transparent.  The div for the nav bar has z-index set to 5 while the div for the slideshow has z-index set to 1.  Both have absolute positioning.  I hope this helps anyone in the future that has trouble with overlaying flash (.swf) files.
    Thanks for your reply and trying to help me solve this issue!

Maybe you are looking for

  • Gforce4Ti4600 Video In Brightness Problem?

    For some reason My Composite in blows out all white. surface with reflection, any white Bleeds making scenes with white in them non-viewable. Does anyone know if this is a driver problem? or if there is a solution?           ;(

  • File Upload using PRC API's

    Guys, I am trying to upload a new document using PRC API's. Below is required code snippet that i am using. IRemoteDocument remoteDoc = documentManager.createRemoteDocument(folderID,dataSourceID,document.getPath()); remoteDoc.setOverrideName(document

  • Embed Flash Animation Inside Flash Website

    Hello, I have created a flash website and I want my features button to load and play a features movie (or animation) when it is clicked. I know how to actionscript already and add buttons and event listeners. My main objective is to avoid adding the

  • Simultaneous execution of time critical parts(one is the drive connected to serial port and the other is the DAQ) in a vi

    We are developing a software for a cyclic spin test using Drive. The drive software consists of a profiler part which should be running in a 50ms interval.(every 50msec th operation should happen). This Part uses a DAQ card. To get some digital statu

  • Why won't most links from Facebook open?

    I'm not sure if it's my internet or a problem with my iPad, but I can't get links from Facebook to open. Also was trying to shop on iPad with my Amazon app and it was taking forever for the product lists to come up. Has anyone else had this problem?