ADF BC/Faces - Order of validation / backing bean action problem

Hello,
I want the user to enter the same "operation date" into all adf faces table rows created in one batch (one transaction).
So I removed operation date field from the table and added "unbound" date field above the table. The date field value is then copied into all new rows in background. This process is invoked from backing bean from Commit button actionListener method.
The problem is the validation of the operation date in entity is executed before a new date value is copied into the date attribute (validation of model is in JSF lifecycle executed prior invoking actions in backing beans).
It means the user can enter dead lock when he enters invalid date (for example date higher then a valid value).
Then after commit:
1. First validation is ok (wrong date value haven't been copied into model yet)
2. backing bean copy action is executed - model now contains wrong date value
3. Validation before commit isn't successfult - error message is displayed
4. User corrects the date value and presses commit again but:
5. First validation is not successful - model still contains recent wrong date value - error message is displayed again
6.There is no way out from this situation
I'm going to override lifecycle to be able to invoke copy method before validation cycle. Is this solution acceptable? Do you have any other suggestion?
Thank you.
Rado

hi Rado
Would it make sense to design your ADF BC View Objects in some kind of master-detail shape that fits your data?
View Object : OperationMaster (OperationDateAttr, ...)
View Object : OperationDetail (OperationAttr1, OperationAttr2, ...)
View Link : OperationDetailForMasterVL (based on some attribute that keeps the detail rows together)
You would need some Application Module method that does the "row batch setup", but it look like your already have something like this.
A change to OperationMaster.OperationDateAttr could update all its detail rows date attribute.
I think that building a UI on this would be less "view layer dependant".
Just a suggestion.
regards
Jan Vervecken

Similar Messages

  • What is the best way to submit an ADF Faces form from a backing bean?

    I would like to submit a JSF form at the end of a backing bean method (actually a ReturnEvent), and wonder if someone could supply an example of the "best practices" approach.
    Thanks!!
    Jeffrey

    Thanks for the reply Frank!
    Actually, what I want would be the equivalent of a resetActionListener.
    After performing "bindings.getOperationBinding("DeleteTrip").execute()" I would like the page to redraw itself with empty controls.
    I have included a resetActionListener in my commandLink, but the page is not redrawn after the operation.
    If I hit the reload button on my browser (after the operation has completed), I get the desired behavior.
    I've just added this comment to someone else's question you replied to on the following thread:
    Re: How to programatically resetAction after rollback?
    Thanks again!!
    Jeffrey

  • ADF Question: call javascript function from backing bean?

    Hi all,
    I am running JDeveloper 10.1.3.3 with ADF BC.
    Heres my situation:
    I have a table, and after inserting a new row, then committing, I want to call a javascript function. I tried using the onkeyup javascript to force a click of the save button, and then call my function after that. However, I really only want the second function to be called AFTER the commit has occurred.
    I have tried putting a setTimeout on the second function, but this never executes then. Is there some way that I can call the second javascript function from the backing bean? Is there a better workaround for this? Here is some code:
            function submitCreate(e) {
                var _event = (window.event) ? event : e;
                var KeyID = _event.keyCode;
                switch (KeyID)
                    case 13:
                        document.getElementById("form1:tvoTable:commitButton").onclick();
                        doAjax();
                        break;
            function doAjax() {
                var item = document.getElementById("form1:inputText3").innerHTML;
                getAjax(item, "FULL");
            }Thanks,
    Heather

    Maybe try adding an af:script block in your jsp as a partial target in your backing bean when you commit to the database? We are doing something similar when we get a tab DisclosureEvent but the principle should be the same.
    In our jsp we have:
    <af:script id="scriptID" text="alert('javascript here');"/>
    In the backing bean we have:
    method(DisclosureEvent de) {
    // get a component somehow or the component, we get it from the disclosure event
    // but you could use a binding also. if you don't have the exact script element you need
    // to find it like we do below.
    UIComponent c = de.getComponent();
    // Find our real script component
    UIComponent target = c.findComponent(":scriptID");
    // get the adf context
    AdfFacesContext adfContext = AdfFacesContext.getCurrentInstance();
    // add the script as a partial target.
    if(target != null) {
    adfContext.addPartialTarget(target);
    This relies on PPR though, which you may not be doing. If you are navigating to a new page you could set an indication in a backing bean and then access that in an <af:script> block in the new page or even generate the Javascript you want depending on your logic and access all of it via an EL binding on the af:script tag:
    <af:script id="scriptID" text="#{bbean.generatedScript}"/>
    Hope this helps!
    Steve

  • ADF BC how to access session backing bean value in servlet

    Hi everyone,
    How do I access session backing bean value in a servlet?

    Frank, thanks for your reply.
    I'm not sure how I can incorporate this example into my situation. Let me explain more detail about my problem.
    "servlet" in my post here actually means a custom servlet I wrote for rendering an image that is stored in db as ordimage. In this servlet, I get hold of my appmodule by using Configuation.createRootApplicationModule(). By doing so (If I'm not wrong) a new database session/connection is created. What I'm going to achieve is set application context for this new session/connection in db with the data stored in a session backing bean in the view layer.
    I can pass the required data to the servlet thru url parameter, but I don't want to do it this way for the reason that the data may contains sensitive information.
    I hope I have explained myself well.
    Message was edited by:
    bsmt

  • Trigger Backing Bean Action from Java script

    Hello
    I'm quite new to JSF, Would like to know how we can trigger a bcaking bean action method using java script as part of form submit.
    Already I added one commandbutton with an action method defined in backing bean, But our requiremnt is to trigger the same action even if the user submits form by pressing Enter key.
    Targeted device is Windows Mobile IE ( In IE Mobile, we can't track onkeydown, onkeyup, onkeypress, onmousemove, onmousedown and onmouseup event. )
    1. How the JSF binds a backing bean method with JSF commandButton control on runtime. I didn't find any hidden value corresponding to this commandButton.
    2.How we can trigger a bcaking bean action method using java script as part of form submit
    Thanks
    Jobinesh

    thanks a lot for the replies. I'll try it out.
    But one question, just because of curiosity
    1. How the JSF binds a backing bean method with JSF commandButton control on runtime. I didn't find any hidden value/or any other flag corresponding to this commandButton from the genarted html for the correspondant jsf soure.

  • Blank page on backing bean exception

    When there is exception in the backing bean, a blank page is displayed. I was expecting response with status code 500. When I debug the http response the status code is 200. I have configured the webapp to display error page on status code 500. Since it is not returning status code 500, this page is not displayed.
    In web.xml
    <error-page>
    <error-code> 500 </error-code>
    <location>/500.jsf</location>
    </error-page>
    I am using Sun RI Implementation of JSF on weblogic 10.3
    Please some one help me.
    Here's a stack trace.
    Note :I purposely introduced devide by zero exception in my backing bean action.
    ####<Mar 11, 2009 10:57:16 AM PDT> <Error> <HTTP> <KOLCHK1-D1> <AdminServer> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1236794236482> <BEA-101107> <[weblogic.servlet.internal.WebAppServletContext@1943319 - appName: 'sam', name: 'hcp', context-path: '/hcp', spec-version: '2.5'] Problem occurred while serving the error page.
    javax.servlet.ServletException: / by zero
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:251)
         at weblogic.servlet.internal.ForwardAction.run(ForwardAction.java:22)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.servlet.internal.ErrorManager.handleException(ErrorManager.java:144)
         at weblogic.servlet.internal.WebAppServletContext.handleThrowableFromInvocation(WebAppServletContext.java:2244)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2093)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Then the problem lies somewhere else. I can't determine it based on the as far given information.

  • How open new browser in JSF after executing backing bean method

    hi All,
    Can you please tell me how to open a new browser after executing action method in bean.
    I have writen one java script function, i am passing the string url which i got from the backing bean action method.
    First of all i want to execute action method then only javascript function.
    waiting for your quick reply.
    thanks & regards
    bhushanam.

    hi,
    That command link in data table. The requirement is like this:
    I have datatable, the columns are
    1) <h:selectBooleanCheckbox ....
    2) <h:commandLink ....
    requirement 1:
    if user select the boolean check box and click the command link
    then I want to execute the backing bean action method , it returns string url and show in new browser window( popup window with toolbar ).
    requirement 2:
    if user not select the boolean check box and click the command link then I want to excute the backing bean action method, it returns string url and show in the same browser ( through navigation rule we can show that page.)
    Please look the below command link code.......
    <h:commandLink id="belegnr" onmousedown="return showPopupWindowForInvoiceForGraphicImage( '#{row.importKz}', '#{row.blnChecked}', '#{InvoiceMecBoxBean.printInvoiceFilePath}');" styleClass="input" style="color:blue" value="#{row.belegnr}" action="#{InvoiceMecBoxBean.editLinkAction}"/>
    Can u please give me the idea istead of command link can we use outputlink to fullfil the requirement?. Or any suggestion please......
    Here in my case commandlink value is differenet and after action the return value is different to show in new window. that is problem here.
    thanks & regards
    bhushanam.

  • ADF BC + ADF Faces: How can consult a ViewObject in a backing bean.

    Hello comunity i'm new in ADF tecnology, need to consult a VO in a backing bean code, but these are not instances in page definition.
    Thanks Comunity.

    Hi Peter you can consult your aplication module and all VO including inside using these code:
    String amDef = "model.AppModuleImpl";
    String config = "AppModuleLocal";
    String retorno = "";
    ApplicationModule am = Configuration.createRootApplicationModule(amDef,config);
    ViewObject myVO = am.findViewObject("YourVO");
    Then you can filter your VO if you need
    myVO.setWhereClause("id = : 0");
    myVO.setWhereClauseParam(0, var);
    myVO.executeQuery();
    And iterate by the results
    while (myVO.hasNext()) {
    myVO.next();
    Row myRow = myVO.getCurrentRow();
    Number id= (Number)myRow .getAttribute("Id");
    Good Luck

  • ADF Faces Declarative Component onLoad event call Backing Bean Method

    Hello.
    We are trying to implement a declarative component, that will be used as Flex Fields for our application, ie, the components will be created dynamically through a database configuration, and who is responsible for organizing and creating the components, is the declarative components, and its own backing bean.
    The declarative component, will receive a List of custom components, and with this list it is possible to create the components dynamically. We want the components to be created as soon as the page is loaded. The developer could place this declarative component in any region of his page, and even in another tab if he wishes. The problem is, that we cannot register a load event in the declarative component, since it doesn't have a document Object, to call the declarative components backing bean method that is responsible for creating components.
    How could we simulate the onLoad (of the declarative components) so that the backing bean method (responsible for creating component, and putting it in the view tree) could be called ?
    I've tried with a RENDER_RESPONSE phaseListener, but the beforePhase has no objects in the tree, and the afterPhase has already rendered to the client.
    Any ideas on how to achieve this ?
    Thanks a lot.
    Regards,
    John

    Hi Frank, thanks for the response.
    I'm curious about the dynamic declarative component. Any place I could check it out ?
    Back to my scenario. I'll try to be more clear to what we need!
    We have to have dynamic creation of components, based on a database configuration. This will allow our customers to have custom flex fields, without the need of us developing custom pages for each customer.
    One solution we are trying out, is the declarative component. Why ? Because the developer (when developing the page), knows that this specific page, is possible of customization by the client (custom flex fields). With this, the developer would choose where on his page the custom flex fields will be placed. Note that at this point (design time), no component (input, buttrons, etc) is created. The idea of the declarative component, is just so the Developer knows where he wants the custom fields placed in his page (a tab, below the form fields, in a another panel group, and so on). The declarative component, has only a container, PanelFormLayout, and no other component.
    What we want, is a way of calling our managed bean (the managed bean of the declarative component, that now I did configure it in the adfc-config.xml file , thanks for the tip) method, that's responsible for creating the custom components. The declarative component, receives a list of all the custom fields that needs to be created, at design time, through an attribute. The developer is responsible for setting this list when he drags the declarative component on his page.
    Now that I've put the declarative components managed bean in the adfc-config.xml file, the @PostConstruct is called correctly, but I still have a problem. At this moment (postContstruct call), my component PanelFormLayout (that is binded to the managed bean), is null. So I cannot add any component to the PanelFormLayout.
    Am I way out of line here Frank ?
    Really appreciate your comments.
    Thanks a lot.
    John

  • Create a report in a popup (validation needed in back bean before popup)

    Hi all,
    I am very new to JDev and ADF, I am struggling to generate a report in a popup through the back bean, some validation is needed in the back bean before the popup. When creating the popup window, the url of the popup will be the URL of a servlet I searched the forum and found 2 approaches:
    http://thepeninsulasedge.com/frank_nimphius/2007/09/11/adf-faces-showing-reports/
    can af:showPopupBehavior work together with action- or launchListener? (approach by Julian Stephen)
    But I have a few questions for these approaches:
    for first approach:
    is “documentURL” in the commandButton_action() the url for the my report servlet,
    another thing is that, in this commandButton_action(), it said: return "dialog:open"; But I couldn’t find anywhere in the content that shows dialog, open are component ids? Or I am misunderstood it?
    for the second approach:
    where is the url for my report servlet put? Is it in the "hints" in the function “popup.show(hints)”?
    I can try the second approach first, but for the first approach I really want to know what is the "return dialogLopen" about?
    If there are any other means, please let me know!
    Your help is highly appreciated!
    Shawn

    My bad, in the first approach, "dialog:open" is the action string not component ids.

  • JDev11 with ADF backing bean examples?

    I have gone through many of the OBEs, How To examples, and a few custom examples in blog posts. Almost all of the examples that use ADF Business Components to model oracle data do not use backing beans, at least not of the ones I have found. If anyone know of links to examples that show JDeveloper using ADF to model Oracle table and using backing beans (Could be calls to the application module, whatever). Could you please post links. The examples from Oracle tend to be declarative with ADF components, and I want to get to the next level of complexity in development that combines custom code with existing declarative code.
    It would be great if a few of the OBEs could show a declarative, and also a programmatic way to solve the same problem in a few cases - such as the "Build a Fusion Web Application" in the help. I don't need everything programmatically done, just show where something can be done declarative and how it could also be done programmatically. It would also help to know the limits of declarative programming and where you would need to code a solution.
    Thanks, Ken

    >
    Warning: Long Post. I wanted this to be clear as to what I really need help with.
    >
    What I am looking for is more clarification on both how to use and when to use backing beans.
    Here is an example that I am currently working on using jdev11u2 with ADF BC for the model and JSF.
    I have a single page. The goal is to have several filter components, then a run report. Under the run report there are several components based on select statements that use one or more of the filter components. These components are displayed as graphs (because that is what management wants to see.)
    Seems easy enough.
    I have four graphs that are desired. In my oracle schema, I use sql developer to develop four queries that return the data that I want.
    In the model, I create four view objects. Each one has a one or more binds for filters. I don't put in a default value, but make them required. Most of the views have a common bind for techID, which actually points to a different column name in each of the views, but generally has a similar meaning. I didn't create the tables, just have to live with the existing design. Sound familiar? After creating read only views that do not have EOs, I add these to the Application Module. I also create a lookup for techid that queries a table and returns two values, techname and techid. I want this to be used for a combobox to select the user to run the report on.
    Three of the queries have a date component. The idea is to have options so that the use can select from three choices, last 30 days, last 60 days, and last 90 days. I modify three of the queries in the VOs, and add a DateFilter bind that is of type Date. This happens to be oracle.jbo.domain.Date
    So to get this to work so far, I create a method named updateViews in my Application Module. I create two methods, one that receives String TechID, and another that receives String TechID and java.util.Date date. In the code for the first choice, I simple get the date 30 days ago and use that, then call the second method with both techid and the date. In the second method, I convert java.util.Date to oracle.jbo.domain.Date. I create an instance of each VO, and call a method on each named updateWithParams(String techid, Date date). The Date is automatically defined as the oracle.jbo.domain.Date. In each of my VO's, I create a method in the VOImpl.java for each that is basically the same - accepts the parameters, sets them in the where clause, then calls the execute method.
    In the form, I start simple. I drag the ExecuteWithParam method to the form from the updateView that only has the techid field as an ADF Button. I Then drag the techid parameter under this method to the form as a single selection, and set this up so that it uses my lookup for the data, displays the name, and uses the techid as the value.
    To test, I drag each of the VOs to the page as simple read only tables, not bothering to change any of the settings. This is just to make sure it is working.
    To note, the page uses an actionlistener for the button, so the code on the page for the button is:
    <af:commandButton actionListener="#{bindings.updateViews1.execute}"
      text="updateViews1"
      disabled="#{!bindings.updateViews1.enabled}"/>Everything works! Yea!
    Now to make this more interesting, I want to add the date filter.
    I delete the Command button and the combobox. I now drag the method that has two parameters. Same procedure as before, adding the techid parameter that uses the combobox that uses the lookup vo. Great so far.
    Now here is where I run into problems and am trying to understand backing beans as a possible solution.
    I need the data selection to be a radio button that has three choices: Last 30, Last 60, and Last 90. Using the drop method of the parameter to the form, it doesn't appear that I have any way to setup initial values correctly. Just to test, I dropped as an input date. In this case I can't set the default date. I get the following component on the page:
              <af:inputDate value="#{bindings.date.inputValue}"
                            required="#{bindings.date.hints.mandatory}"
                            shortDesc="#{bindings.date.hints.tooltip}">
                <f:validator binding="#{bindings.date.validator}"/>
                <af:convertDateTime pattern="#{bindings.date.format}"/>
              </af:inputDate>What I want is to be able to modify the value for #{bindings.date.inputValue}, but I don't understand how backing beans work well enough to implement this. When I try, everything gets messed up. I even tried to use a backing bean for the command button, but then I have an actionlistener, I have to create both the binding and action. I don't know if this is correct, and haven't found documentation that shows what to do.
    So this is my dilemma, I think that a backing bean will solve the problem, but need examples that incorporate both standard table bound components to ADF BC model, that I can manipulate. Eventually, I want the date component to point to a radio button. If I drop the component on the form and drop as a select one radio, this is my starting point. Now, how can I setup the values so that the 30, 60, and 90 are really SYSDATE - 30, SYSDATE - 60, and SYSDATE -90 (or java equivalent using Calendar), and still bound to the ADF component so when the command button is pressed, the correct parameters are sent.
    What is not clear is whether I need to switch out the execwithparams to backingbean functionality to call the method. Can both co-exist with actionlistener being set, and an action pointing to a backing bean?
    This is why I am requesting more examples, so that the mixing of ADF BC model bound to ADF faces components and programming code to get the compoents to work according to a specific user case can be completed.
    Thanks, Ken

  • 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

  • How to access backing bean of a xml component , in a managed bean of ADF

    Hi,
    We wrote a xml component in JSF and this component is used in ADF project by including the component as jar .
    In a master detail page , we need to update the value of the xml component, when the master row is changed. How to do this.
    We are trying to do this by accessing the backing bean of the xml component in ADF project's managed bean. So when ever the row changes, we can access the managed bean in ADF and then can set the value of the xml component by accessing it's backing bean
    But i can't access the backing bean instance of the xml component in the ADF managed bean. Could you let me know how to do this. Thanks .

    Thanks for the response Shay. The xml component is added as a custom component , with a separate faces-config.xml file . This component is added to ADF project as a jar with a custom tag.
    In the ADF project , i'm having different managed beans and i can access them from a different managed bean.
    The issue is, i can't access the added custom component's backing bean which is available from a different jar , defined in a separate faces-config.xml file . This backing bean is defined with request scope.

  • Managed bean/Data exchange between two ADF Rich Faces based applications

    Hi,
    I have been trying to research what seems to be a small issue. My requirements are as follows.
    1. I need to be able to pass managed bean information from one ADF Rich Faces based application to another (in two separate ears) at runtime (e.g. from Ear1: SenderApp/Sender.jspx -> Ear2: ReceiverApp/Receiver.jspx).
    2. I do not want to use the database as my applications need to be performant.
    3. Serialization/de-serialization would fall pretty much under the database category. In other words, I like to avoid Serialization/de-serialization of the managed bean.
    4. I cannot use query string due to security issues.
    My question is as follows:
    1. Is there any standard/architecture/best practices for data exchange of backing beans or other forms between two ADF Rich Faces based apps (in two separate ears)?
    2. Has someone found anything similar to an applicationScope that works across applications?
    I would appreciate any ideas.
    Thanks very much,
    Edited by: user11219846 on Jul 23, 2009 2:38 PM
    Edited by: user11219846 on Jul 23, 2009 2:42 PM

    Hi,
    its not an ADF Faces problem, but not possible in Java EE. You can however fallback to vendor specific implementations like in WLS. From the WebLogic documentation : http://e-docs.bea.com/wls/docs103/webapp/sessions.html
    Enabling Web applications to share the same session*
    By default, Web applications do not share the same session. If you would like Web applications to share the same session, you can configure the session descriptor at the application level in the weblogic-application.xml deployment descriptor. To enable Web applications to share the same session, set the sharing-enabled attribute in the session descriptor to true in the weblogic-application.xml deployment descriptor. See “sharing-enabled” in session-descriptor.
    The session descriptor configuration that you specify at the application level overrides any session descriptor configuration that you specify at the Web application level for all of the Web applications in the application. If you set the sharing-enabled attribute to true at the Web application level, it will be ignored.
    All Web applications in an application are automatically started using the same session instance if you specify the session descriptor in the weblogic-application.xml deployment descriptor and set the sharing-enabled attribute to true as in the following example:
    +<?xml version="1.0" encoding="ISO-8859-1"?>+
    +<weblogic-application xmlns="http://www.bea.com/ns/weblogic/90";;>+
    +...+
    <session-descriptor>     
    +<persistent-store-type>memory</persistent-store-type>+
    +<sharing-enabled>true</sharing-enabled>+
    +...+
    +</session-descriptor>+
    +...+
    +</weblogic-application>+
    Frank

  • Backing Bean Validation Method error

    Hi all,
    I've an ADF JSF User Registration Form and I want to set my server-side validation to confirm passwords entered by the user using the validator attribute bound to customized validation logic sitting in a method my backing bean. I've tried quite a few cracks at this but I still seem to get a java.lang.NullPointerException error when the method is invoked.
    The relevant method in my Backing Bean looks like this:
    public void comparePassword(FacesContext facesContext, UIComponent uiComponent, Object newValue) {
    //Get the new value that is passed passed from the Confirm Password field
    String confirmPassword = (String)newValue;
    //Get the password that has already been entered
    String password = (String)getLoginPasswordText().getValue();
    //Compare passwords and raise validation error message
    if (!password.equals(confirmPassword)){
    throw new ValidatorException(new FacesMessage
    (FacesMessage.SEVERITY_ERROR,
    "Passwords need to be the same",
    "Password values should be the same"));
    The getters and setters for the components are also in the bean and the gettLoginPasswordText() returns the original password input text field (the one that I want to compare it to).
    Is there something that I've missed here?
    Cheers

    Thanks Frank.
    I now understand a bit more about value binding. But unfortunately I need a little more help (from anyone) on this one. I've tried quite a few things and I think the problem stems from the fact that the validation code doesn't seem to pickup the value entered in the comparison field - at least in the way that I've coded it. Here's a more complete example of what I'm trying to overcome:
    I've got two input text components:
    <af:inputText required="true" simple="true"
    id="loginPasswordText"
    immediate="true"
    value="#{backing_UserRegistration.password1}">
    </af:inputText>
    <af:inputText required="true" simple="true"
    id="loginConfirmPasswordText"
    immediate="true"
    validator="#{backing_UserRegistration.comparePassword}"
    value="#{backing_UserRegistration.password2}">
    </af:inputText>
    I've setup the relevant accessors as in the following:
    String password1 = "";
    public String getPassword1(){
    return password1;
    String password2 = "";
    public String getPassword2(){
    return password2;
    And my validation now code looks like this:
    public void comparePassword(FacesContext context, UIComponent toValidate, Object value) {
    if (!Password2.equals(Password1)) {
    FacesMessage msg = new FacesMessage("summary message", " detailed message");
    msg.setSeverity(FacesMessage.SEVERITY_INFO);
    ValidatorException e = new ValidatorException(msg);
    throw e;
    I've tested the validation code on a standalone basis ie passing in a new variable as part of the method ie.
    String word = (String) value;
    if (word.equals("tom"))....
    The validator and message fires OK, so I know the problem lies with picking up the entered values for password1 and password2. I know the values are there because I can "see" them on screen and they are recognized by standalone validators and the bean has a session scope.
    Ideas anyone?
    Thanks

Maybe you are looking for

  • NEW HD ON MY MACBOOK. CAN'T INSTALL OS X

    I had to replace my HD on my MacBookPro. A new Seagate momentum 500gb 7200rpm was installed. I did partitioned in 1 Volume. When I tried to install OS X it gives me a failure notice "Install Failed. Mac OSX could not be installed in your computer. Th

  • Sending an idoc to 1 the of the 2 idocs in the receiver side based on field

    Hi, Am having 1 idoc in sender side SHPMNT05 and 2 idocs in receiver side DELVRY05 and VEHCLE01. My requirement is to send data to DELVRY05 only when one field in SHPMNT05 is having space in it and to VEHCLE01 only if having Vehicle no in that partic

  • TS1702 How can I delete an app that was purchased?

    How can I delete an app that was purchased?

  • Issue in report

    Hi All, I had a multiprovide on top of it I had report with almost 14-15 infoobject which are authorization enabled. It used to run fine. Now I have created another multiprovide, including all the below cubes & a new ODS which is bex enabled, but whe

  • Not able to control the interactive ALV

    Hi all, I am having a requirement that when i double click on the PO field it has to call the transaction ME23N and it is working. But when I am clicking on the other fields also it is trying to call the transaction.. and giving error that this docum