Calling a backing bean method by clicking on an image.

I have several HtmlGraphicImage (h:graphicImage) objects on a page. I would like to be able to call a method inside the backing bean for the JSP page where the images are located when the user clicks on one of the images, and have a parameter sent to that method in the backing bean that will tell it which image was clicked on.
How can this be done? Unlike buttons that have an action that gets listend to in the backing bean, HtmlGraphicImage objects do not have actions. I know that you can intercept clicks by an onClick Javascript method, but how can you call a mehtod in the backing bean using the Javascript onClick?
For example, part of my JSP looks like this:
           <body style="background-color: rgb(255, 255, 255); -rave-layout: grid">
                <h:form binding="#{InitialReport.form1}" id="form1">
                    <h:graphicImage binding="#{InitialReport.frontalImage}" height="204" id="frontalImage" style="left: 144px; top: 240px; position: absolute" width="242"/>
                    <h:graphicImage binding="#{InitialReport.profileImage}" height="198" id="profileImage" style="left: 432px; top: 240px; position: absolute" width="244"/>
                    <h:graphicImage binding="#{InitialReport.smileImage}" height="198" id="smileImage" style="left: 720px; top: 240px; position: absolute" width="244"/>If my backing bean (InitialReport.java) had a method that looked like this:
  public void setCurrentImage(String imageName)what would the javascript look like in order to send a name to setCurrentImage?
Thanks!

you can use the <h:button> with type='image'Thanks for the reply, but I cannot use that. The thing is, the images are read at run time from a database and are not present in the resources. The button's image only takes String file names, not URLs.
There should be a way to do this using onClick.

