Data initialization in backing bean

Hi,
JDev Version: 11.1.2.1.0
I have set of jsff pages in backingBeanScope, which are embedded in a bounded taskflow and the taskflow is used in a jspx page as a region.
A table in jsff page displays the data on executing a DB query:
<af:table var="row" id="t2" value="#{requestScope.backing_main.lstReleases}" partialTriggers="...">
</af:table>
Backing bean has the following:
public List<MyObject> getLstReleases(){
// populate MyObject list based one a DB query
return myObjects;
This table gets refreshed based on user's selection on the page.
Issue:
Since the fragment is in backing bean scope, this query gets fired multiple times and hits the performance issue.
Executing DB query in the constructor fires the query atleast twice.
I need to display the default view each time user requests the page, i.e. clear the previously user selected values on the page, say drop-down list, check box, etc(view state management).
Can you please suggest a way to initialize the data when using backingBeanScope and avoid executing same DB query multiple times?
Your help is much appreciated.
Regards,
Shrinath

I am trying a better place to initial the data model, i.e. List<MyObject>, by executing a DB query.
Executing this query inside the constructor was just an effort.
Here is my usecase:
1. I have a dropdown list with 2 static values, 1. user view1 (default) 2. user view2.
2. On choosing any value, the table data should get refreshed.
3. On page load, the table should display the data with default user view(user view1).
To achieve this, currently, the DB query is placed in the getter method and hence the 'value' attribute of the table is set to #{backingBeanScope.backing_main.lstReleases}.
As managed bean for the jsff page is in backingBeanScope, this getter method gets executed multiple times, resulting in multiple DB query execution. Hence performance issue.
Can you please suggest a way to avoid executing same query multiple times, still refresh the table on choosing different user view?

Similar Messages

  • SelectOneMenu does not show the data from the backing bean

    Here is my code:
    <!--
    Fetch the source directory
    -->
    <h:inputText id="dir"
    value="#{myBean.sourceDirectory}"/>
    <!--
    Click this button to refresh the sub-directories list below
    -->
    <h:commandButton value="fetch"
    actionListener="#{myBean.processFetch}" />
    <!--
    Show the list of sub-directories in the directory entered above as a drop
    down
    -->
    <h:selectOneMenu value="#{myBean.selection}">
    <f:selectItems value="#{myBean.dirs}"/>
    </h:selectOneMenu>
    public class MyBean{
    private String sourceDirectory;
    private ArrayList<SelectItem> dirs;
    public String getSourceDirectory(){
    return sourceDirectory;
    public void setSourceDirectory(String newDir){
    this.sourceDirectory = newDir;
    public ArrayList<SelectItem> getDirs(){
    return dirs;
    public void setDirs(ArrayList<SelectItem> newDirs){
    this.dirs = newDirs;
    public void processFetch(ActionEvent e){
    //For this example, we return some hard coded values
    dirs = new ArrayList<SelectItem>();
    SelectItem s1 = new SelectItem();
    s1.setLabel(sourceDir + "_1");
    SelectItem s2 = new SelectItem();
    s2.setLabel(sourceDir + "_2");
    SelectItem s3 = new SelectItem();
    s3.setLabel(sourceDir + "_3");
    SelectItem s4 = new SelectItem();
    s4.setLabel(sourceDir + "_4");
    dirs.add(s1);
    dirs.add(s2);
    dirs.add(s3);
    dirs.add(s4);
    When I run the above code, I notice that the first time, (and the only time), if I hit the "fetch" button the data in the drop-down menu does get refreshed.
    Subsequently, it does not change. I am not sure what I am doing wrong.
    Can someone help me?

    Hi,
    In order to use the JDBC persistence store you have to use a non XA JDBC driver for your Data Source.
    http://docs.oracle.com/cd/E23943_01/web.1111/e13701/store.htm#CNFGD221
    Point-13). When configuring a connection pool to use with WebLogic JMS JDBC Store, use non-XA database drivers.
    http://middlewaremagic.com/weblogic/?p=586
    Hope it helps

  • JSF Backing Bean State Being Lost Prior to Submit

    ISSUE
    I have an attribute in a backing bean for a drop-down list in a JSF that loses its state before I submit the page, which causes data updates to the backing bean dependent upon its state to be ignored.
    CONTEXT
    The JSF in question has a selectOneMenu drop-down list that determines whether or not several inputText fields will be rendered. The selectOneMenu is bound to an enum in the backing bean, and there are conditional accessors allowing the JSF to determine which inputTexts should be included in the current view. The three valid values of the drop-down are "ALL", "RANGE" and "SINGLE". The page is request scoped, a requirement of this project.
    Here is the JSF tag for the selectOneMenu drop-down list:
    <h:selectOneMenu disabled="#{not backingBean.newEntry}"
        id="tCriteria"
        value="#{backingBean.tCriteria}"
        onchange="submit()">
        <f:selectItems value="#{backingBean.possibleTCriteria}" />
    </h:selectOneMenu>And here are the RANGE selection-specific inputText controls:
    <h:inputText disabled="#{not backingBean.newEntry}"
        rendered="#{backingBean.tRange}"
        id="startTIndex"
        value="#{backingBean.tIndex}" />
    <h:inputText disabled="#{not backingBean.newEntry}"
        rendered="#{backingBean.tRange}"
        id="endTIndex"
        value="#{backingBean.endTIndex}" />Here is how I initialize the backing bean for the drop-down list attribute:
    * The current "t" criteria.
    private TCriteria tCriteria = TCriteria.ALL;And there are basic accessor/mutator methods for it. All of this works pretty well, with one problem. If I select "RANGE" in the drop-down, the appropriate inputText fields appear in the view. When I submit the page with values in the inputText fields, the value of the drop-down in the backing bean has been reset to its default initial value ("ALL") without having been updated through its mutator. Thus, when values in the backing bean are updated from the JSF, the conditional inputText fields are ignored, as they appear to have been deemed irrelevant during the update phase by the invalid state of the backing bean for the drop-down.
    To test my theory, I changed the default value of the backing bean attribute for the drop-down to be "RANGE", and made it final. The page behaves perfectly in updating the backing bean with the values entered for the conditionally-displayed inputText controls. This tells me that the invalid state of the backing bean drop-down list attribute must be the problem. Furthermore, I have tried using "disabled=", "readonly=" and "rendered=" on the conditional inputText fields, and none of that seems to make a difference. I also tried using a ValueChangeHandler, but that didn't do anything about it.
    Note - the backing bean does realize that the correct state for the drop-down should be "RANGE", but only AFTER the backing bean has received its updated values from the page controls.
    Has anyone seen anything like this? I haven't read anything in previous posts about an issue like this, but it has to be something someone has seen before. Maybe related to using the enum type? Thanks.

    Hi,
    did your web.xml file had any parameter regarding explicitly indicating the way to save state?
    I mean something like
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
      </context-param>One last question: did you stay with request scope beans or session ones?
    Greetings.
    MogaRick

  • Is it recommended to instantiate Model object from Backing Bean

    Wondering what are the best practices in developing JSF,Spring, Hibernate application.
    Appfuse/Equinox example instantiate Model Object i.e. POJO in the Backing bean. Here is the snippet
    UserForm.java (Backing Bean)
    public class UserForm {
    public User user = new User();
    public UserManager mgr;
    // Getter & Setter methods for user & mgr
    //Persistence
    public String save() {
    mgr.saveUser(getUser());
    addMessage("user.saved", getUser().getFullName());
    return "success";
    I undertand the purpose of having UserManager defined in backing bean but wondering why do we need to have Model (i.e. User) defined in backing bean . Is this a best practice?
    Is it recommended to populate model object with data in the backing bean and then call for business methods like mgr.saveUser(getUser());
    Regards
    Bansi

    Here is some more info
    UserForm is a JSF managed bean,
    User is a hibernate mapped POJO, and
    UserManager is manager class in Spring
    I am wondering about perfomance issues i.e. making DB calls from backing bean getters or setters. DB calls can mean a performance hit, and JSF will call the getters and setters multiple times per page request (which means you'll be doing multiple DB calls).

  • H:inputText ; How To initialize value Property from back/bean method?

    Hello Guys at Sun Forums.
    I am a newbie at using JSF. and I'm having a bit of a Problem.
    I don't know how to initialize the value property of a h:inputText from a method inside a backing bean that returns a String data type.
    My Method inside the Backing bean is this:
    public String getLastDate()
            Connection con = null;
            Statement stmt = null;
            ResultSet rs = null;
            Date DateCapt = null;
            String DateConv= null;
            try{
                Class.forName("com.sybase.jdbc2.jdbc.SybDrive").newInstance();
                con = DriverManager.getConnection("jdbc:sybase:Tds:localhost/BAN_PRO_SNP", "xxxx", "xxxx");
                if(!con.isClosed()){
                    stmt = con.createStatement();
                    stmt.executeQuery ("SELECT TOP 1 CONVERT(VARCHAR(10), fec_parametro, 103) fec_parametro FROM snp_sei_parametros" +
                    "     WHERE cod_parametro = 'FECHA'" +
                    "     ORDER BY fec_parametro DESC");
                    rs = stmt.getResultSet();
                    while (rs.next())
                                DateCapt = rs.getDate("fec_parametro");
                rs.close();  
                stmt.close(); 
            catch (Exception ex)
                        System.out.println("COULD NOT LOAD THE DRIVER!!!!");
                        System.out.println(ex);
                    DateConv = String.valueOf(DateCapt).toString();
        return DateConv;
    }As you can see the Method returns a String data type, and all I want to know is how put that returned String as the initial value of a h:inputText. when the jsf-jsp page loads.
    Please Help Me.

    You should be able to do
       <h:inputText value="#{bean.lastDate}"/>Where 'bean' is the managed bean name containing
    the method getLastDate().
    When the view is rendered, the getter (getLastDate())
    will be called to display whatever value is returned.

  • How to refresh data in SelectOneChoice component based on backing bean

    Hello.
    I am using JD Studio Edition Version 11.1.1.5.0 on Weblogic 11.1.1.5
    I have page fragment with SelectOneCoice based on backing bean (used as filter)
    <af:selectOneChoice label="#{projectBundle['label.toolbar.spinbox.period']}"
                                        valueChangeListener="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.onPeriodValueChangeListener}"
                                        binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.soc2}"
                                        id="soc2" value="#{pageFlowScope.ContentMainView.period}" autoSubmit="true">
                      <f:selectItems value="#{pageFlowScope.YearsListBean.yearItems}"
                                     binding="#{backingBeanScope.backing_jsf_fragments_project_ContentMainView.si2}" id="si2"/>
    </af:selectOneChoice>
    there is backing bean which reads data from database and creates list + add null value
    package sk.web.view.bean;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.share.logging.ADFLogger;
    import oracle.jbo.Row;
    import sk.web.view.common.utils.ADFUtils;
    * Class is supposed to provide list of years for the af:SelectOneChoice component.
    public class YearsListBean {
        private static final String PERIOD_ITERATOR_NAME = "PeriodView1Iterator"; //auto generated id
        private List<SelectItem> yearItems;
        public YearsListBean() {
            super();
            yearItems = new ArrayList<SelectItem>();
            addYearsToList();
        public void addYearsToList() {
            DCIteratorBinding iter = null;
            iter = ADFUtils.findIterator(PERIOD_ITERATOR_NAME);
            Row[] rows = iter.getAllRowsInRange();
            addYearItemToList("", "");       
            for(int i = 0; i < rows.length; i++){
                Row row = rows[i];
                log.info("row[" + Integer.toString(i) +"]: " + rows[i].getAttribute("Year").toString());
                addYearItemToList( rows[i].getAttribute("Year").toString(), rows[i].getAttribute("Year").toString());
        public void clearYears() {
            log.info("Called.");
            getYearItems().clear();
       private void addYearItemToList(String strInYearLabel, String strInYearValue) {
            SelectItem tObjItem = new SelectItem();
            // Setup object
            tObjItem.setLabel(strInYearLabel);
            tObjItem.setValue(strInYearValue);
            // Add it ro list
            yearItems.add(tObjItem);   
        public List<SelectItem> getYearItems() {       
            // Get Output
            return yearItems;
    When I insert new record into DB table I want to show new value into filter. How to achieve this?
    I tryied get current instance of YearsListBean
         YearsListBean yearsList = (YearsListBean)FacesUtils.getManagedBean("pageFlowScope.YearsListBean");
    then clear and fill it again
         yearsList.clearYears();
         yearsList.addYearsToList();
    at the end I refresh view adding partial target
    AdfFacesContext.getCurrentInstance().addPartialTarget(getSoc1());
    But this procedure doesn't work. Please help me find working method.
    Thanks in advance.

    Why don't you use a model driven list in the first place? Your list gets it's data from a vo do this would be the preferred solution.
    Check out my sample http://wp.me/pcBZk-vM
    Which shows an similar use case.
    Timo

  • Page scoped backing bean keeps old data, why???

    I have two pages, a search/list page and an add page. On the search/list page there is an add buttom that simply navigates to the add page.
    The first time I press the add button all fields in the page are blank so I enter data and submits. The data i saved and we are navigated back to the search/list page. The next time I press the add button and are naviagted to the add page, all fields are filled with the same values as the last time I visited the page.
    The add page backing bean is (annotated by Seam) to reside in PAGE scope so it should loose its values between invokations of the add page.
    I get the exact same instance of the bean every time I nav to the add page. (Until the session is closed of course)
    Why this behaviour?
    Thanx.

    Check if a session scoped bean or other class is keeping a reference to the bean

  • Getting data from view object into backing bean

    Hi,
    My requirement is explained below -
         I have a ADF editable table in a jsf page which is connected to backend database table. In the table there are 6 columns and only 2 are editable. So when user inputs a value in first input column an event is triggered such that the data for all the remaining columns should be fetched from another database table.
    Typically if we are not using ADF development environment. We would have had a simple business method which creates the sql query by taking the input from textbox with simple where clause and I would have got the data. I am not getting any idea how to do this in ADF. I have the second table as view object but how to access the view object from backing bean and get data based on the input given.

    Hi,
    step 1) Expose a method on the ViewObject Impl class
    step 2) define arguments for the method as needed to identify the row to read data from
    step 3) retrieve the row from the VO that holds the data you want to add and return a HashMap with this information
    step 4) expose the method on the client interface (Java menu selection on the View Object)
    step 5) In the PageDef file, create a method binding to the method you exposed on the ViewObjectImpl
    step 6) Call the method binding from the managed bean like
    OperationBinding getDataFromVO = (OperationBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("Name of method binding);
    getDataFromVO.getParamsMap().put("name of arguments1", value1);
    getDataFromVO.getParamsMap().put("name of arguments2", value2);
    Object retData = getDataFromVO.execute();
    if(retData != null && getDataFromVO.getErrors().size()==0){
      HashMap retDataMap = (HashMap) retData;
    ... follow the rest of your logic ....
    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

  • Aj4:support initialize backing bean

    Hi,
    I am a newbi in JSF and aj4.I have used ajs:support tag to do a server side validation (a business validation) ,invoking a backing bean method.
    What I have observed is ,when ever the ajax call happened for this validation method , the init() method of the backing bean is getting executed.I have annoted the init with @postConstruct.This is required for me.
    Please find the code below
    jsp
    <a4j:support event="onblur" action="#{accgpBean.validateId}" reRender="idValidMsg" immediate="true"/>
    <h:outputText  binding="#{accgpBean.idValidMsg}" id="idValidMsg"/>Backing bean
    @PostConstruct
         void init(){
              AccountGroup grp=new AccountGroup();
              grp.setAccntSuperGrp(new AccountGroup());
              this.setAccntGrp(grp);
              System.out.println("Retrieving the accnt grp>>>");
              accountGroupList=accountService.listSuperGroup();
    public String validateId(){
            System.out.println("Invoked validation method>>>");
            idValidMsg.setValue("Invalid Id");
            return null;
       }Can anybody suggest,how do I turn off the invokation of init() on the ajax requests ?
    Thanks in Advance
    Shaiju

    Hi,
    I am a newbi in JSF and aj4.I have used ajs:support tag to do a server side validation (a business validation) ,invoking a backing bean method.
    What I have observed is ,when ever the ajax call happened for this validation method , the init() method of the backing bean is getting executed.I have annoted the init with @postConstruct.This is required for me.
    Please find the code below
    jsp
    <a4j:support event="onblur" action="#{accgpBean.validateId}" reRender="idValidMsg" immediate="true"/>
    <h:outputText  binding="#{accgpBean.idValidMsg}" id="idValidMsg"/>Backing bean
    @PostConstruct
         void init(){
              AccountGroup grp=new AccountGroup();
              grp.setAccntSuperGrp(new AccountGroup());
              this.setAccntGrp(grp);
              System.out.println("Retrieving the accnt grp>>>");
              accountGroupList=accountService.listSuperGroup();
    public String validateId(){
            System.out.println("Invoked validation method>>>");
            idValidMsg.setValue("Invalid Id");
            return null;
       }Can anybody suggest,how do I turn off the invokation of init() on the ajax requests ?
    Thanks in Advance
    Shaiju

  • Action method of backing bean called multiple times instead of once.

    Hi,
    My backing bean has an action method called "saveEquipmentList" that's called when a "Save" button is clicked. The problem is, this method gets executed twice every time the button is clicked so data gets peristed twice, db triggers get executed twice, etc., it's really pretty annoying. I've put the bean method's code and the JSF command button below, notice that there's a check for FacesContext.getRenderResponse() that I put in for debugging, the code doesn't get executed at all if I leave the FacesContext.getRenderResponse() in, sure, you're saying "So what's you point", no point, just thought I'd explain why the check is in there.
    Thanks,
    Alex
    public synchronized String saveEquipmentList() throws Exception {
    // Order is very important.
    if (FacesContext.getCurrentInstance().getRenderResponse()) {
    System.out.println("GOT RENDER RESPONSE... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    try {
    loadEquipmentCodesMap(); // Loads map from equip_code_ids in the DB.
    updateEquipCodesMap(); // Updates total for objcode/type to sum of equipment items for that objcode/type.
    saveEquipmentCodes(); // Saves to equipment_codes table.
    loadEquipmentCodesMap();
    updateDataList();
    savedataList();
    updateTotals();
    loadEquipmentList();
    catch (Exception e) {
    setErrMessage("Error saving equipment: " + e.getMessage());
    return "success";
    }else{
    //facesContext.getCurrentInstance().renderResponse();
    return "success";
                                <h:panelGroup id="pg54">
                                  <h:commandButton id="save" disabled="#{(user.role == '2' and backing_equipmentScreen.viewOnly) or
                                                                                          (user.role == '1' and !backing_equipmentScreen.viewOnly)}"
                                                   value="Save"
                                                   action="#{backing_equipmentScreen.saveEquipmentList}"
                                                   styleClass="input"/>
                                </h:panelGroup>

    Here's the phase listener output before clicking the "Save" button (which calls the saveEquipmentList() action method), I pasted it all, from app started to breakpoint, couldn't get it all in due to the 30K char constraint:
    [EJB 3.0]: Assigning default-data-source=jdbc/FedAppDS, specified in projects EJB 3.0 properties
    [Starting OC4J using the following ports: HTTP=8992, RMI=23898, JMS=9233.]
    C:\Dev\JDeveloper10.1.3.3\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config>
    C:\Dev\JDeveloper10.1.3.3\jdk\bin\javaw.exe -server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=53366 -classpath C:\Dev\JDeveloper10.1.3.3\j2ee\home\oc4j.jar;C:\Dev\JDeveloper10.1.3.3\jdev\lib\jdev-oc4j-embedded.jar -Xms256m -Xmx1024m -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\Dev\JDeveloper10.1.3.3\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    Listening for transport dt_socket at address: 53366
    Debugger connected to local process.
    Sep 16, 2009 11:00:34 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
    Sep 16, 2009 11:00:34 AM com.evermind.server.jms.JMSMessages log
    INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
    Sep 16, 2009 11:00:44 AM com.evermind.server.ejb.logging.EJBDeploymentMessages warningGetBeansFromEJBModule
    WARNING: [current-workspace-app:Fed-EOY-EXP_UserInterface_0] EJB module contains no beans.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 19859 ms.
    Target URL -- http://10.1.38.77:8992/Fed-EOY-EXP/faces/login.jspx
    09/09/16 11:00:48 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Short,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Short)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Byte,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Byte)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Integer,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Integer)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Long,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Long)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Float,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Float)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Double,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Double)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ValidatorRule end
    WARNING: [ValidatorRule]{faces-config/validator} Merge(javax.faces.LongRange)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.DateTime,null)
    Sep 16, 2009 11:01:00 AM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Number,null)
    Sep 16, 2009 11:01:01 AM com.sun.faces.config.rules.NavigationRuleRule end
    WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(*)
    09/09/16 11:01:02 BeforePhase: RESTORE_VIEW 1
    Sep 16, 2009 11:01:02 AM oracle.adfinternal.view.faces.application.ViewHandlerImpl _checkTimestamp
    INFO: ADF Faces is running with time-stamp checking enabled. This should not be used in a production environment. See the oracle.adf.view.faces.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    09/09/16 11:01:02 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:02 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:05 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:05 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:05 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:05 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:05 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:05 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:05 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:05 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:05 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:06 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:06 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:06 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:06 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:10 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:10 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:10 BeforePhase: APPLY_REQUEST_VALUES 2
    09/09/16 11:01:10 AfterPhase: APPLY_REQUEST_VALUES 2
    09/09/16 11:01:10 BeforePhase: PROCESS_VALIDATIONS 3
    09/09/16 11:01:11 AfterPhase: PROCESS_VALIDATIONS 3
    09/09/16 11:01:11 BeforePhase: UPDATE_MODEL_VALUES 4
    09/09/16 11:01:11 AfterPhase: UPDATE_MODEL_VALUES 4
    09/09/16 11:01:11 BeforePhase: INVOKE_APPLICATION 5
    09/09/16 11:01:11 LoginBean.login(): Here I is...1
    09/09/16 11:01:11 LoginBean.login(): Here I is...2
    09/09/16 11:01:11 LoginBean.login(): Here I is...2.1
    09/09/16 11:01:11 LoginBean.login(): Here I is...2.2
    09/09/16 11:01:11 LoginBean.login(): Here I is...3
    09/09/16 11:01:11 LoginBean.login(): Here I is...4
    09/09/16 11:01:11 LoginBean.login(): The user's full name is Red Sonia.......................................
    09/09/16 11:01:11 LoginBean.login(): The user's role is Admn.......................................
    09/09/16 11:01:11 LoginBean.login(): Here I is...5
    09/09/16 11:01:11 AfterPhase: INVOKE_APPLICATION 5
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:11 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:11 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:11 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:11 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:11 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4027 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4173 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5027 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5173 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6027 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6027
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_STAFF_ID) FROM FED_STAFF WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6173 AND SALARY > 0
    09/09/16 11:01:12 The select sql is: SELECT COUNT(CONTRACT_ID) FROM CONTRACT WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 6173
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 3120
    09/09/16 11:01:12 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 3130
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 3131
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4041
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4048
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 4367
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5126
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 5323
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 8600
    09/09/16 11:01:13 The select sql is: SELECT COUNT(FED_BUDGET_ID) FROM FED_BUDGET WHERE ADMIN_UNIT_CODE = '21050' AND GRANT_SOURCE_CODE = 9013
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:13 BeforePhase: RENDER_RESPONSE 6
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.webapp.AdfFacesFilterHelperImpl startFilter
    WARNING: AdfFacesContext had not been properly released on earlier request.
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.AdfRenderingContext attach
    WARNING: Trying to attach AdfRenderingContext to a thread that already had one.
    Sep 16, 2009 11:01:13 AM oracle.adfinternal.view.faces.renderkit.core.CoreRenderKit encodeFinally
    WARNING: No AdfRenderingContext available
    09/09/16 11:01:13 AfterPhase: RENDER_RESPONSE 6
    09/09/16 11:01:16 BeforePhase: RESTORE_VIEW 1
    09/09/16 11:01:16 AfterPhase: RESTORE_VIEW 1
    09/09/16 11:01:16 BeforePhase: APPLY_REQUEST_VALUES 2
    .

  • Firing a method of backing bean on Page Load

    Hi all,
    Can anyone tell me how a method of the backing bean can be fired when the corresponding jsf page loads in the browser...
    in fact some data is to be fetched from the server at the time of page load and rendered in one of the fields ... kindly help me in this regard ...
    thanks in advance,
    Neeraj Upreti

    You can use a constructor or initialization block of the bean for this or maybe even introduce lazy loading in the getters, all depending on the expensiveness of the actual logic.
    If you're using JSF 1.2, you can also use the beforePhase attribute of the <f:view> to specify a method which is to be fired on beforePhase of the view. You can also add @PostConstruct annotations to the methods which are to be fired on construction of the bean.

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

  • 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

Maybe you are looking for