How to set a page variable in a JSF composition

I'd like to set a variable in a JSF page that can be used within a multiple defines of a composition.
If it was possible I would like to do it like this:
    <c:set var="myvar" value="#{ejb.value}" />
    <ui:composition template="/layout.xhtml">
      <ui:define name="title">#{myvar.title}</ui:define>
      <ui:define name="content">#{mvar.content}</ui:define>
    </ui:composition>Problem is that anything outside of a <composition> tag is disregarded by JSF, and also that the <set> tag must be within a <view> tag for it to set the variable so that JSF to access.
Essentially I want to retrieve the value from the ejb only once in a page, and reuse it within multiple define tags.
Is there a way to achieve this?

Figured it out.
Essentially just move the <set> to within the first define as such:
    <ui:composition template="/layout.xhtml">
      <ui:define name="title">
         <c:set var="myvar" value="#{ejb.value}" />
         #{myvar.title}
      </ui:define>
      <ui:define name="content">#{mvar.content}</ui:define>
    </ui:composition>

Similar Messages

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • How to set a session variable

    Hi,
    I would like to know how to set a session variable for the following purpose.
    At the top of my application I have a "Welcome <username>" I'd like it instead to have "Welcome <firstname> <lastname>".
    So the concept would be after the user logs in succesfully this session variable is dynamically set so it can be displayed.

    Hi Scott,
    I realize that I can set items etc in pages. The case I'm referring to is a reference in a template. My template has a "Welcome <user name>" ... so the code looks like "Welcome &APP_USER." Anyway to make it say "Welcome first_name last_name" in the template? Note I'll have to get the first/last names from a query
    Thanks,
    Marty

  • How to set the header variables in weblogic

    Hi,
    We have a following set up in our environment.
    We have weblogic and on the top of it we have apex listener deployed which redirects Oracle Apex.
    My Issue:
    How can we set up the header variables in weblogic once the user is authenticated against weblogic server.
    We are struck here, not knowing how to set the header variables in weblogic server. Its fairly straight forward for Oracle Access Manager or others..
    Thanks
    Ramesh P.

    maybe you are looking for the routing options
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125348

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

  • How to set the page size

    Hi,
    How to set the page size of a B tree node in berkeley db java edition?
    thanks.

    The two systems have different performance characteristics. If you are concerned with the performance characteristics, then the best way to tell is to benchmark them.
    By the way, both BDB and BDB JE are B-trees.

  • How to set default page in DLN among folders structure

    Hi All,
    We have the navigation structure as follows.
    In Top Level Navigation we have a Role called " Role1"
    In Second Level Navigation we have a Workset called "Workset1"
    In Detailed Navigation we have a folders as below :
    Folder1
        Folder2
              Page1
              Page2
              Page3
        Folder3
             Page4
             Page5
             Page6
    Now our requirement is when user clicks on Role1 then in the Detailed Navigation (DLN) , Page1 should set by default and content in that page has to be displayed in the content Area.
    Currently it is happening like, when user clicks on Role1 then in the Detailed Navigation(DLN), Folder1 is selecting by default , then user has to select manually the page1 then that page1 is content is displaying in the content area.
    Could you please get back to me what are the properties has to be changed at page level or folder level if any, for achieving the requirement as page1 should set by default when user clicks on Role1 ( from the First Level Navigation).??
    I tried the property of "Default entry for folder"  for page1 as "Yes", Still it is setting the page1 as deafult in the DLN on click of Role1. Please let me know if any other properties are required to change?
    Note : Currently we are using Light framework page fucntionality instead of Default framework page.
    Thanks in advance, it would be great help to us if get back to us.
    Regards,
    PortalUser100
    Edited by: PortalUser100 on Feb 24, 2011 6:53 PM
    Edited by: PortalUser100 on Feb 24, 2011 6:54 PM
    Edited by: PortalUser100 on Feb 24, 2011 6:57 PM

    Hi Mahesh,
    Thanks for your reply.
    Currently we are using Light framework page not Default Framework Page, Inside we have Light detailed Navigation, inside i had check for the property of "Clicking Folder Name Launches First Node", but it was not there for Light detailed Navigation.And this property is there as you said for detailed navigation inside the desktop inner page.
    Could you please guide whether out requirement is possible or not with light framework page->light detailed navigation?
    The following is our requirement
    How to set a Page as Default which is inside the Folder Structure on DLN (Detailed Level Navigation).?
    When user clicks on Role , then we need to set the Page as default to be loading in the detailed Navigation then the content of Page will be automatically displayed in the content area.?
    The following is the Structure of our requirement, then please let me know how to set Page as default when we click on Role 1, as mentioned in the below structure. Currently when click on Role1, then Folder1 in the DLN is selecting by default then user has to click on Page manually then content of page will be displayed in the content area.
    Role1 (First Level Navigation)
         Workset1(Second Level Navigation)
             Folder1(Deailed Navigation content)
                  Folder2
                        Page (Google Page, for example)
    I tried the property of Page as "Default Entry for Folder" as "Yes", even though still the page is not setting by default on click of Role1. let me know if any other changes/properties/options are there to get the solution for this.
    If any one helps on this then it would be great help to us.
    Currently we are using Light Framework Page. Not Default Framework Page.
    Thanks in advance.
    Regards,
    PortalUser100

  • 2 Question How to set the page size and  full screen

    I am looking to find out how to set the page to be 1024 by
    768 static and also how to force a browser window to go to full
    screen. Thanks

    Hi Ludek,
    i could solve the issue by using the follwing code.
    report = new ReportDocument();
    PageMargins customPageMargin = report.PrintOptions.PageMargins;
    report.PrintOptions.PaperOrientation = PaperOrientation.Portrait;
    report.PrintOptions.PaperSize = PaperSize.Paper10x14;
    customPageMargin.rightMargin = 1;
    customPageMargin.topMargin = 0;
    customPageMargin.bottomMargin = 0;
    report.PrintOptions.ApplyPageMargins(customPageMargin);
    Thanks for you help.
    Regards,
    smitha.

  • How to Set a page as home page in Oracle portal 10g

    Hi,
    I have one doubt.
    How to set a page (Not Page group) as home page in Oracle portal 10g?
    whether it should be a HTML Portlet or some other?
    Thanks & Regards
    Suthan.Sathya

    Hi,
    Welcome to SDN
    By defining the Sort Sequence of Navigation Nodes, you can do this, check the links:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/92/3e703e632c7937e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/53/89503ede925441e10000000a114084/frameset.htm
    If you need more help, just ping back.
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers

  • How to set ORACLE_HOME environment variables in win 2003

    Can anyone tell me how to set ORACLE_HOME environment variables in Win2003
    Please tell me the significance of that also.It will be really helpful if u can help me out from Path variable seting of JAVA SDK also... Thanks in advance...

    hi
    use this code IN FORMS60 variable in Regedit
    \\server\DATA\store\Forms;
    Rizwan

  • How to set the Environment Variable

    I'm going through a tutorial on how to create an application and run from the command prompt. I have finished installing my jdk 6 Upadate 5 but i don't know how to set the Environment Variable for the javac compiler and the java interpreter to find my program.
    I have created an application called "ExampleProgram" and have saved it on drive C:. How do i set the Environment Variable so that the "javac" compiler and the "java" interpreter can find it

    gyesa_say wrote:
    I'm using Windows XP Service Pack 2.A very bad choice to go with Windows. Personally I prefer Linux.
    I Google and had several information on how set it, but i tried all of them and none seem to work.I typed "how to set environmental variable in winxp" in Google and the very first link provided all the information I needed (you need). These things will make much more sense if you go through it yourself rather than having someone else spoon-fed you the answer.

  • How to get the session variable value in JSF

    Hi
    This is Subbus, I'm new for JSF framewrok, i was set the session scope for my LoginBean in faces-config.xml file..
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope> like that...
    So all parameter in LoginBean are set in session right ?... for example i used userId is the Parameter...
    Now i need to get the the userId parameter from that session in my another JSP page.. how i get that ?..
    Already i tried
    session.getAtrribute("userId");
    session.getValue("userId");
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..
    By
    Subbus

    Where i use that..is it in jsp or backend bean...
    simply i use the following code in one backend bean and try to get the value from there bean in the front of jsp page...
    in LogoutBean inside
    public String getUserID()
         Object sessionAttribute = null;
         FacesContext facescontext=FacesContext.getCurrentInstance();
         ExternalContext externalcontext=facescontext.getExternalContext();
         Map sessionMap=externalcontext.getSessionMap();
         if(sessionMap != null)
         sessionAttribute = sessionMap.get("userId");
         System.out.println("Session value is...."+(String)sessionAttribute);
         return (String)sessionAttribute;
         return "fail";
    JSP Page
    <jsp:useBean id="logs" scope="session" class="logs.LogoutBean" />
    System.out.println("SS value is ...."+logs.getUserID());
    but again it retrieve only null value.. could u please tell me first how to set the session variable in JSF.. i did faces-config only.. is it correct or not..
    By
    Subbus

  • How to set the bind variable on page load and execute query ?

    Hi All,
    I am using Jdeveloper 11.1.1.5
    I have a table called "Employee"
    Columns :- id , name , location
    Data :- 1, ,james , chicago
    2 ,Raj ,capetown
    Now i have another webservice(created as a webservice dataControl) which sends me the "id" on each time my page loads.Now the id which has been returned by webservice should be incorporated in my VO Query as in where clause to fetch the data for the respective "id" in that "Employee" table and should be rendered on form.
    Eg :- Id "2" has been sent by the webservice then the record should be fetched from database should be "2","raj","capetown".
    I know that there would be necessity of bind variable , but how do i set the bind variable on page load ?
    How can i use the bind variable appropriately ??
    Please suggest !!!!
    Thanks.

    Hi,
    Check
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/web_services.htm#CJADCDBG
    http://thepeninsulasedge.com/frank_nimphius/2011/02/18/adf-code-corner-sample-73-released-hands-on-creating-a-search-form-using-a-pojo-ws-and-the-web-service-data-control/
    -Suresh

  • How to set a bind variable across the pages in a report

    I want to create a portal report where data will come from a table for a date range for a week.
    For e.g select event_date,last_name, event_name
    from RESOURCES
    where event_date between trunc(to_date(:curr_date,'DD-MON-RRRR'))
    and trunc(to_date(:curr_date,'DD-MON-RRRR')+ 7)
    The :curr_date is defined as a bind variable whose default value is sysdate.
    Now, when we run the report for the first time, it takes the :curr_date as
    sysdate and prints the report.
    I have two buttons in the report output like "previous week" and "next week".
    If someone presses previous week, the same report should run with curr_date
    as sysdate-7 and if someone presses next week, the report should run with
    curr_date as sysdate +7 and also the :curr_date sets to sysdate - 7 or sysdate + 7
    depending on the button pressed.
    Problem:
    How do I set the value of curr_date if someone presses any of
    previous week/next week.
    null

    Best to state your JDev version, and technology stack (eg. ADF BC) when posting.
    I can think of 2 approaches.
    1) Create a parent VO based on SELECT :bindVar FROM dual, then create links between your other VOs and the parent
    2) Create a AM client interface method that programatically sets the bind variable in each VO.
    Can you specify your use case? This one tends to come up when discussing effective from/to dated queries.
    CM.

  • How to set a bind variable into a vo query from the current vo ?

    I would like to exclude from my list of values defined in a view object the already referenced items in the current view object content.
    Let's say i have dept and emp with a many to many relationships, I would like that the already existing dept for emp not listed (excluded) in the list of values for emp.
    Do i need to define a bind parameters and set it during search or is it possible to use an expression that will refer the current row attribute representing the dept ?
    I didn't find an example or explanation how to set bind parameters defined in a view object query from seach pages or list of values ui components. May be somebody know how to find the info.
    Thank you

    I think that bind variable accessors in the VO class is what you need. You can override the getter method of the bind variable "LocaleCode2" in order to return the first 2 chars from the bind variable "LocaleCode". Have a look at this blog post for details:
    http://jdeveloperandadf.blogspot.com/2011/03/custom-java-bind-variable-in-where.html
    Dimitar

