Re: Tapestry Form Fields Query. Please advise.

2007-04-10 Thread Numa Schmeder

Hi,

You can persist your field in the session using @Persist or in  
".page" file persist="session", or if your fields are encapsulated in  
an object you can persist the object in the session using ASO.


Numa

Le 11 avr. 07 à 06:28, tapuser a écrit :



Hi,
My domain object has 20 Fields. I am trying to place these  
fields in two

pages ( 10 Each). While I am saving the 1st 10 fields in page one, the
remaining 10 fields are getting reset to null values. The same true  
when I
am updating the values in 2nd Page ( 1st Page values are getting  
reset.). Do
I need to store unwanted fields in the form hidden fields in  
respective
page? Please suggest if there are alternatives. What if my domain  
object has

aList. How can I hide it?

Thanks.
Sri
--
View this message in context: http://www.nabble.com/Tapestry-Form- 
Fields-Query.-Please-advise.-tf3557263.html#a9933040

Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5:Page navigation

2007-04-10 Thread Weisu

Hi,
I have a login page, when user logins, it navigates to next page. How can I
hide the login page when I click the back button from IE. I am using
onActive() in Login page likes:
String onActivate()
{
if (!_user.isLogin()== true) {
return null;
}else{
return "Start";
}   
}
But it still shows the login page.
Thanks.
-- 
View this message in context: 
http://www.nabble.com/T5%3APage-navigation-tf3557597.html#a9934010
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry Form Fields Query. Please advise.

2007-04-10 Thread tapuser

Hi,
My domain object has 20 Fields. I am trying to place these fields in two
pages ( 10 Each). While I am saving the 1st 10 fields in page one, the
remaining 10 fields are getting reset to null values. The same true when I
am updating the values in 2nd Page ( 1st Page values are getting reset.). Do
I need to store unwanted fields in the form hidden fields in respective
page? Please suggest if there are alternatives. What if my domain object has
aList. How can I hide it?

Thanks.
Sri
-- 
View this message in context: 
http://www.nabble.com/Tapestry-Form-Fields-Query.-Please-advise.-tf3557263.html#a9933040
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: EventListener questions

2007-04-10 Thread Anna Vo
If you are using a DirectLink or a Submit button you do not need to use
the @EventListener annotation. You can specify using updateComponents
which elements to refresh. See
http://tapestry.apache.org/tapestry4.1/components/link/directlink.html
and http://tapestry.apache.org/tapestry4.1/components/form/submit.html
for available parameters.

Example:
Link 

The idOfAreaToUpdate is the id of a component () and not just the id of a div.

If you use @EventListener, see
http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html for
examples and also check out Kent Tong's book:
http://www.agileskills2.org/EWDT/. Chapter 11 has edit and delete
examples.
 
If you want to use javascript, try using scripts. You can include a js
file and do some dynamic scripting.
http://tapestry.apache.org/tapestry4.1/components/general/script.html

http://tapestry.apache.org/tapestry4.1/usersguide/script.html

-Original Message-
From: Chris Chiappone [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 5:40 PM
To: Tapestry List
Subject: EventListener questions

Hi I was wondering what the correct way would be to create an
EventListener that returns a confirm when a button is clicked.

I have the following that doesn't work:


@EventListener(elements="deleteButton", events="onclick")
public String testThis(){

return "return confirm('"+
appMess.getString("delete.case") +"')";

}

@Component(id="deleteButton", type="DirectLink", bindings={
"parameters=ognl:currCase",
"renderer=bean:buttonRenderer",
"listener=listener:deleteCaseListener",
})
public abstract DirectLink getDeleteButton();


What is the correct way to go about doing something like this?

Thanks

-- 
~chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ... assets and paths changing?

2007-04-10 Thread Howard Lewis Ship

The documentation is always ahead of the non-snapshot JARs.

On 4/10/07, Bruce Petro <[EMAIL PROTECTED]> wrote:

Ah... the docs must be 5.0.4 compatible, but I assumed they were older
not newer.  THANKS!

-Original Message-
From: robert zeigler [mailto:[EMAIL PROTECTED] On Behalf Of
Robert Zeigler
Sent: Tuesday, April 10, 2007 5:00 PM
To: Tapestry users
Subject: Re: T5 ... assets and paths changing?

Actually, T5.0.3 didn't remove path; path was added after 5.0.3.
For T5.0.3 you do:

@Inject("../edit.png")
private Asset _icon;

Robert

On Apr 10, 2007, at 4/103:55 PM , Bruce Petro wrote:

> It appears that T5.0.3 has removed @Asset and @Path
>
> How do we then load an image to be used either directly or as a BG
> image?
>
> I've looked all over including the Introduction page where you
> appear to
> keep a running feature changes list.
>
>
>
> Thanks
>
>
>
>   @Inject
>
> @Path("../edit.png")
>
> private Asset _icon;
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



EventListener questions

2007-04-10 Thread Chris Chiappone

Hi I was wondering what the correct way would be to create an
EventListener that returns a confirm when a button is clicked.

I have the following that doesn't work:


@EventListener(elements="deleteButton", events="onclick")
public String testThis(){

return "return confirm('"+ appMess.getString("delete.case") 
+"')";

}

@Component(id="deleteButton", type="DirectLink", bindings={
"parameters=ognl:currCase", 
"renderer=bean:buttonRenderer",
"listener=listener:deleteCaseListener",
})
public abstract DirectLink getDeleteButton();


What is the correct way to go about doing something like this?

Thanks

--
~chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is OGNL 2.7 compatible with JDK 1.4 ?

2007-04-10 Thread Jesse Kuhnert

"oops"

Guess I need to run the ognl unit tests in 1.4 occasionally...

On 4/10/07, Hugo Palma <[EMAIL PROTECTED]> wrote:

I'm asking because i'm getting this error running it:

Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at ognl.ASTProperty.toSetSourceString(ASTProperty.java:548)
at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.generateSetter(
HiveMindExpressionCompiler.java:386)
at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
(HiveMindExpressionCompiler.java:162)
at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:388)
at ognl.Ognl.compileExpression(Ognl.java:123)
at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
ExpressionCacheImpl.java:129)
... 65 more

