Workshop 8.1: Page Flow Action and jsp:include

Hi everybody.
Can i use jsp:include to "include" a page flow action ?
I've tried it, but odd things are happening: The resource got included, but fragments of html source "around" it are been lost.
Any ideas ?
Thanks in advance.

Hi Daniel
There are 2 ways you can acheive this.
1) Using something called Pageflowscoped form for this. This will let you use arrays for checkbox group.
The main part will be that you need to define a member varaible of the form at the pageflow level there by the data will not be lost
2) Using Request scoped form like you have now but need to modify the getter method to populate the "searchResult" object.
public List getSearchResult() {
if( null == searchResult){
System.out.println(" Pouplate the searchResult here. ");
searchResult= new ArrayList();
//populate the default values.
return this.searchResult;
More info at:
http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/netui/guide/conReqScopedVsPageScopedBean.html
I have a sample with pageflowscoped bean and requestscoped bean that I can send you if you provide your email address.
Unfortunately we cannot attach files in the newsgroup.
Thanks
Vimala

Similar Messages

  • Workshop 8.1 - jsp:include an Page Flow action resource

    Hi everybody.
    Can i use jsp:include to "include" a page flow action ?
    I've tried it, but odd things are happening: The resource got included, but fragments of html source "around" it are been lost.
    Any ideas ?
    Thanks in advance.

    Hi everybody.
    Can i use jsp:include to "include" a page flow action ?
    I've tried it, but odd things are happening: The resource got included, but fragments of html source "around" it are been lost.
    Any ideas ?
    Thanks in advance.

  • JSCookMenu and jsp:include

    I'm newbie to JSF. I want to add dynamic menu to my page. and when click on a menu Item in the same page I want to display corresponding page. So, I tried to use jsp:include tag to display the page.
    <f:subview id="myMenu">
                <t:jscookMenu layout="hbr" theme="ThemePanel" >
                    <t:navigationMenuItems value="#{dynMenu.navItems}" />
                </t:jscookMenu> 
    </f:subview>     
    <f:subview id="midPage" rendered="#{dynMenu.pageUrl != null}">          
              <jsp:include page="customer.jsp"/>
    </f:subview>but when I use this way Menu is not displaying
    If I remove <jsp:include page="customer.jsp"/> then menu is displaying.
    (in the page If I use jsp:include tag any where, the menu is not displaying)
    pls help me....
    Rohitha

    I'm newbie to JSF. I want to add dynamic menu to my page. and when click on a menu Item in the same page I want to display corresponding page. So, I tried to use jsp:include tag to display the page.
    <f:subview id="myMenu">
                <t:jscookMenu layout="hbr" theme="ThemePanel" >
                    <t:navigationMenuItems value="#{dynMenu.navItems}" />
                </t:jscookMenu> 
    </f:subview>     
    <f:subview id="midPage" rendered="#{dynMenu.pageUrl != null}">          
              <jsp:include page="customer.jsp"/>
    </f:subview>but when I use this way Menu is not displaying
    If I remove <jsp:include page="customer.jsp"/> then menu is displaying.
    (in the page If I use jsp:include tag any where, the menu is not displaying)
    pls help me....
    Rohitha

  • Difference between jsp:forward sendRedirect and jsp include directive

    Am very much confused, please explain me the difference between
    jsp:forward sendRedirect and jsp include directive with a suitable example.
    I'll be very gratefull. Its very urgent.

    One basic difference. The include executes in the .jsp servelet created. The redirect transfers "control" by redirecting the client request to another destination. In other words, the current .jsp is no longer in charge or in the calling chain in any way.

  • Page flow actions are called twice from each UI's action=...

    Odd observation: my nothing fancy login / pw change / logged in / jsps and pageflow are having the actions in the .jpf called twice for each jsp form action=.
    What can cause this?
    For example: the login jsp form action=loginAction, the corresponding method in the .jpf is called twice when the user clicks the login button on the login UI. The same behavior is observed for all the other actions in this page flow too.
    This has been a real problem for the pw change UI. Until I figured this out, pw change always returned invalid pw due to the second call to the action. :))
    tnx curt

    I have narrowed it down even more. What is happening is that you select the first item in the list it throws a validation error. I found this by adding and inline message. The weird thing is that if you select any other item in the list but the first everything flows as normal.
    This is a list of dates bound to a date type column in a database.
    Any Idea's why selecting the first item in a list would throw the validation message?

  • ADF Page Flow Action - Page Refresh

    Hello,
    BACKGROUND
    I'm working on a POC development environment using Oracle technologies. I'm using a Windows XP SP3 machine with JDeveloper 11.1.1.5 and WebLogic 10.3. What I have currently setup is:
    - Work in Jdeveloper 11.1.1.5 to edit code sources etc
    - Build project and EAR using Ant
    - Deploy EAR to WebLogic 10.3 using WLST
    The JDeveloper project was created as a WebCenter Portal Application however I don't use any of the portal features nor are there any included in the project (we might use this in the future). It's a basic vanilla ADF application at the moment with a few JSPs, a placeholder data control and 1 bounded and unbounded task flows.
    PROBLEM
    The package builds and deploys fine and I can view a landing page ok. The problem is when I try and click a button or link that goes to another page in the Page Flow the page just seems to refresh. I can see that a request is hitting the server but it would seem the framework isn't invoking the action.
    EXTRA INFO / DEBUG
    The weird thing is, if I right click a page in JDeveloper and run it in the integrated weblogic the application works fine. I thought it might be my build process so I tried right clicking and exporting an EAR file from JDeveloper and deploying that into my WebLogic but that one fails with the same refresh problem as my Ant generated one.
    I have done a file and directory comparison of the EAR and it all is the same. This lead me to believe it might be my WebLogic server/domain, so I deployed my Ant generated EAR manually into the integrated JDeveloper weblogic in which the auto deploy application is working. This however still fails with the refresh problem. It must be something to do with my EAR but I can't for the life of me figure it out as it all looks the same!
    I do get a few warnings when deploying, hopefully these can help:
    ####<11/10/2011 11:00:19 AM EST> <Warning> <J2EE> <OVLD630422KV1S> <AdminServer> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3fe29258d1efb468:5549c41:132efedbfd7:-8000-0000000000000100> <1318291219078> <BEA-160140> <Unresolved optional package references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.apps.common.resource, referenced from: C:\Oracle\Middleware\user_projects\domains\base_domain\servers\AdminServer\tmp\_WL_user\oracle.webcenter.framework\l81aqz]. Make sure the referenced optional package has been deployed as a library.>
    ####<11/10/2011 11:00:21 AM EST> <Warning> <J2EE> <OVLD630422KV1S> <AdminServer> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <3fe29258d1efb468:5549c41:132efedbfd7:-8000-0000000000000100> <1318291221031> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application MyApp-0.1 is not versioned.>
    ####<11/10/2011 11:00:36 AM EST> <Warning> <Default> <OVLD630422KV1S> <AdminServer> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3fe29258d1efb468:5549c41:132efedbfd7:-8000-0000000000000104> <1318291236562> <J2EE JMX-46238> <Cannot map nonserializable type "interface oracle.adf.mbean.share.config.runtime.resourcebundle.BundleListType" to Open MBean Type for mbean interface oracle.adf.mbean.share.config.runtime.resourcebundle.AdfResourceBundleConfigMXBean, attribute BundleList.>
    Cheers,
    Ross

    Oh! I see now yes that seems to have fixed it. It seems that if you create a page as .jsp and .jspx they are slightly different too.
    .jspx has this around the content of the page
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    </jsp:root>
    The .jsp does not. So when you hit the .jsp page (e.g. test.jsp) in the browser without the extension (e.g. url:port/myapp/faces/test) you get a 404 not found.
    Hitting one that was created as a .jspx page with the extra XML stuff in the file works ok when you drop the extension.
    So just for clarification, should you use .jspx for 'pages' and .jsp for fragments of a page?

  • Javascript error with f:subview and jsp:include

    Hi,
    I have tried to include one jsp page with jsf components into another jsp page with jsf components. But somehow I get a Javascript error.
    I have of course included the jsp:include into an f:subview like this:
    <f:subview id="tree" rendered="#{tabsBacker.treeRendered}">
    <jsp:include page="mission.jsp" />
    </f:subview>In mission.jsp, all non-jsf tags are surrounded by f:verbatim tags (otherwise, JBoss would complain anyway).
    The Javascript error says: "elements.form1:_link_hidden_ is null".
    "form1" is the name of the form in my jsp page which includes the other one.
    As soon as I remove the jsp:include thing, everything works fine. The include happens in a t:panelTabbedPane, and (probably as a result of the javascript error), the tab where the included page should be shown, can't be displayed. I can click on the tab, the page is reloaded, but nothing else happens.
    The error occurs in IE and in Firefox.
    Can anyone help me to solve this problem??
    Kind regards,
    Wiebke

    It's just a jsp fragment file. Here's the start of the jspf included above:
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx" %>
    <f:subview id="browseForm">
    <table class="box" width="100%">
         <tr>
              <td><h:outputText value="#{labels.someValue}" styleClass="smalltitle"/></td>
         </tr>And so on. This was just done to stop the jsp files becoming too long, I think. So the subview tag is included in the jspf file rather than around the jsp file as you have it.
    Illu

  • GetRequestURI() and jsp:include

    I have a page, a.jsp (referenced from http://server/app/a.jsp). This page has a line that looks like this:
    <jsp:include page="/app/foo/b.jsp" />
    Now, in b.jsp, I need to get the full URI (/app/foo/b.jsp). The request.getRequestURI() method returns the URI for the original page (a.jsp). I've tried a number of different things, but cannot come up with a way to retrieve this information that is independent of the JSP engine that I am using. Is this actually possible?
    Thanks!

    Hi jfeldmann,
    Did you have a look on
    1.
    javax.servlet.include.request_uri
    javax.servlet.include.query_string
    2.
    put in b.jsp to see
    <%=request.getAttribute("javax.servlet.include.request_uri")%>
    <%=request.getAttribute("javax.servlet.include.query_string")%>
    --Paul.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to link 2 page flow controllers in Workshop

    Hello there,
    I have been playing with rowSet controls and page flows in WorkShop for a few days now and I can see that the creation of both of these is straight forward.
    The question that I have is ... having created the page flow for a given rowSet control, say, "customersController.jpf" -- how can I click on a given row and pass a parameter to, say, "ordersControler.jpf" and have ordersController.jpf query the database based on the parameter passed to it?
    At this point I have these 2 page flows which work okay in isolation. So, we have:
    /customers/customersController.jpf    [custid, name, address, etc]
    /orders/ordersController.jpf    [orderid, date, total, etc]
    I have already managed to pass the custid parameter when clicking on the custid field for a given customer on the customersController.jpf page.
    URL looks something like this:
    http://localhost:7001/myApp/customers/showOrders.do?_autoscope__rowId=customersControllerGridName%7ECUSTID%7E1004
    "showOrders.do" is, of course, an action that calls ordersController.jpf.
    We can see that the customer id (CUSTID) parameter is being passed (1004). Now, how can I modify ordersController.jpf and orders.jcx so that only the orders for customer 1004 are returned by ordersController.jpf? By default, all the order in the database are returned.
    Thanks a million,
    Manuel
    Message was edited by:
    manu_moreno

    Hi manu_moreno,
    You should create an Event handler.
    On the Property Editor, click on the "Event Handler" option.
    On "Add Handler..." you should select "Handle Page Flow Event". This way you can trigger a Page Flow action everytime an action in another portlet is called.
    The parameters I suggest you put on the Session.
    Hope this Helps,
    Pedro Oguri

  • Calling Service Control from Page Flow

    In Workshop for Weblogic Platform v10.0, we have a web service control in a page flow.
    Although the web service call succeeds (as evidenced by a TcpMon monitor), the control method always returns null.
    I'm guessing that although the call looks synchronous, it's actually behaving asynchronously - returning immediately with null.
    Is this perhaps related to the particulars of calling controls from a Page Flow environment? Is it a bug in v10 of Workshop (Eclipse-based?
    Thanks for any ideas!
    - Rob
    ps: Here's the control interface and using class:
    package controls;
    import com.bea.control.ServiceControl;
    import org.apache.beehive.controls.api.events.EventSet;
    import org.apache.beehive.controls.api.bean.ControlExtension;
    @ServiceControl.Location(urls = {"http://LECAP1.lan.us.ray.com:9905/xsltTransform_vs0"})
    @ServiceControl.HttpSoapProtocol
    @ServiceControl.SOAPBinding(style = ServiceControl.SOAPBinding.Style.DOCUMENT, use = ServiceControl.SOAPBinding.Use.LITERAL, parameterStyle = ServiceControl.SOAPBinding.ParameterStyle.BARE)
    @ServiceControl.WSDL(resourcePath = "controls/cesXsltTransform.wsdl", service = "xsltTransform_vs0")
    @ControlExtension
    public interface xsltTransform_vs0ServiceControl extends ServiceControl
    static final long serialVersionUID = 1L;
    public java.lang.String xmlTransform(com.raytheon.schemas.ces.transformationservices.xmlschema.schema.TransformInput transformInput_arg);
    /** This event set interface provides support for the onAsyncFailure event.
    @EventSet(unicast=true)
    public interface Callback extends ServiceControl.Callback {};
    @Control
    private xsltTransform_vs0ServiceControl xsltTransform_vs0ServiceControl1;
    com.raytheon.schemas.ces.transformationservices.xmlschema.schema.TransformInput transformInput_arg = form
                        .getTransformInput_arg();
    String xmlTransformResult = xsltTransform_vs0ServiceControl1
                        .xmlTransform(transformInput_arg);

    Strange -- the PageFlowJspFilter adds no-cache headers to the response, so
    if you're forwarding to a JSP from the action, then the browser shouldn't be
    caching the result. What's in the URL bar in the case where your request is
    getting cached?
    "Neeraj Harlalka" <[email protected]> wrote in message
    news:3ff993bd$[email protected]..
    >
    Richard -
    Ok. I dug deeper into the issue and now my problem is that although theaction
    is getting called correctly, it seems to execute from a cache. The actiondoes
    not get executed the second time.
    Any ideas?
    Neeraj
    "Richard Feit" <[email protected]> wrote:
    Hmm... I'm not sure why you'd get that. Can you post the relevant JSP
    code?
    Also, are you able to hit the other page flow directly from a browser?
    Rich
    "Neeraj Harlalka" <[email protected]> wrote in message
    news:[email protected]..
    Hi Richard -
    I get an error saying cannot find the begin.do action.
    Thanks
    Neeraj
    Richard Feit" <[email protected]> wrote:
    Hello Neeraj,
    This should work:
    <netui:anchor
    href="/someOtherFlow/SomeOtherFlowController.jpf">someOtherFlowController.
    j
    p
    f</netui:anchor>
    What happens when you do this?
    Rich
    "Neeraj Harlalka" <[email protected]> wrote in message
    news:3fda39df$[email protected]..
    I read the other posts on how to call one page flow from a jsp
    that
    belongs to
    another pageflow. However the last suggestion posted - use the netuianchor tag
    with href, also does not work.
    Any other solution?
    Thanks
    Neeraj

  • How to skip a page (in a page flow) when hitting 'Back' in a browser

    This may have been posted somewhere else. But I don't seem to find it.
    Here is what I'd like to do in a page flow control:
    a.jsp submits to action 'a' in MyController.java
    action 'a' fowards to b.jsp
    b.jsp directs to action 'b' in MyController.java
    action 'b' forwards to c.jsp
    Now, hitting 'Back' in a browser when in c.jsp would normally return to b.jsp. What I'd like to do is to make it return to a.jsp, instead of b.jsp, i.e. skip the b,jsp.
    Thanks in advance for any help!
    Jason

    Here is the deal with this nonesense. It is again a Pages fault to over design. In order to delete a complete page within a series of pages in your document. You must leave the view thumbnail, goto Sections and delete the page out of sections. Why? Likely because you can add page break, additional pages in sections but not in thumbnail. EASIER PAGES/MAC SOLUTION: Click on the page in the thumbnail veiw and hit delete, but that would be to simple for the mac/pages software developers. Still a great tool to use though.

  • Replacing page flow factory

    Hello,
    We are using Portal 8.1 SP6
    I have seen an interesting way to implement dependency injection in NanoWAR (PicoContainer).
    They have implemented their own the struts processorClass, which is responsible to resolve the dependencies for the struts Action classes, and there they inject dependencies.
    The dependencies key is the URL to an action.
    Since a page flow is somehow a struts action, I was looking for a way to replace the processor class by my own one. Have a look at the .pageflow-struts-generated directory and you will see that Portal has defined following line:
    processorClass="com.bea.wlw.netui.pageflow.PageFlowRequestProcessor"
    Has anybody any idea about how to replace that class?
    If this is not possible, is there a way replace Portal's page flow factory by my own one?
    Thanks,
    Yves Bossel
    Edited by ybossel at 05/29/2007 7:13 AM

    Hello,
    After some research Workshop documentation I have found the com.bea.wlw.netui.pageflow.FlowControllerFactory class.
    That class is responsible to resolve the page flow class and to create new page flow instances.
    If I could specify the FlowControllerFactory, it would be possible to inject the dependencies into the page flows, just after they get instantiated.
    The idea is to declare a decorator for the FlowControllerFactory that injects the dependencies (setter injection) after the decorated FlowControllerFactory has created a page flow.
    Note that I would prefer to use constructor injection. But this is a good start.
    I would appreciate any idea about how to replace the FlowControllerFactory.
    Thanks in advance,
    Yves

  • Page Flow - Null request attributes

    Hi.
    I am using the netui:anchor and netui:paramter tags to add attributes to the request
    object. However in the pageflow when I try to get them from the request using
    this.getRequest().getParameter("xxx") - it seems to be NULL.
    Any clues?
    Girish

    Hey Richard -
    I solved this problem using the outerrequest and the scopedrequestutil classes.
    However, I still have the page flow caching issue that many folks seem to be posting
    on the newsgroups.
    Thanks
    Girish
    "Richard Feit" <[email protected]> wrote:
    Hello Girish,
    This should work. Can you post a JSP fragment and a page flow action
    that
    demonstrates the problem?
    Thanks,
    Rich
    "Girish Venkat" <[email protected]> wrote in message
    news:3fe87514$[email protected]..
    Hi.
    I am using the netui:anchor and netui:paramter tags to add attributesto
    the request
    object. However in the pageflow when I try to get them from the requestusing
    this.getRequest().getParameter("xxx") - it seems to be NULL.
    Any clues?
    Girish

  • Communication between multiple page flow portlets

    Hi, I am working on weblogic portal 8.1.
    I've been struggling to communicate between different page flow portlets,
    I have a login page flow portlet and i need to submit login details to indeex page after login action is done.
    I am able to do this by using PageUrl class and RequestDispatcher's forward method using definition label of the index page flow portlet.
    but it is not happening again when i logged out.
    If anybody have worked on it, please let me know the soltution.
    Thanks,
    Vidya sagar

    Not sure whether you tried this option(I tried it works for me).
    configuration has to be done is portlet-2:
    =========================
    Create an custom event namely(messageCustomEvent) and also add an action for it for invoking a portlet method getMessage in Portlet-2.
    //Place this method in Portlet-2
    public void getMessage(ActionRequest request, ActionResponse response,
    Event event) {
    CustomEvent customEvent = (CustomEvent) event;
    String message = (String) customEvent.getPayload();
    response.setRenderParameter("message0", message);
    configuration has to be done is portlet-1:
    =========================
    when click on Login in portlet1, in the pageflow code you fire an custom event as shown below
    PortletBackingContext context =
    PortletBackingContext.getPortletBackingContext(getRequest());
    context.fireCustomEvent("messageCustomEvent", form.getMessage());
    return new Forward("success");
    Thanks & Regards,
    Murali.
    ============

  • JSP include tag not showing page content

    Below is my code for a JSP page that uses JSP:include tag to include footer.jsp. The footer page does not display on show_email_entry.jsp. The error I am getting is variable emailAddress cannot be resolved. What am I doing wrong?
    Here is my code.
    show_email_entry.jsp
    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <%@ include file="../includes/header.htm" %>
    <body>
    <%
    String firstName = request.getParameter("firstName");
    String lastName = request.getParameter("lastName");
    String emailAddress = request.getParameter("emailAddress");
    %>
    <h1>Thanks for joining our email list</h1>
    <p>Here is the information that you entered:</p>
    <table cellspacing="5" cellpadding="5" border="1">
    <tr>
    <td align="right">First name:</td>
    <td><%= firstName %></td>
    </tr>
    <tr>
    <td align="right">Last name:</td>
    <td><%= lastName %></td>
    </tr>
    <tr>
    <td align="right">Email address:</td>
    <td><%= emailAddress %></td>
    </tr>
    </table>
    <jsp:include page="footer.jsp" flush="true" />
    <p>To enter another email address, click on the Back <br>
    button in your browser or the Return button shown <br>
    below.</p>
    <form action="../email6/join_email_list.html" method="post">
    <input type="submit" value="Return">
    </form>
    </body>
    </html>
    FOOTER.JSP page:
    <%@ page import="java.util.Date" %>
    <p><i><%= emailAddress %> was added on <%= new Date() %>.</p>

    The [url http://java.sun.com/products/jsp/syntax/2.0/syntaxref209.html#1003408]@include directive and the [url http://java.sun.com/products/jsp/syntax/2.0/syntaxref2020.html#8828]<jsp:include> have two different functionalities.
    From the [url http://java.sun.com/products/jsp/syntax/2.0/syntaxref20.html] reference page:
    Include Directive : Includes a resource of text or code when the JSP page is translated.
    <jsp:include>
    Includes a static resource or the result from another web component
    (italic emphasis is mine)
    Basically the @include directive is like "copy and paste this file into the JSP and then compile"
    jsp:include is "run this web page, and add the result of that to my current response"
    So jsp:include can only include complete standalone JSPs.
    Do you see now why it would throw an error message with your example?
    Cheers,
    evnafets

Maybe you are looking for