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 in Nashua <kc...@live.com> on 2012/10/13 08:02:19 UTC

EventLink parameters

Folks,

I havent found an example of the KIND of event link parameters I am trying to exercise... just trying to render a digit as a link so as to point to a cursor position within my gallery ... this is auto-paging logic

Can someone help me figure this out?

So far I got this... where pageIndex actually is an @Property... pageNum I made up and specified it within the parameters space... not sure if I did it right... it wont run.

Gallery.TML
<t:eventLink  t:id="IndividualPage" t:parameters="pageNum:${pageIndex} + 1">
    <t:outputRaw value="${pageIndex} + 2"/> 
</t:eventLink>

Gallery.JAVA
    @Component(parameters =    { "event=individualPage","pageNum=pageNum" })
    private EventLink individualPage;
    public void onIndividualPage(@RequestParameter("pageNum") Integer pageNum)
    {
        logger.info("In onPage : ");

        cursor = (pageNum.intValue() * itemsPerPage);
    }

But I get this error...
org.apache.tapestry5.internal.services.PropertyExpressionExceptionException
 generating conduit for expression 'pageNum': Class 
org.tynamo.examples.hibernatesecurity.components.Gallery does not 
contain a property (or public field) named 'pageNum'.expressionpageNumorg.apache.tapestry5.ioc.util.UnknownValueExceptionClass org.tynamo.examples.hibernatesecurity.components.Gallery does not contain a property (or public field) named 'pageNum'.

am i specifying this right ?if i try to make modifications to pageNum and use a property it complains about coercian from Map to string...
Any takers would be appreciated... been banging my head on this for 4 hours
thanks
Ken

 		 	   		  

RE: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
Just write a getter (aka a property)

public int getFoo() {
   // return some calculation using pageNum and index value
}

And call it in a template

<t:eventlink context="foo">...</t:eventlink>



--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716918.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
>  but it also states that there is a bug with parameters
<sarcastic>I love it when people who don't understand something say it's
broken</sarcastic>

public Map<String, String> getFoo() {
  // return a map
}

<t:eventlink parameters="foo">...</t:eventlink>



--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716925.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
eventlink.parameters MUST be either a Map or something that can be coerced to
a Map
eventlink.context MUST be either a collection or something that can be
coerced to a collection (eg a single value)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716942.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: EventLink parameters

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Tue, 16 Oct 2012 11:30:49 -0300, Ken in Nashua <kc...@live.com>  
wrote:

> <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" >

Never, never ever use ${} expansions when passing parameters values.

-- 
Thiago H. de Paula Figueiredo

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


RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
Lenny Primak... you can go public with your messages to me. 
You dont have to send me private things like that.

Real talent should be brave enough to show their real insides.
I dont what could prompt your stuff... over parameter's ???

But I think it is my caption on my T4 widget thats eating you.

I will keep on developing tapestry because its my passion. 

peace be with you


From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 10:30:49 -0400





so context was the solution... i get my pagenumber in nicely to the handler

<t:eventLink  t:id="IndividualPage" t:context="${pageValue}" >

thanks for helping

: )
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 10:28:38 -0400





Lance, jap slappin me is going to make me a better engineer... thank you

                                    <t:eventLink  t:id="IndividualPage" parameters="pageValue" >
                                        <t:outputRaw value="${individualPageIndex}"/> 
                                    </t:eventLink>

    public int getPageValue() {
        return pageIndex + 2;
    }    

but as far as this code goes... it produces the following (including the lines commented out) (not sure what else to say... but i did find a solution with your help):

41						<t:if test="pages">42							<t:Loop id="foreachpage" source="pages" value="currentPage" index="pageIndex">43								<a>44									<!-- <t:eventLink  t:id="IndividualPage" t:parameters="prop:{'pageNum':'indexValue'}" > -->45									<!-- <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" > -->46									<t:eventLink  t:id="IndividualPage" parameters="pageValue" >47										<t:outputRaw value="${individualPageIndex}"/> 48									</t:eventLink>49								</a>50							</t:Loop>51						</t:if>locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure
 reading parameter 'parameters' of component 