It seems that it's looking for an implementation of Integer.valueOf(Integer).
This kind of method call would only work in JDK 1.5.

Thanks,

Hugo




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4.1.1 stateless contrib:table

2007-04-10 Thread Shawn Church
I am needing to provide sortable contrib:Tables in my application, but I
need them to survive a session timeout.  I normally buckle and make the
TableView source persist in the session, but that is never a very nice
solution.  I am providing my own IBasicTableModel, so I'm reloading the
table data on each request.  I thought I could use the new TableView
persist parameter to persist the table state to the client, as in:



Rendering a table, killing the application, restarting the app, and then
clicking on a sortable column header results in a StaleSessionException.

I have tried implementing my own ITableSessionStateManager, but the
default manager along with client persistence I thought should work.  I
would really appreciate some input if anyone has been able to implement
a truly stateless table.

Thanks,
Shawn

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: T5 ... assets and paths changing?

2007-04-10 Thread Bruce Petro
Ah... the docs must be 5.0.4 compatible, but I assumed they were older
not newer.  THANKS!

-Original Message-
From: robert zeigler [mailto:[EMAIL PROTECTED] On Behalf Of
Robert Zeigler
Sent: Tuesday, April 10, 2007 5:00 PM
To: Tapestry users
Subject: Re: T5 ... assets and paths changing?

Actually, T5.0.3 didn't remove path; path was added after 5.0.3.
For T5.0.3 you do:

@Inject("../edit.png")
private Asset _icon;

Robert

On Apr 10, 2007, at 4/103:55 PM , Bruce Petro wrote:

> It appears that T5.0.3 has removed @Asset and @Path
>
> How do we then load an image to be used either directly or as a BG
> image?
>
> I've looked all over including the Introduction page where you  
> appear to
> keep a running feature changes list.
>
>
>
> Thanks
>
>
>
>   @Inject
>
> @Path("../edit.png")
>
> private Asset _icon;
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ... assets and paths changing?

2007-04-10 Thread Robert Zeigler

Actually, T5.0.3 didn't remove path; path was added after 5.0.3.
For T5.0.3 you do:

@Inject("../edit.png")
private Asset _icon;

Robert

On Apr 10, 2007, at 4/103:55 PM , Bruce Petro wrote:


It appears that T5.0.3 has removed @Asset and @Path

How do we then load an image to be used either directly or as a BG
image?

I've looked all over including the Introduction page where you  
appear to

keep a running feature changes list.



Thanks



  @Inject

@Path("../edit.png")

private Asset _icon;






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 ... assets and paths changing?

2007-04-10 Thread Bruce Petro
It appears that T5.0.3 has removed @Asset and @Path

How do we then load an image to be used either directly or as a BG
image?

I've looked all over including the Introduction page where you appear to
keep a running feature changes list.

 

Thanks

 

  @Inject

@Path("../edit.png")

private Asset _icon;

 



Re: Tap 4.1.1 problem: async direct link returns empty ajax response

2007-04-10 Thread Jesse Kuhnert

No things should still work the same with 4.1.1. .(but upgrading might
be a good idea either way)

The error you got means that you don't have a component defined in
your page with an id of "div1". Your example before on how you were
defining your div blocks was incorrect and I provided an example of
how to do it...ie :



It'll work if you define your block that way.

On 4/10/07, Matt Larson <[EMAIL PROTECTED]> wrote:

Hi Jesse,

I did try this approach previously, thinking OGNL would use the Map key
as a property like in your example (I think that's what it's doing in
your example?).  But following your example very closely, I get this
exception:

Unable to read OGNL expression...source is null for getProperty(null,
"clientId")

(source is
updateComponents="ognl:{page.components.div1.clientId,page.components.div2.clientId}")

I think was partly the cause of my confusion before :).  I couldn't see
how that expression could work, and it appears to be dying at the
div1/div2 step.

