You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bhorvat <ho...@gmail.com> on 2013/02/24 23:43:07 UTC

Tapestry Tree (jquery)

Any idea how I can trigger an event when someone expends a node on the tree?
Can I create mixin for this and if so what can I use it to 'override'? 

I have looked at the component description but I couldnt find anything to
help me with this? I would like to refresh some data due to hibernate lazy
initialization and also run some javascript code

Cheers and thanks



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Tree-jquery-tp5720196.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: Tapestry Tree (jquery)

Posted by bhorvat <ho...@gmail.com>.
The way I see it jumpstart is using the normal tree component from tapestry
and even though that one has the event that I need it does not bubble up so
I can handle it :(

any way to include a mixin that will change the way component is handling
the original event?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Tree-jquery-tp5720196p5720220.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: Tapestry Tree (jquery)

Posted by bhorvat <ho...@gmail.com>.
Hi Nicolas,

Yea I see that event but sadly it isn't propagated to me. I am not sure if
it is possible to change this behaviour using mixin?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Tree-jquery-tp5720196p5720221.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: Tapestry Tree (jquery)

Posted by Nicolas Barrera <nb...@gmail.com>.
Hi,

reading the api docs it seems that the only triggered events are
NODE_SELECTED and NODE_UNSELECTED

anyway looking into the code..., the Tree component seems to have an

ExpandChildren event which perhaps is bubbled up and you can do something
there..., ( I 'm not pretty sure of this )

(
http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tapestry/tapestry-core/5.3.0/org/apache/tapestry5/corelib/components/Tree.java#Tree.onExpandChildren%28java.lang.String%29)

However take into account that the Tree component load elements on demand
through ajax... (it even has a cache) elements are loaded only when a node
which has terminal elements is selected,

those terminal elements are loaded into the cache and won't be updated if
you update the model afterwards (you should make your own tree without the
cache if you want to avoid that).

cheers.


Nicolás.-


On Mon, Feb 25, 2013 at 7:09 AM, Lance Java <la...@googlemail.com>wrote:

> There's a pretty complex, database backed tree example in jumpstart
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/treefromdatabasewithzones
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Tree-jquery-tp5720196p5720207.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: Tapestry Tree (jquery)

Posted by Lance Java <la...@googlemail.com>.
There's a pretty complex, database backed tree example in jumpstart
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/treefromdatabasewithzones




--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Tree-jquery-tp5720196p5720207.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