On Fri, 21 Nov 2014 15:17:11 -0200, Akshay <akshayestat...@gmail.com> wrote:

Hi

Hi!

Infact, the idea to intialize it in the way given below is taken from the Grid component of tapestry,as I am trying to build a customized grid over the tapestry default grid. The value transferred from Component A to B doesn't seem to be a problem...Its the transfer of field value from B to A using the method as given in the mail.Not sure if there is something to do with the binding stuff or I am overlooking something here.

In your code below, Component A uses Component B. You bind the A.sortAscending property to the B.sortAscending parameter. This way, any changes to the value of B.sortAscending will be immediately propagated to A.sortAscending. The prop binding, the default one, is bidirectional. That's how the Loop's value parameter works.

Component A{

  @Component(id = "B", parameters = { "sortAscending=sortAscending"})
  private ComponentB  b;

  @Property
  private boolean sortAscending=true;


}


Component B{

    @Persist
    private ComponentA a;

    @Parameter(required = true)
    private boolean sortAscending;

 Object setupRender(){


a.updateXXX(sortAscending);

}}

By the way, why the hell are you persisting a component instance? There's absolutely no scenario in which this is correct. In addition, one component calling another's method should be avoided.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to