Now I'm suspecting I need to upgrade to the latest Tap 4.x source and
the latest OGNL, which I know you have done a lot of work on.  Do I need
those to make your example work?

Thanks again,
Matt

Jesse Kuhnert wrote:
> You want to do something like this instead for your divs:
>
> 
>
> Then your updateComponents statement becomes
>
> 
updateComponents="ognl:{page.components.foo.clientId,page.components.someOtherDiv.clientId}"
>
>
> On 4/10/07, Matt Larson <[EMAIL PROTECTED]> wrote:
>> Jesse,
>>
>> Thanks for your response.  This feels like the problem, that the IDs on
>> the  tags are not being matched.  However due to my lack of
>> knowledge about Tapestry's internals, I haven't been able to implement
>> your suggestion.
>>
>> What I can't figure out is how to get the clientId out of the OGNL
>> expression you used (page.components.div1.clientId).  I had a look at
>> what is in the Map that page.components returns, and I don't see
>> anything that looks like my components' clientIds in either the
>> component.getClientId() or in the set of keys of the components Map.
>> How do I get the clientId from a component named "div1", given that I'm
>> in a For loop as well?  I'm confused about what the updateComponents
>> parameter in the DirectLink component should take instead of the IDs on
>> the s since I can't seem to retrieve the clientIds.
>>
>> Here is what I am doing now, using components with IDs to try to follow
>> your example:
>>
>> In the .jwc file I have two components for s that look like this:
>>
>> 
>> 
>> 
>>
>> 
>> 
>> 
>>
>> These are used to display the s in the .html file, which will be
>> updated by the asynchronous DirectLink.
>>
>> Then in my DirectLink component:
>>
>> > listener="listener:submitRatingAjax"
>> async="ognl:true"
>> updateComponents="ognl:{'ratingImage' +
>> hunch.id,'ratingStars' + hunch.id}">...
>>
>> If you or anyone else can help direct me to the right way to get the
>> clientIds for components for use within the updateComponents parameter,
>> that would be greatly appreciated.  I have looked at the source code and
>> APIs but so far that hasn't cleared it up.
>>
>> Cheers,
>> Matt
>>
>> Jesse Kuhnert wrote:
>> > Hmm... You can try adding some of the server side logging stuff
>> > outlined here:
>> http://tapestry.apache.org/tapestry4.1/ajax/debugging.html
>> > .
>> >
>> > I'm guessing that the clientId of the div's you are trying to update
>> > doesn't match on these responses.
>> >
>> > One thing you could do as a test is if you currently do something
>> like:
>> >
>> > > >
>> > change it to :
>> >
>> > > > updateComponents="ognl:{page.components.div1.clientId,
>> > page.components.div2.clientId}"
>> >
>> > I noticed something similar to this recently and probably need to make
>> > updateComponents="a,b" automatically use the clientId and not
>> > componentId to match id's on the response.
>> >
>> > Hopefully that's the problem.
>> >
>> > On 4/8/07, Matt Larson <[EMAIL PROTECTED]> wrote:
>> >> I have just run into a problem that I think is probably a bug, but
>> may
>> >> be something that I am doing wrong.  It's definitely a showstopper
>> in my
>> >> app, though.
>> >>
>> >> I have a component that allows users to rate something via the normal
>> >> kind of "stars" rating.  After a user clicks a star the overall
>> rating
>> >> of the object is calculated and displayed as a graphic.  I use a
>> >> component that employs an asynchronous DirectLink to do this, with
>> each
>> >> star having a different value on submit, and it works quite
>> nicely.  I
>> >> have this custom component on two different pages and I can submit
>> >> ratings on both.
>> >>
>> >> However, I just added pagination, and as soon as you move off of the
>> >> home page via the "next" pagination link, the DirectLink for
>> ratings no
>> >> longer returns anything. The pagination works using the standard
>> kind of
>> >> "start from" parameter, which calls a listen

Re: Tap 4.1.1 problem: async direct link returns empty ajax response

2007-04-10 Thread Matt Larson

Hi Jesse,

I did try this approach previously, thinking OGNL would use the Map key 
as a property like in your example (I think that's what it's doing in 
your example?).  But following your example very closely, I get this 
exception:


Unable to read OGNL expression...source is null for getProperty(null, 
"clientId")


(source is 
updateComponents="ognl:{page.components.div1.clientId,page.components.div2.clientId}")


I think was partly the cause of my confusion before :).  I couldn't see 
how that expression could work, and it appears to be dying at the 
div1/div2 step.


