Focus on a specific item on JSF page

How we can focus on a specific item on JSF page in Jdev 11g.
In our use case user chose something from a radio button Then he want to focus on specific item on page.
Thanks.

I don't think so. One other thing is to insert javascript to the page from the code (backing bean):
                FacesContext facesContext = FacesContext.getCurrentInstance();
                ExtendedRenderKitService service = (ExtendedRenderKitService)
                Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
                service.addScript(facesContext, "alert(\"Hello!\");");Pedja

Similar Messages

  • Jump to specific region on a page

    I have a page with multiple (10+) sql report regions. What I’m looking to do is let users select one of the regions from a list thereby jumping (moving focus) to that specific region on the page.
    If possible I’d like to do this without submitting the page again.
    If anyone has tips or has seen a thread with this answered already, please let me know.
    Thank you

    Give each report region a unique ID using the region's Static ID property, for example emp-report.
    These can be referenced as fragment identifiers in URLs:
    <a href="#emp-report" title="Go to Employee report on this page">Employees</a>
    Re: Lists that go to items.

  • Jsf page layout

    Pls show me how to control layout of items on jsf page , is there any way to format the page as in oracle form .
    thanks
    abohatim

    You use panels for this.
    ADF Faces has an extensive set of panels you can read about them in the ADF Developer Guide page 4-30

  • Focus on first item on the page

    Allthough I have this setting activated for my login page and my first item is user name, the focus is set to password. Is there anything I forgot? Funny enough, on one of my other applications works right.
    Denes Kubicek

         What is the difference between these ways:
    onLoad="html_GetElement('P101_USERNAME').focus();"
    And
    <script type="text/javascript">
    first_field('P101_USERNAME');
    </script>
         For some reason, I was able to set the focus by using the second method, but never success on first. Could you or someone to help me undsertand what the
    possible reason is. What I did is : set Cursor focus to <b>do not focus cursor</b> and put onLoad="html_GetElement('P101_USERNAME').focus();" into Page HTML Body Attribute.
    I am also check the #ONLOAD# on my page template .
        Another question is: I have an item on a page which is a text field. It's focused every time page is loaded. but I put a "onChange" event on this item which calls a
    confirm message box. If "Yes", then submit the page, If "No", clear the item and set the focus on the item again. I am having trouble to have the cusor re-focus on
    the item again. Anyone could help. Thanks in advance for the help. Here is the code I put at page attribute;
    <script language="JavaScript1.1" type="text/javascript">
    function test(form){
       var conmod = confirm("Are you sure you want to submit");
       if (conmod == true)
          doSubmit();
       else
       form.P2_BE.focus() ;
       form.P2_BE.value='';
    </script>
    I am using version 1.6
    Regards,
    Ran

  • Clear page cache - All except specific items

    APEX 4.2.1
    On a page with dozens of editable page items, when branching back to the same page on-submit, is there a way to clear cache for all items except a few (key) items? The branch attributes (via the f?p= syntax) support clearing cache for the entire page and setting specific item/value pairs but no support for exclusions.
    Any ideas? Thanks

    I wrote a utility procedure to do this a couple of years ago. Something like this (reusing a slightly modified version of the Shuttle item - Saving changes):
    create or replace procedure clear_page_cache_except (
        p_page          in number
      , p_exclude_items in varchar2
      , p_separator     in varchar2 := ',')
    is
    begin
      for item in (
        select
            i.item_name
        from
            apex_application_page_items i
        where
            i.application_id = nv('app_id')
        and i.page_id = clear_page_cache_except.p_page
        minus
        select
            x.column_value
        from
            table(
              string_to_coll(
                  upper(clear_page_cache_except.p_exclude_items)
                , clear_page_cache_except.p_separator)) x)
      loop
        apex_util.set_session_state(item.item_name, null);
      end loop;
    end clear_page_cache_except;However IIRC we mainly used this from packages: it's not very branch-to-page friendly. Possibly use a Branch to PL/SQL Procedure with a procedure that calls <tt>clear_page_cache_except</tt> then redirects to the page?

  • Af:table receives focus when clicked which causes scrolling of page

    We're using a flowing UI design; we have a listing of items on the page; so when the listing gets long, you use the browser's scroll bar to scroll down the list (as opposed to having an individually-scrolling content island).
    The issue we're running into is this: When the listing is long enough that the page contains a scrollbar, and you click one of the rows in the table, the page scrolls up so that the top of the table is aligned with the top of the browser window (in all browsers other than FireFox). I spent some time looking at the JavaScript in a debugging tool and discovered that the scrolling is due to the table receiving focus when AdfDhtmlTablePeer._grabFocus is called on the table's mousedown event.
    By itself this is just a minor annoyance, but when it happens while attempting to access a context menu it becomes a serious usability problem. If for example you right-click on row 4 in your table, the page scrolls up as soon as it detects the mousedown event on the table; at this point your cursor is no longer over row 4 in your table, maybe row 9; so when the context menu is subsequently displayed, it's related to row 9 rather than row 4 which you originally clicked.
    I created a very simple JSF page to confirm that the behavior could be reproduced outside the context of our application. This is the JSF code for the page:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="jmtest.jsf" id="d1">
    <af:form id="f1">
    <af:panelBorderLayout id="pbl1"
    inlineStyle="background:#ffffcc; height:150px;">
    <af:outputText value="Test 01" id="ot2"/>
    </af:panelBorderLayout>
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{jmtest.testList}" fetchSize="200"
    contentDelivery="immediate" immediate="true"
    autoHeightRows="200">
    <af:column sortable="false" headerText="col1" id="c1" width="500">
    <af:outputText value="#{row}" id="ot1"/>
    </af:column>
    </af:table>
    </af:form>
    </af:document>
    </f:view>
    This is the simple bean that populates the table with 100 rows:
    package tmptst.jmarshal;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.ViewScoped;
    @ManagedBean
    @ViewScoped
    public class jmtest
    public String[] getTestList()
    String[] testList;
    testList = new String[100];
    int count = 0;
    while (count < 100)
    testList[count] = "Item " + count;
    count++;
    return testList;
    What I need is some JavaScript that can be used to suppress the focusing of the table that occurs inside HandleComponentMouseDown. There are ways that I could hack my way to roughly the desired result, but I'm hoping there are some valid ADF-approved hooks that could allow me to get the job done in a cleaner way. Or better yet, maybe some declarative switch or flowing page-geometry configuration we've overlooked.

    We're currently using 11.1.2.2.0 (this is for the .8 release of WebCenter Content). The plan is to migrate to 11.1.2.4.0 for .9; but for this release we've got to stick with what we're using.

  • Change item value when a specific item has changed... how can i do that?

    Hi guys, i need to ask something...
    Is it possible to have a process or a computation, that gives value to an item, only when one specific item has changed.
    I have other items on my page too, but this two are related, and i need to give a specific value to the first one, only when the value of the second has changed...
    Help please
    tsveti:)

    Hey Farhan, i guess i need some help on that easy javascript...
    i havent done much thing with it so i have almost none experience with js....
    So in 'HTML Form Element Attributes' for the second item I m trying this :
    onchange="javascript:{document.getElementById('P1_SUBPROJECT').value = '-1';}"
    but when i change the value of this second item, the first one (P1_SUBPROJECT) dont get -1
    what am i doing wrong?

  • 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.

  • How to get the initial state of JSF PAGE IN ORACLE ADF

    Hi everybody
    my Jdeveloper version is 12.1.3
    I'm building my JSF pages based on a template that has a navigation pane which contains command navigation items , every one of them (command navigation items) appears as a link at runtime and calls a JSF page , I wish to get the initial state for any page when leaving it then entering such page again , and I would like to know what is the suitable place to write the code to do this task.
    many thanks !

    Clear the cache by adding the following to each jsf page.
    <%
    response.setHeader("Cache-Control","no-cache"); 
    response.setHeader("Pragma","no-cache");
    %>

  • How do I zoom to a specific point on a page

    My first question ever to support:
    WIndows 7 - Firefox 32.0.2 - Laptop without touch screen or touch pad (mouse and keyboard only)
    I have found lots of ways to Zoom on a page. However, zoom always anchors to the top left. I would really love to zoom to the position of the mouse pointer. Usually I am focused on a specific piece of the content and not the whole page.
    Is this possible? Thanks everyone.

    hello, i don't think that this is possible currently (or that there are any addons that would provide this functionality).
    however, it sounds like a nifty feature though when you use the gestures involving the mouse to zoom - you might want to file an enhancement bug at bugzilla.mozilla.org about that...

  • Navigation to specific tab within a page

    I have an event set up to navigate to a certain page however this is not good enough for me. I want to navigate to a specific tab within that page. Is there a way to do this?

    I'm not entirely sure I understand what you want, but if you want to simply go directly to a specific tab, you can use it's direct access URL. If you login to portal and bring up Oracle's portal help (use the help link in the upper right on any of the default pages), search for direct access URL and they do a nice job of explaining how to reach a page, tab, subpage, item, etc.
    To access a subtab called mytab1 on the mytab tab in Portal release 2 or portal 10g prior to 10.1.4:
    http://<hostname>:<portnumber>/pls/portal/url/page/<pagegroupname>/<pagename>/mytab/mytab1
    (Note that the names needed for the url are the "Name" field when looking at properties, not the "Display Name")
    The URL structure has changed in 10.1.4.
    Rgds/Mark M.

  • Anyway to lock items on a page?

    Is there anyway that iWeb will allow you to lock down text and images on a page once you have finished the layout of that particular item. I am getting a bit frustrated with selecting things that I didn't realize was selected and moving them. Thank goodness for the Undo function.
    Also, can you tab or some other way of selecting various items on a page, like when an image is behind a text box but the text box is bigger than the image box. How do you select through the text box.
    Sorry if these are silly questions. Just need to know and I couldn't find anything under help.
    Thanks,
    Mike

    Is there anyway that iWeb will allow you to lock down text and images on a page
    You cannot lock objects. If it could, there would be a command (Cmd-L) in a menu. You cannot group object either.
    Also, can you tab or some other way of selecting various items on a page, like when an image is behind a text box but the text box is bigger than the image box. How do you select through the text box.
    Drag the mouse over the objects and Cmd-Click the object(s) you do not want to move.
    It's not iWeb specific. Has been possible in all apps for the past 25 years if I remember correctly. It's an acquired skill.

  • Problem with Non JSF Request to JSF Page

    Hi All,
    I am working on dynamic controls generation based on the request come from non jsf page
    For the first request, pageworks perfectly. but when we go for second request, it is not rendering and I am getting same old page.
    What I have identified is if I have 2 pages as JSF, application is not giving any problem.
    For this I have written small test application contains both JSF pages only.
    page1 contains 3 submit buttons.
    When submit buttons are clicked based on the request, I get, am able to see the dynamic controls.
    SO there is no problem with JSF PAGE to JSF Page Communication
    Now I have done some changes in First JSF page. Instead of submitting directly I am submitting the page through JavaScript which is nonb JSF request. There I am facing the problem and based on requested qaction I am not able to see correct rendered page based on the requested action.
    Any Idea why it is giving problem for non JSF requests??
    Thanks
    Sudhakar

    For Your Convenience in understanding the problem
    I am pasting entire test code
    Page 1 -- (here page2 is Page1 and Page1 is page2 - some naming convention errors :) )
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page2 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page2.form1}" id="form1">
    <!-- Non JSF REquests -->
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=1'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=2'; document.forms['form1'].submit(); return false;"/>
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" onclick="document.forms['form1'].action='faces/Page2.jsp?id=3'; document.forms['form1'].submit(); return false;"/>
    <!-- this  is JSF request -->
                        <!--
                        <h:commandButton action="#{Page2.button1_action}" binding="#{Page2.button1}" id="button1" style="left: 48px; top: 48px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button2_action}" binding="#{Page2.button2}" id="button2" style="left: 48px; top: 96px; position: absolute" value="Submit" />
                        <h:commandButton action="#{Page2.button3_action}" binding="#{Page2.button3}" id="button3" style="left: 48px; top: 144px; position: absolute" value="Submit" />-->
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Page1 Bean
    * Page2.java
    * Created on June 25, 2005, 11:08 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class Page2 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlCommandButton button2 = new HtmlCommandButton();
        public HtmlCommandButton getButton2() {
            return button2;
        public void setButton2(HtmlCommandButton hcb) {
            this.button2 = hcb;
        private HtmlCommandButton button3 = new HtmlCommandButton();
        public HtmlCommandButton getButton3() {
            return button3;
        public void setButton3(HtmlCommandButton hcb) {
            this.button3 = hcb;
        // </editor-fold>
        public Page2() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
            } catch (Exception e) {
                log("Page2 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        public String button1_action()  throws Exception{
            // TODO Following code was replaced by static navigation
           getSessionBean1().setId(1);       
          /* ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case1";
        public String button2_action()  throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(2);
          /*  ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
           return null;*/
            return "case2";
        public String button3_action() throws Exception{
            // TODO Following code was replaced by static navigation
                getSessionBean1().setId(3);
            /*    ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
           HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
           HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
           res.sendRedirect("http://localhost:18080/webapplication8/faces/Page2.jsp");
            return null;*/
            return "case3";
    }page 2
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <jsp:text><![CDATA[
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    ]]></jsp:text>
        <f:view>
            <html lang="en-US" xml:lang="en-US">
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>Page1 Title</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                    <h:form binding="#{Page1.form1}" id="form1">
                        <h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="left: 96px; top: 48px; position: absolute"/>
                        <f:selectItems binding="#{Page1.radioButtonList1SelectItems1}" id="radioButtonList1SelectItems1"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
                            style="left: 384px; top: 120px; position: absolute" value="Submit"/>
                        <h:commandButton action="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1" style="left: 384px; top: 72px; position: absolute" value="Submit"/>
                        <h:outputLink binding="#{Page1.hyperlink1}" id="hyperlink1" style="left: 480px; top: 216px; position: absolute" value="http://www.sun.com/jscreator">
                            <h:outputText binding="#{Page1.hyperlink1Text}" id="hyperlink1Text" value="Hyperlink"/>
                        </h:outputLink>
                        <h:commandLink binding="#{Page1.linkAction1}" id="linkAction1" style="left: 456px; top: 264px; position: absolute">
                            <h:outputText binding="#{Page1.linkAction1Text}" id="linkAction1Text" value="Link Action"/>
                        </h:commandLink>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>page2 bean
    * Page1.java
    * Created on June 25, 2005, 10:52 AM
    * Copyright user
    package webapplication8;
    import javax.faces.*;
    import com.sun.jsfcl.app.*;
    import com.sun.jsfcl.data.DefaultSelectItemsArray;
    import java.util.Vector;
    import javax.faces.component.UIComponent;
    import javax.faces.component.UISelectItems;
    import javax.faces.component.html.*;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import javax.faces.model.SelectItem;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Page1 extends AbstractPageBean {
        // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
        private int __placeholder;
        private HtmlForm form1 = new HtmlForm();
        public HtmlForm getForm1() {
            return form1;
        public void setForm1(HtmlForm hf) {
            this.form1 = hf;
        private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid();
        public HtmlPanelGrid getGridPanel1() {
            return gridPanel1;
        public void setGridPanel1(HtmlPanelGrid hpg) {
            this.gridPanel1 = hpg;
        private HtmlCommandButton button1 = new HtmlCommandButton();
        public HtmlCommandButton getButton1() {
            return button1;
        public void setButton1(HtmlCommandButton hcb) {
            this.button1 = hcb;
        private HtmlOutputLink hyperlink1 = new HtmlOutputLink();
        public HtmlOutputLink getHyperlink1() {
            return hyperlink1;
        public void setHyperlink1(HtmlOutputLink hol) {
            this.hyperlink1 = hol;
        private HtmlOutputText hyperlink1Text = new HtmlOutputText();
        public HtmlOutputText getHyperlink1Text() {
            return hyperlink1Text;
        public void setHyperlink1Text(HtmlOutputText hot) {
            this.hyperlink1Text = hot;
        private HtmlCommandLink linkAction1 = new HtmlCommandLink();
        public HtmlCommandLink getLinkAction1() {
            return linkAction1;
        public void setLinkAction1(HtmlCommandLink hcl) {
            this.linkAction1 = hcl;
        private HtmlOutputText linkAction1Text = new HtmlOutputText();
        public HtmlOutputText getLinkAction1Text() {
            return linkAction1Text;
        public void setLinkAction1Text(HtmlOutputText hot) {
            this.linkAction1Text = hot;
        // </editor-fold>
        public Page1() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                ExternalContext ctx=(ExternalContext)FacesContext.getCurrentInstance().getExternalContext();
                HttpServletRequest req=(HttpServletRequest)ctx.getRequest();
                HttpServletResponse res=(HttpServletResponse)ctx.getResponse();
                String id=req.getParameter("id");
                if(id!=null)
                    getSessionBean1().setId(Integer.parseInt(id));
                if (getSessionBean1().getId()==1) {
                    addTextBox();
                else if (getSessionBean1().getId()==2) {
                    addCheckBox();
                    addRadio();
                else if (getSessionBean1().getId()==3) {
                    addRadio();
                   // addCheckBox();
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        protected webapplication8.ApplicationBean1 getApplicationBean1() {
            return (webapplication8.ApplicationBean1)getBean("ApplicationBean1");
        protected webapplication8.SessionBean1 getSessionBean1() {
            return (webapplication8.SessionBean1)getBean("SessionBean1");
         * Bean cleanup.
        protected void afterRenderResponse() {
        private void addRadio() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc2");
            HtmlSelectOneRadio checkBox = new HtmlSelectOneRadio();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a3");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addCheckBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Desc");
            outputText.setId("somedesc1");
            HtmlSelectManyCheckbox checkBox = new HtmlSelectManyCheckbox();
            checkBox.setBorder(0);
            checkBox.setLayout("pageDirection");
            checkBox.setId("a2");
            UISelectItems items = new UISelectItems();
            DefaultSelectItemsArray objArray =new DefaultSelectItemsArray();
            vectDefaultSelectItemsArray.add(objArray);
            arrays=(DefaultSelectItemsArray[])vectDefaultSelectItemsArray.toArray(new DefaultSelectItemsArray[vectDefaultSelectItemsArray.size()]);
            int size =arrays.length;
            arrays[size - 1].clear();
            for (int i =0;i<10;i++) {
                arrays[size - 1].add(new SelectItem(""+i+"",""+i));
            // array.setItems(new String[] {"Yes","No" });
            items.setValueBinding("value",getValueBinding("#{Page1.arrays["+(size-1)+"]}"));
            checkBox.getChildren().add(items);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(checkBox);
            parent.getChildren().add(gridPanel);
        private void addTextBox() {
            HtmlPanelGrid gridPanel = new HtmlPanelGrid();
            UIComponent parent = gridPanel1;
            HtmlOutputText outputText = new HtmlOutputText();
            outputText.setValue("Some Description for Control Text Box");
            outputText.setId("somedesc");
            HtmlInputText textField = new HtmlInputText();
            //  textField.setId("textField_"+control.getId());
            textField.setId("a1");
            HtmlOutputText outputText1 = new HtmlOutputText();
            hyperlink1Text.setValue(" ");
            hyperlink1Text.setStyleClass("bodyText");
            textField.setStyleClass("frmObjects");
            gridPanel.setColumns(3);
            gridPanel.getChildren().add(outputText);
            gridPanel.getChildren().add(hyperlink1Text);
            gridPanel.getChildren().add(textField);
            parent.getChildren().add(gridPanel);
        private DefaultSelectItemsArray array = new DefaultSelectItemsArray();
        public DefaultSelectItemsArray getArray() {
            return array;
        public void setArray(DefaultSelectItemsArray dsia) {
            this.array = dsia;
        private Vector vectDefaultSelectItemsArray = new Vector();
        private DefaultSelectItemsArray[] arrays = new DefaultSelectItemsArray[10];
        public DefaultSelectItemsArray[] getArrays() {
            return arrays;
        public void setArrays(DefaultSelectItemsArray[]dsia) {
            this.arrays = dsia;
        private UISelectItems radioButtonList1SelectItems1 = new UISelectItems();
        public UISelectItems getRadioButtonList1SelectItems1() {
            return radioButtonList1SelectItems1;
        public void setRadioButtonList1SelectItems1(UISelectItems uisi) {
            this.radioButtonList1SelectItems1 = uisi;
        private ValueBinding getValueBinding(String expression) {
            return     FacesContext.getCurrentInstance().getApplication().createValueBinding(expression);
        public String button1_action() {
            // TODO Replace with your code
            return "case1";
    }my navigation.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <navigation-rule>
            <from-view-id>/Page2.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case2</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>case3</from-outcome>
                <to-view-id>/Page1.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
        <navigation-rule>
            <from-view-id>/Page1.jsp</from-view-id>
            <navigation-case>
                <from-outcome>case1</from-outcome>
                <to-view-id>/Page2.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>my managed beans xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                                  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
    <faces-config>
        <managed-bean>
            <managed-bean-name>Page1</managed-bean-name>
            <managed-bean-class>webapplication8.Page1</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>SessionBean1</managed-bean-name>
            <managed-bean-class>webapplication8.SessionBean1</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>ApplicationBean1</managed-bean-name>
            <managed-bean-class>webapplication8.ApplicationBean1</managed-bean-class>
            <managed-bean-scope>application</managed-bean-scope>
        </managed-bean>
        <managed-bean>
            <managed-bean-name>Page2</managed-bean-name>
            <managed-bean-class>webapplication8.Page2</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <managed-bean>
    </faces-config>

  • Execute Logic Before JSF Page Is Processed

    In my task flow, I have two view activities.  When a user executes a specific operation, e.g., click on Submit command, in View A, the JSF page in View B is displayed.  View B's JSF page has three ADF components(2 forms and a table) that were created from different view objects in the Data Control section.  Before the JSF page is loaded, a method will execute the necessary logic for the three ADF components.  Is this possible?
    I am using JDeveloper 12.1.3.  I am not able to determine where I can specify the name of  the name of the method that will be invoked before View B's JSF page is invoked.

    You can add a method call in between when you navigate between A to B in your Task Flow.
    You can get some idea from this link :
    Johny's Tips: ADF: How to execute the ViewObject with a ViewCriteria on the PageLoad in ADF Web Application
    Cheers
    AJ

Maybe you are looking for

  • JDev 11g - PAPI WS access

    Hello, Using the documentation and some very helpful posts from this forum we successfully started using PAPI WS interface to BPM in our JDev 10.1.3 JEE application. After the upgrade to 11g, however, the code stopped working. Here's the error that w

  • How to run labview exe with command line

    I would like to launch a labview exe with a command line. I would like to get advice how to launch the Labview exe with giving values to the control parameters? You can view the example where x,y are the controls Solved! Go to Solution. Attachments:

  • Edge terrible for YouTube.  Here's another solution to get good YouTube

    Not the best but this actually turns up better YouTube vids. Go to iTunes and subscribe to BestOfYouTube (Video) podcast. iTunes will download as many of the vids you chose and then when you sync your iPHone will have the videos ready to play in the

  • Classification for Routing Operation (PLPOD-KLAKZ)

    Hi experts, I have to check if a routing operation (CA03) is classified. In CA03 there is an indicator that shows if a classification exists. (PLPOD-KLAKZ) I already checked function group CPCL but I didn't find any function module which fits to my n

  • My ipod connects with other computers but not mine.

    my ipod connects with other computers but not mine.