You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bohnert <ab...@weberhofer.at> on 2011/04/26 13:26:18 UTC

beanModel.reorder does not work on multiple fields

Hello!

I use the following code to change the order of the columns of my grid:

   public BeanModel<TicketViewModelBean> getModel() {
         if (model == null) {
             model = 
beanModelSource.createDisplayModel(TicketViewModelBean.class, 
componentResources.getMessages());
             model.reorder("tododate,contextLabel");
         }
         return model;
     }

where my bean class looks like (I do the getter myself):

     /**
      * @return the contextLabel
      */
     public Timestamp getTododate() {
         return this.tododate;
     }
     /**
      * @return the contextLabel
      */
     public final String getContextLabel() {
         return contextLabel;
     }


if I  just use one field it works fine, but if I try to use 2 or more 
fields tapestry treat them as one single field:

Render queue error in SetupRender[Tickets:grid.columns]: Failure reading 
parameter 'model' of component Tickets:grid: Bean editor model for 
at.weberhofer.eusoda.server.backend.model.TicketViewModelBean does not 
contain a property named 'tododate,contextLabel'.

what am I'm doing wrong?

Thanks,
Andreas


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


Re: beanModel.reorder does not work on multiple fields

Posted by Andreas Bohnert <ab...@weberhofer.at>.
Thank you!
I did not know that java supports a variable argument list already.

already ... I just remember that 20 years ago c++ was already able to 
deal with vargs  :)

Andreas

> 	Emmanuel DEMEY <ma...@gmail.com>
> 26. April 2011 20:14
>
>
> You can find more informations here :
> http://download.oracle.com/javase/1.5.0/docs/guide/language/varargs.html
>
> 2011/4/26 Andreas Bohnert <ab...@weberhofer.at>
>
>
>
> --
>
> ------------------------------------------------------------------------
>
> 	Andreas Bohnert <ma...@weberhofer.at>
> 26. April 2011 19:04
>
>
> hello emmanuel,
>
> yes, that make sense. thank you.
> I was wondering about 'String...'
> I haven't seen that before.
>
> Andreas
>
>
> ------------------------------------------------------------------------
>
> 	Emmanuel DEMEY <ma...@gmail.com>
> 26. April 2011 18:42
>
>
> Hi Andreas,
>
> Try model.reorder("tododate","contextLabel");
>
> The method signature is *BeanModel<T> reorder(String... propertyNames);*
>
> Emmanuel
>
>
> 2011/4/26 Andreas Bohnert <ab...@weberhofer.at>
>
>
>
> ------------------------------------------------------------------------
>
> 	Andreas Bohnert <ma...@weberhofer.at>
> 26. April 2011 18:26
>
>
> Hello!
>
> I use the following code to change the order of the columns of my grid:
>
>   public BeanModel<TicketViewModelBean> getModel() {
>         if (model == null) {
>             model = 
> beanModelSource.createDisplayModel(TicketViewModelBean.class, 
> componentResources.getMessages());
>             model.reorder("tododate,contextLabel");
>         }
>         return model;
>     }
>
> where my bean class looks like (I do the getter myself):
>
>     /**
>      * @return the contextLabel
>      */
>     public Timestamp getTododate() {
>         return this.tododate;
>     }
>     /**
>      * @return the contextLabel
>      */
>     public final String getContextLabel() {
>         return contextLabel;
>     }
>
>
> if I  just use one field it works fine, but if I try to use 2 or more 
> fields tapestry treat them as one single field:
>
> Render queue error in SetupRender[Tickets:grid.columns]: Failure 
> reading parameter 'model' of component Tickets:grid: Bean editor model 
> for at.weberhofer.eusoda.server.backend.model.TicketViewModelBean does 
> not contain a property named 'tododate,contextLabel'.
>
> what am I'm doing wrong?
>
> Thanks,
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
> ------------------------------------------------------------------------


Re: beanModel.reorder does not work on multiple fields

Posted by Emmanuel DEMEY <de...@gmail.com>.
You can find more informations here :
http://download.oracle.com/javase/1.5.0/docs/guide/language/varargs.html

2011/4/26 Andreas Bohnert <ab...@weberhofer.at>