Now I'm suspecting I need to upgrade to the latest Tap 4.x source and 
the latest OGNL, which I know you have done a lot of work on.  Do I need 
those to make your example work?


Thanks again,
Matt

Jesse Kuhnert wrote:

You want to do something like this instead for your divs:



Then your updateComponents statement becomes

updateComponents="ognl:{page.components.foo.clientId,page.components.someOtherDiv.clientId}" 



On 4/10/07, Matt Larson <[EMAIL PROTECTED]> wrote:

Jesse,

Thanks for your response.  This feels like the problem, that the IDs on
the  tags are not being matched.  However due to my lack of
knowledge about Tapestry's internals, I haven't been able to implement
your suggestion.

What I can't figure out is how to get the clientId out of the OGNL
expression you used (page.components.div1.clientId).  I had a look at
what is in the Map that page.components returns, and I don't see
anything that looks like my components' clientIds in either the
component.getClientId() or in the set of keys of the components Map.
How do I get the clientId from a component named "div1", given that I'm
in a For loop as well?  I'm confused about what the updateComponents
parameter in the DirectLink component should take instead of the IDs on
the s since I can't seem to retrieve the clientIds.

Here is what I am doing now, using components with IDs to try to follow
your example:

In the .jwc file I have two components for s that look like this:









These are used to display the s in the .html file, which will be
updated by the asynchronous DirectLink.

Then in my DirectLink component:

...

If you or anyone else can help direct me to the right way to get the
clientIds for components for use within the updateComponents parameter,
that would be greatly appreciated.  I have looked at the source code and
APIs but so far that hasn't cleared it up.

Cheers,
Matt

Jesse Kuhnert wrote:
> Hmm... You can try adding some of the server side logging stuff
> outlined here: 
http://tapestry.apache.org/tapestry4.1/ajax/debugging.html

> .
>
> I'm guessing that the clientId of the div's you are trying to update
> doesn't match on these responses.
>
> One thing you could do as a test is if you currently do something 
like:

>
> 
> change it to :
>
>  updateComponents="ognl:{page.components.div1.clientId,
> page.components.div2.clientId}"
>
> I noticed something similar to this recently and probably need to make
> updateComponents="a,b" automatically use the clientId and not
> componentId to match id's on the response.
>
> Hopefully that's the problem.
>
> On 4/8/07, Matt Larson <[EMAIL PROTECTED]> wrote:
>> I have just run into a problem that I think is probably a bug, but 
may
>> be something that I am doing wrong.  It's definitely a showstopper 
in my

>> app, though.
>>
>> I have a component that allows users to rate something via the normal
>> kind of "stars" rating.  After a user clicks a star the overall 
rating

>> of the object is calculated and displayed as a graphic.  I use a
>> component that employs an asynchronous DirectLink to do this, with 
each
>> star having a different value on submit, and it works quite 
nicely.  I

>> have this custom component on two different pages and I can submit
>> ratings on both.
>>
>> However, I just added pagination, and as soon as you move off of the
>> home page via the "next" pagination link, the DirectLink for 
ratings no
>> longer returns anything. The pagination works using the standard 
kind of

>> "start from" parameter, which calls a listener that simply does
>> setStartFrom(int startFrom) and then lets the pageBeginRender() 
method

>> calculate the objects to display.
>>
>> I do know the reason that the ratings no longer show the updated
>> graphic--the AjaxResponse just returns empty tags, with no errors
>> reported at all (had a look at this with firebug):
>>
>> 
>>
>> The actual link is firing just fine, and all of the server side
>> processing happens as my logs show. It's just that the ajax 
response is
>> empty when it should include new HTML for the s to be 
updated.  It
>> seems like there is some kind of setup that happens when you go 
directly

>> to Home.html and click the rating link, but not when I've gone to the
>> home page via a DirectLink.  I cannot see what would be different, 
since
>> my pageBeginRender() method is called, and everything else happens 
just

>>

Re: Tap 4.1.1 problem: async direct link returns empty ajax response

2007-04-10 Thread Jesse Kuhnert

You want to do something like this instead for your divs:



Then your updateComponents statement becomes

updateComponents="ognl:{page.components.foo.clientId,page.components.someOtherDiv.clientId}"

On 4/10/07, Matt Larson <[EMAIL PROTECTED]> wrote:

Jesse,

Thanks for your response.  This feels like the problem, that the IDs on
the  tags are not being matched.  However due to my lack of
knowledge about Tapestry's internals, I haven't been able to implement
your suggestion.

What I can't figure out is how to get the clientId out of the OGNL
expression you used (page.components.div1.clientId).  I had a look at
what is in the Map that page.components returns, and I don't see
anything that looks like my components' clientIds in either the
component.getClientId() or in the set of keys of the components Map.
How do I get the clientId from a component named "div1", given that I'm
in a For loop as well?  I'm confused about what the updateComponents
parameter in the DirectLink component should take instead of the IDs on
the s since I can't seem to retrieve the clientIds.

