I have the following:
private boolean adding;
@Persist
public boolean isAdding() {
return adding;
}
public void setAdding(boolean adding) {
this.adding = adding;
if (adding)
setFactsheet( new Factsheet() );
}
neither method is either called (but it should have been). They get
overridden.
On Fri, 2005-10-28 at 13:28 -0400, Mark Shead wrote:
> Try creating the property in the java class as a variable and then
> create the assessors as actual methods (not abstract) mark the first of
> these methods with @Persist. I think it will work. It seemed to do the
> job when I tried it.
>
> private Entry selectedEntry;
> @Persist
> public Entry getSelectedEntry() {
> return selectedEntry;
> }
>
> public void setSelectedEntry(Entry selectedEntry) {
> this.selectedEntry = selectedEntry;
> }
>
> If that doesn't work for you let me know.
>
> --Mark
>
> -----Original Message-----
> From: Dan Adams [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 28, 2005 11:28 AM
> To: Tapestry users
> Subject: RE: @Persist and custom code
>
> Yeah, thats exactly what it is but I don't want to have to create .page
> files all over the place just for that one property.
>
> On Fri, 2005-10-28 at 10:36 -0400, Mark Shead wrote:
> > So do you have:
> >
> > @Persist
> > public abstract void getProperty();
> >
> > But you want to do something other than just return the property
> > variable?
> >
> > You can probably create the actual property along with getters and
> > setters and specify that it is persistence in the .page file.
> >
> > I'm not sure if there is a way to do it in the .java file.
> >
> > --Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Dan Adams
Software Engineer
Interactive Factory
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]