Checkbox problem in JSF Page

Hi Experts,
I am using Jdeveloper 11.1.2.1.0.I have one tab in my page.In that page i have table dropped on it which is a combination of 3 views.When i check the checkbox some fields should be automatically filled up by the data present in the database.Whenever i uncheck it should not show anything for this i have written one impl class.This scenario works fine when i run app module.But this is not happening when i run the page.When i check the checkbox its showing this error,
JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25009. Error message parameters are {0=java.lang.Long, 1=5F000F89D9F548358C6B76AB7ED20467, 2=java.lang.String}
ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #2.
Please anyone can help me on this problem.
Edited by: Sri on Mar 21, 2012 12:49 AM
Edited by: Sri on Mar 21, 2012 12:52 AM

what you wrote impl.class how did you perform drag and drop operation in jspx/jsff.
or use any valuchangelisteners.

Similar Messages

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

  • Problem connecting JSF page with SQL server 2005 DB

    hello guys,
    i have tried working with the visual web JSF in NET BEANS 6.1 IDE.
    i get an error connecting the jsf page witht he sql server 2005 db.
    i get an odbc:jdbc error.
    can anyone gimme the exact correct coding to connect a a jsf page with the sql server 2005 db.
    expecting a reply soon...
    thanks a lot....
    sandeep

    You need to elaborate a bit more about the problem.
    Read this to get more chance on suitable help: [http://www.catb.org/~esr/faqs/smart-questions.html].

  • HTML tag problem in jsf page

    Hello every body .I am newer in jsf.I have used the following segment in my jsf page .Now I want to read value from intl properties file in place of "*********************".How i will do it?plz help me Thanks in advance.
    <t:panelGrid id="guestUserIstallationhelpnotesGrid" columns="1" width="100%" border="0" columnClasses="next" style="align: right !important;"
                   cellpadding="8">
                        <f:verbatim>
                             <table class="tip" cellspacing="0" width="100%" height="50px" border="0">
                                  <tr>
                                       <td class="tip_headline">
                                       </td>
                                  </tr>
                                  <tr>
                                       <td class="tip_text" ></f:verbatim>
                                            <p align="justify">************
                                            </p>
                                       </td>
                                  </tr>
                             </table>
                        </f:verbatim>
                   </t:panelGrid>

    Use the f:loadBundle component.

  • Problem with JSF Page loading with WAS 6.1.0.2

    We are using Trindad Faces & the app server is Websphere 6.1.0.2.
    When the server starts up, its gives lots of logs (does not say error or warning) as below.
    11:13:58:881 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [group]
    [11/10/06 11:13:59:061 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [property-metadata]
    [11/10/06 11:13:59:231 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [group]
    [11/10/06 11:13:59:372 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [property-metadata]
    [11/10/06 11:13:59:532 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [group]
    [11/10/06 11:13:59:782 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared FacesConfigParser.parseShared(): unable to locate : [property-metadata]
    [11/10/06 11:13:59:942 EST] 00000019 jsf W com.ibm.ws.jsf.configuration.FacesConfigParser parseShared Face
    And, when I try to access the Page, the following error message is shown up and the page is not getting displayed.
    java.lang.NullPointerException
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:754)
    at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:66)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:255)
    at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:277)
    at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:70)
    at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:134)
    at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:150)
    at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:76)
    at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:294)
    Any thoughts on what could be the issue?
    Thanks in advance!!

    Hi Raymond,
    Is it possible to package a JSF implementation with your web application and then use the usual classloading order?
    * Tried that, looks like that wont work. WAS throws all sorts of exceptions :
    java.lang.NoSuchMethodError: javax/servlet/jsp/JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
    +Caused by: org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'ehrRequest.savePractice(practice)' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl]+
    +.....+
    What about hiding the JMS queuing behind an EJB (that way the JMS happens in the EJB container, not the web container, a total hack but what can you do)? Have you tried moving all of your classes and libraries from the WAR and into the application space?
    Thats actually a pretty good idea. I am gonna try that.

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

  • How to get rendered JSF page (send it as HTML email)

    Hello,
    I would like to send notification email in my application. Could you please help me to find a way how to get HTML result of JSF page as string-file-stream. Simply anything I could handle and use it as email body or attachment.
    My use case: User click to button (raise a action) which change something in DB and confirmation.xhtml(.jsf) is shown to him to confirm that this action was succesful. And I would like to send notification email to all other users with this page (simplified version).
    I need a something like String getJsfPage(String url) but I could not find anything in JSF API.
    Thanks for any clue.

    quote gimbal2: +...now write the code to generate the email body...+
    Thanks for reply...
    Is that mean that I could not use already written code (confirmation.xhtml)? The beuty on JSF is that JSF parser take care about CSS styles, EL, templating (ui: ...), ... When anybody (administrators) wants to change how this email looks - just change this XHTML file.
    How should I write email body? I thought about several way but nothing what looks good:
    - I really dont want to use StringBuilder do build HTML.
    - I dont want to write my own parser of .xhtml template (confirmation.xhtml).
    - Write HTML (xml) template and parse it with XSLT transformation seems to me acceptable but complicated. Needs a special library to perform XSLT, complicated template service (future changes)
    - JSP page, more-or-less the same problems like JSF page
    The sad is that this email (html) body is quite small but highly dynamic (css, language of texts, logos...).

  • Jsf page url don't show  full path on address bar.

    Hi,
    my problem is jsf page url don't show full path on address bar.
    1st page located on: http://127.0.0.1:7101/ViewController/faces/home.jspx
    2nd page located on:http://127.0.0.1:7101/ViewController/faces/pages/private/main.jspx
    when click 2nd page call button on home.jspx, then which is show main.jspx page. but on address url page full path is never change.
    ex: http://127.0.0.1:7101/ViewController/faces/home?_adf.ctrl-state=190epua3co_9
    I want to see this url : http://127.0.0.1:7101/ViewController/faces/pages/private/main.jspx?_afrLoop=15092772897987&_afrWindowMode=0&_adf.ctrl-state=190epua3co_14
    I used to adfc-config.
    how to resolve it?
    thanks
    juddi
    Edited by: juddi on May 20, 2011 12:06 AM
    Edited by: juddi on May 20, 2011 3:06 AM

    The question is why do you want to show the URL?
    Faces apps don't change the url with each click (as the click might be going into a region).
    Can you give us a use case? Do you use bounded task flows?
    JDev version?
    Timo

  • JSF page fails to reflect saved changes to model

    How do I refresh the info kept in the JSF backing bean in order to reflect changes saved to the model?
    My JSF page contains rows of data. Depending on the user’s choices, one or more rows may be eliminated from the model. My problem is the change in the model is never reflected in subsequent page displays, unless I kill the session. I’m sure this behavior is because the backing bean has a scope of session and the data loaded into the session bean never changes to reflect the change in the model. Invalidating the session kills everything including stuff I want to keep around (like logon info and other stuff that will really never change during the session). Changing the backing bean scope to request breaks the update completely.
    Help!!!
    Regards,
    Al Malin

    Thanks for the reply.
    I have (actually had) two problems. The first one I've solved since my initial post (stupid error on my part).
    The other unsolved problem is JSF pages displaying stale data. User navigates to first page, navigates to second page, at this point the database changes, and then the user navigates back to first page. Navigating back to the first page shows the data how it was, not how it is, because it's from the session bean and not the database. If I could kill the session bean when the user navigates from the page the problem would be solved because I build the inital display in the constructor (BTW, please advise if this is a bad approach).
    Frank, your reply raised a question. Is there a way to specify a refresh frequency? If so, how?
    Thanks,
    Al Malin

  • Update OneToMany collection from jsf page

    Hello,
    I have a problem updating a OneToMany relationship from a jsf page.
    I get an parent object via the local interface from the ejb, then I remove a child from the onetomany relationship and call my save method on the stateless bean which just merges the parent object back to the entitymanager.
    But the child I've removed gets not deleted from the database (so its in the collection again after refresh).
    So whats the preferred way to do this?
    thanks
    Dirk

    Thanks for the reply.
    I have (actually had) two problems. The first one I've solved since my initial post (stupid error on my part).
    The other unsolved problem is JSF pages displaying stale data. User navigates to first page, navigates to second page, at this point the database changes, and then the user navigates back to first page. Navigating back to the first page shows the data how it was, not how it is, because it's from the session bean and not the database. If I could kill the session bean when the user navigates from the page the problem would be solved because I build the inital display in the constructor (BTW, please advise if this is a bad approach).
    Frank, your reply raised a question. Is there a way to specify a refresh frequency? If so, how?
    Thanks,
    Al Malin

  • Use commandLink to forward non-jsf page cause other commandLink invalidate

    Hi :
    I use commandLink to forward to non jsf page , after click the link , it worked , success to 1.jsp. Then I click another link , the other commandLink doesn't work.
    any one have the same problem ?
    JSF page:
    <h:commandLink action="#{MenuHandler.go}">
         <h:outputText value="process" />
         <f:param value="1.jsp" name="forward" />
    </h:commandLink>
    MenuHandler.java
      public static String go() {
                HttpServletRequest req = getRequest();
                String forward = req.getParameter("forward");
                getExternalContext().redirect(forward);
                FacesContext.getCurrentInstance().responseComplete();
                return "success";
      }ps:there is one <h:form/> in my jsf page and I use:
    jdk1.5.0
    jsf-1_1
    Tomcat-5.0.28

    to supplement:
    I found something strange:
    The JSF page I used is for menu purpose.
    So there is a <BASE target="mainFrame"> tag in my JSF page.
    If I mark it . Then other commandLink can work ~~
    Because the page is a menu page , so I can't mark the <BASE target="mainFrame">

  • Problem in using MySQL in JSF Pages

    Hi,
    I am facing a problem regarding use of MySQL in JSF.
    I am using IBM RAD 6.0 for application developement.
    Previously creating a normal java application which is used of retrieval of the data from the database was working fine. by including j/connector jar file in java build path.
    But when same program is converted to web service and accessed through a JSF page using a managed bean it is not working. It throws classNotFoundException
    Please reply at your earliest.
    Thanks in advance.
    Regards,
    Amit
    code :-
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class BeanClass
         public String display()
              Connection conn = null;
              Statement stmt = null;
              ResultSet rs = null;
              String returnDate = "";
              try
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
                   System.out.println("Sucess");
                   conn=DriverManager.getConnection("jdbc:mysql://localhost/switching","root","pspl");
                   System.out.println("Sucess******");
                   stmt = conn.createStatement();
                   System.out.println("Sucess^^^^^^^^^");
                   rs = stmt.executeQuery("SELECT * FROM log1 where senderId = '008' ");
                   System.out.println("Sucess#########");
                   while(rs.next())
                        System.out.println("Date : " + rs.getString("expDate"));
                        returnDate = rs.getString("expDate");
                   System.out.println("Final success");     
                   System.out.println("Sucess@@@@@@@@@@@@@@@@");
              }catch(ClassNotFoundException cnfe)
                   System.err.println("Drivers not found " + cnfe.toString());
                   cnfe.printStackTrace();
              catch(IllegalAccessException iae)
                   System.err.println("Access Exception");
              catch(InstantiationException ie)
                   System.err.println("Instatiation Exception");
              catch(SQLException se)
                   System.err.println("SQL EXCEPTION");
                   se.printStackTrace();
              System.out.println("Date is = " + returnDate);
              return returnDate;
    Errors are :-
    [5/3/06 10:47:33:358 IST] 00000061 SystemErr R java.lang.ClassNotFoundException: com.mysql.jdbc.Driver     at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.lang.Class.forName1(Native Method)
         at java.lang.Class.forName(Class.java(Compiled Code))
         at packBean.BeanClass.display(BeanClass.java:29)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMethod(JavaDispatcher.java:178)
         at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOperation(JavaDispatcher.java:141)
         at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequestResponse(SoapRPCProcessor.java:423)
         at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMessage(SoapRPCProcessor.java:388)
         at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessage(BasicDispatcher.java:134)
         at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invoke(SessionDispatcher.java:203)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invoke(JAXRPCHandler.java:151)
         at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:64)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:225)
         at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:279)
         at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
         at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1802)
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:469)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:408)
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:286)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
         at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

    You have to put myfaces jar on the web-inf/lib

  • Weird problems with CSS being applied to JSF pages

    I have this really weird problem with my CSS rules being applied to my JSF pages. My CSS rules don't get applied unless one of the following two things happen:
    - A page is reloaded (by redirecting to itself, or if there were validation errors)
    - The previous page in the history had the same relative reference to the same CSS file.
    If a page is newly loaded, and the previous page did not have that same CSS reference, the CSS styles will not show up. Also, if the above is true, and the page is reloaded by JSF, the CSS styles show up.
    Now, my problem could be solved if I put all JSP files in the same level, but the display of the first page would still be without the CSS style applied.
    Is this known behaviour? And if it is, does it have anything to do do with the way JSF handles URLs (always one level back)? Help and input is kindly appreciated!

    Dude,
    I tried the same
    <link rel="stylesheet" href="<h:outputText value="#{facesContext.externalContext.requestContextPath}"/pages/css/default.css" />
    and I got the following Jasper exception.... pointers plz ??
    =============================================================
    2005-08-24 14:18:55,937 [http-8080-Processor25] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[mydemo].[FacesServlet] - Servlet.service() for servlet FacesServlet threw exception
    org.apache.jasper.JasperException: /myproj/eventCrit.jsp(8,78) Unterminated <h:outputText tag
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:130)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1049)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parseBody(Parser.java:1793)
         at org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1060)
         at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1367)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    =========================================================

  • Problems with data controls from java classes in JSF pages.

    Hi! We have a problem in our Application that we are developing with JSF pages using Data Controls generated from facades java classes. When we running a page in debug mode and the page are loading, if we insert a breakpoint in the first line of method referenced in the data control, the execution enter two times in the method, and this is a problem for us. How to solve this?
    We are using JDeveloper 11.1.1.2 with ADF faces.

    You might need to play around with the refresh property of the action binding.
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adf_lifecycle.htm#BJECHBHF

  • Problem displaying error page of web.xml when using JSF, Ajax4jsf

    Hi,
    My application is using MyFaces, RichFaces and Ajax4jsf. When i try to display error page configured in web.xml, i am getting exception "Error while processing error page".
    my web.xml contents are as follows:
    <?xml version="1.0"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>faces</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>extensionsFilter</filter-name>
    <filter-class>
    org.apache.myfaces.webapp.filter.ExtensionsFilter
    </filter-class>
    <init-param>
    <description>
    set the size limit for uploaded files. Format: 10 - 10 bytes 10k
    - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadMaxFileSize</param-name>
    <param-value>100m</param-value>
    </init-param>
    <init-param>
    <description>
    Set the threshold size - files below this limit are stored in
    memory, files above this limit are stored on disk.
    Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
    </description>
    <param-name>uploadThresholdSize</param-name>
    <param-value>100k</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>Seam Redirect Filter</filter-name>
    <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
    </filter>
    <filter>
    <filter-name>KTServletFilter</filter-name>
    <filter-class>com.kenexa.core.system.KTServletFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>extensionsFilter</filter-name>
    <url-pattern>/faces/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>Seam Redirect Filter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>KTServletFilter</filter-name>
    <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <!-- seam Listeners -->
    <listener>
    <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    <listener>
    <listener-class>com.kenexa.kr.web.KRServletListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsf</location>
    </error-page>
    </web-app>
    As per the configuration, when exception is thrown out of the application, container tries to display systemError.jsp page. If we want to include the JSF tags in systemError.jsp page, the request should pass through FacesServlet, so in the <error-page> <location> tag systemError page is specified with the extention systemError.jsf though it's actual extention is .jsp
    When exception is thrown from the application container invoke the error page but, while rendering systemError.jsf page exception is thrown saying "Exception processing error page "systemError.jsp" "
    To solve this problem i've gone through several forums, materials.
    In one forum a guy said, JSF1.1 spec has some problem in displaying error pages. To solve this don't write <f:view> tags in the error page, use <f:subview> intstead. By reading this, i again changed the contents of systemError.jsp page replacing <f:view> by <f:subview>. But the error is still repeating.
    Finally what i found is, when we use Ajax4jsf in the application, its AjaxViewRender class is throwing exception while rendering error pages configured through web.xml.
    So what i did is i changed error page extention from .jsf to .jsp in the <location> tag. Now jsf won't come in the picture and remove JSF related tags from the systemError.jsp page.
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/rc/systemError.jsp</location>
    </error-page>
    Any comments are welcome----------------------------------------------------------------

    I too iam facing the same problem could you advise if you have found any solutions
              -Ram

Maybe you are looking for