Here is what I am doing now, using components with IDs to try to follow
your example:

In the .jwc file I have two components for s that look like this:









These are used to display the s in the .html file, which will be
updated by the asynchronous DirectLink.

Then in my DirectLink component:

...

If you or anyone else can help direct me to the right way to get the
clientIds for components for use within the updateComponents parameter,
that would be greatly appreciated.  I have looked at the source code and
APIs but so far that hasn't cleared it up.

Cheers,
Matt

Jesse Kuhnert wrote:
> Hmm... You can try adding some of the server side logging stuff
> outlined here: http://tapestry.apache.org/tapestry4.1/ajax/debugging.html
> .
>
> I'm guessing that the clientId of the div's you are trying to update
> doesn't match on these responses.
>
> One thing you could do as a test is if you currently do something like:
>
> 
> change it to :
>
>  updateComponents="ognl:{page.components.div1.clientId,
> page.components.div2.clientId}"
>
> I noticed something similar to this recently and probably need to make
> updateComponents="a,b" automatically use the clientId and not
> componentId to match id's on the response.
>
> Hopefully that's the problem.
>
> On 4/8/07, Matt Larson <[EMAIL PROTECTED]> wrote:
>> I have just run into a problem that I think is probably a bug, but may
>> be something that I am doing wrong.  It's definitely a showstopper in my
>> app, though.
>>
>> I have a component that allows users to rate something via the normal
>> kind of "stars" rating.  After a user clicks a star the overall rating
>> of the object is calculated and displayed as a graphic.  I use a
>> component that employs an asynchronous DirectLink to do this, with each
>> star having a different value on submit, and it works quite nicely.  I
>> have this custom component on two different pages and I can submit
>> ratings on both.
>>
>> However, I just added pagination, and as soon as you move off of the
>> home page via the "next" pagination link, the DirectLink for ratings no
>> longer returns anything. The pagination works using the standard kind of
>> "start from" parameter, which calls a listener that simply does
>> setStartFrom(int startFrom) and then lets the pageBeginRender() method
>> calculate the objects to display.
>>
>> I do know the reason that the ratings no longer show the updated
>> graphic--the AjaxResponse just returns empty tags, with no errors
>> reported at all (had a look at this with firebug):
>>
>> 
>>
>> The actual link is firing just fine, and all of the server side
>> processing happens as my logs show. It's just that the ajax response is
>> empty when it should include new HTML for the s to be updated.  It
>> seems like there is some kind of setup that happens when you go directly
>> to Home.html and click the rating link, but not when I've gone to the
>> home page via a DirectLink.  I cannot see what would be different, since
>> my pageBeginRender() method is called, and everything else happens just
>> like it should in the component and in the page.
>>
>> If anyone has run into this before or has an idea regarding what this
>> might cause an async DirectLink to return nothing in some cases, please
>> let me know.  The pagination is a major part of my app, and users need
>> to be able to submit ratings no matter which page they are on, so I am
>> kind of dead in the water until I get this fixed.  Next step is to spend
>> quality time with the source code, but if anyone has a better idea
>> before I take that time...
>>
>> Cheers,
>> Matt
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>


-
To unsubscribe, e-

Re: Tap 4.1.1 problem: async direct link returns empty ajax response

2007-04-10 Thread Matt Larson

Jesse,

Thanks for your response.  This feels like the problem, that the IDs on 
the  tags are not being matched.  However due to my lack of 
knowledge about Tapestry's internals, I haven't been able to implement 
your suggestion.


What I can't figure out is how to get the clientId out of the OGNL 
expression you used (page.components.div1.clientId).  I had a look at 
what is in the Map that page.components returns, and I don't see 
anything that looks like my components' clientIds in either the 
component.getClientId() or in the set of keys of the components Map.  
How do I get the clientId from a component named "div1", given that I'm 
in a For loop as well?  I'm confused about what the updateComponents 
parameter in the DirectLink component should take instead of the IDs on 
the s since I can't seem to retrieve the clientIds.


Here is what I am doing now, using components with IDs to try to follow 
your example:


In the .jwc file I have two components for s that look like this:


  

  
   
  
   


These are used to display the s in the .html file, which will be 
updated by the asynchronous DirectLink.


Then in my DirectLink component:

   updateComponents="ognl:{'ratingImage' + 
hunch.id,'ratingStars' + hunch.id}">...


If you or anyone else can help direct me to the right way to get the 
clientIds for components for use within the updateComponents parameter, 
that would be greatly appreciated.  I have looked at the source code and 
APIs but so far that hasn't cleared it up.


Cheers,
Matt

Jesse Kuhnert wrote:

Hmm... You can try adding some of the server side logging stuff
outlined here: http://tapestry.apache.org/tapestry4.1/ajax/debugging.html
.

