You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by dwi ardi irawan <pe...@gmail.com> on 2008/11/20 15:39:53 UTC

Q : Where is 'model' property form Grid Component ?

hi guys..it's been so long i didn't work using tapestry 5
but i have difficulty to update my application using new tapestry 5.0.16

when i used the old tapestry version (i forgot the version) it supported
something like this :
*.tml*
<table t:type="grid" rowsPerPage="20" pagerPosition="top"
source="playerList" row="player" model="playerModel" remove="idPlayer"/>


*.java
*@Retain
private BeanModel playerModel;
@Inject
private BeanModelSource beanModelSource;
@Inject
private ComponentResources resources;*
*
......
void pageLoaded(){
        playerModel = beanModelSource.create(Player.class, false,
resources);

}
.....

but when i checked...the latest version of tapestry which is tapestry 5.0.16

the method .create() for BeanModelSource is now deprecated.

does anybody know how how to fix it and how can i implement it the same way
in tapestry 5.0.16


thnx u very much


-- 
http://dwiardiirawan.blogspot.com
"cos everyone could be extraordinary...lighten up !"

Re: Q : Where is 'model' property form Grid Component ?

Posted by dwi ardi irawan <pe...@gmail.com>.
thnx for the information i got it now...
i read the src code from jumpstart and it really help me

thnx u very much

On Thu, Nov 20, 2008 at 9:47 PM, Hugo Palma <hu...@gmail.com> wrote:

> You should now use either the createDisplayModel or createEditModel method.
> Both are documented so you should easily figure out which one applies to
> your use case.
>
> You'll need to pass an additional Messages parameter that you can (if
> that's
> the case) for example get from ComponentResources.getMessages()
>
> On Thu, Nov 20, 2008 at 2:39 PM, dwi ardi irawan <penyihirkecil@gmail.com
> >wrote:
>


-- 
http://dwiardiirawan.blogspot.com
"cos everyone could be extraordinary...lighten up !"

Re: Q : Where is 'model' property form Grid Component ?

Posted by Hugo Palma <hu...@gmail.com>.
You should now use either the createDisplayModel or createEditModel method.
Both are documented so you should easily figure out which one applies to
your use case.

You'll need to pass an additional Messages parameter that you can (if that's
the case) for example get from ComponentResources.getMessages()

On Thu, Nov 20, 2008 at 2:39 PM, dwi ardi irawan <pe...@gmail.com>wrote:

> hi guys..it's been so long i didn't work using tapestry 5
> but i have difficulty to update my application using new tapestry 5.0.16
>
> when i used the old tapestry version (i forgot the version) it supported
> something like this :
> *.tml*
> <table t:type="grid" rowsPerPage="20" pagerPosition="top"
> source="playerList" row="player" model="playerModel" remove="idPlayer"/>
>
>
> *.java
> *@Retain
> private BeanModel playerModel;
> @Inject
> private BeanModelSource beanModelSource;
> @Inject
> private ComponentResources resources;*
> *
> ......
> void pageLoaded(){
>        playerModel = beanModelSource.create(Player.class, false,
> resources);
>
> }
> .....
>
> but when i checked...the latest version of tapestry which is tapestry
> 5.0.16
>
> the method .create() for BeanModelSource is now deprecated.
>
> does anybody know how how to fix it and how can i implement it the same way
> in tapestry 5.0.16
>
>
> thnx u very much
>
>
> --
> http://dwiardiirawan.blogspot.com
> "cos everyone could be extraordinary...lighten up !"
>