Home:gallerywidget.individualpage: Could not find a coercion from type 
java.lang.Integer to type java.util.Map.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.util.UnknownValueExceptionCould not find a coercion from type java.lang.Integer to type java.util.Map.
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 00:28:31 -0400





alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 17:43:37 -0400





Lance, this has specifically to do with the parameters construct failing on java methods

I dont know what to do.

I wrote the method as you specified.


t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 

parameters construct refuses to create the Map if I use a java method or try to dereference a java method

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 16:20:46 -0400






t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		   		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  

RE: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
I have to agree with the other guys.... You were starting to get on my tits a
bit too. 

In fact, if you look at the first response on this thread, I provided a link
to an example [1] containing the solution to your problem. I get the feeling
that you don't take the time to comprehend (or maybe even read?) the answers
you are given.

I have a bit of a philosophy in life:
If one person says you're being an idiot, don't pay much attention. If two
(or more) people say it, you're most likely being an idiot ;)

[1]
http://tapestry.1045711.n5.nabble.com/Gallery-for-each-article-using-hibernate-td5716817.html





--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716989.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
Thanks Taha... but I got a huge problem understanding this language and I am not talking about T5.

I am having fun with this T5...  real diamond grade fun.
Is that such a crime ?
I can model the natural world... am I not allowed?
I enjoy the ups and downs and challenges and problems.

I dont take my work so serious that I have to exurt myself to try and take other folks out.
And yeah that kinda stuff runs deep. 
How would you like it if someone told you that your insane and need to hang it up? And you call that polite?

I dont know this guy from a hole in the wall 
and for all he knows I could have a brain tumor the size of a piece of meatloaf and be drooling in a wheel chair.

It all leads back home... and I find it very disheartening that the remote folks are very ungrateful for the fruitful air that has been given them.

i am always greatful for the help and ready to help anyone no matter what the circumstances.
I will keep my questions to a bare minimum in order to keep lenny happy. I can handle it.

- cheers
 		 	   		  

RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
so context was the solution... i get my pagenumber in nicely to the handler

<t:eventLink  t:id="IndividualPage" t:context="${pageValue}" >

thanks for helping

: )
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 10:28:38 -0400





Lance, jap slappin me is going to make me a better engineer... thank you

                                    <t:eventLink  t:id="IndividualPage" parameters="pageValue" >
                                        <t:outputRaw value="${individualPageIndex}"/> 
                                    </t:eventLink>

    public int getPageValue() {
        return pageIndex + 2;
    }    

but as far as this code goes... it produces the following (including the lines commented out) (not sure what else to say... but i did find a solution with your help):

41						<t:if test="pages">42							<t:Loop id="foreachpage" source="pages" value="currentPage" index="pageIndex">43								<a>44									<!-- <t:eventLink  t:id="IndividualPage" t:parameters="prop:{'pageNum':'indexValue'}" > -->45									<!-- <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" > -->46									<t:eventLink  t:id="IndividualPage" parameters="pageValue" >47										<t:outputRaw value="${individualPageIndex}"/> 48									</t:eventLink>49								</a>50							</t:Loop>51						</t:if>locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure
 reading parameter 'parameters' of component 
Home:gallerywidget.individualpage: Could not find a coercion from type 
java.lang.Integer to type java.util.Map.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.util.UnknownValueExceptionCould not find a coercion from type java.lang.Integer to type java.util.Map.
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 00:28:31 -0400





alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 17:43:37 -0400





Lance, this has specifically to do with the parameters construct failing on java methods

I dont know what to do.

I wrote the method as you specified.


t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 

parameters construct refuses to create the Map if I use a java method or try to dereference a java method

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 16:20:46 -0400






t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  

Re: EventLink parameters

Posted by Taha Siddiqi <ta...@gmail.com>.
Hi Ken