I'm guessing that the clientId of the div's you are trying to update
doesn't match on these responses.

One thing you could do as a test is if you currently do something like:

 wrote:

I have just run into a problem that I think is probably a bug, but may
be something that I am doing wrong.  It's definitely a showstopper in my
app, though.

I have a component that allows users to rate something via the normal
kind of "stars" rating.  After a user clicks a star the overall rating
of the object is calculated and displayed as a graphic.  I use a
component that employs an asynchronous DirectLink to do this, with each
star having a different value on submit, and it works quite nicely.  I
have this custom component on two different pages and I can submit
ratings on both.

However, I just added pagination, and as soon as you move off of the
home page via the "next" pagination link, the DirectLink for ratings no
longer returns anything. The pagination works using the standard kind of
"start from" parameter, which calls a listener that simply does
setStartFrom(int startFrom) and then lets the pageBeginRender() method
calculate the objects to display.

I do know the reason that the ratings no longer show the updated
graphic--the AjaxResponse just returns empty tags, with no errors
reported at all (had a look at this with firebug):



The actual link is firing just fine, and all of the server side
processing happens as my logs show. It's just that the ajax response is
empty when it should include new HTML for the s to be updated.  It
seems like there is some kind of setup that happens when you go directly
to Home.html and click the rating link, but not when I've gone to the
home page via a DirectLink.  I cannot see what would be different, since
my pageBeginRender() method is called, and everything else happens just
like it should in the component and in the page.

If anyone has run into this before or has an idea regarding what this
might cause an async DirectLink to return nothing in some cases, please
let me know.  The pagination is a major part of my app, and users need
to be able to submit ratings no matter which page they are on, so I am
kind of dead in the water until I get this fixed.  Next step is to spend
quality time with the source code, but if anyone has a better idea
before I take that time...

Cheers,
Matt




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Best page templating strategy

2007-04-10 Thread Howard Lewis Ship

This could also be written as:

Block onBeforeRenderBody() { return _sidebar; }

On 4/10/07, Yann Ramin <[EMAIL PROTECTED]> wrote:


Just figured out you can return the block in a render stage to get it to
render. Deceptively simple, but the docs (from my reading), didn't
mention it.

@BeforeRenderBody
Block doSidebar()
{
return _sidebar;
}


Yann Ramin wrote:
> I got a good start on this, but still missing something fundamental.
>
> In Page.java, I have the Sidebar component.
> In Page.html, I pass the component in a parameter
> 
> 
> 
>
> In Layout.java I have a sidebar block
>
> @Parameter(required=true)
> private Block _sidebar;
>
> What I can't figure out is how to get the block to render.
>
> Thanks for all of your suggestions so far!
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Best page templating strategy

2007-04-10 Thread Yann Ramin


Just figured out you can return the block in a render stage to get it to 
render. Deceptively simple, but the docs (from my reading), didn't 
mention it.


@BeforeRenderBody
Block doSidebar()
{
return _sidebar;
}


Yann Ramin wrote:

I got a good start on this, but still missing something fundamental.

In Page.java, I have the Sidebar component.
In Page.html, I pass the component in a parameter




In Layout.java I have a sidebar block

@Parameter(required=true)
private Block _sidebar;

What I can't figure out is how to get the block to render.

Thanks for all of your suggestions so far!




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: contrib:Tree linking to other tapestry pages

2007-04-10 Thread tapuser

Hi,
  I am also having the same issue. I want add a button to the tree
table's row.  Any idea?
Thanks.
Sri

anil wrote:
> 
> Hi -
> 
> I'm using the contrib:TreeView and related components (TreeDataView &
> TreeNodeView) to display a table of contents for a book. 
> 
> I'd like to keep the makeNodeDirect setting set to true so the user can
> click on the +/- boxes to expand & collapse the hierarchy, 
> but I'd like the actual link of tree item to go to another tapestry page
> (i.e. not open or close the hierarchy)
> 
> Is there a relatively simple way I can stop the makeNodeDirect setting for
> the actual link text collapsing & opening the hierarchy, but still
> preserving the +/- image links?
> 
> I pressume that I would need to make some kind of custom component but I'm
> unsure how to approach the development.
> 
> If anyone could point me in the right direction for this then that would
> be much appreciated.
> 
> Anil.
> 

-- 
View this message in context: 
http://www.nabble.com/contrib%3ATree-linking-to-other-tapestry-pages-tf2233619.html#a9924336
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Best page templating strategy

2007-04-10 Thread Yann Ramin

I got a good start on this, but still missing something fundamental.

In Page.java, I have the Sidebar component.
In Page.html, I pass the component in a parameter




In Layout.java I have a sidebar block

@Parameter(required=true)
private Block _sidebar;

What I can't figure out is how to get the block to render.

Thanks for all of your suggestions so far!


Howard Lewis Ship wrote:

