Re: Strange behavior of a WOForm: values get nullify

"Jerry W. Walker" <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Hi, Xavier,

Is it possible that you're falling prey to the problem of changing  
the structure of your component between the point at which it is  
rendered through appendToResponse and the point at which the values  
are scraped in takeValuesFromRequest? Changing the component's  
structure at any time between these two points could cause problems  
similar to what you seem to be seeing.

For a more complete explanation of this issue, see:

http://www.wodeveloper.com/omniLists/webobjects-dev/2005/April/ 
msg00023.html

or:

  http://en.wikibooks.org/wiki/Programming:WebObjects/ 
Web_Applications/Development/ 
General_Best_Practices#Avoid_Changing_WOComponent_Structure_Before_It_Is 
_Used

Hope this helps.

Regards,
Jerry

On Nov 24, 2006, at 2:03 PM, Dev WO wrote:

> Hi list,
> I've been trying to isolate the issue but couldn't really find  
> something that "make sense"...
> Here's what I have:
> -a WOForm with some parts which are displayed using WOConditional
> -I'm using an EOGenericRecord as the object container, but it is  
> instantiated in the java file with the correct Class (for example,  
> I can have different Product subentities but using only one  
> textfield in the form for the common attributes)
>
> The strange behavior starts with:
> -the "get" method will actually correctly loads all the data and it  
> will work. But as some products may have a lot of info in them, the  
> get method will fail sometimes.
> -the "post" method leads to some data being nullify! it is  
> consistent all the time. If I "move" the text input, it works in  
> some places and not in some others... It seems to be related to  
> some conditional around it, but every tag is correctly closed.
>
> I'm using Wonder on this project, I updated it to see if it could  
> be a bug in my version but nothing changed.
> I wanted to try without wonder, but I just couldn't apparently  
> because I'm using ToOne and ToMany relationship on abstract  
> objects. So I can't say if it's Wonder related for sure.
> But I recall having some unexpected behavior like this one on  
> another project (without Wonder).
>
> I really don't know where to track what's happening, I printed  
> every call to my object but it appears it is correctly created  
> (with some default value) and when I call my "add" method, the  
> object already has some nullified values...
>
> Is there anything I should be aware of using conditional in a WOForm?
> I don't seem to have such problem in my other projects (but this  
> one has quite a lot ToOne and ToMany relationship in it).
>
> Thanks for any help:)
>
> Xavier
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/jerrywwalker% 
> 40gmail.com
>
> This email sent to [email protected]


--
__ Jerry W. Walker,
    WebObjects Developer/Instructor for High Performance Industrial  
Strength Internet Enabled Systems

     [email protected]
     203 278-4085        office
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.