Can someone please advise on this thread...
@Persist appears to work in preventing binding exceptions
@Parameter (cache = true) does not work and produces
propertyNotFoundException
If I use both simultaneously, I receive
Property fileName has already been accounted for by the element at
Annotation @org.apache.tapestry.annotations.Persist(value=session) of public
abstract java.lang.String org.FileUpload.getFileName().
Stephanie, your feedback does not hold water. Please advise. I did try your
advise.
Best regards
Ken in nashua
----Original Message Follows----
From: "Ken nashua" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], users@tapestry.apache.org
Subject: RE: tapestry-4.0.2 @Parameter : required = true (template binding)
Date: Tue, 23 Jan 2007 15:03:36 -0500
Stephanie, if you look at my original post for this thread... I did
precisely what you said. I declared the parameter in the html template (web
page I believe you were referring to), and sent it into the component.
Parameters have no place to be stored do they? The properties need to be
persisted somewhere.
Maybe I shoujld omit @Parameter altogether and leave the abstract methods
as-is.
What have you to say about that?
Best regards
Ken in nashua
----Original Message Follows----
From: "Ken nashua" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], users@tapestry.apache.org
Subject: RE: tapestry-4.0.2 @Parameter : required = true (template binding)
Date: Tue, 23 Jan 2007 13:29:40 -0500
Stephanie, where in the docs does it explain this?
Are you referring to the template or a *.page file? please clarify.
Also, if my component is the originating source of these attributes
(FileUpload.filename which means, there is no page to generate them or model
to acquire this from) then how do you rationalize this usage as you
described?
The problem with the binding is that the data members of the object have no
where to live. @Persist accomplishes this.
Best regards
Ken in nashua
ou should not use <at> Persist in your component : <at> Persist should be
used n the page and passed to the component as a parameter !
-
téphane Decleire
----Original Message Follows----
From: "Ken nashua" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], users@tapestry.apache.org
Subject: RE: tapestry-4.0.2 @Parameter : required = true (template binding)
Date: Tue, 23 Jan 2007 12:21:35 -0500
Thanks, @Persist binded my properties to the session as they had no where to
be stored.
Not sure how useful @Parameter will be. The cache attribute was
misleading.... When would you want to use this annotation?
Best regards
Ken in nashua
----Original Message Follows----
From: "Ken nashua" <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
CC: [EMAIL PROTECTED]
Subject: tapestry-4.0.2 @Parameter : required = true (template binding)
Date: Tue, 23 Jan 2007 10:43:55 -0500
Folks,
I created a component.
TEMPLATE
<span jwcid="$content$">
<input jwcid="@Upload" file="ognl:file" type="file" displayName="File"
fileName="ognl:fileName" />
</span>
CLASS
public abstract class MyComponent extends BaseComponent {
@Parameter(required = true, cache = true)
public abstract String getFileName();
public abstract void setFileName(String fileName);
}
SPEC
<component-specification class="org.MyComponent"
allow-body="yes"
allow-informal-parameters="yes"/>
But I continue to receive this...
org.apache.hivemind.ApplicationRuntimeException
Required parameter fileName of component
trails:Editors/blobFields.$TrailsUpload is not bound.
My pom.xml uses
<dependency>
<groupId>tapestry</groupId>
<artifactId>tapestry</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>tapestry</groupId>
<artifactId>tapestry-annotations</artifactId>
<version>4.0.2</version>
</dependency>
I defined fileName as ognl binding in the template...
Can someone explain this?
Best regards
Ken in nashua
_________________________________________________________________
The MSN Entertainment Guide to Golden Globes is here. Get all the scoop.
http://tv.msn.com/tv/globes2007/?icid=nctagline2
_________________________________________________________________
Valentines Day -- Shop for gifts that spell L-O-V-E at MSN Shopping
http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095&tcode=wlmtagline
_________________________________________________________________
Get in the mood for Valentine's Day. View photos, recipes and more on your
Live.com page.
http://www.live.com/?addTemplate=ValentinesDay&ocid=T001MSN30A0701
_________________________________________________________________
Type your favorite song. Get a customized station. Try MSN Radio powered
by Pandora. http://radio.msn.com/?icid=T002MSN03A07001
_________________________________________________________________
Invite your Hotmail contacts to join your friends list with Windows Live
Spaces
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
_________________________________________________________________
Get in the mood for Valentine's Day. View photos, recipes and more on your
Live.com page.
http://www.live.com/?addTemplate=ValentinesDay&ocid=T001MSN30A0701
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]