If the sidebar really changes for each page, then it can be a Block
parameter to the layout component. This will allow the layout
component to control where, within its templates, the sidebar appears.
Check out the t:parameter documentation.

On 4/10/07, Stephane PAQUET <[EMAIL PROTECTED]> wrote:

Just one question, why don't  you use a CSS layout + ASSET in stead
of component (this does not apply to the sidebar).
Rgds,
  SP

On Apr 10, 2007, at 8:28 AM, Yann Ramin wrote:

> I'm using T5 to do some experimental testing, creating some mockup
> applications to teach me more about the framework.
>
> My question is, how do you best handle multi-part layouts?
>
> For instance, a Layout can be composed of a Body and a Sidebar. The
> Sidebar can be a component.
>
> My current approach is to have a
>
> Page.java:
>
> public Page {
>  @Component
>  private Layout _layout;
>  @Component
>  private Sidebar _sidebar;
> }
>
> Page.html:
>
> 
> 
> fee fi fo fum
> 
> 
> 
>
> This feels suboptimal, as I'm encoding the location of the sidebar
> into each and every page (namely always coming after the main div).
> I'd like to have the Sidebar component in the Layout component, but
> feed this component from the Page to the Layout (as the Sidebar
> component could be different on every page). I.e.,  sidebar="sidebar">, but that is a parameter, not a component, so
> afaik won't work like I expect it to (it didn't in testing, but
> could have been anything).
>
> Any way of accomplishing this? Any better solutions to this
> problem? Am I missing something?
>
>
> BTW, T5 is a great framework - having lots of fun with it!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is OGNL 2.7 compatible with JDK 1.4 ?

2007-04-10 Thread Hugo Palma

I'm asking because i'm getting this error running it:

Caused by: java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;
   at ognl.ASTProperty.toSetSourceString(ASTProperty.java:548)
   at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.generateSetter(
HiveMindExpressionCompiler.java:386)
   at
org.apache.tapestry.services.impl.HiveMindExpressionCompiler.compileExpression
(HiveMindExpressionCompiler.java:162)
   at ognl.OgnlRuntime.compileExpression(OgnlRuntime.java:388)
   at ognl.Ognl.compileExpression(Ognl.java:123)
   at org.apache.tapestry.services.impl.ExpressionCacheImpl.parse(
ExpressionCacheImpl.java:129)
   ... 65 more

It seems that it's looking for an implementation of Integer.valueOf(Integer).
This kind of method call would only work in JDK 1.5.

Thanks,

Hugo


Re: [T4.0.2] Does anybody have any insight about Portlets

2007-04-10 Thread sunilmanu

I am also interested in portlets, very similar to this requirements. I also
could not find much help.
Anyone any pointers ??

thanks,
Sunil


jake123 wrote:
> 
> Hi All,
> at our company we are going to build a page where our clients will be able
> to choose from maybe 10-15 different Portlets to be displayed (say that
> that the page only can take 4-5 Portlets )
> 
> Example:
>___
>   |_Menu_|
>   | X ||  X  |
>   | X ||  X  |   X marks the Portlet
>   | X ||  |
>   |||  |
>   |||  |
>   --
> 
> Our environment are T4.0.2, Spring 2.0, Acegi 1.1, Hibernate 3.1 and Jboss
> 4.0.4GA
> 
> I have read the doc from
> http://tapestry.apache.org/tapestry4/tapestry-portlet/ but I am not clear
> on how to implement this. I have also scanned the forum for postings about
> Portlets and the hits I got was either old (before the latest version of
> T4.0.2) or kind of discouraging. Does anybody have any experience of using
> Portlets that they want to share? Any examples of how it works and how it
> goes in the project structure?
> 
> What do we need to run a Portlet in our application except the
> tapestry-portlet.jar?
> Can we have the Portlets in our "normal" project or does it need to be in
> a separate one?
> How does the application know about the Portlets available
> I read in a posting that it could be a issue with using Ajax in Portlets,
> is this correct?
> 
> I am really thankful for any insight, help or examples that you want to
> share with the forum...
> 
> Thanks,
> Jacob
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T4.0.2--Does-anybody-have-any-insight-about-Portlets-tf3528326.html#a9920882
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Best page templating strategy

2007-04-10 Thread Howard Lewis Ship

If the sidebar really changes for each page, then it can be a Block
parameter to the layout component. This will allow the layout
component to control where, within its templates, the sidebar appears.
Check out the t:parameter documentation.

On 4/10/07, Stephane PAQUET <[EMAIL PROTECTED]> wrote:

Just one question, why don't  you use a CSS layout + ASSET in stead
of component (this does not apply to the sidebar).
Rgds,
  SP

On Apr 10, 2007, at 8:28 AM, Yann Ramin wrote:

