You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by membersound <me...@web.de> on 2012/10/28 15:14:50 UTC
Define a method as source for a grid?
How can I get the source for a grid from a method, instead of a property?
Something like:
<t:grid source="getUsers()" row="user">
public class UserPage {
@Property
User user;
List<User> getUsers() {
return userService.getUsers();
}
}
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Define-a-method-as-source-for-a-grid-tp5717349.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: Define a method as source for a grid?
Posted by membersound <me...@web.de>.
OK sorry your were right. I had some problems in my session injection.
You solution works as expected without the need of adding a extra List
property.
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Define-a-method-as-source-for-a-grid-tp5717349p5717356.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: Define a method as source for a grid?
Posted by membersound <me...@web.de>.
Without a
@Property List<User> users?
No change: "Failure reading parameter 'source' of component ".
And with a list property: "Unable to create new accessor method public
java.util.List getUsers() <()Ljava/util/List<Lentities/User;>;> on class
UserPage as the method is already implemented."
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Define-a-method-as-source-for-a-grid-tp5717349p5717353.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: Define a method as source for a grid?
Posted by Nicolas Bouillon <ni...@bouillon.net>.
Maybe this way ?
<t:grid source="users" row="user">
public class UserPage {
List<User> getUsers() {
return userService.getUsers();
}
}
On Sun, Oct 28, 2012 at 3:14 PM, membersound <me...@web.de> wrote:
> <t:grid source="getUsers()" row="user">
>
> public class UserPage {
> @Property
> User user;
>
> List<User> getUsers() {
> return userService.getUsers();
> }
> }
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org