Page Reuse

Following on from a question about single page export/import
Is there any ability to have a set of pages (accessing specific tables) that for example implement security in an application that can be reused in another application that is being built.

Your solution is called AliasBean from Tomahawk (www.myfaces.org)
You surrond your included page with an alias bean tag. Inside the included page you refer to this alias bean.
Ex:
On the included page:
<h:outputText value="#{genericBean.titleIdentAE}"/>
On the page that includes the included page.
<t:aliasBean alias="#{genericBean}" value="#{bean}" >
<jsp:include page="/components/genericJsp.jsp" flush="true"/>
</t:aliasBean>

Similar Messages

  • Two pages reuse a task flow -------how to reinitialize the task flow?

    Hi, i get a question.
    In general:
    In the navigation menu i have two commandlink that are "Service" and "Application". And when i click on each of the two command links, i go to a page.
    The detail:
    This two commandlinks use a same task flow-----that is : <af:commandNavigationItem...... definition of this two link' action attributes are just the same.
    What's more, the pages that i go to when i click on the link also use the same one, just show something different bansed on the paramaters when alick on the link. The parameters are defined in the <af:commandNavigationItem...... using <af:setPropertyListener..
    And the question is:
    when i click on the "Service" link and see the "Add service" page and then click "Application" it's still the "Add service" page, and otherwise is the same. i just can not jump freely through this tow link.
    I have debuged the code and find that, once i click "Service" link then i click "Application" link, the task flow won't reinitialize.
    Any one has some solutions?
    Thanks in advance.

    Reading the official doc will help.
    http://docs.oracle.com/cd/E15523_01/web.1111/b31974/taskflows_complex.htm#BABHIAAI

  • Questions on Servlets

    I don't know WHERE the Oracle team came up with my username (mine was TheWhiteKnight), but it's funny guys.... Thanks for the laugh.
    ANYwho....
    I have a question. I currently am creating some objects with getter and setter methods. For example, I have created a Department object that has 4 protected static variables that coincide with the database fields for the department table in a database. I have a getter and setter method for each variable, as well as a loader, saver, updater, and validator methods. I have the object auto-validate it's info before setting the variable's. Here is the code:
    (what happened to our tag?)
    public class Department {
         static final Logger Dept4j = Logger.getLogger(Department.class);
          * Each variable name lines up with the database fields.
          * Database Table - Departments
         protected static int DEPARTMENT_ID;
         protected static String DEPARTMENT_NAME;
         protected static int PARENT_DEPARTMENT_ID;
         protected static boolean STATUS;
         public static String validationErrorMessage;
         public Department() {
              super();
         public int getDepartmentId() {
              return DEPARTMENT_ID;
         public static void setDepartmentId(int deptId) {
              if (validateAllDepartmentIdFields(deptId))
                   DEPARTMENT_ID = deptId;
         public String getDepartmentName(){
              return DEPARTMENT_NAME;
         public static void setDepartmentName(String deptName) {
              if(validateDepartmentName(deptName))
                   DEPARTMENT_NAME = deptName;
         public int getParentDepartmentId() {
              return PARENT_DEPARTMENT_ID;
         public static void setParentDepartmentId(int deptParentId) {
              if (validateAllDepartmentIdFields(deptParentId))
                   PARENT_DEPARTMENT_ID = deptParentId;
         public boolean getDepartmentStatus() {
              return STATUS;
         public static void setDepartmentStatus(boolean deptStatus) {
              if (validateDepartmentStatus(deptStatus))
                   STATUS = deptStatus;
    Simple enough concept.  I'll not post the rest of the class as it's not relevant.  I want to be able to write a generic servlet to be able to pass all objects to (Department, User, Occupation, etc) and be able to get and set info from an HTML page reusing the same servlet to show all of the public get / set methods that I open up.  What I DON'T want to do is pass resultsets around grabbing metadata and use <% %> scriptlet tags in the front end.  I could go the custom route of writing my own tags and passing everything that way, but I'd like a different way to do this.  I'm wondering if there is any realistic way I can call a generic sort of "get all getters / setters" and populate a page of DDL's / fields with that.  I think I already have the answer, but I'd like to hear it from someone else to confirm it.  BTW, I'm using Tomcat 6.0.18 - 6.0.2x for this. Not sure if it actually matters. 
    Any insight is greatly appreciated.  And as always constructive criticism is always welcomed.
    - Josh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Using a Map instead of that class might be a good alternative to a point, but i think I'll have to end up using a class like this for at least a few things. a Map might work for somethings, I'm trying to not use any scriptlets in the JSP pages if I can I help it.
    Clearing the static out of that class fixed the issues. Thank you.

  • Commit on one application module also commits the other

    Jdev 11.1.1.4
    I have a fusion ADF application where I have defined two Data Controls.
    One is called AppModuleDatacontrol and the other AppModuleWSDataControl.
    I do this in order to be able to commit DML made on one Data Control independently of the other.
    The problem is that when a do something like:
    AppModuleWSImpl am=(AppModuleWSImpl)Util.getApplicationModule("AppModuleWSDataControl");
    am.getTransaction().commit();
    Errors on VO of AppModuleDataControl are raised. They were not expected to be raised !
    I have activated ADF logs and just after executing
    AppModuleWSImpl am=(AppModuleWSImpl)Util.getApplicationModule("AppModuleWSDataControl");
    and before executing the commit I get:
    <BindingContext> <findDataControl> [4147] INFO: no refreshRegion, skipping cpx codebase lookup on AppModuleWSDataControl
    <BindingContext> <put> [4148] BindingContext.put( AppModuleWSDataControl@edu_esade_view_DataBindings_cpx, oracle.jbo.uicli.binding.JUApplication )
    <PropertyManager> <loadProperty> [4149] WARNING: Property jbo.maxpoolcookieageset to null
    <PropertyManager> <loadProperty> [4150] Skipping empty Property jbo.maxpoolcookieage from null
    <BindingContext> <put> [4151] BindingContext.put( AppModuleWSDataControl@edu_esade_view_DataBindings_cpx, oracle.jbo.uicli.binding.JUApplication )
    <BindingContext> <put> [4152] BindingContext.put( AppModuleWSDataControl@edu_esade_view_DataBindings_cpx, oracle.jbo.uicli.binding.JUApplication )
    <DebugDiagnostic> <print> [4153] DBG: DataControl:Looking for :_adf_dc_user_params_key_
    <DebugDiagnostic> <print> [4154] DBG: DataControl:Looking for :_adf_dc_user_params_key_
    <ADFLogger> <begin> Create nested Application Module
    I don't know if "Create nested Application Module" is important but I don't want this AppModule to be nested of the other. I want them to be completly independent in order to achieve independance of the commit actions.
    Any help ?

    "1.Defining all BTF as "No controller transaction" I can assume both AppModule will always work with different transactions "
    As long as they're defined as separate root AMs and you've used the <No Controller Transaction> option they will work with different db connections, therefore different transactions too.
    "and one transaction in one AppModule will persist trough pages"
    Within scope of one BTF yes. In scope of chained BTFs that's dependent on the BTF data control scope option. If you set that to isolated, each instance of a BTF will spawn a new instance of the AM in question (and new connections/transactions with the database). If you use shared, 1 instance of the AM will be shared (1 connection/transaction).
    "2.What impact can have this in reusing BTF ? I have a jsf page reusing the same task flow in two regions. The taskflow performs some initialization. Will the regions undesirably interact one with the other ?"
    That depends on the data control scope option as specified above. If you want them to be independent, use the isolated data control scope options on the BTF.
    Consider reading the ADF Task Flow Transaction Fundamentals paper on this website for more information: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfarchitect-1639592.html
    CM.

  • How to capture the current info in the top-of-page event in Reuse block dis

    How to capture the current info in the top-of-page event in Reuse block dis

    Hi Geetha,
         If you don't have any information to pass the Heading Block, then why you are using this event ?
         please comment/ remove that TOP_OF_PAGE code. and use subtotal code in field catalog block.
          you can use below code for subtotal. 
          FORM field_catalog .
                    gs_fcat-do_sum = &2.
              fcat : 'WRBTR' '15' 'X' ' ' ' ' 'WRBTR' 'Amount',
           ENDFORM.
           Regards,
           Kunjan

  • Reusing a page as a region in other pages

    Hi All,
    I have a requirement. I want to reuse a page as a show hide region in other pages.
    Please suggest a way to do the same.
    Version: Oracle Apex 4.2
    Thanks and regards,
    Abhishek Arora

    I'd use iframes. I've got an example on how to apply hide and show of an other region in a report. It's on my blog, which you can find here:
    http://vincentdeelen.blogspot.com/2013/07/show-report-details-in-line.html
    Vincent Deelen: Detail section in line with report, part 2
    There is always some debate about using iframes, I've mentioned a few issues in the posts.
    Please let no if you need any further help.

  • Change existing page to .css for reuse

    I have created a page with spry menu bars etc in dwcs4
    , but when I first created the page, I chose add it to the head from the templates, and in fact to reuse this page I think I needed
    to have chose create a new file.
    My question is can I save this page as a .css file for reuse after the fact?
    thx
    Brad

    Create a new blank CSS document.  Copy and Paste the CSS rules from your HTML or DWT document into the new CSS page (code view only please).  Save it as some filename.css.
    Open your HTML or DWT file, delete the CSS rule.
    Link the HTML or DWT document to your newly created external CSS page.
    See link below for details:
    http://alt-web.com/DEMOS/DW-Link-Stylesheet.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Is there a way to reuse a region in multiple pages?

    Is there a way to reuse a region in multiple pages?
    For future maintenance, it would be easier to make changes in just one region. Maintaining multiple copies of a region is more work and eventually someone will forget to change one of the regions.
    Thank you.

    Hi wolfv
    Create your region on page 0 and then conditionally set the display of the region for specific pages in you application only.
    Under the region's "condition type" attribute select " Current page is Contained within Expression 1 (comma delimited list of pages)" and in Expression 1 put 1,2,4,6,99 etc or what ever pages you want it to appear on.
    This works especially well for tree regions.
    regards
    Paul P

  • "Tab Also Current for Pages" is automatically cleared when reusing page

    I'd want to reuse a page, and include it in the "Tab Also Current for Pages" list of 2 standard tabs, that are displayed conditionally. But when I include it in the second tab, it is automatically cleared in the first. This only happens in the detail Tab edit screen, in the multi tab edit screen the pagenrs are not cleared. So I can achieve what I want, but for future maintanance this is very risky.
    Is there any way to avoid this?

    Hi Capt Egg
    I didn't mean to say that there wasn't a case for a page being associated to more than one tab -- quite the opposite! More than once I wished that could be done...
    But the fact is that currently in Apex we have:
    - A tabular form that allows you associate the same page to multiple tabs (and worth mentioning, allows you to enter anything in the Also Current Pages column, not only a list of page numbers!)
    - A form that doesn't allow you to do so, and validates if you entered a list of valid numbers in the Tab Also Current For Pages field.
    Something needs fixing, and in my experience with Apex the forms I've seen seem to be much more strict in terms of validations than tabular forms for a number of reasons.
    I am guessing that the form is the correct one and implements the intended rules. If that is true, the potential bug in the tabular form may be fixed in the future and the OP won't be able to maintain his applications that used this hack anymore.
    Or maybe not, maybe the bug is in the form. But I would seek clarification on this before going down this route...
    Luis

  • Problem with JSF page in reused task flow

    Jdev 11.1.1.4
    I have a main JSF page with an af:paneltabbed.
    The paneltabbed has two af:showdetailItem
    In every showdetailitem there's a region.
    In both regions I have the same fragment taskflow.
    In this fragment task flow there's one page fragment (as a view activity).
    If I'm executing the secondary page fragment in both showdetailitems at the same time, they interfere one each other. That's my issue.
    This page fragment has a backing bean that depending on the value of a selectonechoice, shows or hides several fields.
    If in showdetailitem A I make a selection that displays all fields and then I go to showdetailitem B and make a selection that hides all fields, when I go back to showdetailitem all fields are hidden as in B !
    Is there any procedure in order to make indepedent both page fragments ? (in fact they are the same but executed in to different regions) I don't want instructions like "si1.setDisabled(true)" of one page fragment affect the other.
    The page is quite complex and that's my main reason to reuse it.
    The page flow is Transaction "Alway begin new transaction" and "Share data controls" disabled in order to make them as independent as possible but I don't think this can affect my issue.

    The bean, that I know has Backing Bean scope which is the most limited scope that I know.
    It is a standar bean created with: Design->Page Properties->Component Binding->checking Auto Bind. The one that is usually created in order to map a pages field and then be able to deal with the fields showing or hiding them.
    By the way, in wich xml file is this registered ? I haven't found it. The only thing I have found is an XML comment at the end of the page's source code like this:
    +<!--oracle-jdev-comment:auto-binding-backing-bean-name:AluCertIniBB-->+
    but I don't thing JSF is going to map the page to that bean only with this.
    Now I'm working in the line to stop and restart both task flow when changing the tab of the panelbox. Restarting the task flow every time I lick in one tab should avoid this problem, wouldn't it ?

  • Reusing JSF Page Code

    I have 3 JSF pages which have the same block of Code.
    Is there a way I could use to make one JSF page say main.jsp with the main block of code and then use something like the include tag to just reuse and insert the main.jsp in my other 3 pages.
    The code is:
    <h:form id="frmRR">
        <f:loadBundle basename="com.eds.send.controller.Resource."
                      var="messages"/>
        <tr:panelHeader styleClass="titleText" text="RR"/>
        <tr:panelHorizontalLayout valign="top">
            <tr:panelHorizontalLayout valign="top">
                <tr:panelGroupLayout layout="vertical">
                    <tr:panelGroupLayout layout="horizontal">
                        <tr:panelGroupLayout styleClass="columnSpace boldAlignLeft"
                                             layout="vertical"
                                             inlineStyle="width:200px">
                            <tr:outputText value="To:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="From:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="Subject:"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="Business:"/>
                            <tr:outputText value="#{messages[\date\']}:"/>
                            <tr:outputText value="PN:"/>
                        </tr:panelGroupLayout>
                        <tr:panelGroupLayout styleClass="normalAlignLeft"
                                             layout="vertical"
                                             inlineStyle="width:350px">
                            <tr:outputText value="#{messages[\'hp.email\']} "/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="#{rR.userName}"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="R R"/>
                            <tr:spacer height="18"/>
                            <tr:outputText value="#{rR.subList.description}"/>
                            <tr:outputText value="#{rR.cyc}">
                             </tr:outputText>
                            <tr:outputText value="#{rR.pN}"/>
                        </tr:panelGroupLayout>
                    </tr:panelGroupLayout>
                    <tr:panelGroupLayout layout="vertical">
                        <f:facet name="separator">
                            <tr:spacer width="10" height="1"/>
                        </f:facet>
                        <tr:outputFormatted inlineStyle="font-weight:bold" styleClass=" columnSpace font_size"
                                            value="Email Message:"/>
                        <tr:inputText id="emailMessage"
                                      value="#{rR.emailMessage}"
                                      columns="50" rows="10" wrap="soft"/>
                    </tr:panelGroupLayout>
                    <tr:panelButtonBar>
                        <tr:commandButton text="Confirm"
                                          action="#{rRBean.createAction}"/>
                        <tr:commandButton text="Cancel" action="home"/>
                    </tr:panelButtonBar>
                </tr:panelGroupLayout>
            </tr:panelHorizontalLayout>
            <f:facet name="separator">
                <tr:spacer width="8"/>
            </f:facet>
            <tr:panelHorizontalLayout valign="top" halign="right">
                <tr:panelGroupLayout layout="vertical">
                    <tr:outputText inlineStyle="width:270px; font-size: 8pt; font-weight:bold; text-align: left"
                                   styleClass="subnav"
                                   value="#{messages[\'rReq.terms\']}"/>
                    <tr:outputText inlineStyle="width:270px; font-size: 8pt; font-weight:normal; text-align: left"
                                   styleClass="subnav"
                                   value="#{messages[\'rReq.body\']}"/>
                </tr:panelGroupLayout>
            </tr:panelHorizontalLayout>
        </tr:panelHorizontalLayout>
    </h:form>I want to be able to put this code in a Main jSP and then just include the tag in other JSPs where ever I want the above fields to be populated.
    How can this be achieved ?
    Thanks

    you already are blessed with the rare event of a Sun employee answering a question for you, now don't push it by demanding more. A simple google query can give you all the answers you need. For example this page can give you some hints:
    http://www.ibm.com/developerworks/java/library/j-facelets/
    The facelets website also has lots of documentation.
    https://facelets.dev.java.net/nonav/docs/dev/docbook.html

  • Reusing the same jsp include multiple times on the same page

    If someone knows a way out of this
    I'd like to print out 2 records of the same data type I have a JSP include which does that.
    Now my issue is how to use the same include twice on the same page
    Ideally I would like to do the following:
    <%
    request.setAttribute("person", person1);
    %>
    <jsp:include page="./person.jsp"/>
    <%
    request.setAttribute("person", person2);
    %>
    <jsp:include page="./person.jsp"/>
    And in person.jsp
    I could have
    <h:inputText name=#{person.name}/>
    This fails in the updateModel phase - And I realize why it's failing. There really is no person managed bean.
    It's just that I am at a kind of loss as to what I need to do now -
    Am missing something or is it just impossible to use jsp:includes the way Ive tried to?

    I do not understand, have you created a backing bean named person? Have you defined it in your config file?
    Please copy/paster your backing bean code and config file.
    Normally, you can set directly the value of the bean by using some java code in your jsp instead of setting the request attribute.

  • How to reuse a custom template for multiple pages?

    I have created a page using Blank - Layered Paper. I would like to create more pages with the same title heading and text box. Is there something comparable to a "save as" function or another way to do this without cutting and pasting in my heading and text box every time I make a new page?

    Create another new site on the same domain file. Call it something like Template.
    Create your template page in this site.
    When you need a new page for your site, click on the template, duplicate it, drag it up to the top site and rename it.

  • How to reuse a form in two web pages?

    I have a create page for creating a user account and an edit page for editing a user account.
    I have two backing beans each with a user object that's being created or edited, for example:
    UserCreatorHandler.creationUser and UserEditorHandler.editUser
    Currently I have two JSPs -- createUser.jsp and editUser.jsp each have the same simple form on them (firstname, lastname, emailaddress) because they look like this:
    // createUser.jsp
    <h:inputText id="firstname" value="#{userCreatorHandler.creationUser.firstName}" />
    // editUser.jsp
    <h:inputText id="firstname" value="#{userCreatorHandler.editUser.firstName}" />My question is, how can I rework it so there one form:
    // userForm.jsp
    <h:inputText id="firstname" value="#{user.firstName}" />and have both createUser.jsp and editUser.jsp include the userForm.jsp by passing the user in as a parameter to the userForm.jsp page?
    Any help is greatly appreciated! Thanks,
    rh

    Make it a request scoped managed bean which you inject in the userCreatorHandler as managed property. You can find hints here.

  • Is it possible to reuse DataProvider across different pages?

    Suppose in page1,
    i have a Object Array DataProvider that is bind to getAllCars()
    i have a method
    public Cars[ ] getAllCars(){
    return carsArray
    Then in page2, i need to do some similiar actions
    i tried binding it Page1's dataProvider
    but this gives me some error
    any suggestion?

    You can do this but you must place the DataProvider in a Session Bean. The page beans only have request scope, so a Data source declared in one page will not be in scope for any other page. This also requires that you maintain the data source manually in code rather than through the toolset provided by the IDE.

Maybe you are looking for

  • Blur face again...I know have read previous but can't do it...help

    ok am using fcp5.1 on g5 and am very new to fcp...used to use another program but this is different... placed the original file on v1 and a copy on v2. have hidden v1 so i don't get confused. just need to block out a small piece of video i dropped a

  • Why is Maverick's startup time so SLOW!!!

    Start up time went from 10 seconds to 32 seconds... I quit Drop Box, wifi & got rid of all programs out of the tray, leaving only the finder & it did not improve the time... How does one improve the start up time????

  • What are the risks of Installing win 10 preview ?

    I have a brand new Dell Inspiron Laptop, and I was thinking of installing windows 10 preview on a new partition , so I can dual boot! Could installing win 10 preview cause any damage to the hardware at all ? I am not going to touch the original OS or

  • Spiral/Vortex with Multiple Objects

    Hi, all I'm trying to replicate this image from Shutterstock with multiple objects to create this spiral vortex. http://image.shutterstock.com/display_pic_with_logo/849265/101051014/stock-vector-card-sui t-hearts-diamonds-spades-and-clubs-playing-car

  • HT5312 How can i reset my security answers?

    I forgot my security answers to purchase some products. I followed the guide to reset my answers but i cannot log in to my yahoo account because it has been locked. I also cannot active this yahoo account anymore. If you can reset my security answers