Tabmenu in a JSF page

hi all,
I am supposed to create an Application in JSF.Functionality is to create a page with multiple tab items that display different pages for each tab. The main concern is that i need the tab menu to in the middle of the page , meaning , the page consists of two halves - the upper half remaining constant , fixed & then the page below which changes according to the tab selected.

What I've been doing is including my tabbed pages using jsp:include as follows:
<af:showOneTab position="both">
   <af:showDetailItem id="headlines" text="Headlines" rendered="true"
               disclosureListener="#{AdministratorPage.disclosureListener}">
              <jsp:include flush="true"
                    page="/jspf/AdministratorPage/Headlines.jsp"/>
  </af:showDetailItem>
  <af:showDetailItem id="useradmin" text="Users" rendered="true"
                     partialTriggers="change_displayed_users update_user create_user email_user"
                    disclosureListener="#{AdministratorPage.disclosureListener}">
    <jsp:include flush="true"
                 page="/jspf/AdministratorPage/UserTable.jsp"/>
   </af:showDetailItem>
    <af:showDetailItem id="groupadmin" text="Groups"
        rendered="#{Session.user.globalAdmin}"
        disclosureListener="#AdministratorPage.disclosureListener}">
         <jsp:include flush="true"
                page="/jspf/AdministratorPage/GroupTable.jsp"/>
   </af:showDetailItem>
and so on
...The included JSP files look something like this:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces">
    <af:panelForm labelWidth="15" rows="2" maxColumns="2">
        <af:inputText label="Home Page Message:"
                      value="#{Application.homePageHeadline}" columns="80"
                      rows="8"
                      tip="is displayed on a dedicated left hand panel of the Home Page.  It will most often be read by users who are just logging in."/>
        <af:inputText label="Banner Headline:"
                      value="#{Application.bannerHeadline}" columns="80"
                      rows="2"
                      tip="is displayed immediately under the Banner logo on every page.  It will displayed to all users the next time they update the page."/>
        <f:facet name="footer">
            <af:panelButtonBar>
                <af:commandButton text="Apply"/>
                <af:resetButton text="Reset"/>
            </af:panelButtonBar>
        </f:facet>
    </af:panelForm>
</jsp:root>

