You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ken nashua <nh...@hotmail.com> on 2007/01/23 16:43:55 UTC

tapestry-4.0.2 @Parameter : required = true (template binding)

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

_________________________________________________________________
Valentine’s 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
You should not use @Persist in your component : @Persist should be used 
in the page and passed to the component as a parameter !

--
Stéphane Decleire




Ken nashua a écrit :
> 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" <nh...@hotmail.com>
> To: users@tapestry.apache.org
> CC: nhhockeyplayer@hotmail.com
> 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
>
> _________________________________________________________________
> Valentine's 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

Re: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
When i say page, i mean page object which implements the IPage 
interface. This object embeds your component. So, you need to have 
something like that :

In your page java code, you need to declare a property which will be 
persistent to store the information between different calls :

@Persist
public abstract void setMyProperty(Object myProperty)
public abstract Object getMyProperty()

(I've put a property of generic type Object but, of course, it could be 
of any type.)

In your component java code, you have to declare your parameter :

@Parameter
public abstract void setMyParameter(Object myParameter)
public abstract Object getMyParameter()

The last thing you need to do is to bind the persistent property of your 
page in the parameter of your component. That can be done in your html 
page, in the .page file or inthe java code using annotations. Let's say 
your component is called MyComponent, you should have for instance in 
your .page file, somthing like that :

<component id="myComponent" type="MyComponent">
    <binding name="myParameter" value="ognl:myProperty"/>
</component>

Hope that will help you

--
Stéphane Decleire



Ken nashua a écrit :
> 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" <nh...@hotmail.com>
> To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
> To: users@tapestry.apache.org
> CC: nhhockeyplayer@hotmail.com
> 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
>
> _________________________________________________________________
> Valentine's 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

Re: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
You can make the same thing with the @Component annotation in your Java 
code.

--
Stéphane Decleire



Ken nashua a écrit :
> Ok, Stephanie... thanks for the response...
>
> On your last block...
>> The last thing you need to do is to bind the persistent property of 
>> your page in the parameter of your component. That can be done in 
>> your html page, in the .page file or inthe java code using 
>> annotations. Let's say your component is called MyComponent, you 
>> should have for instance in your .page file, somthing like that :
>>
>> <component id="myComponent" type="MyComponent">
>>    <binding name="myParameter" value="ognl:myProperty"/>
>> </component>
>
>
> Which annotation are you referring to that will persist this parameter?
>
> Best regards
> Ken in nashua
>
> _________________________________________________________________
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
Ok, Stephanie... thanks for the response...

On your last block...
>The last thing you need to do is to bind the persistent property of your 
>page in the parameter of your component. That can be done in your html 
>page, in the .page file or inthe java code using annotations. Let's say 
>your component is called MyComponent, you should have for instance in your 
>.page file, somthing like that :
>
><component id="myComponent" type="MyComponent">
>    <binding name="myParameter" value="ognl:myProperty"/>
></component>


Which annotation are you referring to that will persist this parameter?

Best regards
Ken in nashua

_________________________________________________________________
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: users@tapestry.apache.org
CC: nhhockeyplayer@hotmail.com
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

_________________________________________________________________
Valentine’s 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: users@tapestry.apache.org
CC: nhhockeyplayer@hotmail.com
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

_________________________________________________________________
Valentine’s 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
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" <nh...@hotmail.com>
To: nhhockeyplayer@hotmail.com, 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" <nh...@hotmail.com>
To: users@tapestry.apache.org
CC: nhhockeyplayer@hotmail.com
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

_________________________________________________________________
Valentine’s 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
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" <nh...@hotmail.com>
To: users@tapestry.apache.org
CC: nhhockeyplayer@hotmail.com
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

_________________________________________________________________
Valentine’s 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


MIME's in @Image component

Posted by Ken nashua <nh...@hotmail.com>.
Folks,

I developed my own blobservice that accomodates all uploadable media.

Here is the html template


    <span jwcid="@If" 
condition="ognl:blobDescriptorExtension.renderType.image">
		<a jwcid="@ServiceLink" service="BlobService" 
parameters="ognl:byteArrayAsset">
            <img jwcid="@Image"
        		image="ognl:byteArrayAsset"
        		alt="ognl:fileName" />
        </a>

    </span>

Question: Why can't tapestry negotiate the mime icon for *.txt or *.doc ? Is 
there a way to influence this to display for the content type?

Question: Why is the image blank in IE for *.txt or *.doc etc... (it seems 
ok for *.gif or *.jpg)?

Question: Why is the markup for @Image totally ignored and visibly blank 
when trying to view in firefox?

Best regards
Ken in nashua

_________________________________________________________________
Laugh, share and connect with Windows Live Messenger 
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: tapestry-4.0.2 @Parameter : required = true (template binding)

Posted by Ken nashua <nh...@hotmail.com>.
Thanks, @Persist binded my properties to the session as they had no where to 
be stored.

Not sure how useful @Parameter will be now. When would you want to use this 
annotation?

Best regards
Ken in nashua

----Original Message Follows----
From: "Ken nashua" <nh...@hotmail.com>
To: users@tapestry.apache.org
CC: nhhockeyplayer@hotmail.com
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

_________________________________________________________________
Valentine’s 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

_________________________________________________________________
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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org