Immediate postback does not retain field values under a dataTable

A fairly common input dialog requirement is allowing the user to enter a variable number of rows of data -- as a concrete example say the form has one <h:inputText/> for a subject followed by a <h:dataTable/> initially with one <h:inputText/> for a URL, with a <h:commandButton immediate="true"/> called "Add Row". The user fills in subject, enters a URL, and then pushes "Add Row" to allow the entry of a second URL. This is an "immediate" button, and the action just adds a new element to the backing bean property which is a list of URL's.
This almost+ does what the developer wants -- the form is redisplayed with a new empty URL row, the subject field remains filled in with what the user already entered, but the problem is the already filled in URL field is reset to blank.
So it appears that input fields inside of a <h:dataTable/> do not retain user input if the form is submitted in immediate mode, but fields outside of <h:dataTable/> are preserved.
I am using Sun's RI JSF 1.2, and it is not clear if this is just a bug, or some fundamental limitation. Given that the input fields in a data table have unique names that include the row index it seems possible that the posted parameters for the rows in a data table that remain after the action method adds or removes a row can be applied to the new view, just like for fields outside of the data table, and furthermore, this is what the user and developer would expect.
The questions are:
<ol><li>Is this a bug?</li>
<li>If it is not a bug, what is another way to achieve the desired behavior?</li>
</ol>