Similar Messages

  • Calling a backing bean method after load of fragment in adf

    I needed to call a backing bean method after page load of fragment in adf.
    I used the method suggested in:
    https://community.oracle.com/message/11044570
    only difference is im giving the if clause as:
    if (refreshFlag == RegionBinding.RENDER_MODEL ) {
    instead of
    if (refreshFlag == RegionBinding.PREPARE_MODEL)
    It was working fine, but page was not getting refreshed so used the code as mentioned in example:
    public void refresh() {
              FacesContext facesContext = FacesContext.getCurrentInstance();
              String refreshpage = facesContext.getViewRoot().getViewId();
              ViewHandler  viewHandler =facesContext.getApplication().getViewHandler();
              UIViewRoot viewroot =  viewHandler.createView( facesContext, refreshpage);
              viewroot.setViewId(refreshpage);
              facesContext.setViewRoot(viewroot);
    Now issue is once page is loaded and backing bean method is called, the refresh code refreshes the page and upon page load, refresh method is called again in recursive fashion.
    please advise what to do in such scenario?
    I tried to do selective refresh using some variable(also with static) but it does not help as page wont be refresh at all or page will keep refreshing recursively.

    Use clientListener on the page load event
    <af:document id=”d1″>
        <af:serverListener type=”onloadEvent”
                           method=”#{<managedbean name>.<method name>}”/>
        <af:clientListener method=”onLoadClient” type=”load”/>
        <af:resource type=”javascript”>
        function onLoadClient(event) {
          AdfCustomEvent.queue(event.getSource(),”onloadEvent”,{},false);
          return true;
        </af:resource>

  • Call a backing bean method using h:selectBooleanCheckbox of jsf on select

    I want to call a backing bean method using h:selectBooleanCheckbox of jsf on select and deselect.
    I cannot use af:selectBooleancheckBox of adf and h:selectBooleanCheckbox doesnot have the property of autosubmit="true"

    User,
    please don't duplicate your posts on this forum ({thread:id=2369739})
    If you don't get an answer right away it might be that there is some information missing or nobody had time to work on the issue. Pleas be patience...
    We all have other work to do to get our bills paid.
    If you can't wait open a support request with support.oracle.com
    Timo

  • How to call the backing bean method through javascript

    Hi
    I have a command button associated with actionListener . Action Listener method associated with backing bean methods.
    I want to fire the event on command button and backing bean method should be invoked from javascript dynamically.
    can anybody help me asap

    JSF<h:form id="formId">
        <h:commandButton id="buttonId" value="submit" actionListener="#{myBean.action}" />
    </h:form>JSdocument.getElementById('formId:buttonId').click();

  • How to call the backing bean method through javascript by closing window?

    Hi all,
    What I want to do is:
    I open a new page by clicking <t:commanLink.../> from the first page. Then I close the new page. By closing the new page I will call a function in the backing bean such as myBean.doSomething() to do something. Such like:
    <body onUnload=jsFunction()..../>
    ...

    So far I understand, I should write following code
    in my second page:
    <html>
    <head>
    <script type="txet/javascript">
    function jsFunction()
    {>
    ocument.forms[0].action="#{myBean.doSomething}";
    document.forms[0].submit();
    </scrip>
    </head>
    <body onunload="jsFunction()">
    <ui:composition>
    <h:form id="myForm">
    <t:commandLink id="myLink" immediate="true"
    action="#{myBean.doSomething}"
    value=""></t:commandLink>
    </h:form>
    </ui:composition>
    Is that right? I am not sure if I've the javascript
    in the right position.I am sorry! That solution will not work. My Bad.
    You can try this.
    1) Have a invisible command button on your first page with the action attribute set to "#{myBean.doSomething}" as below
    <t:commandButton style="width:0px;height:0px" id="myButton" immediate="true"
    action="#{myBean.doSomething}"
      value=""></t:commandButton>2) Your JS onunload method on the second page should look like
    <script type="txet/javascript">
       function jsFunction()
    var buttonObject= window.parent.document.getElementById("formname:myButton");
    buttonObject.click(); // This would help in submitting the first page
    // to submit to the needed action method
    </script>Karthik

  • Urgent: calling my backing bean method.

    I have a menu option implemented as a <h:commandLink> component and I want to call a MailBoxBean's method call checkMailBox(). This method checks some information on a database and returns a "success" String if everything is ok. The Bean is "configured" so that redirects to a mailbox.jsp if the "success" String is thje outcome. The information is shown on mailbox.jsp.
    The problem is that I can't get to the checkMailBox() method through the <h:commandLink> component although I have written the action attribute like this: <h:commanLink action="#{mailbox.checkMailBox}">.
    What's wrong with this?

    Thanks for answering so quickly. The fact is that I have my Bean declared and the navigation rule setted both in my faces-config.xml file.
    The firts problem I am having is that the menu option implemented with that <h:commandLink> component is not correctly rendered as I get some kind of javascript error, but I can see much more cause I'm using MS's Explorer.
    <h:commanLink action="#{mailbox.checkMailBox}" immediate="true">
    <h:outputText value="Check mailbox"/>
    </h:commandLink>
    Is these correct??

  • How to call backing bean method when user tabs out of af:inputListOfValues field

    Hi,
    I am using jdev 11.1.2.4.
    I want to call a backing bean method based on the value selected in the af:inputListOfValues field.
    The requirement is similar as Frank Nimphius-Oracle has demonstrated here  https://blogs.oracle.com/jdevotnharvest/entry/how_to_notify_the_server but with Input List of Values component.
    The fields I want to call method from is
    <af:inputListOfValues id="appealNameId"
                          popupTitle="Search and Select: #{bindings.AppealName.hints.label}"
                          value="#{bindings.AppealName.inputValue}"
                          label="#{bindings.AppealName.hints.label}"
                          model="#{bindings.AppealName.listOfValuesModel}"
                          required="#{bindings.AppealName.hints.mandatory}"
                          columns="#{bindings.AppealName.hints.displayWidth}"
                          shortDesc="#{bindings.AppealName.hints.tooltip}"
                          binding="#{backingBeanScope.backing_Donation.appealNameId}"
                          autoSubmit="true" clientComponent="false">
                          <f:validator binding="#{bindings.AppealName.validator}"/>
                          <af:autoSuggestBehavior suggestedItems="#{backingBeanScope.backing_Donation.onSuggestAppeal}"/>
                          <af:clientListener method="onBlurTxtField" type="blur"/>
    </af:inputListOfValues>
    <af:serverListener type="onBlurNotifyServer"
                       method="#{backingBeanScope.backing_Donation.onBlurNotify}"/>
    as you can see,  af:serverListener is outside the af:inputListOfValues which probably is the reason its not executing this method?
    public void onBlurNotify(ClientEvent clientEvent) {
       // get a hold of the input text component
       RichSelectOneChoice inputTxt =  (RichSelectOneChoice) clientEvent.getComponent();
       //do some work on it here (e.g. manipulating its readOnly state)
       //Get access to the payload
       Map  parameters = clientEvent.getParameters();
       System.out.println("SubmittedValue = "+parameters.get("submittedValue"));
       System.out.println("LocalValue =  "+parameters.get("localValue"));
    I've tried to put serverListener tag inside the <af:inputListOfValues> but getting below error
    "Server Listener is not valid child of Input List of Values"
    any ideas please?
    thanks

    As first, check to see that you are using correct type for af:serverListener (thet one you are queue in the javaScript onBlurTxtField function)
    If still does not work, go to directly to the page source code, and put af:serverListener "by hand", as a child for af:inputListOfValues.
    Because it is possible that these messages are false alarm...

  • How to call Backing Bean method from href tag in JSF. -- URGENT

    Hi guys,
    i am new to JSF. i want one option. how to call a backing bean method from href.
    I searched a lot. i found one component <commandLink>, but i cann't use <commandLink> i have to use only href which is client instructions.
    If anyone knows pls help me. Its Urgent. If u can, give me the code also.
    Suggestions will be appreciated.
    Thanks
    Rajesh

    You can make use of the constructor of the backing bean or the @PostConstruct annotation if you want to use managed properties.
    You may get some ideas out of this: [http://balusc.blogspot.com/2006/06/communication-in-jsf.html].

  • Is it possible to call any Managed Bean method from af:goLink

    Hi,
    I am using RichGoLink component.
    Is it possible to call a managed bean method on click of the af:goLink? I want to provide some validations when user clicks on the goLink.
    There is no any actionListener provided.
    Thanks in advance.

    Hi,
    I am able to resolve my second problem also.
    i wanted to set the "destination" of the goLink on the fly. To do this I created a custom componnt by extending the RichGoLink and I override the encodeBegin method in that class. In this method i check my condition and then set the "destination" property.
    I am still using the clientListener and the serverListerner to do some further testing that i wanted to. Here one thing you have to keep in mind that. In the javascript function that we are calling in the clientListener should not do the "cancel" on the event object, if you do so it will not navigate to the required position.
    Thanks for the way you showed to resolve my problem. Hope you understand the way i worked for this solution.

  • How to call backing bean method from java script

    Hi,
    I would like to know how to call backing bean method from java script.
    I am aware of serverListener and [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    but i am running in to some issues with [AjaxAutoSuggest article|http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html]
    regarding which i asked for help in other thread with subject ....Question on AjaxAutoSuggest article (Ajax Transactions Using ADF and J...)
    The reason why i posted is ( though i realise both are duplicates) .. that threads looks as a specific question to that article hence i would like to ask the quantified problem is asked in this thread.
    So could any please letme know how to call backing bean method from java script
    Thanks
    Murali
    Edited by: mchepuri on Oct 24, 2009 6:17 PM
    Edited by: mchepuri on Oct 24, 2009 6:20 PM

    Hello,
    May know how to submit a button autoamtically on onload of page with clicking a welcome alert box. the submit button has managed button too to show a message on console using SOP.
    the problem is.
    1. before loading the page a javascript comes on which i clicked ok
    2. the page gets loaded and the button is there which gets automatically clicked and the managed bean associated with prints a message on console using SOP.
    I m trying to do this through server listener and click listener. the code is(adf jspx page)
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.backing_check4.d1}">
    <af:form id="f1" binding="#{backingBeanScope.backing_check4.f1}">
    <af:commandButton text="commandButton 1"
    binding="#{backingBeanScope.backing_check4.cb1}"
    id="cb1" action="#{beanCheck4.submit1}"/>
    <af:clientListener type="click" method="delRow"/>
    <af:serverListener type= "jsServerListener"
    method="#{backingBeanScope.backing_check4.submit1}"/>
    <f:facet name="metaContainer">
    <af:resource type ="javascript">
    x=confirm("hi");
    // if(x){
    delRow = function(event){
    AdfCustomEvent.queue(event.getSource(), "jsServerListener", {}, false);
    return true;
    </af:resource>
    </f:facet>
    </af:form>
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_check4-->
    </jsp:root>
    the backing bean code is -----
    public class classCheck4 {
    public classCheck4() {
    public String submit1() {
    System.out.println("hello");
    return null;
    }

  • ***How to Invoke backing bean method by DOUBLE-CLICK the table ROW!!***

    Hi,
    How can I collect the selected row value & navigate to next page by DOUBLE-CLICK the result table row.
    My application got searchResult page where I am displaying the list of user in result table. Then selecting any one row and navigating to master details page by clicking the continue button. Button Action method will collect the selected row userID which I am forwarding to the masterDetails page.
    Same functionality I want to do by double click the row instead of clicking the button!!. I want to trigger the backing bean method if the user double click the row basically. Please help me in this how to do this?
    Current button action method:
    *public String userSelected() {*
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    System.out.println("selectedNetID -->"+selectedNetID);
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    return "continue";
    *}*

    Puthanampatti ,
    Yes, I am using the same. Below is my code. I am trying to get the object of the MAIN jspx page region (where I am displaying the fragments) and refresh the one. But cant able to get the object for the region it is returning null. without refresh seems the navigation wont work.
    public void doDbClick(ClientEvent clientEvent) {
    FacesCtrlHierNodeBinding binding = (FacesCtrlHierNodeBinding) searchResultTable.getSelectedRowData();
    currentRow = binding.getRow();
    selectedNetID = (String) currentRow.getAttribute("netid");
    System.out.println("selectedNetID -->"+selectedNetID);
    requestContext.getPageFlowScope().put("netid",selectedNetID);
    try{
    FacesContext facesCtx = FacesContext.getCurrentInstance();
    NavigationHandler nh = facesCtx.getApplication().getNavigationHandler();
    nh.handleNavigation(facesCtx, "", "continue");
    System.out.println("region obj -->" +facesCtx.getViewRoot().findComponent("advse1"));
    // Refresh the current region; advse1 is the id of the region component inside jspx page
    AdfFacesContext.getCurrentInstance().addPartialTarget(facesCtx.getViewRoot().findComponent("advse1"));
    catch(Exception e){
    System.out.println("Error is: " +e);
    Is this correct coding to get the region object?? actually the "result table" and "Master details" are 2 different fragments which are linked with task-flow and the task flow is part of main jspx page as a region. I am using that region ID to get the obj, but cant able to get so....!!! any idea

  • SelectOneMenu: How can I fire a backing bean method just when click

    I want that when just I click one option of Dropdown list it fires a backing bean method.
    The method must take the new value of dropdown, to execute a SQL to populate a new (another one) dropdown list and refresh the page.
    My code
                            <h:commandButton id="button1" style="left: 216px; top: 216px; position: absolute" value="Cancelar"/>
                            <h:commandButton id="button2" style="left: 312px; top: 216px; position: absolute" value="Generar"/>
                            <h:outputLabel for="componentLabel5" id="componentLabel5" style="left: 120px; top: 0px; position: absolute">
                                <h:outputText id="componentLabel5Text" value="Título de la Página"/>
                            </h:outputLabel>
                            <h:selectOneMenu immediate="true" value="#{fgstb.ctoId}"  valueChangeListener="#{fgstb.cambiaValorCtos}" id="dropdown1" style="left: 264px; top: 72px; position: absolute; width: 120px">
                                <f:selectItems id="dropdown1SelectItems" value="#{fgstb.ctos}"/>
                            </h:selectOneMenu>
                            <h:selectOneRadio id="radioButtonList1" layout="pageDirection" style="left: 48px; top: 48px; position: absolute" value="#{fgstb.modo}">
                                <f:selectItem id="radioButton1" itemLabel="Generar Campeonato" itemValue="1"/>
                                <f:selectItem id="radioButton2" itemLabel="Generar desde Campeonato" itemValue="2"/>
                                <f:selectItem id="radioButton3" itemLabel="Generar Todos Campeonatos" itemValue="3"/>
                            </h:selectOneRadio>It works fine but when I push a button and I would like it works when I click over dropdown list.
    Thank you

    Hi,
    You can simply add onchange="submit()" attribute to your component to allow form to be submited when the coomponent value is changed, and add also a value change listener to allow JSF to be notiifed for component value change event :
    <h:selectOneMenu onchange="submit()"  valueChangeListener="#{fgstb.cambiaValorCtos}"
                              immediate="true" value="#{fgstb.ctoId}"   id="dropdown1" style="left: 264px; top: 72px; position: absolute; width: 120px">
                                <f:selectItems id="dropdown1SelectItems" value="#{fgstb.ctos}"/>
    </h:selectOneMenu>

  • ADF Faces Declarative Component onLoad event call Backing Bean Method

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

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

  • Calling Backing Bean Method with h:outputLink

    Is there a way to call a backing bean using h:outputLink isntead of h:commandLink ?

    No, you can't. You however can just let it point to a JSF page and make use of the constructor of the involved request scoped managed bean.

  • JSF Problem invoking backing bean method

    I want a backing bean method to be invoked when the submit button is clicked but for some strange reason the method is not getting invoked any Help in this regards would be great.
    I am able to properly get the values from database and display on the page , after the user types in some more additional information like password , hint question the form has to be submitted when clicked on the submit button..
    Register.jsp
    <body>
         <f:view>
         <h:graphicImage url="/header.jpg"></h:graphicImage>
               <br><h:form id="user">
                        <table>
                        <tr>
                             <td>
                                  <h:outputLabel for="" value="uUser Name:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                                  <h:inputText onblur="JavaScript:doSubmit();" value="#{registerFormBean.userName}" id="userName"></h:inputText>
                             </td>
                        </tr>
                        <tr>     
                             <td>
                             <h:outputLabel for="" value="First Name:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputText value="#{registerFormBean.firstName}" id="firstName"></h:inputText></td>
                        </tr>
                        <tr>     
                             <td><h:outputLabel for="" value="Middle Name:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputText id="middleName" value="#{registerFormBean.middleName}"></h:inputText></td>
                        </tr>
                        <tr>     
                             <td><h:outputLabel for="" value="Last Name:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputText id="lastName" value="#{registerFormBean.lastName}"></h:inputText></td>
                        </tr>
                        <tr>
                             <td>
                                  <h:outputLabel for="" value="Password:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                                  <h:inputText id="password" value="#{registerFormBean.password}"></h:inputText>
                             </td>
                        </tr>
                        <tr>     
                             <td><h:outputLabel for="" value="Re-type Password:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputText></h:inputText></td>
                        </tr>
                        <tr>     
                             <td><h:outputLabel for="" value="Password Hint Question:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputTextarea id="hintQuestion" value="#{registerFormBean.hintQuestion}"></h:inputTextarea></td>
                        </tr>
                        <tr>     
                             <td><h:outputLabel for="" value="Password Hint Answer:" styleClass="orderlabelcell"></h:outputLabel></td><td>
                             <h:inputTextarea id="hintAnswer" value="#{registerFormBean.hintAnswer}"></h:inputTextarea></td>
                        </tr>
                        <tr>     
                             <td>
                                  <h:commandButton id="submit" value="Submit" type="submit" action="#{registerFormBean.saveUser}"/>
                                  <h:commandButton id="Reset" value="Reset" type="reset"/>
                                  </td>
                        </tr>
                        </table>
                   </h:form>
         </f:view>
    </body> 
    RegisterFormBean.java
      package services;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import dao.DatabaseHandler;
    import model.User;
    public class RegisterFormBean {
    User selectedUser;
    String userName;
    String firstName;
    String middleName;
    String lastName;
    String password;
    String hintQuestion;
    String hintAnswer;
    String errMsg;
    private DatabaseHandler dbHandle;
    public RegisterFormBean() {
         javax.faces.context.FacesContext context = javax.faces.context.FacesContext.getCurrentInstance();
         javax.faces.application.Application app = context.getApplication();
         dbHandle = (DatabaseHandler)app.createValueBinding("#{databaseHandler}").getValue(context);
    public void setUserDetails() {
         try{
              System.out.println("gettting Details for user: "+userName);
              selectedUser = (User)dbHandle.getUser(userName);
         catch (SQLException e) {
              errMsg = "Problem gettting records";
    public String getUserName() {
         if(null!=userName){
              setUserDetails();
         if(null!=selectedUser)
              return selectedUser.getLoginName();
         else
         return "";
    public void setUserName(String userName){
         this.userName = userName;
    public String getFirstName() {
         if(null!=selectedUser)
              return selectedUser.getFirstName();
         else
         return "";
    public void setFirstName(String firstName) {
         System.out.println("in setFirst name");
         this.firstName = firstName;
    public String getMiddleName() {
         if(null!=selectedUser)
              return selectedUser.getMiddleName();
         else
         return "";
    public void setMiddleName(String middleName) {
         System.out.println("in set middle name...");
         this.middleName = middleName;
    public String getLastName() {
         if(null!=selectedUser)
              return selectedUser.getLastName();
         else
         return "";
    public void setLastName(String lastName) {
         System.out.println("in set last name....");
         this.lastName = lastName;
    public String getPassword() {
         return password;
    public void setPassword(String password) {
         if(null!=password){
              System.out.println("$$$$$$$$$$$$ setting password.."+password);
              selectedUser.setPassword(password);
    public String getHintQuestion() {
         return hintQuestion;
    public void setHintQuestion(String hintQuestion) {
         if(null!=hintQuestion){
              System.out.println("#########  Hint Question "+hintQuestion);
              selectedUser.setHintQuestion(hintQuestion);
    public String getHintAnswer() {
         return hintAnswer;
    public void setHintAnswer(String hintAnswer) {
         if(null!=hintAnswer){
              System.out.println("@@@@@@@  Hint Answer"+hintAnswer);
              selectedUser.setHintQuestion(hintAnswer);
    public String saveUser(){
         String flag = "";
         System.out.println("IN registerUser Method....");
         try{
              if(null!=selectedUser){
                   flag = dbHandle.registerUser(setUserDefaults(selectedUser));
         catch(SQLException se){
         flag="fail";
         System.out.println("FAILED DUE TO THE EXCEPTION :- "+se.getMessage());
         errMsg = "Unable to Register the User...";
         return flag;
    public User setUserDefaults(User user){
         System.out.println("SETTING USER DEFAULTS.....");
         user.setActive(true);
         user.setLoginType("False");
         user.setCreatedUserName("SOMEUSERNAME");
         user.setSecIdFunctionGroup(17);
         user.setChallangeWord("CHANGE IT");
         user.setTrusted(false);
         user.setUserTypeIdTypeOf(1);
         user.setChangePwdNextLogin("False");
         user.setLoginIsDisabled(false);
         user.setPasswordNeverExpires(false);
         user.setThinWorkOrder(false);
         user.setCurrencyTypeId(2);
         return user;
    I am able to fetch the details from Database and display on the page so DAO is working properly hence not copying here
    faces-config.xml
      <?xml version="1.0" encoding="UTF-8"?>
    <!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>
    <managed-bean>
      <managed-bean-name>databaseHandler</managed-bean-name>
      <managed-bean-class>dao.DatabaseHandler</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
      <managed-bean-name>registerFormBean</managed-bean-name>
      <managed-bean-class>services.RegisterFormBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
      <from-view-id>/Register.jsp</from-view-id>
      <navigation-case>
       <from-outcome>success</from-outcome>
       <to-view-id>/Success.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    </faces-config>

    A conversion or validation error may have been occurred. Add <h:messages/> to the page to note them all. If you're using at least Sun Mojarra 1.2, then you should be able to note them all in the application server logs.

Maybe you are looking for

  • PROVIDE SYNTAX?

    Hi, If i take one infotype data we are taking like this... PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA. WRITE: P0002-PERNR, P0002-NACHN, P0002-VORNA. ENDPROVIDE. But i want multiple infotypes data like 0000,0006,0008....?Give me the syntax of

  • How to integrate BRF+ application in WEBDynpro abap

    Hello, Can anybody tell me , how to integrate BRFPLUS application to Webdynpro components. is their any configuration or code is available for the same? Thanks Rakshar

  • WEBSITE BLOCKING ON WRT54G V6 (Firmware Version: v1.02.8)

    Hello Friends, Short: why some webpages block and others don't using this feature in my router?  As mentioned above, I run a small office and  am using an ::: WRT54G V6 (Firmware Version: v1.02.8) ::: router. For instance, I have been successful in b

  • Witch specifikation will i need to run AutoCad via bootcamp (Window version)

    In order to run AutoCad on a Macbook Pro via bootcamp, what kind of specification will i need ??? I´m thinking about the 17 inch Macbook Pro. About processors i have to choises, either the 2,2 with 6 mb L3 and turbo-boost up to 3,4 or the 2,3 with 8

  • Startup

    I'm a new in Oracle Form. If I developed a few Oracle forms, how can I set one form as Startup ?