I think Lenny has been most polite to you by sending you a private message. Although I do believe people can learn if they try(don't know about aviation though :)) but your way is not the right way, IMHO. 

Migrating a T4 app to T5 is not an easy job, especially when your T5 skills are not so good.

If I were you I would start with a getting started, then follow the examples on the Jumpstart, then read the book by Igor, then go through the tapestry documentation and only then think of starting the migration.

I can tell you for sure, once you have done all this, you will be in a position to understand why your questions are not the right questions.

Best of luck
Taha

On Oct 17, 2012, at 9:02 AM, Ken in Nashua wrote:

> 
> 
>> Subject: Re: EventLink parameters
>> From: lprimak@hope.nyc.ny.us
>> Date: Tue, 16 Oct 2012 11:06:10 -0400
>> To: kcolassi@live.com
>> 
>> Seriously, I hate being "rude anonymous guy" but we have this saying in aviation (my other profession)
>> "this ain't your thing" and watching you taking the controls sadly knowing that one of these days you are guaranteed to crash,
>> hoping you aren't going to take other people with you.
>> 
>> For you, Ken, this development thing "ain't your thing"
>> You are asking the same questions over and over, trying the same things, hoping to get a different result.
>> This is the definition of insanity.
>> Let it go.  Find another profession.  You will never make it in the development world.
>> 
>> 
>> On Oct 16, 2012, at 10:28 AM, Ken in Nashua wrote:
>> 
>>> 
>>> Lance, jap slappin me is going to make me a better engineer... thank you
>>> 
>>>                                   <t:eventLink  t:id="IndividualPage" parameters="pageValue" >
>>>                                       <t:outputRaw value="${individualPageIndex}"/> 
>>>                                   </t:eventLink>
>>> 
>>>   public int getPageValue() {
>>>       return pageIndex + 2;
>>>   }    
>>> 
>>> but as far as this code goes... it produces the following (including the lines commented out) (not sure what else to say... but i did find a solution with your help):
>>> 
>>> 41						<t:if test="pages">42							<t:Loop id="foreachpage" source="pages" value="currentPage" index="pageIndex">43								<a>44									<!-- <t:eventLink  t:id="IndividualPage" t:parameters="prop:{'pageNum':'indexValue'}" > -->45									<!-- <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" > -->46									<t:eventLink  t:id="IndividualPage" parameters="pageValue" >47										<t:outputRaw value="${individualPageIndex}"/> 48									</t:eventLink>49								</a>50							</t:Loop>51						</t:if>locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure
>>> reading parameter 'parameters' of component 
>>> Home:gallerywidget.individualpage: Could not find a coercion from type 
>>> java.lang.Integer to type java.util.Map.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.util.UnknownValueExceptionCould not find a coercion from type java.lang.Integer to type java.util.Map.
>>> 
>>> 
>>> 
>>> 
>>> From: kcolassi@live.com
>>> To: users@tapestry.apache.org
>>> Subject: RE: EventLink parameters
>>> Date: Tue, 16 Oct 2012 00:28:31 -0400
>>> 
>>> 
>>> 
>>> 
>>> 
>>> alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that
>>> 
>>> kcolassi@live.com
>>> 
>>> 
>>> 
>>> 
>>> From: kcolassi@live.com
>>> To: users@tapestry.apache.org
>>> Subject: RE: EventLink parameters
>>> Date: Mon, 15 Oct 2012 17:43:37 -0400
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Lance, this has specifically to do with the parameters construct failing on java methods
>>> 
>>> I dont know what to do.
>>> 
>>> I wrote the method as you specified.
>>> 
>>> 
>>> t:parameters="prop:{'pageNum':'indexValue'}" 
>>> t:parameters="prop:{'pageNum':'${pageIndex}'}" 
>>> 
>>> parameters construct refuses to create the Map if I use a java method or try to dereference a java method
>>> 
>>> kcolassi@live.com
>>> 
>>> 
>>> 
>>> 
>>> From: kcolassi@live.com
>>> To: users@tapestry.apache.org
>>> Subject: RE: EventLink parameters
>>> Date: Mon, 15 Oct 2012 16:20:46 -0400
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> t:parameters="prop:{'pageNum':'indexValue'}" 
>>> t:parameters="prop:{'pageNum':'${pageIndex}'}" 
>>> 
>>> 
>>> Lance, thats just the problem... I did just that and it doesnt work.
>>> 
>>> indexValue and pageIndex are both from within the java
>>> 		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  
>> 
> 		 	   		  


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


FW: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.

> Subject: Re: EventLink parameters
> From: lprimak@hope.nyc.ny.us
> Date: Tue, 16 Oct 2012 11:06:10 -0400
> To: kcolassi@live.com
> 
> Seriously, I hate being "rude anonymous guy" but we have this saying in aviation (my other profession)
> "this ain't your thing" and watching you taking the controls sadly knowing that one of these days you are guaranteed to crash,
> hoping you aren't going to take other people with you.
> 
> For you, Ken, this development thing "ain't your thing"
> You are asking the same questions over and over, trying the same things, hoping to get a different result.
> This is the definition of insanity.
> Let it go.  Find another profession.  You will never make it in the development world.
> 
> 
> On Oct 16, 2012, at 10:28 AM, Ken in Nashua wrote:
> 
> > 
> > Lance, jap slappin me is going to make me a better engineer... thank you
> > 
> >                                    <t:eventLink  t:id="IndividualPage" parameters="pageValue" >
> >                                        <t:outputRaw value="${individualPageIndex}"/> 
> >                                    </t:eventLink>
> > 
> >    public int getPageValue() {
> >        return pageIndex + 2;
> >    }    
> > 
> > but as far as this code goes... it produces the following (including the lines commented out) (not sure what else to say... but i did find a solution with your help):
> > 
> > 41						<t:if test="pages">42							<t:Loop id="foreachpage" source="pages" value="currentPage" index="pageIndex">43								<a>44									<!-- <t:eventLink  t:id="IndividualPage" t:parameters="prop:{'pageNum':'indexValue'}" > -->45									<!-- <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" > -->46									<t:eventLink  t:id="IndividualPage" parameters="pageValue" >47										<t:outputRaw value="${individualPageIndex}"/> 48									</t:eventLink>49								</a>50							</t:Loop>51						</t:if>locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure
> > reading parameter 'parameters' of component 
> > Home:gallerywidget.individualpage: Could not find a coercion from type 
> > java.lang.Integer to type java.util.Map.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.util.UnknownValueExceptionCould not find a coercion from type java.lang.Integer to type java.util.Map.
> > 
> > 
> > 
> > 
> > From: kcolassi@live.com
> > To: users@tapestry.apache.org
> > Subject: RE: EventLink parameters
> > Date: Tue, 16 Oct 2012 00:28:31 -0400
> > 
> > 
> > 
> > 
> > 
> > alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that
> > 
> > kcolassi@live.com
> > 
> > 
> > 
> > 
> > From: kcolassi@live.com
> > To: users@tapestry.apache.org
> > Subject: RE: EventLink parameters
> > Date: Mon, 15 Oct 2012 17:43:37 -0400
> > 
> > 
> > 
> > 
> > 
> > Lance, this has specifically to do with the parameters construct failing on java methods
> > 
> > I dont know what to do.
> > 
> > I wrote the method as you specified.
> > 
> > 
> > t:parameters="prop:{'pageNum':'indexValue'}" 
> > t:parameters="prop:{'pageNum':'${pageIndex}'}" 
> > 
> > parameters construct refuses to create the Map if I use a java method or try to dereference a java method
> > 
> > kcolassi@live.com
> > 
> > 
> > 
> > 
> > From: kcolassi@live.com
> > To: users@tapestry.apache.org
> > Subject: RE: EventLink parameters
> > Date: Mon, 15 Oct 2012 16:20:46 -0400
> > 
> > 
> > 
> > 
> > 
> > 
> > t:parameters="prop:{'pageNum':'indexValue'}" 
> > t:parameters="prop:{'pageNum':'${pageIndex}'}" 
> > 
> > 
> > Lance, thats just the problem... I did just that and it doesnt work.
> > 
> > indexValue and pageIndex are both from within the java
> > 		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  
> 
 		 	   		  

RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
Lance, jap slappin me is going to make me a better engineer... thank you

                                    <t:eventLink  t:id="IndividualPage" parameters="pageValue" >
                                        <t:outputRaw value="${individualPageIndex}"/> 
                                    </t:eventLink>

    public int getPageValue() {
        return pageIndex + 2;
    }    

but as far as this code goes... it produces the following (including the lines commented out) (not sure what else to say... but i did find a solution with your help):

41						<t:if test="pages">42							<t:Loop id="foreachpage" source="pages" value="currentPage" index="pageIndex">43								<a>44									<!-- <t:eventLink  t:id="IndividualPage" t:parameters="prop:{'pageNum':'indexValue'}" > -->45									<!-- <t:eventLink  t:id="IndividualPage" t:context="${pageValue}" > -->46									<t:eventLink  t:id="IndividualPage" parameters="pageValue" >47										<t:outputRaw value="${individualPageIndex}"/> 48									</t:eventLink>49								</a>50							</t:Loop>51						</t:if>locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.internal.util.TapestryExceptionFailure
 reading parameter 'parameters' of component 
Home:gallerywidget.individualpage: Could not find a coercion from type 
java.lang.Integer to type java.util.Map.locationclasspath:org/tynamo/examples/hibernatesecurity/components/Gallery.tml, line 46org.apache.tapestry5.ioc.util.UnknownValueExceptionCould not find a coercion from type java.lang.Integer to type java.util.Map.
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Tue, 16 Oct 2012 00:28:31 -0400





alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 17:43:37 -0400





Lance, this has specifically to do with the parameters construct failing on java methods

I dont know what to do.

I wrote the method as you specified.


t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 

parameters construct refuses to create the Map if I use a java method or try to dereference a java method

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 16:20:46 -0400






t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		   		 	   		   		 	   		   		 	   		  

RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
alright lance... your context works... but it also states that there is a bug with parameters... you hadnt mentioned that

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 17:43:37 -0400





Lance, this has specifically to do with the parameters construct failing on java methods

I dont know what to do.

I wrote the method as you specified.


t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 

parameters construct refuses to create the Map if I use a java method or try to dereference a java method

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 16:20:46 -0400






t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		   		 	   		   		 	   		  

RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
Lance, this has specifically to do with the parameters construct failing on java methods

I dont know what to do.

I wrote the method as you specified.


t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 

parameters construct refuses to create the Map if I use a java method or try to dereference a java method

kcolassi@live.com
 



From: kcolassi@live.com
To: users@tapestry.apache.org
Subject: RE: EventLink parameters
Date: Mon, 15 Oct 2012 16:20:46 -0400






t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		   		 	   		  

RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.

t:parameters="prop:{'pageNum':'indexValue'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 


Lance, thats just the problem... I did just that and it doesnt work.

indexValue and pageIndex are both from within the java
 		 	   		   		 	   		  

RE: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
It looks like you're trying to do too much logic in a template again. Write a
getter for your logic and access the simplified property in your template.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716886.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


RE: EventLink parameters

Posted by Ken in Nashua <kc...@live.com>.
event link parameters is very sensitive


t:parameters="prop:{'pageNum':'indexValue'}" 
this compiles and runs but doesnt give me what i want


t:parameters="prop:{'pageNum':'2'}" 
this compiles and runs but doesnt give me what i want



t:parameters="prop:{'pageNum':'${pageIndex} + 2'}" 
t:parameters="prop:{'pageNum':'${pageIndex}'}" 
t:parameters="prop:{'pageNum':'${pageIndex+2}'}" 
this is what i want to try (and want) but it doesnt compile or run and complains about coercian to Map

all I want to do is send a pageNum parameter into my event handler

:(
 		 	   		  

Re: EventLink parameters

Posted by Lance Java <la...@googlemail.com>.
I suggest you get my gallery example up and running from this thread
tapestry.1045711.n5.nabble.com/Gallery-for-each-article-using-hibernate-td5716817.html

Note how I do the "work" in a getter so that every request will invoke it.
Note also that it does not use @Persist.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/EventLink-parameters-tp5716874p5716875.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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