EEG wrote:
Hello.
I'm using Apex 4.1.0 on Oracle 10.2.0.5 and Oracle app server (mod_plsq).
Unfortunately, whenever I change this field to "InActive" in an existing row and then click my "Add Row" button, the tabular form re-appears with a new row but the modified row still has "Active" as the setting.
I checked the values in my COL_CHOICES collection to be sure that the "active_status" field actually changed from "Active" to "InActive" for the existing/modified row. And it did. The modified row in the collection shows "InActive" as the value, even though the page displays "Active" for the value.
How then can I make this drop down show the actual modified value?
I've looked at the APEX_ITEM docs and have tried various combinations of the parameters but nothing works.The second parameter to <tt>apex_item.select_list</tt> is the value for the control. Your code has
apex_item.select_list(16, null, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL, 'NO') active_statusThis will always have the value NULL and thus default to the first option "Active". You need to use the appropriate column from the collection here instead of NULL:
apex_item.select_list(16, c021, 'Active;Y,InActive;N', 'style="color:darkred;"', 'NO', '%NULL%', '%', 'f16_' || '#ROWNUM#', NULL

Similar Messages

  • Uploadedfile does not retain its value

    Hi,
    I am using the following to upload a Excel file:
    *<af:inputFile label="File to Upload" columns="30" value="#{backing_dataUpload.file}"/>*
    Here is how I 'put' save the file for later use, in hte sesion:
    **public void processExcelHeader() {**
    UploadedFile file = getFile();
    AdfFacesContext.getCurrentInstance().getViewScope().put("uploadedFileKey",file);//
    Here is how I retrieve it:
    *public void beginUpload() {//=======TBD=======*
    UploadedFile uploadFile = (UploadedFile)AdfFacesContext.getCurrentInstance().getViewScope().get("uploadedFileKey");
    if (uploadFile != null)
    *try {*
    ProcessExcelWorksheet pexcel = new ProcessExcelWorksheet();
    java.io.InputStream in = uploadFile.getInputStream();
    PROBLEM is the value java.io.InputStream in returns NULL. PLease note that the scope tof the Bean is 'Session'.
    I Looked into the debugger the 'uploadFile' in hte beginUpload() has all the entries except the 'buffer' is NULL, and hte length is zero.
    Please note that after the out there is some processing and the control exits back to screen, and on pressing another Command Button it returns to the
    beginUoload() function.
    Any Ideas......
    Thanks......

    Anil:
    No, I don't think the 2 backing bean method is out of scope. I guess the framework implicitly close the stream in the first event handler. Because the framework might think you're done with it. After all the Session scope is the second largest scope and only shorter than Application scope.
    The behavior may be related how the framework dispatch the servicing back bean to handle your event. Even thoug it might be using the same backing bean instance, the framework may clean it up after the completion of each round of servicing.
    Your probably need to put the instance of the opened InputStream into ViewScope so that the inputstream will not be closed since it is still referenced. But you need to remember to close it after using in the second method which is beginUpload().
    So in
    public void processExcelHeader() {**
    UploadedFile file = getFile();
    InputStream is = file.getInputStream();
    AdfFacesContext.getCurrentInstance().getViewScope().put("uploadedFileStream",is);//
    Then:
    public void beginUpload() {//=======TBD=======
    InputStream inputStream = (UploadedFile)AdfFacesContext.getCurrentInstance().getViewScope().get("uploadedFileStream");
    inputStream.close();
    If you don't close it after using, you should experience serious memory leak.
    Good luck,
    Alex

  • Tokenizer not retaining its value

    Again another issue I do not understand! Would anybody understand this?
    The Tokenizer does not retain its value!? Why it does not?
    15,XCV, Some Other String, 10',389.5,4194.0
    while ((rec = aPrintData[rIndex].toString()) != null){
         Iterator tokZ = new myNewGetToken(rec, patS, retD);
             for(; tokZ.hasNext();){               // here I got the value 15
                  tokZorRetD = (String)tokZ.next();     // here I got "NULL"???
                  if (tokZorRetD == null) {
                       patScount--;
                       mCount--;
                  }else{
                       switch(patScount){
    public class myNewGetToken implements Iterator{
    //          class RETokenizer implements Iterator{
              private CharSequence in;
              private Matcher mt;
              boolean retD;
              private String delim;
              private String match;
              private int lastEnd = 0;
              public myNewGetToken(CharSequence in, String patS, boolean retD){
                  this.in = in;
                  this.retD = retD;
                  Pattern pattern = Pattern.compile(patS);
                  mt = pattern.matcher(in);
              public boolean hasNext(){
                   if(mt == null){
                        return false;
                   if(delim != null || match != null){
                        return true;
                   if(mt.find()){
                        if(retD){
                             delim = in.subSequence(lastEnd, mt.start()).toString();
                        match = mt.group();
                        lastEnd = mt.end();
                   }else if(retD && lastEnd < in.length()){
                        delim = in.subSequence(lastEnd, in.length()).toString();
                        lastEnd = in.length();
                        mt = null;
                   return delim != null || mt != null;
              public Object next(){    // the value is not there anymore
                   String result = null;
                   if(delim != null){
                        result = delim;
                        delim = null;
                   }else if(match != null){
                        result = match;
                        match = null;
                   return result;
              public boolean isNextToken(){
                   return delim == null && match != null;
              public void remove(){
                   throw new UnsupportedOperationException();
         }I renamed it because I might need to modify or find out why it does not keeps the value!

    dubwai, I am sure you doubt the programming solutions
    that I come up with BUT while I run into many problems
    to get the results right it seems like that has to be
    done what the man has to do!I don't doubt it. I'm 100% absolutely sure that your 'fix' doesn't change anything.
    Let me explain line by line:
    tempToken = tokZ.next();   //  do Not convert do Not cast, keep it as ObjectThe Object is what it is. Casting the Object doesn't change it. All it does at runtime is check to see
    that the given Object is String or what ever you cast it to: Try the following:
    Object o = "test";
    String s = (String) o;
    System.out.println("o and s are the same Object? " + o == s);
    tokZorRetD = (String)tempToken.toString();  // Now, convert and cast
    // would that have to do anything with StrongTyping?Given that your previous code was not throwing a ClassCastException, the Iterator is already
    a String. Calling toString on a String just returns this:
    String s = "test"
    System.out.println("s.toString returns s? " + s == s.toString());Also, toString returns a String. There's no need to cast a String to String.
    And if s is null (which it appears to sometimes be) calling toString() will throw a NullPointerException.
    In short, if your code has been fixed, it was something else.

  • Imqobjmgr does not recognize the value of java.naming.provider.url property

    On Windows, I am running imqobjmgr 4.3
    when I run imqobjmgr -i list.properties, I am getting the following error
    Error [A3052]: imqobjmgr does not recognize the value of java.naming.provider.url property.
    Why is that?
    classpath
    C:\Sun\SDK\imq\lib\jms.jar;C:\Sun\SDK\imq\lib\imq.jar;C:\Sun\SDK\imq\lib\fsconte
    xt.jar;.
    contents of list.properties
    # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
    # Copyright 2000-2008 Sun Microsystems, Inc. All rights reserved.
    # The contents of this file are subject to the terms of either the GNU
    # General Public License Version 2 only ("GPL") or the Common Development
    # and Distribution License ("CDDL") (collectively, the "License"). You may
    # not use this file except in compliance with the License. You can obtain
    # a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
    # or mq/legal/LICENSE.txt. See the License for the specific language
    # governing permissions and limitations under the License.
    # When distributing the software, include this License Header Notice in each
    # file and include the License file at mq/legal/LICENSE.txt. Sun designates
    # this particular file as subject to the "Classpath" exception as provided by
    # Sun in the GPL Version 2 section of the License file that accompanied this
    # code. If applicable, add the following below the License Header, with the
    # fields enclosed by brackets [] replaced by your own identifying information:
    # "Portions Copyrighted [year] [name of copyright owner]"
    # Contributor(s):
    # If you wish your version of this file to be governed by only the CDDL or
    # only the GPL Version 2, indicate your decision by adding "[Contributor]
    # elects to include this software in this distribution under the [CDDL or GPL
    # Version 2] license." If you don't indicate a single choice of license, a
    # recipient has the option to distribute your version of this file under
    # either the CDDL, the GPL Version 2 or to extend the choice of license to
    # its licensees as provided above. However, if you add GPL Version 2 code
    # and therefore, elected the GPL Version 2 license, then the option applies
    # only if the new code is made subject to such option by the copyright holder.
    # @(#)list.properties     1.11 07/02/07
    # This property file will list administered objects
    # Version of command file
    # NOTE: This is not the version of the Sun Java(tm) System Message Queue product
    version=2.0
    cmdtype=list
    # If you want to only list a particular type of administered
    # object, uncomment the following line and specify the type.
    # Acceptable values for the type property are: t, q, tf, and qf,
    # where t = topic, q = queue, tf = topic connection factory, and
    # qf = queue connection factory.
    #obj.type=
    # To use the LDAP service provider implementation from
    # Sun Microsystems, uncomment the following two property lines
    # and set the url property correctly.
    objstore.attrs.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
    objstore.attrs.java.naming.provider.url=ldap://localhost:389/ou=imqobjmgr,o=sun.com
    # To use the File System service provider implementation from
    # Sun Microsystems on Solaris, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///home/foo/imq_admin_objects
    # To use the File System service provider implementation from
    # Sun Microsystems on Windows, uncomment the following two
    # property lines and set the url property correctly.
    # *** Note that the url syntax here is platform specific. ***
    #objstore.attrs.java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    #objstore.attrs.java.naming.provider.url=file:///C:/imq_admin_objects
    #objstore.attrs.java.naming.security.authentication=
    #objstore.attrs.java.naming.security.principal=
    #objstore.attrs.java.naming.security.credentials=

    I see you're using Sun Java System Message Queue. There's a forum specific to that product over at [http://forums.sun.com/forum.jspa?forumID=711&start=0|http://forums.sun.com/forum.jspa?forumID=711&start=0] . You could try asking there.
    Nigel

  • Scroll bar does not retain its position after or before pack

    Hi
    My Scroll bar does not retain its position after pack in my application.
    But i need to retain its state.
    My code snippet is :
    System.out.println("VAlue--->" + getHXValue());
    scrollPane.getHorizontalScrollBar().setValue(getHXValue());
    pack();
    My VAlue printed is 100.
    But my positon of scroll bar is at 0 th location.
    Can any one help me.....

    Swing related questions should be posted in the Swing forum.
    My code snippet is :Snippets don't help.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)",
    see http://homepage1.nifty.com/algafield/sscce.html,
    that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • Multiple select list not retaining the value for the first time

    Hi,
    I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
    For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
    for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
    Here is the code.
    function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var l_Select1 = html_GetElement(pSelect1);
    var l_Select2 = html_GetElement(pSelect2);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
    get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    // alert(document.getElementById("F660_CASCADING_TEST").value);
    gReturn = get.get('XML');
    if(gReturn && l_Select ){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);

    Please ask any question if you dont understand about the problem.
    Thanks

  • Safari does not retain Full Screen state

    Yosemite: version 10.10 (14A389)
    Safari: version 8.0 (10600.1.25)
    Safari does not retain Full Screen state when opening, or re-opening, quitting and restarting Safari, or rebooting the computer, even when the last state was in Full Screen.
    Under Lion, this did not happen. Safari would always keep the last state used even after quitting, or rebooting the iMac.
    In God's Harmony

    navigate to your Users Library folder ( it is hidden , so use Finder's "go to folder" menu ) , then locate inside the Library folder "preferences", search for com.apple.safari and delete the plist you find for Safari.
    then restart Safari and it should present all new Lion Options.

  • Firefox 29.0.1 Does Not Retain Options Settings. Cookies Enabled.

    On only one of my XP profiles, Firefox 29.0.1 does not retain the settings made under tools-options. I have deleted the cookies from Mozilla on the chance they may have been corrupted and have also cleared the web cache. The problem remains. Also, it is not clear in the new version how to have Firefox ask you each time before a cookie is accepted. Thanks for you help.

    You can try to delete the cookies.sqlite and permissions.sqlite files in the Firefox profile folder.
    You can use this button to go to the currently used Firefox profile folder:
    * Help > Troubleshooting Information > Profile Director: Show Folder (Linux: Open Director; Mac: Show in Finder)
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can inspect and manage the permissions for the domain in the currently selected tab via these steps:
    * Click the "Site Identity Button" (globe/padlock) on the location bar
    * Click "More Information" to open "Tools > Page Info" with the Security tab selected
    * Go to the Permissions tab (Tools > Page Info > Permissions) to check the permissions for the domain in the currently selected tab
    Also see:
    [[Cookies - Information that websites store on your computer]]
    [[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more]]

  • Visual Studio 2012 SharePoint Project Error : The partial project item type does not have a value for this property

    Hi,
    I am getting this error from visual studio 2012 whenever i try to create the following project types:
    - Workflow Custom activity
    - Web parts
    The error is as mentioned below
    "The partial project item type does not have a value for this property"
    Due to this the when I add above type of items in my project, they show a red cross icon against them.
    Please let me know If have you any solution?

    Hi
    I had same issue. Below is the solution
    Installing
    "Visual Studio 2012 Update 3" usually solves this problem. (You can download it through microsoft's official site at
    "http://www.microsoft.com/en-in/download/details.aspx?id=39305")
    Hansraj Rathva

  • As a new Macbook Pro user I was saddened to find that the feature of using keywords in iPhoto '11 does not allow showing same under each photo.  I understand this was available in earlier versions.  Any comments?

    As a new Macbook Pro user I was saddened to find that the feature of using keywords in iPhoto '11 does not allow showing same under each photo.  I understand this was available in earlier versions.  Any comments?

    Against TOU which you "agreed" to in order to post in these user to user forums.  If you want to "suggest" something to Apple, do so in the Product Feedback area.

  • In a purchase order for 3 GR's Quantity does not equal the value

    Hi,
    I have found the difference in one purchase order, there have been 3 GRs where the Qty does not equal the Value.  How has this happened?
    Any guesses why the difference has come.
    Thanks&regards,
    Veena

    Hi Vishal,
    In po history for agt 3 Gr's  Quantity does not equal the values. I hope the difference is Movement types. But exactly where to check this movements i am not getting.
    Can you tell me this which T.code.
    Tx,

  • Report similar to MC$4 that does not show absolute values

    Hi all,
    We need a report similar to Report similar to MC$4 which has the same drilldown capabilities but does not show absolute values, and instead shows the proper (actual) values.
    Or if its possible to change something in the MC$4 report to show the actual values and not the absolute.
    Thanks in advance!
    George

    HI
    Your input criteria should contain all plant numbers and the period to be analyzed.  Execute the report and then select:  Plant Analysis\Export\Transfer to XXL\Deselect all options and tick Plant, Storage Location and Month.  Follow the options to export to Excel.  Report will be based on Plant, Storage location and Month.
    Regards

  • ME23n , Does not shows the values correctly in print preview

    Hi,
    When viewing a PO using ME23n , it does not shows the values correctly in the print preview.
    For example;
    This is the vendor & its address.  (check attached image img1.jpg)
    ZERANDIB BUSINESS APPLIANCES
    Number-122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO-04
    When displaying the print preview, it shows only some parts of the above address
    Shows only; (check attached image img2.jpg)
    ZERANDIB BUSINESS APPLIANCES
    PO BOX 41,112,REID AVENUE
    These values are getting from a table called LFA1. I have checked that table & in that table all the values exists correctly.
    I have noted issue is with, having only a single word. (If address or name having only a single word, that is without spaces, it will not going to show in the print preview) -
    In the above example, it is not showing Number-122/A and  COLOMBO-04 (Its a single word. No spaces there)
    If its like --> Number - 122/A   &  COLOMBO - 04 ,  then it will display in the print preview correctly (where there are spaces after - mark)
    check img3.jpg
    If its having more than one word, then it will display correctly in the print preview.  As below;
    ZERANDIB BUSINESS APPLIANCES
    Number - 122/A
    PO BOX 41,112,REID AVENUE
    COLOMBO - 04
    If its 2 or more words, it shows correctly.
    If its 1 word, then its not showing!
    Why it is happening like that? Any ideas how to resolve this issue?
    regards.
    zerandib

    It turns out that this problem went away after the program crashed.  Everything seems to be working well now.

  • MW64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program

    W64,  cs6 bridge when I move or copy files the  context menu does not retain  recent folder destinations after I close the program. The context options that show are the ones from original install. The workspace I set up is also gone. I have every explorer box and cleaner checked to save recent. Had to disable nivedia desktop software because of weird display conflict. Have Dell pro support and they cannot fix. Any ideas to help me with this would be appreciated.

    Self-solved!  I work in column view in Finder so get there in a Finder window with folders and files appearing.
    There really is no problem, just select an ITEM in the COLUMN before right-clicking!
    The "old" context menu will appear. If you click in the white space in that column (or anywhere in a Finder window) and then place the cursor over a folder or file WITHOUT selecting it and right-click you will bring up the secondary context menu - Open, Copy, Duplicate, View Options and a greyed out Labels option. No "Move to Trash".

  • The report does not accept the value for apps.fnd_profile.value('USER_ID')

    Hi,
    I followed the below note and added a report to my SSHR menu.
    How To Add A Report To A 11i Self Service Menu [ID 334847.1]
    In my report , I have a condition in the query
    and a.created_by =apps.fnd_profile.value('USER_ID')
    When the report is submitted as a request , it works fine., however the same report when called from the self service page does not accept any value for apps.fnd_profile.value('USER_ID') .
    Is there a workaround to handle this problem.
    regards

    hi,
    I had already tried the option apps.fnd_global.USER_ID too.
    However it does not accept the value for apps.fnd_global.USER_ID.
    We want to call the reports in SSHR using oaf and at the same time the records that are pending for approval created by the employee should only be visible.
    regards
    Maya

Maybe you are looking for

  • How to show the graphs from 16channels or more at one time

    Hi. I am using labview with pci-6031e board. Is there a efficient way to show the graph from 16 channels which acquire the temperature with thermocouple, or to show just one specific graph that I want. I followed these steps. 1.in examples from the l

  • How to keep new applications on top within windows 8.1 desktop

    In previous Window versions when one opened applications such as word, excel or browser or snipping tool these applications stayed on top.   However, in windows 8.1 now when ne application is openned, one needs to minize other applications before sta

  • Best practice for saving data in SQL server

    Hi all Hoping for a little help on this question.  If i have a list of fields ex. (name,address,postal,phone etc.). Then i create a webform/task to gather some of theese fields (name, postal), then i make another webform/task to gather some other fie

  • I must go from string to 2 16 bit integers.

    Hay, I have problem with data types. I m starting from a string and I must go to 2 times a 16 bit integer. In the string I type a number like this 5,87. I made an example to make it clear. I hope someone can help my because i need soon a solution. gr

  • Can anyone explain how to create this effect in Deamweaver and Fireworks?

    This site was oriinally done in dreamweaver - but the shadow effect was done outside of Dreamweaver. When I save to html and load into Dreamweaver it makes no sense to me. Can anyone explain how to create this effect in Deamweaver and Fireworks? http