Problem in inputText field

I am creating an application for changing profile of a customer. I want the textbox should show the value extracted from database as well as it should update the value if it is changed.
My problem is, if we want to show a value in text box syntax is
<h:inputText id="name" value="xyz"/>and if we want to attach the field to a bean property then it is
<h:inputText id="name" value="#{loginBean.name}"/>now how to use both.

Hi BalusC
I am explaining my problem briefly. I have the information about the customer in my database. Now i want to provide a form where user can able to change the profile.
The text box should display the data extracted from the database and if any modification done then it should update.
The combobox should show the proper value when the change profile page should open.

Similar Messages

  • Problem mapping inputText field to a variable in a data control

    I have encountered the following problem. Please help. Any feedback is appreciated.
    I have a page that contains first name, last name, address, city, state zip and country input text fields and a submit button. When the submit button is clicked, user entered information will be commited to database. This is easily achieved by using a managed bean.
    Now I would like to achieve the same functionality by using data control. The reason I want to use data control is to avoid putting the controls (first name, last name, address, city, state zip and country) in the managed bean. I was hoping that they can be directly mapped to the data control variables. The data control is created from a Java object which contains attributes of first name, last name, address, city, state zip and country. The data control is dragged and dropped to a jsff page and the jsff looks like the following:
    <af:inputText label="First Name"
    value="#{bindings.firstName.inputValue}"
    required="true"
    maximumLength="25" autoSubmit="true"
    id="it10">
    </af:inputText>
    When I run the page, I can see the label First name but the input box was not shown. So I removed: value="#{bindings.firstName.inputValue}" and the input box appears.
    Why did that happen? Can I directly map a data control attribute to an input text field?
    Thank,
    Cecilia

    Thanks for the response, Shay. Really appreciate it.
    I tried your first solution - modified the property IsUpdateable to Updateable. However the input text box is still not appearing.
    My java class is just a simple Java class. In the class all I have is just a get method for a domain model object.
    In the jsff, if I assigned a value to the value attribute (value="Jane"), the input text box would appear as updateable.
    Any idea?

  • Problem with InputText field in JDeveloper

    Hi,
    I have this design of web page:
    http://img26.imageshack.us/my.php?image=76778817.tif
    but when I run the page I see this:
    http://img21.imageshack.us/my.php?image=60820183.tif
    And when I click Cancel which points to previous page and then from that previous page go again to this page I finally see what I want from the beginning:
    http://img21.imageshack.us/my.php?image=30068593.tif
    Any ideas what could be wrong inside the code of that page?
    Thanks a lot!

    Maybe I know where is the problem now. Because the Cancel button invokes this method:
    public void insureOneBlankRowInGlobals() {
    getGlobals().clearCache();
    getGlobals().insertRow(getGlobals().createRow());
    and the page definition looks like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="10.1.3.42.70" id="app_CreateGroupPageDef"
    Package="userinterface.pageDefs">
    <parameters/>
    <executables>
    <iterator id="GlobalsIterator" RangeSize="10" Binds="Globals"
    DataControl="SSKAppModuleDataControl"/>
    </executables>
    <bindings>
    <attributeValues id="GroupCode" IterBinding="GlobalsIterator">
    <AttrNames>
    <Item Value="GroupCode"/>
    </AttrNames>
    </attributeValues>
    <attributeValues id="Description" IterBinding="GlobalsIterator">
    <AttrNames>
    <Item Value="Description"/>
    </AttrNames>
    </attributeValues>
    <attributeValues id="Colour" IterBinding="GlobalsIterator">
    <AttrNames>
    <Item Value="Colour"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="insureOneBlankRowInGlobals"
    InstanceName="SSKAppModuleDataControl.dataProvider"
    DataControl="SSKAppModuleDataControl"
    MethodName="insureOneBlankRowInGlobals"
    RequiresUpdateModel="true" Action="999"
    IsViewObjectMethod="false"/>
    </bindings>
    </pageDefinition>
    I think I'll solve this if I call that method at start right? I'm still very new to this so where and what should I write? I think it should be in executables but I don't know how to do it:(

  • Updating data in h:inputText field

    In my <h:inputText> field, first time user enter a number to search, and the number saved in the session, later on from page to page navigation, sometime user can selected another order number , save the number in session and refresh the whole web content, the value in this <h:inputText> field should update the new number from session everytime the web page reloaded, this actually working fine in the <h:outputText> field as following code <h:outputText value="#{MyPageCode.orderNumber}"/> which getting the orderNumber from session,
    but it is not working in the <h:inputText> getting the new number from session, it always keep the first time user entered number there, can someone help me to solve the problem?
    Thanks a lot !
    <h:form styleClass="form">
      <h:outputText  value="Order#: "/>
         <h:inputText  value="#{mySession.orderNo}">  </h:inputText>
              <f:param name="orderNo" value="#mySession.orderNo}">
              </f:param>
    <h:commandLink  style="padding-top:3px;" action="#{myBean.searchAction}">
       <h:outputText  value="Search" >
       </h:outputText>
    </h:commandLink>
    <h:outputText  value="Order number is#: "/>
    <h:outputText value="#{MyPageCode.orderNumber}"/>
    </h:form>

    Here you are, hope I did not lost anything... Thanks!
    faces-config.xml:
    ====================
    <managed-bean>
              <managed-bean-name>mySession</managed-bean-name>
              <managed-bean-class>myManagedSession</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
                   <managed-bean-name>myBean</managed-bean-name>
                   <managed-bean-class>MyManagedBean</managed-bean-class>
                   <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
         <managed-bean>
                   <managed-bean-name>MyPageCode</managed-bean-name>
                   <managed-bean-class>MyManagedPageCode</managed-bean-class>
                   <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
         =================================
         public class MySession {
            private Integer orderNo;
                 public Integer getOrderNo() {
                      return orderNo;
                 public void setOrderNo(Integer orderNo) {
                      this.orderNo = orderNo;
                public void setOrderNumber(int on) {
                  // set order number in session
          ===================
           public class MyBean {
         public String searchAction() {
                   Integer orderNo = getMySession().getOrderNo();
                   if(orderNo != null){               
                      int orderNumber = orderNo.intValue();
                      getRequestScope().put("OrderNumber", new Integer(orderNumber));
                      getMySession().setOrderNumber(orderNumber);                    
                   return "page1";
         protected MySession getMySession() {
                   if (mySession == null) {
                        mySession = (MySession) getFacesContext()
                                  .getApplication().createValueBinding("#{mySession}")
                                  .getValue(getFacesContext());
                   return mySession;
    =========
    public class MyPageCode {
        public int  getOrderNumber() {
             // get from session
    }

  • Spaces in the inputText field

    Hi,
    Iam not sure of how best I can explain the problem I experience on my JSF pages.
    When i try to select a value from the drop down list..it is populating other fields on the page perfectly.
    One of the fields is Zipcode which has a validator on it
    Zip Code:
    <h:inputText id="text5" maxlength="5" size="5" immediate="true"
        value="#{processApplication.ownerZipcode}">
    <f:validator validatorId="zipcodeValidator"/></h:inputText>
    <font color="#FF0000"><h:message for="text5" /></font> When i make any changes and hit save button on the page...(Most of the times) I get a red color msg beside the zipcode field "Zipcode not valid" eventhough that field is blank.
    But, the cursor on that field is in the middle of the field which makes zipcodeValidator trigger becoz it cannot take any spaces.
    when i place the cursor to the front of the field and hit save...everythiing is fine.
    Why does the zipcode inputText field adds those spaces all by itself?
    Any clue?
    Any help is really really appreciated.

    Thanks BalusC!!
    Let me be more clear with this issue.
    I have four inputText fields with required = "#{param['form1:button3'] == 'Issue License'}"When I click on a link...
    These 4 text fields get the data(if any) from the database.
    Now, when I click on the "Issue License" command button , I should check if these 4 fields are not null.
    If any one of them is null, then I get the message "required field is missing" and I fill that field accordingly.
    Now, the problem is....
    When I click on a link...I noticed that the first field added few spaces by itself since the cursor is in the middle of the inputText box. Other 3 fields are normal and blank too i.e., all 4 fields did'nt get any data from DB.
    When I click "Issue License" command button, I get "required field is missing" msg, only for 3 inputText fields but not for the first one since the first one has already few spaces in it and the required attribute thinks it has some value in it.
    Now, how should I handle this situation?
    Do you think
    creating a converter for java.lang.String which converts empty/spacy strings to null would solve the problem?
    This happens in few other pages too.
    Please suggest me the solution.
    Thanks

  • Problem with currency  field in smart form

    hi
    friends ..
    i had problem with currency field in smartform iam printing 5 currecny
    fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
    each fields for ex.
    33,260.00
    120.00
    0.00
    0.00
    0.00
    i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i  get the value in char variable i get 2260.20 which i dont want .
    so pls help me how to condense or shift left and print the currency field on right place.
    regards
    answers will be rewarded points.

    hi,
    this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
    eve if not solve the problem use the TEMPLATE node..
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • Problem with a field set to refresh after insert at Row level

    hello all,
    i have a problem with a field (a serial) which is set by a db trigger at insertion. The field "refresh after insert" is properly set in the Entity and everything is refreshed correctly when i insert data via an adf form in a jspx but when i want to insert programmatically nothing is refreshed. I insert data this way :
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    newRow.setAttribute("mandatoryAttribute1",value1);
    newRow.setAttribute("mandatoryAttribute2",value2);
    <more init here but not the serial since it will be set by the DB trigger>
    insertVO.insertRow(newRow);
    but when i want to get back the value with "newRow().getAttribute("TheSerial");" i always get a null back and not the value set by the db trigger.
    One way to get the serial is to commit after each insert but i don't want to commit between inserts.
    i've tried to unset the refresh after insert and override the createDef() method to setUseReturningClause(false) as it's is advised in chapter 26.5 of the ADF 4GL dev. guide but in this case i have an exception JBO-29000: JBO-26041.
    How can i get the value back properly ?
    thanks
    -regards

    The data for the newly created row doesn't get inserted into the database until the commit is executed, so the insert trigger isn't called.
    If you need to get the value without committing, then you should implement the trigger programmatically and drop the trigger from the database. The code below shows how you could do this.
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    SequenceImpl seq = new SequenceImpl("MY_SEQ", insertVO.getDBTransaction());
    Long next = (Long)seq.getData();
    newRow.setAttribute("primaryAttribute", new Number(next));
    ...You will need to replace MY_SEQ and primaryAttribute with the correct values for your example, but this should acheive what you want.

  • Dynamic inputText fields values.

    Dear all,
    Please suggest solution on following:
    In my ADF/Trinidad project I have one view which is build dynamically by <tr:iteratior/> tag depending on amount of binding elements. Purpose of the page is to read parameter names from database and ask user to provide values for those parameters. Sample code:
    <tr:iterator var="items" first="0" value="#{bindings.parameters.collectionModel}" varStatus="status" id="ip">
         <tr:inputText Label="#{items.bindings.label.inputValue}" binding="#{backing_parameters.it}" id="it"/>
    </iterator>Once user resubmits page I need create pairs of parameter/value in backing bean and use it further in business logic. My challenge is to how actually obtain these values, provided by user if amount of fields (inputText) is only determined during runtime?
    Sorry if solution is too obvious. Please guide me to the correct way.

    I think I succeeded to resolve it:
    Solution:
    1. Create ValueChangeEvent on backing bean and map it to the inputText field
    2. Add <f:attribute/> tag to map inputText field to desirable value
    3. Handle event in backing bean and obtain new values and mapping to the field from ValueChangeEvent object.
    The only issue is if user does not change value of the field, then no event created and backing bean still does not know on existence of inputText field and its value
    <tr:iterator var="items" first="0" value="#{bindings.parameters.collectionModel}" varStatus="status" id="ip" >
         <tr:inputText valueChangeListener="#{backing_parameters.event}" label="#{items.bindings.label.inputValue}" binding="#{backing_parameters.it}" id="it">
              <f:attribute name="paramName" value="#{items.bindings.name.inputValue}"/>
         </inputText>
    </iterator>
    public void event(ValueChangeEvent actionEvent) {
        actionEvent.getComponent().getAttributes().get("paramName");
        actionEvent.getNewValue();
    }Thank you.

  • Secret inputText field on showOneTab is cleared when tab changes

    I have a secret inputTextField on a tab. If a change to another tab and then change back again the password is cleared.
    Is there a work around for this?
    Thanks
    Martin

    Hi frank,
    No, I don't do any extra submits.
    I have a simple af:showOneTab with a secret inputText field on tab 1. The secret textfield is bound to a property on a backing bean which contains the current value of a password. When I click on tab 2, than back to tab 1 the secret textfield has been cleared. I would add that there are non-secret fields on each tab which are not cleared.
    Martin

  • I have a problem in text field

    Hi All
      I have a problem in text field.
       First time  Text field is displaying correctly and looking good. When i will go to otherscreen and coming back to same screen text field is displaying as a normal text field and it is not appling and jquery mobile theme.
    Here is the code
    Please help me to solve this issue  ASAP.
    Thanks and Regards,
          Siva.
    Edited by: sivamurthy on Sep 26, 2011 2:23 PM
    Edited by: sivamurthy on Sep 26, 2011 2:43 PM

    You'll have to supply some more information for us to help you.  Among other things:
        - What version of SUP are you using?
        - What devices/emulators are you seeing this problem on?
        - Have you added any custom code?  If so, what is it?

  • How to keep the focus on the inputtext field.

    Hi,
    I'm using jdev 11.1.2.0
    I have two inputtext fields.
    when i tabout from firstinputtextfield , i'm calling a javascript to set focus on to the second textinput field.
    this is working fine.
    Second textfield has one server listner onblur event.
    When i add value change listener on the firstinputext field, after tabout from the first field , focus is going to set to next field and calling the serverlistener of the second field.
    how to make the not to call the serverlistner function of the second field when i tabout from the first field?(serverlistener is called only when i tabout from the second field on onblur event)(Thi is happening in ie8)
    Any suggestion would be appreciated.
    Thank you.

    If you have a value change listener it will send up ajax call when you tab out which may be have a bad interaction with your client listener. Instead of using a client listener you could try adding the javascript call to response from the value change listener. In your value change listener add a call to the javascript method that sets the focus
    public void addScriptToResponse(String script){
    ExtendedRenderKitService erkService = Service.getService(getFacesContext().getRenderKit(), ExtendedRenderKitService.class);
    erkService.addScript(getFacesContext(),script);
    }

  • SelectOneChoice to populate an InputText field

    I am using JDeveloper 10.1.3 and ADF, and I would like to have a DataBound SelectOneChoice dropdown list populate the selected value into another InputText field in the form. The destination is just a plain InputText field.
    From what I can see, the result of the selection HAS to go into some Base Data Source field, but that's not what I want to do. Is this not possible or is there another way to allow someone to populate a field from a dropdown list.
    Thanks.
    Andy

    Are you using ADF BC in the back end? Would it help if you added a transient attribute to the VO (ie one which is non database) and then you could simply return the value from the list into that (and so use the existing binding dialog?)
    Alternatively check out this.
    http://groundside.com/blog/GrantRonald?title=conditional_rendering_of_jsf_fields_depe&more=1&c=1&tb=1&pb=1
    You just need to do the first part of this example...i.e. create a proxy bind variable and return the value from the drop down into the bind var and then display this bind var in a text field on the page.
    Regards
    Grant Ronald

  • How do you clear an InputText field with a button click

    I am trying to create a calculator and I want to be able to use a "Clear" button that will reset all the values entered in several InputText fields and the total which is a label.     I can update and clear a label using the UpdateContext
    function, but this isn't working for an InputText field.   Can someone provide an example on how to clear one InputText field?

    Hello,
    To do this you need to do the following
    Add an "Input Text", select the inputText and click Express view (bottom right).
    Set the default value to
    textboxvalue
    without any quotes
    On the behaviour / OnVisible of screen you put the inputText on set for example the following
    UpdateContext({textboxvalue: "Enter text here"})
    You can now add several buttons on the screen that do something
    UpdateContext({textboxvalue: ""})
    or
    UpdateContext({textboxvalue: "Enter Text here"})
    Or you could chain it with another OnSelect that is going on on the screen and reset your textbox. You can then also add the value the user has entered in a collection too (see bottom example)
    Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
    Collect(inputcollection,{userinput: InputText1!Text});Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
    I believe this should point you in the right direction
    Regards
    StonyArc

  • How Can I hide InputText Field?

    Hi everybody..
    How can I hide a InputText Field from a af:table?
    I need to pass a value to a specific attribute. but I´d like to hide from user...
    is that possible?
    thanks again.

    The "rendered" attribute.
    <af:inputText rendered="true" />
    <af:inputText rendered="false" />
    I believe it supports EL.

  • Problem with Date fields in Search panel

    Hi all,
    I use TP2 and in my jspx page I have a search panel with two date fields and table where the results is displayed. But there is a problem with these date fields, because when I search dates the results is nothing even I retype the date from table. Also I have other pages where this problem exist with same structure.
    Could somebody help me with some advice?
    Thanks in advance!

    Hi Frank,
    Thanks for the answer.
    I use the standart method to make search panel with drag and drop the data control to the page. The other search panel fileds work fine, only the date fileds are problem. Maybe something in view object doesn't work properly.
    Here I post the code from my page.
    <table border="1" style="margin:5px;">
    <tr>
    <td>
    <af:showDetailHeader text="ТЪРСЕНЕ" disclosed="true"
    inlineStyle="width:780px;">
    <table cellspacing="2" cellpadding="3" border="0">
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.EGN.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.EGN.inputValue}"
    label="#{bindings.EGN.hints.label}"
    columns="#{bindings.EGN.hints.displayWidth}"
    maximumLength="#{bindings.EGN.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.LNC.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.LNC.inputValue}"
    label="#{bindings.LNC.hints.label}"
    columns="#{bindings.LNC.hints.displayWidth}"
    maximumLength="#{bindings.LNC.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.AccPersonID.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.AccPersonID.inputValue}"
    label="#{bindings.AccPersonID.hints.label}"
    columns="#{bindings.AccPersonID.hints.displayWidth}"
    maximumLength="#{bindings.AccPersonID.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.PersonName.hints.label}"/>
    </td>
    <td align="left" colspan="5">
    <af:inputText value="#{bindings.PersonName.inputValue}"
    label="#{bindings.PersonName.hints.label}"
    columns="#{bindings.PersonName.hints.displayWidth}"
    maximumLength="#{bindings.PersonName.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.DateFrom.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateFrom.inputValue}"
    label="#{bindings.DateFrom.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateFrom.format}"/>
    </af:inputDate>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.DateTo.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateTo.inputValue}"
    label="#{bindings.DateTo.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateTo.format}"/>
    </af:inputDate>
    </td>
    </tr>
    <tr>
    <td align="right">
    <af:commandButton actionListener="{bindings.Execute.execute}"
    text="#{bundle.FindBtn_LABEL}"
    disabled="#{!bindings.Execute.enabled}"
    icon="/images/find.png"/>
    </td>
    <td align="left">
    <af:commandButton text="#{bundle.FindClearBtn_LABEL}"
    icon="/images/find_clear.png"
    action="#{PeopleBean.onClearVCBtn}"/>
    </td>
    </tr>
    </table>
    </af:showDetailHeader>
    </td>
    </tr>
    </table>
    Also I have a result table for the search panel, but I don't believe the problem can be there because it works fine when I search in fields different by inputDate.
    Do you have any suggestions?

Maybe you are looking for

  • External Hard Drive and iTunes

    I've been having a problem lately with one of my USB outlets, and evidence of that is provided by the fact that my External Hard Drive icon on my bottom right task tray keeps repeating the fact that it's plugged in. The wire is loose or something, bu

  • Sync w/o .Mac

    I have a .Mac account that I use to sync my iMac and Macbook, but I would like to sync my wife's account too. She doesn't need anything else except the sync to the family memebership is a bit steep just to sync her stuff b/c the Macs. Are there any o

  • Approval Tempate Terms Query Problem

    I have a query that i've included in the Approval Tempate - Terms Tab, that checks to see if any order lines after discount price is less than a Item UDF minimum price for the item. It is as follows: SELECT DISTINCT 'True' FROM  [dbo].[ORDR] T0 (nolo

  • Books, Best Practice, CM Guides

    Hi, Can anybody point me towards a best practice, SCM Book or any other documentation that gives practical advice on how to set up and use SCM from a Config. Managers point of view - not a developers. The supplied documentation seems to be a bit thin

  • Labview version problem?

    Hello guys, I have made a subVI that controls the rpm % of a wind tunnel vane. This consists in adquiring 2 values of data within 30 seconds and compare both to see the uniformity of the flux. I use a Labview 2011 version. The problem occurs when i u