>  hello emmanuel,
>
> yes, that make sense. thank you.
> I was wondering about 'String...'
> I haven't seen that before.
>
> Andreas
>
>    Emmanuel DEMEY <de...@gmail.com>
> 26. April 2011 18:42
>
> Hi Andreas,
>
> Try model.reorder("tododate","contextLabel");
>
> The method signature is *BeanModel<T> reorder(String... propertyNames);*
>
> Emmanuel
>
>
> 2011/4/26 Andreas Bohnert <ab...@weberhofer.at> <ab...@weberhofer.at>
>
>
>
>  ------------------------------
>
>    Andreas Bohnert <ab...@weberhofer.at>
> 26. April 2011 18:26
>
> Hello!
>
> I use the following code to change the order of the columns of my grid:
>
>   public BeanModel<TicketViewModelBean> getModel() {
>         if (model == null) {
>             model =
> beanModelSource.createDisplayModel(TicketViewModelBean.class,
> componentResources.getMessages());
>             model.reorder("tododate,contextLabel");
>         }
>         return model;
>     }
>
> where my bean class looks like (I do the getter myself):
>
>     /**
>      * @return the contextLabel
>      */
>     public Timestamp getTododate() {
>         return this.tododate;
>     }
>     /**
>      * @return the contextLabel
>      */
>     public final String getContextLabel() {
>         return contextLabel;
>     }
>
>
> if I  just use one field it works fine, but if I try to use 2 or more
> fields tapestry treat them as one single field:
>
> Render queue error in SetupRender[Tickets:grid.columns]: Failure reading
> parameter 'model' of component Tickets:grid: Bean editor model for
> at.weberhofer.eusoda.server.backend.model.TicketViewModelBean does not
> contain a property named 'tododate,contextLabel'.
>
> what am I'm doing wrong?
>
> Thanks,
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
> ------------------------------
>
>
>


--

Re: beanModel.reorder does not work on multiple fields

Posted by Andreas Bohnert <ab...@weberhofer.at>.
hello emmanuel,

yes, that make sense. thank you.
I was wondering about 'String...'
I haven't seen that before.

Andreas

> 	Emmanuel DEMEY <ma...@gmail.com>
> 26. April 2011 18:42
>
>
> Hi Andreas,
>
> Try model.reorder("tododate","contextLabel");
>
> The method signature is *BeanModel<T> reorder(String... propertyNames);*
>
> Emmanuel
>
>
> 2011/4/26 Andreas Bohnert <ab...@weberhofer.at>
>
>
>
> ------------------------------------------------------------------------
>
> 	Andreas Bohnert <ma...@weberhofer.at>
> 26. April 2011 18:26
>
>
> Hello!
>
> I use the following code to change the order of the columns of my grid:
>
>   public BeanModel<TicketViewModelBean> getModel() {
>         if (model == null) {
>             model = 
> beanModelSource.createDisplayModel(TicketViewModelBean.class, 
> componentResources.getMessages());
>             model.reorder("tododate,contextLabel");
>         }
>         return model;
>     }
>
> where my bean class looks like (I do the getter myself):
>
>     /**
>      * @return the contextLabel
>      */
>     public Timestamp getTododate() {
>         return this.tododate;
>     }
>     /**
>      * @return the contextLabel
>      */
>     public final String getContextLabel() {
>         return contextLabel;
>     }
>
>
> if I  just use one field it works fine, but if I try to use 2 or more 
> fields tapestry treat them as one single field:
>
> Render queue error in SetupRender[Tickets:grid.columns]: Failure 
> reading parameter 'model' of component Tickets:grid: Bean editor model 
> for at.weberhofer.eusoda.server.backend.model.TicketViewModelBean does 
> not contain a property named 'tododate,contextLabel'.
>
> what am I'm doing wrong?
>
> Thanks,
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
> ------------------------------------------------------------------------


Re: beanModel.reorder does not work on multiple fields

Posted by Emmanuel DEMEY <de...@gmail.com>.
Hi Andreas,

Try model.reorder("tododate","contextLabel");

The method signature is *BeanModel<T> reorder(String... propertyNames);*

Emmanuel


2011/4/26 Andreas Bohnert <ab...@weberhofer.at>

> Hello!
>
> I use the following code to change the order of the columns of my grid:
>
>  public BeanModel<TicketViewModelBean> getModel() {
>        if (model == null) {
>            model =
> beanModelSource.createDisplayModel(TicketViewModelBean.class,
> componentResources.getMessages());
>            model.reorder("tododate,contextLabel");
>        }
>        return model;
>    }
>
> where my bean class looks like (I do the getter myself):
>
>    /**
>     * @return the contextLabel
>     */
>    public Timestamp getTododate() {
>        return this.tododate;
>    }
>    /**
>     * @return the contextLabel
>     */
>    public final String getContextLabel() {
>        return contextLabel;
>    }
>
>
> if I  just use one field it works fine, but if I try to use 2 or more
> fields tapestry treat them as one single field:
>
> Render queue error in SetupRender[Tickets:grid.columns]: Failure reading
> parameter 'model' of component Tickets:grid: Bean editor model for
> at.weberhofer.eusoda.server.backend.model.TicketViewModelBean does not
> contain a property named 'tododate,contextLabel'.
>
> what am I'm doing wrong?
>
> Thanks,
> Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Emmanuel DEMEY
Ingénieur Etude et Développement
ATOS Worldline
+33 (0)6 47 47 42 02
demey.emmanuel@gmail.com
http://emmanueldemey.fr