-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've done some more work on this, and appear to have it going now.

I think it was some problem (that I still do not fully understand) with 
exactly WHICH Content instance was being persisted within the "save this 
record" Submit handler.

I changed the getContent() method to:

        public Content getContent() {
                if (content == null) {
                        cat.debug("Returning content from binding - our cached 
property is null");
                        IBinding binding = getBinding("content");
                        return (Content) binding.getObject();
                }
                return content;
        }

so instead of the object CACHING the result of the binding, it returns the 
bound value. If something else calls setContent(), then from then on that 
value will be returned.

Elsewhere within the class, I made sure that everything else used getContent() 
when wanting the actual content object. 

It works now.   /-)

I can only assume that in some circumstances, the order of binding calls, 
rendering calls and so on caused different instances (some from a cached 
binding, some from the visit object) to be used, which then caused the weird 
behavior.

Is the above method of returning a bound value good?
Or should I define bound value property methods differently?

Thanks for the help!
Slowly but surely I will get there :-)

Neil

On Saturday 16 Nov 2002 5:22 pm, Neil Clayton wrote:
> With regard to parameters on components.  I want to be able to pass an
> object reference into a component. I'm having a few "issues" doing this.
>
> I feel it's only right to give a reasonable amount of detail in order that
> people understand the environment, so I hope that you do not mind a long
> post.
....
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE91ryFLXcfQF3yrNoRAmA4AKCoNp5daMuzRkyWy2I2fbVUDn4CIwCeNbTy
yWZPXnlSdr+lcl5C5c5HigE=
=pSBe
-----END PGP SIGNATURE-----



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to