Similar Messages

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • How to get values from a query string in URL in a jsf page?

    if i have a url, http://my.com/?name=john+smith, how do i get the values from that url in a jsf page and then pass those values to a servlet?
    i know how to do that in jsp using "request.getParamter("name")" and save it in a bean and then forward to a servlet. But what about in jsf?

    Hello,
    Try this:
    Map requestMap = FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
    String name = (String) requestMap.get("name");If isn't worked one of these methods probably will solve your problem.
    FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
    FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();hth.

  • How to Open an Oracle Report From a JSF Page

    Hi there,
    I would be really grateful if anyone would find me a solution to the following scenario:
    In my company, we have a project where we have to convert Oracle Forms and Reports to Java Web Application. The conversion of forms is being done thourgh JSF/ADF technology but how can i open an Oracle Report from a JSF page after supplying it with parameters ? Or i have to do some type of conversion before ?
    Once again i would be thankfull for your replies.

    Tapash,
    Thanks for reponding.
    Here is the URL I am currently using :
    https://gccss.glendale.edu:8001/dev60cgi/rwcgi60?server=rep60_crp3+userid=apps/pswd@crp3+report=/u07/oracle/crp3appl/gcccus/11.5.0/reports/US/GCC_ACCRUAL_BAL_0505.rdf+desformat=html+paramform=yes+destype=cache+p_accesscode=""
    The p_accesscode is the parameter I need to pass to the Oracle report.
    Currently, when I click the button, it invokes the above URL and takes me to the parameter form of the Oracle report and when I enter the Username, it runs the report and displays the desired output. But, what I need to achieve is, to pass the current user who has logged in behind the scene and to get rid of the parameter screen totally. Is this doable ? If yes, please help me !!!
    Thanks
    Hilal

  • How-to get attributes from one JSF page redirected to another?

    How do I send information from one JSF page when the navigation rule redirects it to another?
    When JSF navigation does a forward I can use request.setAttribute() in the from-page and then use request.getAttribute() in the to-page, but this doesn't work with <redirect/>.
    Regards,
    Al Malin

    The process scope in ADF Faces solves this. See:
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtTopicFile.adffacesguide%7Cdevguide%7CcommunicatingBetweenPages%7Ehtml/

  • How to Use another JSF page that I load by XMLHttpRequest?

    Hi everyone, I'm a newbie of JSF and curisous about how to load page content seperately by AJAX.
    I saw example of Java Blue Print. It's load some data to use in page. What I want is to load another JSF page when click a link or button, (Like include another page). And work with functions privoided by loaded JSF Page.
    My example is, In a main page. I request a JSF page and set it into a div layer.
    var requestURL = "/admin/customer/customer-list-body.faces";
    var content = postDataWithoutContent(requestURL);     divContent.innerHTML = content;     
    All JSF components are required under <f:view>, thus action of form is set as "action='"/admin/customer/customer-list-body.faces'"
    But my page is main.jsp. Each time I click command button in customer-list-body.faces, the url will change to customer-list-body.faces, I want to request and hold in main.jsp.
    What can I do then? Any advices?

    Hi,
    the list doesn't seem to be your problem. You need to track down the illegal argument exception. Once you have that sorted out, expose the method on the AM so it gets shown as a method binding. The return values then could be picked up in a managed bean to create the select Item list
    Frank

  • How can I put an output stream (HTML) from a remote process on my JSF page

    Hello,
    I've a question if someone could help.
    I have a jsf application that need to execute some remote stuff on a different process (it is a SAS application). This remote process produces in output an html table that I want to display in my jsf page.
    So I use a socket SAS class for setting up a server socket in a separate thread. The primary use of this class is to setup a socket listener, submit a command to a remote process (such as SAS) to generate a data stream (such as HTML or graphics) back to the listening socket, and then write the contents of the stream back to the servlet stream.
    Now the problem is that I loose my jsf page at all. I need a suggestion if some one would help, to understand how can I use this html datastream without writing on my Servlet output stream.
    Thank you in advance
    A.
    Just if you want to look at the details .....
    // Create the remote model
    com.sas.sasserver.submit.SubmitInterface si =
    (com.sas.sasserver.submit.SubmitInterface)
    rocf.newInstance(com.sas.sasserver.submit.SubmitInterface.class, connection);
    // Create a work dataset
    String stmt = "data work.foo;input field1 $ field2 $;cards;\na b\nc d\n;run;";
    si.setProgramText(stmt);
    // Setup our socket listener and get the port that it is bound to
    com.sas.servlet.util.SocketListener socket =
    new com.sas.servlet.util.SocketListener();
    int port = socket.setup();
    socket.start();
    // Get the localhost name
    String localhost = (java.net.InetAddress.getLocalHost()).getHostAddress();
    stmt = "filename sock SOCKET '" + localhost + ":" + port + "';";
    si.setProgramText(stmt);
    // Setup the ods options
    stmt = "ods html body=sock style=brick;";
    si.setProgramText(stmt);
    // Print the dataset
    stmt = "proc print data=work.foo;run;";
    si.setProgramText(stmt);
    // Close
    stmt = "ods html close;run;";
    si.setProgramText(stmt);
    // get my output stream
    context = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
    ServletOutputStream out = response.getOutputStream();
    // Write the data from the socket to the response
    socket.write(out);
    // Close the socket listener
    socket.close();

    The system exec function is on the Communication palette. Its for executing system commands. On my Win2K system, the help for FTP is:
    "Ftp
    Transfers files to and from a computer running an FTP server service (sometimes called a daemon). Ftp can be used interactively. Click ftp commands in the Related Topics list for a description of available ftp subcommands. This command is available only if the TCP/IP protocol has been installed. Ftp is a service, that, once started, creates a sub-environment in which you can use ftp commands, and from which you can return to the Windows 2000 command prompt by typing the quit subcommand. When the ftp sub-environment is running, it is indicated by the ftp command prompt.
    ftp [-v] [-n] [-i] [-d] [-g]
    [-s:filename] [-a] [-w:windowsize] [computer]
    Parameters
    -v
    Suppresses display of remote server responses.
    -n
    Suppresses autologin upon initial connection.
    -i
    Turns off interactive prompting during multiple file transfers.
    -d
    Enables debugging, displaying all ftp commands passed between the client and server.
    -g
    Disables file name globbing, which permits the use of wildcard characters (* and ?) in local file and path names. (See the glob command in the online Command Reference.)
    -s:filename
    Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).
    -a
    Use any local interface when binding data connection.
    -w:windowsize
    Overrides the default transfer buffer size of 4096.
    computer
    Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last paramete
    r on the line."
    I use tftp all of the time to transfer files in a similar manner. Test the transfer from the Windows command line and copy it into a VI. Pass the command line to system exec and wait until it's done.

  • Can we  have a href tags in jsf page

    hi all,
    I tried inserting a link in jsf page using <a href> tag but when I click it, it is appending the link to contextroot.
    For Example:
    <f:verbatim>
    click here
    </f:verbatim>
    and when I click on it, I see http://www.google.com is appended to my application url after context root like
    http://localhost:9080/Ma/view/India/http://www.google.com
    and I get 404 error. how do I do it without having my application url.
    Thanks
    Ma
    Edited by: niki007 on Jan 12, 2009 4:32 PM

    This problem can occur if you didn't specify any protocol (http:// or https:// or others) in the link. But your example looks fine. I think that you modified the real code to this example, without being aware that you solved the problem yourself.
    At any way, you can also just use h:outputLink to render <a> elements.

  • Unable to get the output when i run any jsf page in adf

    Hi,
    I have created one jsf page to access the business components which i had created earlier after that when i drop the another panel splitter into the second facet of the initial panel splitter we created , I was unable to see in the workspace (.jpx) window.can you suggest me on this.
    after done all the steps if I tried to run that page it starts the WLS servier and createda URL but the url is taking long time approx more that two hour and still not getting the required output only the loading window I can see.
    Please suggest me on this.
    Thanks
    Chetan

    Hi,
    the panelSplitter should at least show in the Structure Window. So check if it is there. The runtime issue can be caused by the proxy settings. Go to Tools / Preferences --> Browser and Proxy and add localhost to the list of exclusion
    If you are new to ADF I recommend running a tutorial like this: http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm
    Frank

  • How to call a struts action from a JSF page

    I am working on a small POC that has to do with struts-faces. I need to know how to call a struts ".do" action from a JSF page..
    Sameer Jaffer

    is it not possible to call a action from the faces submit button and/or the navigation?
    This a simple POC using struts-faces exmaples.
    Here is my struts-config and faces-config file.
    <struts-config>
    <data-sources/>
    <form-beans>
      <form-bean name="GetNameForm" type="demo.GetNameForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
      <forward name="getName" path="/pages/inputname.jsp"/>
    </global-forwards>
    <action-mappings>
      <action name="GetNameForm" path="/greeting" scope="request" type="demo.GreetingAction">
       <forward name="sayhello" path="/pages/greeting.jsp"/>
      </action>
    </action-mappings>
    <controller>
        <set-property property="inputForward" value="true"/>
        <set-property property="processorClass"
                value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    </struts-config>faces-config
    <faces-config>
    <managed-bean>
      <managed-bean-name>calculate</managed-bean-name>
      <managed-bean-class>com.jsftest.Calculate</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
      <managed-bean-name>GetNameForm</managed-bean-name>
      <managed-bean-class>demo.GetNameForm</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
      <from-view-id>/calculate.jsp</from-view-id>
      <navigation-case>
       <from-outcome>success</from-outcome>
       <to-view-id>/success.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
       <from-outcome>failure</from-outcome>
       <to-view-id>/failure.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    <navigation-rule>
      <from-view-id>/inputNameJSF.jsp</from-view-id>
      <navigation-case>
       <to-view-id>/pages/greeting.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    </faces-config>in my inputNameJSF.jsp (faces page)
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Say Hello!!</title>
    </head>
    <body>
    Input Name
    <f:view>
         <h:form >
              <h:inputText value="#{GetNameForm.name}" id = "name" />
              <br>
              <h:commandButton id="submit"  action="/greeting.do" value="   Say Hello!   " />
         </h:form>
    </f:view>
    </body>
    </html>I want to be able to call the struts action invoking the Action method in the that returns the name
    package demo;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class GreetingAction extends org.apache.struts.action.Action {
        // Global Forwards
        public static final String GLOBAL_FORWARD_getName = "getName";
        // Local Forwards
        private static final String FORWARD_sayhello = "sayhello";
        public GreetingAction() {
        public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            String name = ((demo.GetNameForm)form).getName();
            String greeting = "Hello, "+name+"!";
            request.setAttribute("greeting", greeting);
            return mapping.findForward(FORWARD_sayhello);
    }Edited by: sijaffer on Aug 11, 2009 12:03 PM

  • How to custom a conversion error in JSF page in JDeveloper

    According to the book "Core JavaServer Faces" p213 (fifth edition), if I add the following line to messages.properties file, and specifiy it in the faces-config.xml and .jsp file, then the displayed conversion error message should be my tailored one instead of the default. However, I still get the default error message. Besides, I didn't find "CONVERSION" variable in UIInput class. Is the book wrong? And what's the correct way?
    javax.faces.component.UIInput.CONVERSION=Please correct your input

    I didn't choose any special in JDeveloper IDE. I just selected "new" to create a file called "message.properties" and put the line there. I didn't specify converters excepts declaring the type in the Jave Beans. I guess the converting is done by the JSF framework automatically. It must be a JSF converter since I created the page as a JSF page.

  • Calling a method in BPM Object from jsf page

    Hi All,
    How do I call a method in BPM object from JSF page? Is it possible to invoke it in a manner similar to invoking a method from managed bean in JSF application?
    Please help.
    Thanks and Regards,
    Veronica

    You can use f:invoke (or f:invokea to with parameters)
    For ajax calls, you can use f:invokeUrl to get the URL to a particular method within your BPM object, although make sure the Server-Side Method property is set to Yes.
    http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/taglib/index.html

  • New View Columns are Blank on Rendered JSF Page

    In an existing application, I am trying to add a few columns to an ADF Read-Only Table on an existing jsf page. In the model project, I added the columns to the read-only view object by changing the SQL statement. I then tested the business layer changes in the BC tester and the view works as I expected it to. I opened the affected jsf page in the ViewController, and tried to add the columns by copying the last column in the table repeatedly and just changing the sortable and headerText properties of the af:column objects and the text property of the af:outputText objects to values representing the new columns. Upon testing the page, the new columns appeared in the table but they where empty. No headers, no data. I then tried deleting the entire table and creating a new one by dragging the view back onto the page and selecting Create -> Tables -> ADF Read-only Table.... In the dialog I selected all the fields of interest and the new table appeared on the design view of the page. Running this version of the page gave me the same results as manually adding rows.
    What am I doing wrong? Is there something I need to do to the pagedef file? Is there another file that is "out of sync" with my jspx and pageDef files? I have been away from ADF for several months and I thought I covered all my bases.
    Thanks,
    Jeff

    Jeff,
    Your first scenario should work. What you need to do after copying the columns and changing all of the properties - go into the page definition, find the binding for the iterator upon which the table is based, double-click it, then you need to use the shuttle to add the new VO fields.
    Should work like that.
    John

  • Setting the value of a hidden field in a Visual Web jsf page

    Hey All,
    I am new to jsf and need some help with the following. I have written a method in the java portion of the jsf page that will get the selection(s) from a listbox and return them as a string. I need to assign the value of that string to a hidden field in the jsp portion of the page, so that I can pass the string as a parameter to a servlet. I have tried the following code in the "button_action", in the java portion of the jsf page, to assign the value of the string, returned from method, to the hidden field:
    hiddenField.setValue(string);
    This is not working. Any and all help on this matter is greatly appreciated.
    Thanks in advance.

    Here is the tag for the hidden field when the "hidden field" component is added from the pallette, I addded the "value" and "id". The name of the class is ReportStandard, which extends the AbstractPageBean.
    <webuijsf:hiddenField binding="#{ReportStandard.utilSelHF}" id="utilSelHF" value="#{ReportStandard.utilParams}"/>This is how I am calling the hidden field in the servlet:
    utils = request.getParameter("form1:utilSelHF_field");Here is the code for the button_action:
    public String runReport_button_action() {
           this.utilParams = get_utilSelection();
           return "sRptrslts";
    }

  • How to populate a html table in a JSF page

    Hi, I need help on the following issue:
    My code calls an business layer API which returns me a string in html format which produces a html table. I have a JSF page with a bunch of other JSF components and I want to insert this html table at the bottom of this page. Is there a way to do it?

    OK
    Here is an example
    Drag an outputText component on to the Page. Check the properties of outputText and uncheck the escape property. Write this some where in the code when you want to display the HTML table on the page.
    String s = "<HTML><BODY><TABLE BORDER=2><TR><TD>No</TD><TD>Name</TD><TD>Age</TD></TR><TR><TD>1</TD><TD>John</TD><TD>30</TD></TR><TR><TD>2</TD><TD>Michael</TD><TD>20</TD></TR></TABLE></BODY></HTML>";
    outputText1.setValue(s);
    I am using the hardcoded value for String but in your case you get the string from some API.
    Hope this helps
    Thanks
    Creator Team

Maybe you are looking for

  • I'd like to uninstall iCal and possibly iSync

    I'd like to trash iCal and iSync and reinstall. How do I do this? Right now it takes 20 minutes to an hour to do a mundane task such as deleting an event. I believe that either there is something wrong with the SyncManager or I have a hidden conflict

  • Webutil error with linux fedora 7

    i have developed forms in 10g in windows. server is also windows. http://aaf00022:8889/forms/frmservlet if i run this link in windows(client) it is working fine. but in fedora 7(client) i got the error like: Java Plug-in 1.6.0_10 Using JRE version 1.

  • ALE/IDOC PROCESSING

    hello guys, Can anyone explain me the ALE/IDOC scenario with some real time example..... I am having all the material and links for this ....  I know the total process how to create the custom idocs, how to distribute the ale scenario, how to create

  • Windows 2008 R2 TCP/IP KeepAliveTime not working

    Hi, We have configured the KeepAliveTime for the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters both on the server and the client and time for the KeepAliveTime is 300000(5 minutes). Now , we restarted the computers after s

  • Images look soft.

    Haven't used Finalcut for ages, but decided to give it an other go, but when I play the still images, they turn soft. Am I going crazy?