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

Similar Messages

  • How to call javascript function in back bean of jsf

    hi,
    i am trying to call java script function in back bean but not done. Is there any code for call javascript function in bean file.

    Java runs at server side.
    JSF produces HTML output.
    Server sends HTML output to client.
    Java stops running.
    HTML runs at client side.
    JS starts to run in HTML.
    Clear? Java is a server side language. JS is a client side language. To run JS using JSF, simply print it out to the HTML so that it get invoked when the HTML runs.

  • Data sharing between region and the ADF page which contains it

    Here I've got an ADF page, on which there is a region. Suppose the region corresponds to the backing bean A and the ADF page corresponds to backing bean B. Now I need to make use of the variable (e.g., var_a) in the region the pass it to the backing bean of the ADF Page's backing bean B.
    How do I achieve this? Any comments will be highly appreciated.
    Regards.
    Edited by: isaacniu on Apr 5, 2010 8:05 PM

    Hi,
    the propery way to communicate back fom a region into the calling page is to use contextual events, which is a publish/subscribe system implemented on teh ADF binding layer. If a bean is configured in a standrad servlet scope (for example request or session), thus not bound to a specific occurence of its instance (backingBeanScope) then you could pass the EL string as an input argument to the task flow and use a ValueExpression in the managed bean of the region to resolve it and call a setVariable method to pass a value to it.
    For example, if the managed bean is MyManagedBean, then you could pass
    #{'#{MyManagedBean}'}
    as the task flow input value. This then e.g would be written to the pageFlowScope.externalBeanref attribute (you need to do this in the input parameter mapping) from where it can be accessed by the inner managed bean (the bean of the region).
    Note that the above is a "little dirty" but works. The reason why I suggest to use an input parameter instead of directly coding the EL to the parent page managed bean into the bean of the region is encpsulation: you don't want to make the bounded task flow in the region dependent from the outer parent context.
    Frank
    Ps.: Note that the managed bean is created when it does not exist. If you want to avoid this, you could pass #{'#{requestScope.managedBean}'} into the task flow. In this case, if the managed bean is not instantiated by the parent, the EL Value Expression comes out "null" if the managed bean wasn't instantiated before, in which case you know that there is no sense in accessing a setter/getter on it.

  • How To Customize displaying  of JSP page From Backing Bean

    I would like to customize the displaying of jsp page from backing bean based on user Roles
    For example
    - if the Role is Admin then backing bean should display Admin.jsp
    - if the Role is Guest then backing bean should display Guest.jsp
    Any pointers/suggestions will be highly appreciated
    Regards
    Bansi

    Thanks to all for providing thoughts
    I wanna make it more Dynamic. In the sense
    "Backing Beans should drive the rendering of first jsp page in the application " and not jsp page driving the backing bean or not to put some kind of hard coding in jsp page to see if its admin user then display certain set of UI Components or certain set of other UI components for other users.
    As we have atleast 10 different Roles and there can be Composite Roles i.e. combination of two roles. In this case how does the Backing Bean drives the rendering of jsp page?
    Regards
    Bansi

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How can i call a taskflow methode from backing bean ??

    Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660
    i like to call a Methode (taskflow) from backing bean!
    my bean code :
        public void imageLinkActionListner(ActionEvent actionEvent) {
            String              id      = actionEvent.getComponent().getId();
            int                 linkID  = Integer.parseInt(id.substring(4));
            DCBindingContainer  bc      = (DCBindingContainer)ADFUtils.getBindingContainer();
            DCTaskFlowBinding   tf      = null;
            System.out.println("Region Change...."+id+" INT "+linkID);
            switch (linkID) {
                case LINK_CALENDAR_REGION:
                    tf = (DCTaskFlowBinding)bc.findExecutableBinding("calendartaskflowPage");                   
                break;
                case LINK_MAIL_REGION:
                    tf = (DCTaskFlowBinding)bc.findExecutableBinding("mailtaskflowPage");                   
                break;
              case LINK_ADDRESS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("addresstaskflowPage");                   
              break;
              case LINK_BLOGS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("blogstaskflowPage");                   
              break;
              case LINK_MAPS_REGION:
                  tf = (DCTaskFlowBinding)bc.findExecutableBinding("mapstaskflowPage");                   
              break;
            default:
                return;
            if (tf != null){
                uiMainRegion.setRegionModel(tf.getRegionModel());
                uiMainRegion.setValue(tf.getRegionModel());
                tf.getExecutableBindings();
                AdfFacesContext.getCurrentInstance().addPartialTarget(uiMainRegion);
        }i like to call *#{backingBeanScope.mapBean.initMap}*
    my taskflow source
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="map-task-flow">
        <default-activity id="__1">map</default-activity>
        <view id="map">
          <page>/map/map.jsff</page>
        </view>
        <method-call id="initMap">
          <method>#{backingBeanScope.mapBean.initMap}</method>
          <outcome id="__7">
            <fixed-outcome>init</fixed-outcome>
          </outcome>
        </method-call>
        <control-flow-rule id="__2">
          <from-activity-id id="__3">initMap</from-activity-id>
          <control-flow-case id="__5">
            <from-outcome id="__6">init</from-outcome>
            <to-activity-id id="__4">map</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>

    Hi,
    to call the bean, use the EL in Java and reference #{backingBeanScope.mapBean.initMap} as a method expression. If you try and access the bean directly then chances are that the instance is not available. Using EL from Java always guarantees this
    Frank

  • How to get value in backing bean from application module

    Hi all.. I'm new in jdeveloper and adf..
    I need to use value from backing bean and use that value in application module.
    But I don't know how to get it.
    Do you a have any solution?

    suppose you have myMethod(String argumentName1,String argumentName2) in your Application Module
    then to access a method binding from a managed bean, use the following code,
      BindingContext bctx = BindingContext.getCurrent();
      BindingContainer bindings = bctx.getCurrentBindingsEntry();
      OperationBinding operationBinding =
           bindings.getOperationBinding("name_of_method_binding");
      //Here you can pass the parameters value to the AM method
      operationBinding.getParamsMap().put("argumentName1",value1);
      operationBinding.getParamsMap().put("argumentName2",value2);
      //invoke method
      operationBinding.execute();
      if (!operationBinding.getErrors().isEmpty()) {
         //check errors
         List errors = operationBinding.getErrors();
      //optional
      Object methodReturnValue = operationBinding.getResult();

  • How to show popup from backing bean code immediately?

    Hi,
    I'm using JDeveloper 11.1.2.1.0 and have problems with showing popups. I have a button with an action on my page and a method in backing bean.
    I want to rise up few popups from this method in backing bean (for example just an anouncement that something will happen) or a dialog
    (for example a question if you want to continue).
    I understand how to get a dialog response to deal with it in code, but the problem is that the popup doesn't show up immediately, but only when
    this method called on button finishes. I'd like to handle dialog responses in the middle of the action and then the code to continue with the execution.
    Here is my backing bean code:
    private RichPopup popup;
    public String test() {
    //Some code...
    RichPopup.PopupHints hints = new RichPopup.PopupHints();
    popup.show(hints);
    //Here is the place for code which I want to be executed after popup closes,
    //but is executed before the popup shows...
    return null;
    And here is part of my jssf:
    <af:commandButton text="Test" id="cb1"
    action="#{popupBean.test}"/>
    <af:popup id="popup" binding="#{popupBean.popup}">
    <af:dialog id="dialog" type="yesNo"
    title="Dialog"
    dialogListener="#{popupBean.onDialogAction}"
    binding="#{popupBean.dialog}" clientComponent="true">
    <af:outputText value="Do you want to continue?" id="ot1"/>
    <af:clientListener method="onDialogCancel" type="dialog"/>
    <af:serverListener type="DialogCancelHandlerEvent" method="#{popupBean.onDialogCancel}"/>
    </af:dialog>
    </af:popup>
    Can someone give me some answer how to show the popup from backing bean code immediately?
    Thanks in advance,
    Tina

    If you want to execute code after popup closes, then put this code in PopupCanceledListener or in DialogListener(you can't block method execution).
    Dario

  • I have just lost all my contacts from my Mac and my I Phone. Don't know how.  Can I get them back?  Not using Time Machine

    I have just lost all my contacts from my Mac and my I Phone. Don't know how.  Can I get them back?  Not using Time Machine

    If you have no backups, and data has been lost, then it's lost forever. The rest of your data will inevitably follow if you don't back up.

  • HT4847 Please help me how to reinstall icloud back up from specific date. (eg. back up from 1.02.13).

    My phone was not backed up on icloud due to excess storage size for one month. Recently i lost some contacts by accident. and it was backed up on icloud again this morning .so I would like to reinstall from last month back up to get all contacts back. but when i connected to computer, I only have a choice to reinstall from last 5 months ago which was backed up on my computer manually. So, please help me how to choose to reinstall icloud back up from specific date from last month (eg. 02.02.2013). Thank you very much.

    You cannot selectively restore from iCloud. You can only do a full device restore by resetting the device and choosing to restore from the iCloud backup during the setup process.
    See: http://support.apple.com/kb/HT4859

  • My I pad 1 sometimes while watching working switches off and go back to home page ... Why ? Also I need to know how I can upload my photos and pictures from laptop to my I pad.  I tried thru I tunes but not work.

    My I pad 1 sometimes while watching working switches off and go back to home page ... Why ? Also I need to know how I can upload my photos and pictures from laptop to my I pad.  I tried thru I tunes but not work.

    Satmar wrote:
    My I pad 1 sometimes while watching working switches off and go back to home page ...
    Try This...
    Close All Open Apps... Sign Out of your Account... Perform a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    Wait for the Apple logo to Appear...
    Usually takes about 15 - 20 Seconds... ( But can take Longer...)
    Release the Buttons...
    Note:
    Also consider Deleting any Apps you have Purchased / Downloaded but you now never use...
    Satmar wrote:
    Also I need to know how I can upload my photos and pictures from laptop to my I pad.
    See Syncing photos to devices
    Here  >  http://support.apple.com/kb/HT4236

  • HT4847 How can I move a back up from an old iPhone out of iCloud but not delete it?

    How can I move a back up from an old iPhone out of icloud and onto my own storage device? I don't want to delete it, I just don't want to keep it in iCloud

    Unfortunately you do not have direct access to iOS backs in iCloud.
    I am not sure what you mean by:
    It's locked with an enterprise (third party code)
    Do you mean it is a corporate device and managed by Mobile Device Management software?
    If so the IT department can reset the passcode.
    Other than that, there is no third party iOS app that can lock the device at that level unless it is jailbroken and then no one here can help you.

  • HT201269 how can i restore a back-up from an older phone?

    how can i restore a back-up from an older phone?
    I did a back up from my iPhone 4 on iTunes but I don't seem to be able to restore on my new 5c

    Restoring from an older iOS to a newer iOS version is fine.  It's going the other way that would be a problem.
    You do need a late version of iTunes on your computer to be able to work with the new iPhone.  The current iTunes version is 11.1.3.  If your iTunes is old, download the latest from
    http://www.apple.com/itunes/download

  • How to call a Javascript function from backing bean without any event

    Hi,
    Someone knows how to call a Javascript function from backing bean without any event ?
    thanks

    Please review the following thread:
    ADF Faces call javascript
    Luis.

  • How do I display data from Multiple Queries in a spreadsheet?

    I am running Oracle forms 10g as a kicker to export a report (rdf 10.1.2.0.2) to PDF or Excel Spreadsheet - User's choice.
    Doesn't matter if I have desformat = SPREADSHEET, DELIMITEDDATA, or DELIMITED; I still get only the first query displayed when I run in spreadsheet format.
    How do I display data from Multiple Queries in a spreadsheet? Is this possible?
    Thanks in advance!

    Hi adam,
    did you search the forum? You will find a lot of threads handling the problem of Excel file access.
    In short: you need to use ActiveX (the RGT also uses ActiveX under the hood)!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • The material account assignment group is missing in sales Order creation

    Hi Gurus, When creating the sales order the material account assignment group is not copied in the sales order line item.  For eg: when the sales order has 5 line item for one of the line item the material account assignment group is not getting copi

  • Exit labview (executables) after using large text files

    Hello, I am using LabView 6.0 and his aplication builder / runtime engine. I wrote some VI`s to convert large Tab delimited textfiles (up to 50 mb). When I am finished with the file it is staying in the memory somehow and is staggered with other (tex

  • Insert blank page into report after odd page

    I'm trying to get my report to insert a blank page at the end of each invoice if the invoice is an odd number of pages. We're looking to start printing two-sided invoices and need each invoice to be able to be mailed to the customer. I already have N

  • In Labview, is there an easy way to implement a string input from the operator with a dialog box?

    I have a production test system that I want the operator to enter the serial number through a dialog box. As I've currently done it, there's a string control on the front panel to enter the serial number, but the program will run without it. Any help

  • Premiere Pro CC 7.1, rMBP, no CUDA

    retina MacBook Pro 10,1 OSX 10.8.5 2.7 GHz Intel Core i7 16gb ram NVIDIA GeForce GT650M 1024mb CUDA Driver 5.5.28 GPU Driver 8.16.74 Premiere Pro CC 7.1 I've already consulted this blog on the matter: http://blogs.adobe.com/kevinmonahan/2013/09/13/en