Serializing of backing beans

I have the following backing bean:
public class BackingBean {
   private UIData dataComp;
   public void setDataComp(UIData d) { dataComp = d; }
   public UIData getDataComp() { return dataComp; }
}I use it in the JSP as such:
<h:dataTable binding="#{BackingBean.dataComp}"...>
</h:dataTable>The above code works fine when the state saving method is set to server. However, when I set the saving method to client, JSF tries to serialize my backing bean. Needless to say, I get serializable exceptions and my app doesn't work with client side state saving.
For a variety of reasons I don't want my BackingBean to be Serializable. Any ideas on how to make my app work without my BackingBean having to implement Serializable?
Thanks.

~ JSF should not be attempting to serialize your backing bean
I was under the same impression myself. But my debugging so far suggests otherwise... Below is the stack trace (As you can see, the ViewHandlerImpl.renderView() method is trying to serialize the backing bean):
javax.servlet.ServletException: Error while saving state in 'session': 'myPackage.MyBackingBean'.
     at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:471)
     at org.apache.jsp.map$jsp._jspService(map$jsp.java:984)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
     at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
     at java.lang.Thread.run(Thread.java:536)

Similar Messages

  • Error using selectmany tags with backing beans - Beta 1

    Hi All,
    I'm not having any luck getting any of the selectmany tags working with back-end beans. I've concluded it just doesn't work. My example is derived from the selectmany sample in the tutorial, which also just doesn't work (there are 4 or 5 problems with the sample in the tutorial, including the fact that there's no tag called 'selectmany_checkbox' in Beta 1, it's renames to selectmany_checkboxlist. But I digress).
    Anyway, the following is the relevant JSP snippet:
    <html:selectmany_menu value="#{facesTest.items}">
    <faces:selectitem itemValue="foo" itemLabel="foo" />
    <faces:selectitem itemValue="bar" itemLabel="bar" />
    </html:selectmany_menu>
    Here's the relevant backing bean snippet:
    protected ArrayList items = null;
    public Object[] getItems() {
    System.out.println("getItems():ENTRY");
    if (items != null)
    return items.toArray();
    else
    return null;
    public void setItems(Object[] items)
    System.out.println("setItems():ENTRY");
    int len = 0;
    if (null == items ||(len = items.length) == 0) {
    return;
    if (this.items != null)
    this.items.clear();
    this.items = new ArrayList(len);
    for (int i = 0; i < len; i++) {
    this.items.add(items);
    I've declared the bean as follows in the face-config.xml:
    <managed-bean>
    <managed-bean-name>facesTest</managed-bean-name>
    <managed-bean-class>ipt.faces.FacesTest</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    The errors vary, but basically when I don't select anything from the multi-select menu, all is fine. When I do select something I get one of two messages returned thru the messages tag, either "Conversion Error setting value 'null' for 'expression'" when I select one item or " Conversion Error setting value '[Ljava.lang.String;@397d4e' for 'expression'." when I select two items.
    Turning on 'FINEST', I get the output below:  Any ideas?  I've noticed several posting regarding the selectmany tags, any response on getting these to work?
    thanks!
    Steve
    FINE: Exiting RenderResponsePhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINE: Begin executing lifecycle phases
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: execute(phaseId=RESTORE_VIEW 1)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: Begin execute(phaseId=RESTORE_VIEW 1)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
    FINE: Entering RestoreViewPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getMappingForR
    equest
    FINEST: servletPath /hello.jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getMappingForR
    equest
    FINEST: pathInfo null
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
    g
    FINE: URL pattern of the FacesServlet executing the current request .jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl convertViewId
    FINE: viewId after appending the context suffix /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl restoreView
    FINE: Begin restoring view from response /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl restoreView
    FINE: End restoring view from response /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl restoreView
    FINEST: set character encoding on request to ISO-8859-1
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
    FINE: Postback: Restored view for /hello.jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RestoreViewPhase execute
    FINE: Exiting RestoreViewPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: End execute(phaseId=RESTORE_VIEW 1)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl hasPostDataOrQuery
    Params
    FINEST: Request Method: POST/PUT
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: execute(phaseId=APPLY_REQUEST_VALUES 2)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: Begin execute(phaseId=APPLY_REQUEST_VALUES 2)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
    FINE: Entering ApplyRequestValuesPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINE: getValue(ref=facesTest.items)
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
    FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
    getItems():ENTRY
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINE: getValue Result:[Ljava.lang.Object;@11fb68f
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINEST: -->Returning [Ljava.lang.Object;@11fb68f
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
    FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getType
    FINE: isReadonly result:class [Ljava.lang.Object;
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINE: getValue(ref=facesTest.items)
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.VariableResolverImpl resolveVariable
    FINE: resolveVariable: Resolved variable:ipt.faces.FacesTest@f97d27
    getItems():ENTRY
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINE: getValue Result:[Ljava.lang.Object;@1262667
    Jan 9, 2004 10:11:52 AM com.sun.faces.el.ValueBindingImpl getValue
    FINEST: -->Returning [Ljava.lang.Object;@1262667
    Jan 9, 2004 10:11:52 AM com.sun.faces.context.FacesContextImpl addMessage
    FINE: Adding Message[sourceId=_id0:_id7,summary=Conversion Error setting value '
    [Ljava.lang.Object;@1262667' for 'expression'.)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ApplyRequestValuesPhase execute
    FINE: Exiting ApplyRequestValuesPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: End execute(phaseId=APPLY_REQUEST_VALUES 2)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: execute(phaseId=PROCESS_VALIDATIONS 3)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: Begin execute(phaseId=PROCESS_VALIDATIONS 3)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ProcessValidationsPhase execute
    FINE: Entering ProcessValidationsPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.ProcessValidationsPhase execute
    FINE: Exiting ProcessValidationsPhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINEST: End execute(phaseId=PROCESS_VALIDATIONS 3)
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.LifecycleImpl execute
    FINE: Skipping to RenderResponsePhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
    FINE: Entering RenderResponsePhase
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
    FINE: About to render view /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
    FINE: About to render view /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
    g
    FINE: URL pattern of the FacesServlet executing the current request .jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
    FINE: Found URL pattern mapping to FacesServlet .jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
    FINEST: Before dispacthMessage to newViewId /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getFacesMappin
    g
    FINE: URL pattern of the FacesServlet executing the current request .jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl getViewIdPath
    FINEST: viewId after modifications /hello.jsf
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ApplicationImpl createConverte
    r
    FINEST: Created converter of type javax.faces.convert.BooleanConverter
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl writeState
    FINEST: Begin writing state to response for viewId/hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl writeState
    FINEST: End writing state to response for viewId/hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl saveSerialize
    dView
    FINE: Begin creating serialized view for /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.StateManagerImpl saveSerialize
    dView
    FINE: End creating serialized view /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.application.ViewHandlerImpl renderView
    FINEST: After dispacthMessage to newViewId /hello.jsp
    Jan 9, 2004 10:11:52 AM com.sun.faces.lifecycle.RenderResponsePhase execute
    FINE: Exiting RenderResponsePhase

    Could you post your code example? I am having the same problem. And I am wondering how you can set the value, label and description using the String[] return type. I thought the object[] would basically be a SelectItem Array...
    thanx!

  • Calling a method on backing bean in response to contextual event

    Hi
    I am using Jdeveloper 11.1.1.6.0 and using ADF contextual events..
    I have a drop down list and i am rasiing a contextual event on changing the current selection. In response to that event i want to call a backing bean method with parameters.. But when i click on the subscriber section for the contextual event, i can see only some bindings of the page.. How can i call a method on backing bean as a subscriber..
    Thanks
    Raghu

    Hi,
    this article has a use case for the POJO approach: http://www.oracle.com/technetwork/issue-archive/2011/11-may/o31adf-352561.html
    Another is to define a method binding in the receiving PageDef file and configure it as explained here
    http://java.net/projects/smuenchadf/pages/ADFSamplesBindings/revisions/3#SMU164
    Frank

  • What is difference between Managed Bean and Backing Bean?

    What is difference between Managed Bean and Backing Bean? Please guide me how to create them and when to use them?
    Please post sample for both beans.

    Hi,
    managed beans and backing beans are quite the same in that the Java object is managed by the JavaServer Faces framework. Manage in this respect means instantiation. The difference is that backing beans contain component "binding" references, which managed beans usually don't. Do backing beans are page specific versions of managed beans.
    Managed beans are configured either in the faces-config.xml file, or using ADF Faces and ADFc, in the adfc-config.xml file
    Frank
    Edited by: Frank Nimphius on Jan 31, 2011 8:49 AM

  • Get selected row from af:table in backing bean

    Hi Experts,
    I have an af:table and i have seelctBoolean check box in that. If the user select 'x' nos of check boxes i want to display the row data of those selected rows. Can somebody help me in getting the selected row data in backing bean?
    I am using adf faces and backing bean.
    JSF Code:
    <af:table value="#{demo.partyList}" var="row"
    rowBandingInterval="0" binding="#{demo.t1}" id="t21"
    rowSelection="multiple">
    <af:column>
    <af:selectBooleanCheckbox text="#{row.person_first_name}"
    label="Label 1" id="sbc1"
    />
    </af:column>
    <af:column>
    <af:inputText value="#{row.emirate}"/>
    </af:column>
    </af:table>
    <af:commandButton action="#{demo.print}" text="Print"/>
    BB Code:
    public void print(){
    // what code to write here
    }

    This is the code
    JSF ::
    <af:table value="#{createOpportunity.dataList}" var="row"
    rowBandingInterval="0" binding="#{demo.t1}" id="t21">
    <af:column headerText="Model">
    <af:selectBooleanCheckbox text="#{row.modelRange}"
    label="Label 1" id="sbc1" value="#{row.selected}"/>
    </af:column>
    <af:column headerText="Description">
    <af:outputText value="#{row.description}"/>
    </af:column>
    <af:column>
    <af:inputText value="#{row.quantity}"/>
    </af:column>
    </af:table>
    <af:commandButton action="#{createOpportunity.print}" text="Print"/>
    Backing bean Code::
    public void print () {
    selectedDataList = new ArrayList<ModelDescription>();
    for (ModelDescription dataItem : dataList) {
    if (dataItem.isSelected()) {
    System.out.println(dataItem.getQuantity());
    selectedDataList.add(dataItem);
    // dataItem.setSelected(false); // Reset.
    Clicking on the print button shows "We have 0 rows selected"
    Thnks for ur replies guys ..
    Edited by: Wannabe Java Guru on Mar 9, 2011 1:43 AM

  • How to validate values from selectInputDate in backing bean

    I have two selectInputDate fields, arrivalDate and departureDate.
    I want to validate that arrivalDate cannot be greater than departureDate.
    java.lang.ClassCastException is raised at below line in the backing bean:
    Timestamp newArrivalDate = (Timestamp)newValue;
    I tried to use below in the backing bean for arrivalDate validation.
    import java.sql.Timestamp;
    public void arrivalDateValidator(FacesContext facesContext,
    UIComponent uiComponent, Object newValue) {
    //The new value is passed into us
    try {
    Timestamp newArrivalDate = (Timestamp)newValue; --> java.lang.ClassCastException raised at this line.
    //Get the Departure Date which is already bound on this screen
    Timestamp departureDate =
    (Timestamp)ADFUtils.getBoundAttributeValue("departureDate");
    // Now compare and raise an error if the rule is broken
    if (newArrivalDate.compareTo(departureDate) > 0)
    throw new ValidatorException(JSFUtils.getMessageFromBundle
    ("Arrival Date cannot be greater than Departure Date", FacesMessage.SEVERITY_ERROR));
    } catch(Exception e) {
    System.out.println("Some exception raised");
    e.printStackTrace();
    08/12/26 13:30:08 Some exception raised
    08/12/26 13:30:08 java.lang.ClassCastException
    08/12/26 13:30:08      at opera.activity.view.backing.app.TestApp.arrivalDateValidator(ActivityMain.java:1524)
    08/12/26 13:30:08      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    08/12/26 13:30:08      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    08/12/26 13:30:08      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    08/12/26 13:30:08      at java.lang.reflect.Method.invoke(Method.java:324)
    08/12/26 13:30:08      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXEditableValue.validateValue(UIXEditableValue.java:400)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXEditableValue.validate(UIXEditableValue.java:206)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXEditableValue._executeValidate(UIXEditableValue.java:522)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXEditableValue.processValidators(UIXEditableValue.java:302)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXShowDetail.processValidators(UIXShowDetail.java:86)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at javax.faces.component.UIForm.processValidators(UIForm.java:190)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildrenImpl(UIXComponentBase.java:855)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.validateChildren(UIXComponentBase.java:839)
    08/12/26 13:30:08      at oracle.adf.view.faces.component.UIXComponentBase.processValidators(UIXComponentBase.java:689)
    08/12/26 13:30:08      at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
    08/12/26 13:30:08      at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
    08/12/26 13:30:08      at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
    08/12/26 13:30:08      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
    08/12/26 13:30:08      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
    08/12/26 13:30:08      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
    08/12/26 13:30:08      at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    08/12/26 13:30:08      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
    08/12/26 13:30:08      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
    08/12/26 13:30:08      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
    08/12/26 13:30:08      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
    08/12/26 13:30:08      at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    08/12/26 13:30:08      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
    08/12/26 13:30:08      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
    08/12/26 13:30:08      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    08/12/26 13:30:08      at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    08/12/26 13:30:08      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    08/12/26 13:30:08      at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    08/12/26 13:30:08      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    08/12/26 13:30:08      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    08/12/26 13:30:08      at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    08/12/26 13:30:08      at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
    08/12/26 13:30:08      at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
    08/12/26 13:30:08      at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
    08/12/26 13:30:08      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    08/12/26 13:30:08      at java.lang.Thread.run(Thread.java:534)
    Can someone suggest a solution?
    Thanks in advance.

    Hi user:
    Use the class oracle.jbo.domain.Date in the date component then is very easy using the compareTo Method (Returns -1 if DATE is less than date, 0 if DATE and date are equal (==), 1 if DATE is greater than date).
    Good Luck.

  • Reading Values from a Datatable to a backing bean

    I have a Datatable which has 3 columns.
    First Column is a Account Number and the Second Column gives the address of the Account Number.
    The Inputs 1 to 5 Account Number on the Previous Page. Depending on number of Accounts Input by the user - the datatable shows those many rows with address. Now the third column has 4 Input Text fields for New Address.
    Because the 3rd column is also generated dynamically how can I use the New Address entered by the user in my backing bean.
    The JSF Code is:
    <h:form id="frmManualDataEntryUpdateAddress">
        <tr:panelHeader styleClass="titleText" text="Update Address"/>
        <h:dataTable rows="25" rowClasses="oddRow,evenRow"
                     styleClass="columnSpace font_size" value="#{summaryList}"
                     var="summary">
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Keyline"/>
                </f:facet>
                <h:outputText rendered="#{summary.keyline != null}"
                              value="#{summary.keyline}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Address"/>
                </f:facet>
                <h:outputText rendered="#{summary.lienHolderName != null}"
                              value="#{summary.lienHolderName}"/>
                <h:outputText rendered="#{summary.lienHolderAddressLine1 != null}"
                              value="#{summary.lienHolderAddressLine1}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderAddressLine2 != null}"
                              value="#{summary.lienHolderAddressLine2}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderCity != null}"
                              value="#{summary.lienHolderCity}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderState != null}"
                              value=" #{summary.lienHolderState}"/>
                <h:outputText rendered="#{summary.lienHolderZip4 != null}"
                              value=" #{summary.lienHolderZip4}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="New Address"/>
                </f:facet>
                <tr:panelFormLayout>
                    <tr:panelLabelAndMessage label="Address Line 1"
                                             for="addressLine1">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="addressLine1" maximumLength="60"
                                          value="#{summary.acsEntry.acsAddressLine1}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="City" for="city">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="city" maximumLength="28"
                                          value="#{summary.acsEntry.acsCity}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="State" for="state">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="state" maximumLength="2"
                                          value="#{summary.acsEntry.acsState}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="Zip" for="zip">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="zip" maximumLength="60"
                                          value="#{summary.acsEntry.acsZip4}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                </tr:panelFormLayout>
            </h:column>
        </h:dataTable>
    </h:form>

    I have a Datatable which has 3 columns.
    First Column is a Account Number and the Second Column gives the address of the Account Number.
    The Inputs 1 to 5 Account Number on the Previous Page. Depending on number of Accounts Input by the user - the datatable shows those many rows with address. Now the third column has 4 Input Text fields for New Address.
    Because the 3rd column is also generated dynamically how can I use the New Address entered by the user in my backing bean.
    The JSF Code is:
    <h:form id="frmManualDataEntryUpdateAddress">
        <tr:panelHeader styleClass="titleText" text="Update Address"/>
        <h:dataTable rows="25" rowClasses="oddRow,evenRow"
                     styleClass="columnSpace font_size" value="#{summaryList}"
                     var="summary">
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Keyline"/>
                </f:facet>
                <h:outputText rendered="#{summary.keyline != null}"
                              value="#{summary.keyline}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="Address"/>
                </f:facet>
                <h:outputText rendered="#{summary.lienHolderName != null}"
                              value="#{summary.lienHolderName}"/>
                <h:outputText rendered="#{summary.lienHolderAddressLine1 != null}"
                              value="#{summary.lienHolderAddressLine1}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderAddressLine2 != null}"
                              value="#{summary.lienHolderAddressLine2}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderCity != null}"
                              value="#{summary.lienHolderCity}">
                    <f:verbatim>
                        <br/>
                    </f:verbatim>
                </h:outputText>
                <h:outputText rendered="#{summary.lienHolderState != null}"
                              value=" #{summary.lienHolderState}"/>
                <h:outputText rendered="#{summary.lienHolderZip4 != null}"
                              value=" #{summary.lienHolderZip4}"/>
            </h:column>
            <h:column>
                <f:facet name="header">
                    <h:outputText styleClass="titleText" value="New Address"/>
                </f:facet>
                <tr:panelFormLayout>
                    <tr:panelLabelAndMessage label="Address Line 1"
                                             for="addressLine1">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="addressLine1" maximumLength="60"
                                          value="#{summary.acsEntry.acsAddressLine1}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="City" for="city">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="city" maximumLength="28"
                                          value="#{summary.acsEntry.acsCity}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="State" for="state">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="state" maximumLength="2"
                                          value="#{summary.acsEntry.acsState}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                    <tr:panelLabelAndMessage label="Zip" for="zip">
                        <tr:panelHorizontalLayout>
                            <tr:inputText id="zip" maximumLength="60"
                                          value="#{summary.acsEntry.acsZip4}"></tr:inputText>
                        </tr:panelHorizontalLayout>
                    </tr:panelLabelAndMessage>
                </tr:panelFormLayout>
            </h:column>
        </h:dataTable>
    </h:form>

  • CommandButton doesn't invode the function in backing bean.

    I have a jsp page which contains three buttons, and based on a session level state, only one shown at the beginning. Once this button is clicked, the other two are shown and the first one is hidden.
    When the first button (add) is clicked, the other two are shown correctly. But when I clicked any one of them, none of their backing bean methods are called. I checked the log, no exception.
    Then I tried to show all buttons at begining, and click them. Both backing bean methods are invoked.
    Did I miss something in the life cycle of JSF?
    Here is the part of jsp page:
    <h:commandButton action="#{manageBranches.doAddBranches}" image="/images/add.gif" rendered="#{!manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.add.branches']}"
    onmouseover="swapImage( this, 'add.gif', 'add_down.gif' );"
    onmouseout="swapImage( this, 'add.gif', 'add_down.gif' );" />
    <h:commandButton action="#{manageBranches.doEditBranches}" image="/images/edit_icon.gif" rendered="#{manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.edit.branches']}"
    onmouseover="swapImage( this, 'edit_icon.gif', 'edit_icon_down.gif' );"
    onmouseout="swapImage( this, 'edit_icon.gif', 'edit_icon_down.gif' );" immediate="true" />
    <h:commandButton action="#{manageBranches.doSaveBranches}" image="/images/save.gif" rendered="#{manageBranches.isAdd}"
    styleClass="toolbaricon" title="#{messages['branches.dropdown.save.branches']}"
    onmouseover="swapImage( this, 'save.gif', 'save_down.gif' );"
    onmouseout="swapImage( this, 'save.gif', 'save_down.gif' );" />
    Here are corresponding backing bean methods:
         public String doAddBranches()
              Logger.logEnterPublic(MY_CLASS, "doAddBranches()");
              setIsAdd(true);
              return null;
         public String doSaveBranches()
              Logger.logEnterPublic(MY_CLASS, "doSaveBranches()");
              String forward = null;
              if(addedBranchIds ==null || addedBranchIds.length()==0)
    MessageFactory.addErrorMessage( null, "branches.selectAtLeastOneBranch", null );
    this.successMsg = false;
    return forward;
              else
                   String[] branchIdArray = addedBranchIds.split(":");
              this.successMsg = true;
              //TODO: add save logic
              return forward;
         public String doEditBranches()
              Logger.logEnterPublic(MY_CLASS, "doEditBranches()");
              String forward = null;
              setIsAdd(false);
              return forward;
    The add button worked fine. But when save and edit button were shown and add button was hidden. Both save and edit button can't access the backing bean methonds. I put a break point on the constructor of the backing bean, it WAS accessed!
    Very confusing!
    Thanks for any helps.
    jm.

    Ok, I'm not 100% on this, but it's something you can try. In your action methods, you often return null when you want the page to just be reloaded. I believe in JSF, returning null and returning a string that represents the same page is quite different. I think this is because the component tree will get re-initialized when you return a proper string. It's quite possible that you need to have the component tree re-initialized for everything to work properly.
    Therefore, whenever you want to reload "pageA" then return an abbreviation called "A" (or whatever you want). In your faces-config.xml set up a rule that when outcome "A" is received (while on pageA) then load pageA.jsp.
    Hope that makes some sense! Let me know if it works.
    CowKing

  • How to call a query from the backing bean ?

    Hi all,
    Another question for you guys :
    I made a jspx page with an input form and a submit button.
    When I click the submit button, the action my_action in my backing bean is executed.
    This is the code :
    public BindingContainer getBindings() {
    return BindingContext.getCurrent().getCurrentBindingsEntry();
    public String my_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("EmployeesView");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    I hoped that the query 'EmployeesView' was executed in this way, but I get the following exception :
    java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding cannot be cast to oracle.binding.OperationBinding
    So how should I execute the query EmployeesView ?
    Second part of the question : What if I typed the name an employee in my form, and I want to
    execute a query that selects all the Employees with that name ?
    How do I make a query with a variable as input in the WHERE clause ?
    Thanks in advance.
    Edited by: Facehugger on 7-apr-2010 11:15

    I'm still trying all the stuff you guys says, but still no result.
    This is my backing bean :
    +// the button action+
    +public String my_action()  {+ 
    +// get the selected rows from the multiselect table and store the objectid's in an String array+
    RowKeySet rks = graph_table.getSelectedRowKeys();
    Iterator itr = rks.iterator();
    Object key;
    int nbr_objects = 0 , i = 0;
    if (rks.size()>0)  nbr_objects = rks.size();
    +String[] objectid = new String[nbr_objects];+
    while(itr.hasNext())
    +{+
    key = itr.next();
    graph_table.setRowKey(key);
    Object o = graph_table.getRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding) o;
    Row row = rowData.getRow();
    +objectid[i] = row.getAttribute("Objectid").toString();+
    i+;+
    +}+
    +// now get all the x and y values for these objectid's from the database out of the table history.+
    BindingContainer bc = BindingContext.getCurrent().getCurrentBindingsEntry();
    for (int j=0 ; j<nbr_objects; j+){+
    +// get X and Y values for object number j+
    DataPoints history = new DataPoints();
    OperationBinding operationBinding = bc.getOperationBinding("retrieveHistory");   ===> operationBinding stays NULL ???+
    +operationBinding.getParamsMap().put("OBJECTID", objectid[j]);+
    Object retVal = operationBinding.execute();
    +// ==> retVal should contain a List of all X and Y values for the provided objectid.+
    +// while (retVal has values)+
    +// {+
    +// List_of_x_values.add(retVal.valueX);+
    +// List_of_y_values.add(retVal.valueY);+
    +// }+
    history.add(List_of_x_values);
    history.add(List_of_y_values):
    +// call the soap method to do some calculations+
    methodname.forecast(history);
    +}+
    +}+
    In my application module :
    public void retrieveHistory(String objectid) {
    getHistory().setWhereClause("OBJECTID = '" + objectid + "'");
    System.out.println("current query : "+getHistory().getQuery());
    getHistory().executeQuery();
    public ViewObjectImpl getHistory() {+
    return (ViewObjectImpl)findViewObject("History");+
    The query for the VO History : SELECT * FROM HISTORY
    Please anyone ?
    Edited by: Facehugger on 9-apr-2010 14:19

  • Open URL in a new browser from a JSF backing bean

    I want to use commandButton action in jsf to launch a new browser instead of using commandLink.
    How do you launch url in a new browser window by firing up a method in backing bean?
    So far I am able to launch a URL within the same browser window. Here is my code:
    In jsp file:
    <h:commandButton rendered="#{openDataList.valueModifiable}" value="link" action="#{openDataList.link}" />
    In backing bean:
    public void link()
         try{
         FacesContext faces = FacesContext.getCurrentInstance();
         faces.responseComplete();
         ExternalContext context = faces.getExternalContext();
         context.redirect("http://www....");      }
         catch(java.io.IOException e)
    ...

    with a commandButton i dont belive you can
    well there are ways you can use javascript window.open
    or you can use a commanLink ans set the target
    but from my understanding there is no way to open a new browser from the backing beans ( this is because this is a client function and your backing beans are on the sever )

  • Value from backing bean in javascript confirm in 10.1.3

    Hallo,
    Please help
    I have 2 problems:
    Page with 1 record, where 8 items are updatable.
    In entity I 've a method where I set a value in bean. (BotId1 is one of these 8 updatebale items)
    What I expect: when I change a value in BotId1 the value of botId in ValiderenBotBean will be also changed
    public void setBotId1(Number value) {
    setAttributeInternal(BOTID1, value);
    EL.set("#{ValiderenBotBean.botId}",BotId.toString());
    My bean (session scope):
    package viewcontroller.pagedefs.produceren.backing;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    public class ValiderenBotBean
    private static Log log = LogFactory.getLog(ValiderenBotBean.class);
    private String botId;
    public ValiderenBotBean() {
    // accessors
    public void setBotId(String botId) {
    log.debug("setBotId : " + botId);
    this.botId = botId;
    public String getBotId() {
    log.debug("getBotId : " + this.botId);
    return this.botId;
    Op my generaten page I have the button:
    <af:commandButton actionListener="#{bindings.Commit.execute}"
    action="Commit" onclick="if (validateForm('dataForm')){return(confirm(#{ValiderenBotBean.botId} + 'la')}"
    rendered="#{(((jhsUserRoles['JDMR_PRD03']) or (jhsUserRoles['JDMR_PRD03'])) or (jhsUserRoles['JDMR_PRD03'])) or (jhsUserRoles['JDMR_PRD03'])}" textAndAccessKey="#{nls['SAVE_BUTTON_LABEL_KOPPELENPRODUCTIEGEGEVENS']}"
    id="KoppelenProductiegegevensSaveButton">
    <af:resetActionListener/>
    </af:commandButton>
    I get the following error:
    Foutdetails webpagina
    Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.1; AskTB5.6)
    Tijdstempel: Thu, 17 Feb 2011 13:54:46 UTC
    Bericht: Syntaxisfout
    Regel: 3744
    Teken: 1
    Code: 0
    URI: http://172.16.6.108:8988/demeter/adf/jsLibs/Common10_1_3_2_0.js
    The code from Common:
    3732 function _callChained(
    3733 a0,
    3734 a1,
    3735 a2
    3736 )
    3737 {
    3738 if(a0&&(a0.length>0))
    3739 {
    3740 if(a2==(void 0))
    3741 {
    3742 a2=a1.window.event;
    3743 }
    3744 var a3=new Function("event",a0);
    3745 a1._tempFunc=a3;
    3746 var a4=a1._tempFunc(a2);
    3747 a1._tempFunc=(void 0);
    3748 return!(a4==false);
    3749 }
    3750 else
    3751 {
    3752 return true;
    3753 }
    3754 }
    Problem nr.1:
    When I call the button I do not see any logging that indicate that the value is set in backing bean
    Workaround: I made item on my page depending on item where I put my code.
    Result: I have to press 2 times on my button to execute the button code. First time to make the validation and the second time the button code itself.
    Not nice. The validation is also slow.
    But ok:
    Problem 2:
    I still get the same error, I see logging of execution of my validation.
    There is also the difference between loggings is 2 cases:
    If I use
    onclick="if (validateForm('dataForm')){return((#{ValiderenBotBean.botId} + 'la')}"
    what I really want instead of
    onclick="if (validateForm('dataForm')){return'la')}"
    I get:
    17-feb 14:28:40 DEBUG (ValiderenBotBean) -getBotId : -1
    17-feb 14:28:40 DEBUG (ValiderenBotBean) -getBotId : -1
    It means that value is obtained correctly.
    But still the same error.
    If I put for test purpose
    the following code into my bean:
    public String getBotId() {
    log.debug("getBotId : " + this.botId);
    botId = "23";
    return this.botId;
    I do not get any error.
    Any ideas?
    Please help

    Thanks, Amit,
    I will try it tomorrow.
    Some remarkes:
    1. I need javascript for confirmation
    2. I really do not PPR. It takes so long. The user use the scanner to put the value into input items in order speed up the process. And now PPR...
    3. My transient attribute will depend on 8 items. Even more waiting process.
    What I really want is to execute my db function only 1 time "onclick" or "oncommit" and according to outcome of db-function ask user for confirmation of commit.
    I tried already to implement dialog from ADF with launchDialog function.
    But ReturnListener did not function while I launch the Dialog manually.
    Anna

  • How to assign and display an attribute value from backing bean?

    Hello all,
    I am using Jdev 11g. I have a form page which has two inputText attributes The first one implements a valueChangeListener feature. When the user enters a value in the first field, a backing bean function will be invoked through the valueChangeListener . In this backing bean function, based on the value in the first field, I want to assign the value to the second field and display it on the page. Can somebody help me how to achieve this?
    Thanks,
    John

    Hi John,
    Here is small example.
    Create two string variables in your backing bean and generate accessors for them.
        private String text;
        private String text1;
        public void setText(String text) {
            this.text = text;
        public String getText() {
            return text;
        public void setText1(String text1) {
            this.text1 = text1;
        public String getText1() {
            return text1;
        }Bind this variables to the value property of the input texts you have. Add the valuechangedlistener for the first input text (and also set autosubmit to true for that item). Also, add the id of the first input text as partial triggers for the second input text. Like,
            <af:inputText label="Label 1"
                          binding="#{backingBeanScope.backing_untitled1.it1}"
                          id="it1"
                          valueChangeListener="#{backingBeanScope.backing_untitled1.textValueChanged}" autoSubmit="true"
                          value="#{backingBeanScope.backing_untitled1.text}"/>
            <af:inputText label="Label 2"
                          binding="#{backingBeanScope.backing_untitled1.it2}"
                          id="it2"
                          value="#{backingBeanScope.backing_untitled1.text1}"
                          partialTriggers="it1"/>Finally, put the logic on your value changed listener. Like,
        public void textValueChanged(ValueChangeEvent vce){
            this.setText1("Hi " + vce.getNewValue());
        }Now, when you run the page and enter your name in the first input text, the second input text will display Hi <your_name>
    HTH.
    -Arun

  • Using a backing bean in JDeveloper to assign bean class variables

    I am using JDeveloper 10 to make a jsp page that is a form full of inputs and buttons. JDeveloper then creates the setters and getters for you for the ids of the various inputs and buttons. I also have used JDeveloper to create a backing bean.
    The idea of this is to have the backing bean read in parameter(s) from an http source/link(when the form is loaded or instantiated) and assign those parameter(s) to one of the bean class local variables.
    The reason i want to do this is, is that when the form is loaded the first thing it will do is open up an available database(in the bean class constructor), then in the constructor call a function to do a database query that will return a result set that will then be used to fill up the form.
    That variable that is assigned by the backing bean will be the value of a unique database identifier for doing the sql query so that is why it is important that i get this value as the form loads.
    So simply i need to find out from someone how to do this. i am totally new to doing any jsp development or using managed beans and i have gotten far enough to launch the form, retrieve and write to the database using sql queries and all the rest.
    I just dont know enough about managed beans to make a decision on things like making the bean have a session scope. do i need request scope? if i change to request scope how do i make sure the database isn't being called every time the page changes or is refreshed?(when i had it as request scope the constructor was being called every time the page was reloaded and that isnt effecient at all, especially with multiple users). can you define more than one managed bean in one faces config file? do i have to manually change something in the jsp file to make sure things run smoothly?
    Just maybe things are easier than i see them to be and my only problem is that i just dont understand what i am doing. here is what my backing bean looks like now with just basic session scope.
    An example of course would be something like: http://host:port/context-root/faces/register.jsp?12345 - where 12345 would be the value that i would like to assign to a local variable in my bean class that can then be used for filtering out information via a query then filling up the form, all this happening at instantiation.
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <managed-bean-name>beanpackage</managed-bean-name>
    <managed-bean-class>beanpackage.beanclass</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <!--oracle-jdev-comment:managed-bean-jsp-link:1register.jsp-->
    </managed-bean>
    </faces-config>
    This is what i have now, i've tried tons of stuff on the web like assigned value parameters but just am stuck on exactly what to do as nothing has seemed to work. Any help would be appreciated. Thanks in advance!

    Hi,
    don't think you will get a readily programmed solution to this (though I wish you luck). Here's how I would approach the managed bean issue
    - One managed bean that you configure from a java.util.HashMap. This bean should be in requestScope (should be okay here). Say the bean is called "formFields", then adding data to it can be done with the following EL #{formBean['attribute_name']}. You need to add this as the value Expression of the inputText field you create dynamically. The filed will then read and write to the HashMap
    - Create a managed bean in session scope to handle the database interaction. Put this into session scope (e.g. "database")
    - Create a managed bean that holds the action listener that handles the update, insert and delete actions (e.g. logic handler). This bean has a JSF reference to the root component in the page (or the form layout component to add the fields to)
    The "database" bean is referenced from the logic handler managed bean using the #{database} expression, which you resolve using a ValueBinding (ExpressionBinding in JSF 1.2). Or, you configure the bean as a managed property.
    The logic managed bean also needs to reference the formFields bean (similar to above) to access the contained filed names and attributes. If the filed attributes match column names in the database then you should be all set
    Frank

  • How i can display data from backing bean from jsf adf page

    Hi all
    I am creating a adf bc jsf application i am referring hr schema employee table
    in my jsf page i have a inputtext with label employee number if i enter employee number and press tab i should get employee name and jobid and salary for this purpose i am doing like as follows
    my view object query is as follows
    SELECT EMPLOYEE_ID,FIRST_NAME,JOB_ID,SALARY
    FROM EMPLOYEES
    WHERE EMPLOYEE_ID=:EMP_NO
    and my backing bean for my jsf page is as follows
    package view.backing;
    import javax.faces.component.html.HtmlForm;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.faces.component.core.input.CoreInputText;
    import oracle.adf.view.faces.component.core.output.CoreOutputText;
    import oracle.adf.view.faces.component.html.HtmlBody;
    import oracle.adf.view.faces.component.html.HtmlHead;
    import oracle.adf.view.faces.component.html.HtmlHtml;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    public class BindTest3
    private HtmlHtml html1;
    private HtmlHead head1;
    private HtmlBody body1;
    private HtmlForm testForm;
    private CoreInputText employeeId;
    private CoreOutputText firstName;
    private CoreOutputText jobId;
    private CoreOutputText salary;
    public void setHtml1(HtmlHtml html1)
    this.html1 = html1;
    public HtmlHtml getHtml1()
    return html1;
    public void setHead1(HtmlHead head1)
    this.head1 = head1;
    public HtmlHead getHead1()
    return head1;
    public void setBody1(HtmlBody body1)
    this.body1 = body1;
    public HtmlBody getBody1()
    return body1;
    public void setTestForm(HtmlForm form1)
    this.testForm = form1;
    public HtmlForm getTestForm()
    return testForm;
    public void setEmployeeId(CoreInputText inputText1)
    this.employeeId = inputText1;
    public CoreInputText getEmployeeId()
    return employeeId;
    public void changeMethod(ValueChangeEvent event)
    String EmployeeId=(String)event.getNewValue();
    CheckForBind check=new CheckForBind();
    System.out.println(check.getEmployeeNo());
    String amDef = "model.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef,config);
    ViewObject vo = am.findViewObject("EmployeeBindViewObj1");
    vo.setNamedWhereClauseParam("EMP_NO",EmployeeId);
    System.out.println("Query will return "+
    vo.getEstimatedRowCount()+" rows...");
    vo.executeQuery();
    while (vo.hasNext()) {
    Row curUser = vo.next();
    System.out.println(vo.getCurrentRowIndex()+" "+
    curUser.getAttribute("EmployeeId")+" "+
    curUser.getAttribute("FirstName")+" " curUser.getAttribute("JobId")" "+curUser.getAttribute("Salary"));
    //firstName =(String)curUser.getAttribute("EmployeeId");
    //setFirstName(curUser.getAttribute("EmployeeId"));
    firstName.setValue((String)curUser.getAttribute("FirstName"));
    //jobId.setValue((CoreOutputText) curUser.getAttribute("FirstName"));
    // salary.setValue((CoreOutputText)curUser.getAttribute("Salary"));
    // values.setJobId((CoreOutputText)curUser.getAttribute("JobId"));
    // values.setFirstName((CoreOutputText) curUser.getAttribute("FirstName"));
    //values.setSalary((CoreOutputText)curUser.getAttribute("Salary"));
    Configuration.releaseRootApplicationModule(am,true);
    public void setFirstName(CoreOutputText outputText1)
    this.firstName = outputText1;
    public CoreOutputText getFirstName()
    return firstName;
    public void setJobId(CoreOutputText outputText2)
    this.jobId = outputText2;
    public CoreOutputText getJobId()
    return jobId;
    public void setSalary(CoreOutputText outputText3)
    this.salary = outputText3;
    public CoreOutputText getSalary()
    return salary;
    and my jsf page is as follows
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <f:view>
    <afh:html binding="#{backing_BindTest3.html1}" id="html1">
    <afh:head title="Home" binding="#{backing_BindTest2.head1}" id="head1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <style type="text/css">
    body {
    background-color: #f7f7f7;
    </style>
    </afh:head>
    <afh:body binding="#{backing_BindTest3.body1}" id="body1">
    <h:form binding="#{backing_BindTest3.testForm}" id="testForm">
    <af:inputText label="Employee No" binding="#{backing_BindTest3.employeeId}"
    id="employeeId" valueChangeListener="#{backing_BindTest3.changeMethod}" autoSubmit="true"/>
    <af:outputText value="#{backing_BindTest3.firstName.value}"
    binding="#{backing_BindTest3.firstName}"
    id="firstName"/>
    <af:outputText value="outputText2"
    binding="#{backing_BindTest3.jobId}"
    id="jobId"/>
    <af:outputText value="outputText3"
    binding="#{backing_BindTest3.salary}"
    id="salary"/>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_BindTest2--%>
    but i am getting result in console but i cant get the value of firstname into my jsf page
    can any one can tell me for get the value to jsf page what i can do
    and what are the changes i can do in my jsf page

    hi,
    i tried to set value like as follows
    name=(CoreOutputText)curUser.getAttribute("FirstName");
    but that time i getting exception like as follows
    ec 22, 2007 2:17:27 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
    SEVERE: java.lang.ClassCastException: java.lang.String
    javax.faces.el.EvaluationException: java.lang.ClassCastException: java.lang.String
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at oracle.adf.view.faces.component.UIXComponentBase.__broadcast(UIXComponentBase.java:1087)
         at oracle.adf.view.faces.component.UIXEditableValue.broadcast(UIXEditableValue.java:247)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:269)
         at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:363)
         at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: java.lang.String
         at view.backing.ChangeValue.changeMethod(ChangeValue.java:49)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
    What will be the resion please help it is very critical for me

  • Is there any way to create backing bean, After page gets created?

    Hi
    Any one can please answer to my quick question !!!
    Is there any way to create the backing bean ,after a jsf page gets created using ADF ..?
    When i first time created the jsf jppx page i unchecked the option to generate backing bean, but later some time I would like to have backing bean for the newly created page. so is there any way to create backing bean ...?
    Thanks in Advance

    Have your page in the visual design mode then go to the Design->Page Properties menu and you'll be able to select auto-bind on the second tab.

Maybe you are looking for

  • Family sharing setup

    Hello! I am trying to set up family sharing option on my iMac, running on iOS Yosemite. After being prompted for password and entering it, the password window keeps appearing over and over again. There is no error message nor is my password incorrect

  • IPad 2 System Upgrade

    I  just attempted to update my iPad 2 to iOS 7. Everything went well until I got to the point where it told me that the new iOS 7 was successfully installed, the back up restored. It then directed me "slide to set up". After selecting English and my

  • How to create add-on for VB application

    Hi friends, I had created a VB application(not vb.net) and now i want to make that application as Add-On and Register in B1. for that what are the things i have to install,and how to create add-on to my VB application. Thanks & Regards Srinivas

  • Export crashing in 1.0

    Well, its better than Beta 4.1 when I would crash just trying to access the Library. At least now I can open an image and develop it, but its pretty useless to me if I cannot Export. XP Pro;SP2, P4, 2g ram, ATI 8600 video w/ latest drivers installed.

  • Work Flow and Oracle Apps

    Do my developer need to use the APPS account for maintaining and building work flows? Or can they use another account with the correct privleges? Thanks