Thats an interesting solution!
I'm still using 1.2.6, and went 'up'. The Tree is on a Panel, the Panel
gets a LDM and after some pre-processing builds the Tree using
javax.swing.tree.TreeModel. I thought of doing the pre-processing in a
class extending LDM and overwriting getObject, but part of the
preprocessing is overwriting toString when creating TreeNodes and i want
to have some flexibility here.
The nice thing about the panel is that i add ajax-links for expanding
and collapsing in the same panel.
The panel is now updated with the rest of the page.
James McLaughlin wrote:
Hi Sean,
Sure, if you have something in your XTreeModel that needs to be
detached. But I was suggesting to make the TreeNode implement
IDetachable. This way each TreeItem will detach its TreeNode when the
request is over. Are you asking if you need to make your TreeModel
detachable in order to have your TreeNodes detach? No, that is not
necessary.
best,
jim
On 8/1/07, Sean Sullivan <[EMAIL PROTECTED]> wrote:
James,
I am using Wicket 1.3's LinkTree class in my application. I built a custom
tree model class that extends Swing's DefaultTreeModel:
public class XTreeModel extends javax.swing.tree.DefaultTreeModel
Should my class, XTreeModel, implement IDetachable?
Sean
On 8/1/07, James McLaughlin <[EMAIL PROTECTED]> wrote:
For the trees in 1.3 (I haven't used 1.2.x in a long time), if your
TreeNodes implement IDetachable, they wil be detached when the
requestcycle completes. Then it is up to you to implement some logic
in the methods you call to retrieve the user object (such as
getUserObject()) from the TreeNode to check and perform reattachement.
best,
jim
On 8/1/07, Ivana Cace <[EMAIL PROTECTED]> wrote:
What do you want to use the model for?
Is it possible to use LDMs and *Trees*?
Here's a question (from the old user-list) i'd like reopened.
I'm using a Tree to show a directory structure, the user selects folders
to upload files into. It should be updated every submit.
Is there a best practice for using a Tree with a
LoadableDetachableModel?
I now have a Tree that is updated on every mouseClick (in a node) and
this seems a little too much. I would like to see a behaviour similar
to ListView.
Has anyone tried something like this?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]