Maybe you are looking for

  • Interpreting Predicate  and Filter information from the explain plan

    Can somebody help in understanding how does the predicate and filter operation effects the execution plan.or how can I conclude the predicate or filter operation chosen by optimizer is not optimized.

  • Output determination for POs - by purchase org?

    I'm testing some address changes we made on our PO forms in 3.1i -   I set up the output determination, and I'm able to print all POs I need... However, there are a few POs that wont print out, actually they won't even go to SP01 -  When I go back to

  • Newbie Q: I cannot find Sequence 01 tab

    Hi, I decided to give Premier Pro CS5 a try, having previously used Sony Vegas for the short videos I create. Everything was going very smoothly until I lost the Master Timeline Window (labeled Sequence 01). On it I had a number of video and audio tr

  • Movement type for customer returns

    Hi all, We've lost in SPRO while trying to findout how we can change transaction type from 651 to 653 on LR - customer return good receipt document. Can anyone give us a hint hot to and where to change movement type ? Thanks in advance. Levent Arslan

  • CS5 - Standard Screen Mode - Hand Tool don't move the document

    Hi all In PS CS5 -> Standard Screen Mode -> Hand Tool don't move the document unless you zoom the document so it became bigger than the working area! Is it possible to use the hand tool (move the document arround) while the document is smaller than t