Why are inputText values within a dataTable tag lost when validation fails?

Hi, As a test, I have three fields outside of a dataTable tag and three fields inside a dataTable tag.
I enter data into field1, field3 and all of the fields within the dataTable. Field2 is left empty and is required. I press the 'go' button which gets to the validation phase and immediately redraws the web page and says 'value is required' which is what it should do.
What shocks me at this point is that the field values inside the datatable are lost. They are back to their original blank values.
It like even though validation fails(the model is not updated), the datatable is redrawn using the model data which is still blank. The renderer forgets that those fields within the datatable had data typed into them.
Is this a bug? and how do I get around it? I don't want to lose what was typed in.
here is my example:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<body>
<f:view>
<h:form>
<h:panelGrid columns="2">
<h:outputText value="field1"/><h:inputText value="#{example.field1}"/>
<h:outputText value="field2 required"/><h:inputText required="true" value="#{example.field2}"/>
<h:outputText value="field3"/><h:inputText value="#{example.field3}"/>
</h:panelGrid>
<h:panelGrid columns="1">
<h:outputText value="dataTable"/>
<h:outputText value="---------"/>
<h:dataTable value="#{example.lines}" var="line">
<h:column>
<h:inputText value="#{line.text}"/>
<f:facet name="header">
<h:outputText value="column1"/>
</f:facet>
</h:column>
</h:dataTable>
<h:commandButton value="go"/>
<h:outputText value="errors"/>
<h:outputText value="---------"/>
<h:messages showDetail="true"/>
</h:panelGrid>
</h:form>
</f:view>
</body>
</html>
package test;
import java.util.ArrayList;
public class Example {
     private String field1;
     private String field2;
     private String field3;
     private ArrayList lines = new ArrayList();
     public Example() {
          lines.add(new Line());
          lines.add(new Line());
          lines.add(new Line());
     public String getField1() {
          return field1;
     public void setField1(String field1) {
          this.field1 = field1;
     public String getField2() {
          return field2;
     public void setField2(String field2) {
          this.field2 = field2;
     public String getField3() {
          return field3;
     public void setField3(String field3) {
          this.field3 = field3;
     public ArrayList getLines() {
          return lines;
     public void setLines(ArrayList lines) {
          this.lines = lines;
package test;
public class Line {
     private String text;
     public String getText() {
          return text;
     public void setText(String text) {
          this.text = text;
<managed-bean>
<managed-bean-name>example</managed-bean-name>
<managed-bean-class>test.Example</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>

I posted about this bug a month ago and then again twice more (as recently as last week) and got zero responses. I piddled away so much time thinking I was crazy to believe this framework could have such a gaping hole in the fuselage that it was crazy. The more unsettling part too was the fact that the logging in the jsf code is so pathetic that you have no clue even with it on full that it's throwing your data away, they have unit tests in their code, including in-container tests, and they didn't have a test that turned this up? Hello? A project that has been going for this long should not have torture traps like this in it. Sorry for my negative post. To end on a positive note, I am looking forward to finding out about oracle's stuff. And Sun wonders why no one uses their stuff.
Does the Oracle JSF implementation require OAS?

Similar Messages

  • I have 2 phones on my iTunes account, why are text messages showing on the second phone when sent from the first

    I have 2 phones on my iTunes account, why are text messages showing on the second phone when sent from the first phone?

    it's meant to work like that
    so if you receive a message on your iphone you also get it on your ipad or ipod touch
    to avoid it use separate appleID for each device
    or turn off imessage on 1 or both devices in their settings
    but that will not fix the issue that 2 devices using the same appleID will never be able to facetime eachother
    the appleID is a unique handle for 1 user only

  • Why are you asking for my Visa card information when I have a balance on my iTunes gift card?

    Why are you asking for my Visa card information when I have a balance on my iTunes gift card?

    Either because you're trying to buy some sort of gift, or the iTunes Store servers are checking the validity of your account and won't charge the card, or there's a problem at Apple's end.
    (99821)

  • Why are my emails not deleting from all devices when deleted from one?  I have iCloud set up and turned on. I have ipad2, iphone5 and a Mac. What am I doing wrong?  Thank you

    Why are my emails not deleting from all devices when deleted from one?  I have iCloud mail set up and turned on. I have ipad2, iPhone 5 and a Mac desktop. What am I doing wrong?  Thank you.

    It depends on the type of email account you are using, not on iCloud.  If you are using an IMAP or exchange account, when you delete from one device, it is deleted from all devices.  If you are using a POP (POP3) account, it won't.  (iCloud email, Gmail and Yahoo are all IMAP accounts.)

  • Why are my duotone images turning black and white when put in indesign?

    why are my duotone images turning black and white when put in indesign?
    I have been playing duo and montotone images into indesing with no trouble. Then all of a sudden as I placew them they go black and whitre. I have tried everything from re saving, re making in photoshop and differant colours et5c. But nothing seems to wrok. The images already in my document arew fine it is just new ones. If someone could help that would be great

    Can you start a new document and then load one of the duotones known to be good in the working file and have it correct? If so, try one of the duotones known to be bad in the working document in the new file. Does it work?
    If no to either suggestion, can you share one of the images known to be good and one known to be bad? ZIP 'em up and upload to dropbox and plop a link here. Or, to keep the file sizes down, you can quickly make a new set and provide those.
    As well, the ID version and OS info would probably be helpful.
    Take care, Mike

  • Why are the jpeg icons not visible in finder when created by PS6

    Why are the jpeg icons not visible in finder when created by PS6

    hi
    I have faced the same problem ... I didn't find the solution yet
    but please visit this link http://www.oracle.com/technology/products/forms/pdf/webicons.pdf
    you'll get everything you want to know
    I'm not try it yet.
    Best wishes

  • How do you reset inputText values in a dataTable?

    I'm having what must be a simple and common problem,
    but nothing I've tried has solved it. I want to be
    able to refresh (reset) the inputText field values in a dataTable.
    I have a dataTable that holds required inputText components.
    I want to have a "cancel" button which would abandon any edits
    on these components and refresh (reset) them with their backing values,
    as well as removing the last row from the table (used to enter a
    new record). Because the inputText components are required,
    I made the cancel button immediate. I don't know what code I can
    put in the button's actionListener. Right now, the displayed values
    survive the round trip to the server and back to the browser, but
    I want them to be reset to their backing values.
    Here is the page, and the backing bean of a test example:
    <%@ include file="../include/taglibs.jsp" %>
    <h:dataTable id="table" value="#{pc_Test.list}" var="x">
        <h:column>
            <h:panelGroup>
                <h:inputText id="label_value" required="true" value="#{x.value}" />
                <h:message for="label_value"/>
            </h:panelGroup>
        </h:column>
        <f:facet name="footer">
            <h:panelGroup>
                <h:commandButton id = "btnn" value="new row" actionListener="#{pc_Test.newRow}" /> 
                <f:verbatim>  </f:verbatim>
                <h:commandButton id = "btnu" value="update" actionListener="#{pc_Test.update}" />  
                <f:verbatim>  </f:verbatim>
                <h:commandButton id = "btnr" value="cancel" immediate="true" actionListener="#{pc_Test.cancel}"/>
            </h:panelGroup>
        </f:facet>
    </h:dataTable>
    <f:verbatim>Summary=</f:verbatim>
    <h:outputText value="#{pc_Test.listString}" />
    package pagecode;
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    public class TestPage {
        public static class Example {
            public Example(String value){this.value = value;}
            public String getValue() {return value;}
            public void setValue(String value) {this.value = value;}
            public String toString(){return getValue();}
            private String value;
        public TestPage(){
            list.add(new Example("a"));
            list.add(new Example("b"));
            list.add(new Example("c"));
        public List getList() {return list;}
        public String getListString() {return list.toString();}
        public void update(ActionEvent event){}
        public void cancel(ActionEvent event){
            if (list.size()>3)
                list.remove(list.size()-1);
        public void newRow(ActionEvent event){
            list.add(new Example(""));
        private boolean readOnly;
        private List list = new ArrayList();
    }If it makes a difference, my implementation of JSF is MyFaces. Thanks!

    bump
    I'm not happy with having javascript reseting fields in a table before submitting:
    there's a noticable screen flash, and I'd like a server-side solution anyway.
    Question: UIInput has methods getSubmittedValue and setSubmittedValue,
    so I can use these to ignore or clear submitted values when I press an
    immediate command button. This takes care of subclasses like HtmlInputText
    but not for data tables. Is there a way to manipulate all the submitted values
    of a data table?

  • Why are some of my pictures blank green screens when I try to add them into a montage??

    Why are some of my pictures from my iphone showing up as blank green screen when I try to add them into imovie?

    Look under "More like this" on the right of this page, specifically "Re: no photo selected"; the discussion there may be of help.

  • Keep the old value in the UI field if entity validation fails

    Hi,
    I have a requirement to retain the original value (old value), if the entity attribute validation fails when the filed value is changed. I have created one validation rule on the entity object and the validation rule is working as expected. But I would like to reset the value to the original value if the validation fails on the modified value.
    Thanks and Regards,
    S R Prasad

    Hello,
    Please tell us your first name, and change your forum handle to something more friendly than User123. It’s nicer and easier for us this way.
    It seems that the forum software messed up the example code you wanted to present. To avoid that you can use the forum tags &#91;code] and &#91;/code] at the beginning and end of your code.
    If I understand correctly, you are trying to retrieve the original field value from a fxx array, however these arrays are populated after page submit, so they don’t hold the initial values of the column.
    I think the simplest solution will be to use an ‘onfocus’ event that will save the initial value – this.value – in a global JavaScript variable. In your ‘onchange’ code, instead of clearing the field if validation failed just assigns the original value for the JavaScript variable.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Forthcoming book about APEX: Oracle Application Express 3.2 – The Essentials and More

  • Why are my values not "taking"?

    I've had this problem intermittently, and now it's back and I
    don't know why.
    I have 2 datagrids with drag and drop. The source is an
    XMLList, as in:
    <items>
    <item ln1="Feta" ln2="crumbled feta" sn="feta" minQy="0"
    maxQy=".5" qty=".5" units="cup" />
    <item ln1="Fontina" ln2="shredded Fontina" sn="fontina"
    minQy="0" maxQy=".5" qty=".5" units="cup" />
    ... etc ...
    </items>
    For the destination, I have created an ArrayCollection to
    receive the dropped items. One column is a numeric stepper:
    <mx:DataGridColumn dataField="@qty" headerText="Quantity"
    width="70" itemEditor="myComponents.NSEditor"
    itemRenderer="myComponents.NSEditor"
    editorDataField="newTotal"/>
    Which uses this component:
    <mx:Script>
    <![CDATA[
    public function get newTotal ():Number{
    return step.value;
    ]]>
    </mx:Script>
    <mx:NumericStepper id="step" minimum="{XML(data).@minQy}"
    maximum="{XML(data).@maxQy}" stepSize=".25"
    value="{XML(data).@qty}" width="50"/>
    </mx:VBox>
    I check the totals in the list with:
    // adds up the quantities, returns sum
    public function getTotal(_arr:ArrayCollection) : Number {
    var _sum : Number = 0;
    var _length : Number = _arr.length;
    for(var i:Number=0; i<_length; i++) {
    var _item : Object = _arr.getItemAt( i );
    var _value : Number = _item["@qty"];
    _sum += _value;
    return _sum;
    The problem is, I drag a couple of items over, their default
    qty is 0.5 as indicated in the XML. But even if I change the
    steppers to 0.25, I'm still getting a total as if they're 0.5. Why
    is this?

    Make the getter newTotal bindable:
    [Bindable}
    public function get newTotal():Number{ ... }
    You may get either an error or warning telling you that you
    have to have a setter for newTotal as well. If you do, just add the
    setter, even though it won't do anything.
    Another approach would be to have a public variable in your
    NS component:
    [Bindable]
    public var changedQuantity:Number
    <mx:NumericStepper id="step" minimum="{XML(data).@minQy}"
    maximum="{XML(data).@maxQy}" stepSize=".25"
    value="{XML(data).@qty}" width="50"
    change="changedQuantity=step.value" />
    and then
    <mx:DataGridColumn dataField="@qty" headerText="Quantity"
    width="70" itemEditor="myComponents.NSEditor"
    itemRenderer="myComponents.NSEditor"
    editorDataField="changedQuantity"/>
    TS

  • Why are the folders within my Iphoto Library folder empty when I have 16000 photos in Iphoto.

    I discovered this when I went to move my Iphoto library to an external drive. Eventhough I have 1600 photos in Iphoto my Iphoto Library folder only contains 3.5MB and the Attachments, Masters, Previews and Thumbnails folders are empty. Therefore if I drag this folder (Iphoto Library) to my external hard drive which is what every advice site says to do when backing up Iphoto, I will lose all of my photos. When I see screenshots of the Iphoto folder in the support communities I see the Iphoto icon beside the Iphoto Library in Finder-Pictures but I just have a folder icon.
    I am using Iphoto '11 on a 2012 27" Imac running Mountain Lion and want to move Iphoto to an external drive to free up space.

    Are you saying that iPhoto is working fine and has 1600 photos in it but when you look in the iPhoto library ther are no photos in Masters, previews or thumbnails? If so then you are not looking at the iPhoto library that iPhoto is using - under the file menu do to the switch library command and seelect it - it will show available iPhoto libraries and the one you are using will be highlighted
    LN

  • Why are my podcasts not syncing with Apple TV when all devices connect to the same Apple iD?

    Does anybody have an idea as to why my recently updated Apple TV does not sync my podcasts from my Apple iD. It's supposed to, it's not doing it, and it's very annoying.
    This is only half the aggravation; the other half is that all my podcasts have been deleted automatically twice(no apparent reason other than perhaps a bug in iOS 7.0.2 / 11A501).
    This one I have managed to comeup with sort of a temporary fix while Apple fixes this: I made a copy/backup of the "Podcasts" folder inside the "iTunes Media" which in turn is in the "iTunes" folder Within the "Music" folder in my Mac. When my Podcasts are deleted, I just drag the backup "Podcasts" folder I created into the My Pocasts in iTunes.
    Apple please fix it.

    Does anybody have an idea as to why my recently updated Apple TV does not sync my podcasts from my Apple iD. It's supposed to, it's not doing it, and it's very annoying.
    This is only half the aggravation; the other half is that all my podcasts have been deleted automatically twice(no apparent reason other than perhaps a bug in iOS 7.0.2 / 11A501).
    This one I have managed to comeup with sort of a temporary fix while Apple fixes this: I made a copy/backup of the "Podcasts" folder inside the "iTunes Media" which in turn is in the "iTunes" folder Within the "Music" folder in my Mac. When my Podcasts are deleted, I just drag the backup "Podcasts" folder I created into the My Pocasts in iTunes.
    Apple please fix it.

  • Why are my MacBooks so slow on the network when everything else is fast?

    Last month, my apartment complex changed its network from a pretty wide open Wi-Fi to one where we must enter a user name and password every 30 days for each machine.  Since then, both my MacBooks (2012 MBP running 10.8.3 and 2008 white MB running 10.7.5) have very slow connections.  Web pages will fail to load, or load incredibly slowly (as in the progress bar moves an inch then stops).  We get bursts of activity (as also seen in Activity Monitor) lasting for seconds (limited to 4mbps down/0.2mbps up by the new ISP).  This occurs on both Safari and Firefox.  iTunes music store, the Mac App store, Mail, and Spotify all exhibit identical behavior.  My iPad, iPhone, and another's Windows netbook connect without any obvious difficulty.  We had a rep from the new ISP come to check out our connection, and he believes that the problem is directly related to the MacBooks (a virus on both?).
    Things I've tried without change in behavior (with the 2012 MBP):
    1.  Connecting directly to ethernet (and turning off AirPort).
    2.  Restarting the computer and the router.
    3.  Logging in elsewhere in the complex
    4.  Changing DNS to 8.8.8.8 and 8.8.4.4
    5.  Deleting AirPort and re-installing in System Prefs
    6.  Following the excellent "Step by Step to Fix Your Mac" https://discussions.apple.com/docs/DOC-3353 on these forums, including clearing every cache imaginable with Onyx, and uninstalling Java, Silverlight, Flash, and any System Pref plugins.
    7.  Sorting through Activity Monitor to find anything else running on my CPU of consquence--I don't think so.
    8.  Confirming good ping and down/up speeds on Speedtest.net with my iPhone
    I know little about networking, but I'm learning.  Any other suggestions?  Why does the MacBook behave differently on this network?

    bowsplash wrote:
    Thank you for the suggestions.  I agree that my ISP rep looked a little confused by my problem.  He was comfortable using Terminal (at least for basic network queries--more than I know how to do).
    Although I physically have the ISP's router in my apartment, the ISP has changed the password, and I'm unable to change channels (though that shouldn't explain the peristent problem on ethernet).  I've tried restarting it many times, including unplugging it.
    I just emptied my trash (and restarted the computer).  500gb HD, 24gb free. No change in performance.
    You're running out of HD space.  That's the problem.
    Empty the trash in the Dock as well as iPhoto’s trash!
    Open up your application folder & go through all your apps.  Trash all the apps you no longer want and/or use.
    An easier way to do this is to open the Application folder in list view & press the Command+j keys.
    In the the dialog that appears, click the "This Window Only" button & the "Calculate All Sizes" check box.
    Wait a bit until your file & folder sizes have all been calculated, then click the "Size" column to sort your apps from the fattest to the most anorexic.
    Get rid of all your photo files you don't want and/or need.  Same goes for those pics off the websites you downloaded (gifs, jpegs, etc.).  Or transfer/move them all to a photo/movie storage site like ImageShack and Photobucket, 2 of the most popular  FREE  storage sites.
    Get rid of all your video & music files you no longer view and/or listen too.  Especially, if you already have the actual CD/DVDs or you can later redownload from a website.  Or transfer them all to a FREE video/movies and/or music storage site.
    Use Spotlight to make sure you got rid of everything.  You can even trash directly from Spotlight!  Better yet, download this FREE software called Find File.  This app puts Spotlight to shame (works w/Mountain Lion).
    Drag what you don't want and/or need to the trash.  Better yet, download this neat little shareware app *demo* called AppZapper.  It basically does all the work for you by not only trashing the apps but the apps preference files, caches & all its associated files.
    Another software that does the above is AppDelete.  Best of all this software is free!
    Burn what you want and/or need onto CDs or DVDs. Not everyone has the  luxury of purchasing an external HD and/or the system requirements for iCloud to store their "stuff.”
    Dropbox is a free storage utility to check out.
    You can check with your ISP to see if they offer *free* storage space.  Most if not all do now-a-days.   There are thousands if not millions of *free* storage facilities on the web also.  Use your favorite search engine to search them out as they come in different storage sizes to fit your needs & wants.
    Check for duplicate fonts.
    Applications>Font Book
    Select “All Fonts”
    If you see any “black dots” next to any fonts this mean you have duplicates and/or multiple versions of these fonts.
    To clean this up, select a “black dotted” font or the Apple + *click* to select multiple dotted fonts;
    Edit>Resolve>Duplicates.
    What the above does is turns off the duplicates & multiple version fonts.  Not delete them.
    More than likely the “extras” were installed by other programs and/or other users.
    Clear out font caches
    Use FontNuke.  It does all the work for you.  And, best of all it’s *FREE*.
    Printer Drivers
    Get rid of all the printer drivers you don’t need & use except the ones for your *current* printer(s)/scanner(s).
    HD>Library>Printers Folder
    If you accidently threw something out that you needed for your printer/scanner it can be easily obtained from the manufacturer’s website and/or from the CD that came w/the printer/scanner.
    Garage Band
    Has about 1GB of loops stored.  Get rid of some some them.  You surely don’t use, like and/or need them all.
    HD>Library>Audio/Apple Loops>Apple>Apple Loops For GarageBand
    Or just get rid of the Garage Band app altogether if you don’t use it.
    Get rid of extra languages
    Strip your computer down to your “native” tongue.
    You can do this with a *FREE* utility called Monolingual.  Another app that apparently does all the work for you.  I’ve never used it.  However, a lot of users here swear by & recommend it highly.
    However, there is a warning for *native English speakers*. Make sure you keep BOTH English and English (United States).
    Other Resources:
    HD Space Checkers:
    Disk Inventory X (FREE)
    WhatSize (SHAREWARE)
    OmniDiskSweeper (FREE)
    GrandPerspective (FREE - donation)
    ==================
    Mac Performance Guide
    Slimming your hard drive
    Rule of thumb: You should never let your hard drive get to where you have only 10-15% of space left.
    Quick fix
    How To Quickly Free Up Hard Drive Space on Mac OS
    http://www.youtube.com/watch?v=fO-mlLApEuk

  • Why are my files shrinking in MB so much when I crop?

    No matter what, when I crop an image, even just the tiniest amount off of the edges my files are shrinking drastically. If I don't touch the file with cropping, it doesn't shrink when I save. So it's not a compression issue that I know of. An example would be of a 6 or 7 mb file shrinking down to anywhere from 900 something kb to 1.5 mb. I do these files for a photographer and for enlargements bigger than 8x10 that just won't work, so he has to re-do them, and he doesn't get this issue like I do. Is it possibly a setting in CS5? I've been banging my head over this for a few days because it's driving him crazy.
    I'm just doing simple edits, curves in the studio and actions outdoors. Batch saving---if you think it could possibly something involved in that. (which I don't because it happens even when I don't batch save.)

    He shoots in Jpeg, with a Nikon D300s that is 12 megapixels. Here is a screenshot with the crop bar open....Not really sure what other screen shots would help you. This particular file started out as 3 mb and shrunk to 904 kb. Studio files are typically smaller starting out, so that is why the 3 mb.

  • Why are midi notes in piano roll lower volume when selected with pointer than when in playback?

    I'm using Logic X on mac mini. When I select midi notes in piano roll with the pointer, they are at a  lower volume than when in playback? I use Logic X on mac mini with Apogee Duet.

    Thanks for your help Erik.  I found the answer you posted about 30 minutes after posting my question.  To me it doesn't answer my question 100%.  The reason is that I can't expect to believe that every time someone records midi they have to go through all these extra steps to merge it (and it is not easy to do because they are hidden behind one another) in fact my problem was so unique that other logic users didn't understand why I am having this trouble.  SO that brings me to my conclusion, that I have some setting that is keeping this from being a seamless operation and transforming it into a bunch of hoop jumps.  Thoughts?  Could it have to do with record settings of "merge"? I saw a few  different settings there but none make sense to me.
    thanks again.

Maybe you are looking for

  • 500 Internal Server Error in iFS

    I tried to modify the login screen image and ended up with an error, thereby losing access to ifs login web interface. I stumbled across a similar question on TechNet that expressed the same problem (editing the login page and then losing it). The qu

  • Scroll Bar on Stacked Canvas [Solved]

    Hi, I am trying to do the following. I have a form FORM A. Another form FORM B is called with a click of a button on FORM A. FORM B is having 2 blocks each on a stacked canvas. BLOCK 1 is master block and BLOCK 2 is detail block. Table on which BLOCK

  • When I try to sincronisy my iphone 3g S the computer doesnt recognize it

    and the screem of the cell is frozed in a pic of the itunes anad the cable of the cell

  • How to include in report versions of some files?

    ZCM: 10.2.1 at SLES 10 SP2 WS: Windows XP SP3 RUS I want to create report about version of software products installed in my company. But some products doesn't display full version number (flash player plugin and activex have version 10.0.32.18, but

  • Itunes content after computer harddrive crash

    Is there any way to get back Itunes content that you have purchased after a hard drive crash? Our home computer hard drive crashed and had to be replaced. I have receipts.