> I'm using T5 to do some experimental testing, creating some mockup
> applications to teach me more about the framework.
>
> My question is, how do you best handle multi-part layouts?
>
> For instance, a Layout can be composed of a Body and a Sidebar. The
> Sidebar can be a component.
>
> My current approach is to have a
>
> Page.java:
>
> public Page {
>  @Component
>  private Layout _layout;
>  @Component
>  private Sidebar _sidebar;
> }
>
> Page.html:
>
> 
> 
> fee fi fo fum
> 
> 
> 
>
> This feels suboptimal, as I'm encoding the location of the sidebar
> into each and every page (namely always coming after the main div).
> I'd like to have the Sidebar component in the Layout component, but
> feed this component from the Page to the Layout (as the Sidebar
> component could be different on every page). I.e.,  sidebar="sidebar">, but that is a parameter, not a component, so
> afaik won't work like I expect it to (it didn't in testing, but
> could have been anything).
>
> Any way of accomplishing this? Any better solutions to this
> problem? Am I missing something?
>
>
> BTW, T5 is a great framework - having lots of fun with it!
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: session persistance?

2007-04-10 Thread Stephane PAQUET
Yes, from what I understand persist is just to keep value between  
request. so every-time you request the page the object is in this  
case recreated.


If you want to keep this object across a session you need ASO (see T5  
doc on persistence).


You can also (but will not be kept a session level) perform a test in  
your class to instantiate only once the object and keep it for the  
page or request only.


SP

On Apr 9, 2007, at 3:34 AM, Patrick Moore wrote:


Hi there --

does anyone have some thoughts on why:

   @Persist
   @InitialValue("new java.util.HashSet()")
   public abstract Set getFollowUpMessages();
   public abstract void setFollowUpMessages(Set set);

keeps on resetting the set to a new HashSet between http requests?

It looks like according to the @Persist documentation this is the  
correct
way to set an initial value if there is no value already in the  
session. But

it seems not to be the case...

-Pat



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: Best page templating strategy

2007-04-10 Thread Stephane PAQUET
Just one question, why don't  you use a CSS layout + ASSET in stead  
of component (this does not apply to the sidebar).

Rgds,
 SP

On Apr 10, 2007, at 8:28 AM, Yann Ramin wrote:


I'm using T5 to do some experimental testing, creating some mockup
applications to teach me more about the framework.

My question is, how do you best handle multi-part layouts?

For instance, a Layout can be composed of a Body and a Sidebar. The
Sidebar can be a component.

My current approach is to have a

Page.java:

public Page {
 @Component
 private Layout _layout;
 @Component
 private Sidebar _sidebar;
}

Page.html:



fee fi fo fum




This feels suboptimal, as I'm encoding the location of the sidebar  
into each and every page (namely always coming after the main div).  
I'd like to have the Sidebar component in the Layout component, but  
feed this component from the Page to the Layout (as the Sidebar  
component could be different on every page). I.e., sidebar="sidebar">, but that is a parameter, not a component, so  
afaik won't work like I expect it to (it didn't in testing, but  
could have been anything).


Any way of accomplishing this? Any better solutions to this  
problem? Am I missing something?



BTW, T5 is a great framework - having lots of fun with it!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Downloading an offline copy of the 4.1 documentation

2007-04-10 Thread Gareth
Hi,

Can anyone tell me how to create an off-line version of the tapestry 4.1 
website?

I tried to download it by getting the tapestry-site project from svn, and build 
it with maven - something I've not used before, by following instructions on 
the tapestry site, but, 1. the instructions didn't work, and 2. after much 
fiddling and guessing, I managed to get it to build something but it seemed to 
just be the shell for the site - no documentation etc was working - all links 
broken and no files on my PC, so I guess  I downloaded the wrong thing.

I'm having to do this over a dial up connection, so if anyone can provide a 
solution I'd be very pleased - the 4.0 docs are I discovered not as up-to-date 
as I need as a beginner.

Many thanks

Gareth


  ___ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today 
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Visit Object deprecated

2007-04-10 Thread Gareth
Thanks everyone for the confirmation about the visit object - I've been using 
the ASO idea, but sticking to a "visit" object at present - worried about 
drifting too far down aisles unknown (to me a beginner) and getting stuck!


- Original Message 
From: Howard Lewis Ship <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Monday, 9 April, 2007 4:22:25 PM
Subject: Re: Visit Object deprecated

In Tapestry 4, they are more generic, called "ASOs".  You can think of
Visit as a legacy ASO, but it's better to create your own and name
them differently (no Visit) since that conflicts with a deprectated
method (Object getVisit()) on BasePage.

On 4/4/07, Gareth <[EMAIL PROTECTED]> wrote:
> Are we supposed to use some other form of session persistence, or is it a 
> good pattern to create a user Visit Object and keep all user session 
> variables inside it?
>
> Thanks
>
>
>
>
> ___
> What kind of emailer are you? Find out today - get a free analysis of your 
> email personality. Take the quiz at the Yahoo! Mail Championship.
> http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  ___ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today 
http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]