Re: Wicket Tree - Getting The Selected Node
Thanks Sven. Things are clear to me now. Regards, Anup -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672044.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree - Getting The Selected Node
Hi, @Override public Component newContentComponent(String id, IModel model) { return new Folder(id, this, model) { /** * Always clickable. */ @Override protected boolean isClickable() { return true; } @Override protected void onClick(AjaxRequestTarget target) { Employee employee = getModelObject(); // keep selection somewhere, exchange components or switch to other page } @Override protected boolean isSelected() { // get selected status somewhere return false; } }; } Have fun Sven On 25.09.2015 14:12, Anup wrote: Sven Meier wrote a NestedTree does not have any notion of 'selection'. But the set of expanded nodes is kept in the tree's model object, see AbstractTree#expand() and #collapse(). You decide how to represent each node's content, for this you'll have to override AbstractTree#newContentComponent(). The default will just expand and collapse the tree branches on each click, see org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder You can override Folder's methods or use any other component to represent your nodes. Thanks Sven. I have understood the above as I can see the expanded nodes by inspecting tree.getModel(). What still foxes me is how do I take some action, when the user clicks a particular node? For example if each node is representing an employee, then how can I display the details of the desired employee when the user clicks/selects on the corresponding employee node? Regards, Anup -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672042.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree - Getting The Selected Node
Sven Meier wrote > a NestedTree does not have any notion of 'selection'. > But the set of expanded nodes is kept in the tree's model object, see > AbstractTree#expand() and #collapse(). > > You decide how to represent each node's content, for this you'll have to > override AbstractTree#newContentComponent(). The default will just > expand and collapse the tree branches on each click, see > > org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder > > You can override Folder's methods or use any other component to > represent your nodes. Thanks Sven. I have understood the above as I can see the expanded nodes by inspecting tree.getModel(). What still foxes me is how do I take some action, when the user clicks a particular node? For example if each node is representing an employee, then how can I display the details of the desired employee when the user clicks/selects on the corresponding employee node? Regards, Anup -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Tree-Getting-The-Selected-Node-tp4672040p4672042.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree - Getting The Selected Node
Hi, a NestedTree does not have any notion of 'selection'. But the set of expanded nodes is kept in the tree's model object, see AbstractTree#expand() and #collapse(). You decide how to represent each node's content, for this you'll have to override AbstractTree#newContentComponent(). The default will just expand and collapse the tree branches on each click, see org.apache.wicket.extensions.markup.html.repeater.tree.content.Folder You can override Folder's methods or use any other component to represent your nodes. Have fun Sven On 25.09.2015 13:41, Anup Gokhale wrote: Hi. Am a complete noob to Wicket and am currently learning Wicket by writing small example applications. Have worked my way through all the basic components like TextField, Links, Labels, Buttons, ListView, DataTable etc. Have now reached DefaultNestedTree and it's many avatars. Am totally stuck in fetching the currently selected nodes. How do our models know which node(s) the user has currently selected in the tree? Also are there any events that get fired when the user clicks on a tree node? This is my very first post to the wicket user group, and I must say that Wicket developers and committers have done a commendable job. Thanks for developing such a wonderful framework. Warm regards, Anup Gokhale --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Tree - Getting The Selected Node
Hi. Am a complete noob to Wicket and am currently learning Wicket by writing small example applications. Have worked my way through all the basic components like TextField, Links, Labels, Buttons, ListView, DataTable etc. Have now reached DefaultNestedTree and it's many avatars. Am totally stuck in fetching the currently selected nodes. How do our models know which node(s) the user has currently selected in the tree? Also are there any events that get fired when the user clicks on a tree node? This is my very first post to the wicket user group, and I must say that Wicket developers and committers have done a commendable job. Thanks for developing such a wonderful framework. Warm regards, Anup Gokhale --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: wicket-tree with two Hibernate entities
That's good to hear :). Sven On 10/20/2012 09:41 PM, Sandor Feher wrote: Thanks. All work fine. s -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653163.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree with two Hibernate entities
Thanks. All work fine. s -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653163.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree with two Hibernate entities
Hi Sven, Thank you for the prompt answer. Please make me sure if I do it well. FileHelper.class import java.util.Collections; import java.util.List; public class FileTreeHelper implements Serializable { private HrpBbfparam parent; // this is the dictionary class with fields Id and Name public HrpBbfparam getParent() { return parent; } public void setParent(HrpBbfparam parent) { this.parent = parent; } private List children; // files belong to parent public List getChildren() { return children; } public void setChildren(List children) { this.children = children; } } thnx., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122p4653130.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree with two Hibernate entities
Either you have a common super-class already or just use ITreeProvider. Introducing a helper class might save you some instanceof checks though. Sven On 10/19/2012 05:18 PM, Sandor Feher wrote: Hi, I dig myself into wicket-tree. I store my files in an entity by categories. Categories listed in another entity. I would like the files get listed by category in a TableTree. Nothing tricky just two levels. Roots are the categories, children are files belong to categories. As I followed the examples realized that the listed items belongs to the same class. Should I create a helper class based on a view ? I would like to find the best approach if possible. thnx., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-tree with two Hibernate entities
Hi, I dig myself into wicket-tree. I store my files in an entity by categories. Categories listed in another entity. I would like the files get listed by category in a TableTree. Nothing tricky just two levels. Roots are the categories, children are files belong to categories. As I followed the examples realized that the listed items belongs to the same class. Should I create a helper class based on a view ? I would like to find the best approach if possible. thnx., Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-with-two-Hibernate-entities-tp4653122.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree + wiquery ajax draggable + droppable behavior
to get this to work, we ended up having to refresh the entire tree component when the children of a node are loaded, kinda defeating the purpose of the ajax lazy loading. otherwise, the subnodes are not droppable targets in the DOM. still open to better more jq/wiquery-like approach if someone has any ideas. thanks. -c On Wed, Jul 18, 2012 at 7:06 PM, Chris Turchin wrote: > hi, > > we have a wicket 1.5.7 tree > (org.apache.wicket.extensions.markup.html.tree) that we are loading > subnodes into via ajax. the tree supports ajax dnd events using wiquery > (dnd to copy/move/link page objects into the tree nodes) and it works great > when the page loads (e.g at level one in the tree). > > when we add subnode (level two) to the tree via ajax (lazy loading nodes), > these nodes are at first not droppable. after loading an additional > sublevel (level three), then the nodes of level two are droppable. the > level three nodes are not. and this continues down the tree level by > level... alternately, when the page is refreshed (f5) all nodes in the tree > are droppable. > > i know that jquery brings a live() function for reacting to ajax-y DOM > changes. i cannot figure out how this plays into the wiquery context or how > we can get the ajax nodes to be ui-droppable right after loading. > > advice appreciated. thanks. > > best regards > -chris > > -- > Chris Turchin > -- Chris Turchin
wicket tree + wiquery ajax draggable + droppable behavior
hi, we have a wicket 1.5.7 tree (org.apache.wicket.extensions.markup.html.tree) that we are loading subnodes into via ajax. the tree supports ajax dnd events using wiquery (dnd to copy/move/link page objects into the tree nodes) and it works great when the page loads (e.g at level one in the tree). when we add subnode (level two) to the tree via ajax (lazy loading nodes), these nodes are at first not droppable. after loading an additional sublevel (level three), then the nodes of level two are droppable. the level three nodes are not. and this continues down the tree level by level... alternately, when the page is refreshed (f5) all nodes in the tree are droppable. i know that jquery brings a live() function for reacting to ajax-y DOM changes. i cannot figure out how this plays into the wiquery context or how we can get the ajax nodes to be ui-droppable right after loading. advice appreciated. thanks. best regards -chris -- Chris Turchin
Re: wicket-tree checkboxes managing
Hi Massimo, children of collapsed nodes are not present in the Wicket component hierarchy. I don't understand why you're getting different results whether you want to select or deselect though. Instead of twiddling with components, you should perform the mutation directly on your model objects: root.selectAll(true): public void selectAll(boolean select) { this.selected = select; for (Foo child : children) { child.selectAll(select); } } Hope this helps Sven On 05/21/2011 08:45 AM, massimo_pugni wrote: Hi, now that all is looking fine I'm observing a strange behaviuor. The same method, to 'check/uncheck' all from a button, public void modifyAllCheckBoxes(final boolean select) { visitChildren(CheckBox.class, new IVisitor() { @Override public Object component(Component component) { CheckBox checkBox=(CheckBox)component; checkBox.setModelObject(select); return IVisitor.CONTINUE_TRAVERSAL; } }); } seems not working when all are collapsed and if I want unselect all (the select works). 1. Collapsing all and selecting all works 2. nodes into a branch can be unselected with the button only after having expanded and collapsed it page is opened with the tree state = expanded by default best Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3540207.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi, now that all is looking fine I'm observing a strange behaviuor. The same method, to 'check/uncheck' all from a button, public void modifyAllCheckBoxes(final boolean select) { visitChildren(CheckBox.class, new IVisitor() { @Override public Object component(Component component) { CheckBox checkBox=(CheckBox)component; checkBox.setModelObject(select); return IVisitor.CONTINUE_TRAVERSAL; } }); } seems not working when all are collapsed and if I want unselect all (the select works). 1. Collapsing all and selecting all works 2. nodes into a branch can be unselected with the button only after having expanded and collapsed it page is opened with the tree state = expanded by default best Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3540207.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi, I just rechecked the source of FormComponentPanel and there's nothing in there which could have any effect on the tree. Sorry, but I don't have any clue what might be going wrong here. Sven On 05/05/2011 09:14 PM, massimo_pugni wrote: hello Sven, the branch just collapsed. After a tab switching the tree is rightly loaded into its collapsed state (active arrows + labels) and the same thing does not happen replacing the 'extends FormComponentPanel' with 'extends Panel'. I must add that the application is very complex and the tree structure is a nested data structure within a tabbed page (that is actually a Panel). I'd like make use of a 'FormComponentPanel' because I think it's easier to perform an update of the model (every tab switching is a save to persist data). wicket version is the 1.4.9 and the tree package I'm using is is the 0.4.4 kind regards Sven Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3499223.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
hello Sven, the branch just collapsed. After a tab switching the tree is rightly loaded into its collapsed state (active arrows + labels) and the same thing does not happen replacing the 'extends FormComponentPanel' with 'extends Panel'. I must add that the application is very complex and the tree structure is a nested data structure within a tabbed page (that is actually a Panel). I'd like make use of a 'FormComponentPanel' because I think it's easier to perform an update of the model (every tab switching is a save to persist data). wicket version is the 1.4.9 and the tree package I'm using is is the 0.4.4 kind regards Sven Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3499223.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi Massimo, for the tree it doesn't matter which component it is contained in. There must be another change causing this. >why do I get the branches (second level) lost What is lost, the complete branch or is the branch just collapsed? Best regards Sven Am 05.05.2011 17:36, schrieb massimo_pugni: Hi Sven, I'm slowly moving forward and now loading a 2-levels checked selectable tree within a panel hosted by tabbed page and so on. The only significant changes I did are related to the model and the data providing but a question: why do I get the branches (second level) lost the second time I enter the tab contaning the tree when loading the tree itself into a 'formComponentPanel'? The same thing doesn't happen using a simple 'Panel' instead of a 'formComponentPanel', do you have already experimented something like this? best Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3498667.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi Sven, I'm slowly moving forward and now loading a 2-levels checked selectable tree within a panel hosted by tabbed page and so on. The only significant changes I did are related to the model and the data providing but a question: why do I get the branches (second level) lost the second time I enter the tab contaning the tree when loading the tree itself into a 'formComponentPanel'? The same thing doesn't happen using a simple 'Panel' instead of a 'formComponentPanel', do you have already experimented something like this? best Massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3498667.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi, you can utilize the usual Check/CheckGroup/CheckGroupSelector combination. I've added a convenience CheckContent implementation recently (now for Wicket 1.4 too): http://code.google.com/p/wicket-tree/source/browse/branches/wicket-tree-0.4.x/wicket-tree/src/main/java/wickettree/content/CheckFolder.java Hope this helps Sven On 05/01/2011 01:27 PM, massimo_pugni wrote: Hi Sven, I'm on back on it now. To hidden the checkboxes for roots I've put the 'if' into the 'newContentComponent' method something like this public Component newContentComponent(String id, final AbstractTree tree, IModel model) { if (model.getObject().isRoot()) { return new Label(id, model); } else { return new CheckedFolder(id, tree, model) { ... } What I'd like to do now is to reproduce 'check all/uncheck all' features I was able to do using a linear/plain list view data structure (the original structure I'd like to replace with a hierarchical one) best massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3487626.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi Sven, I'm on back on it now. To hidden the checkboxes for roots I've put the 'if' into the 'newContentComponent' method something like this public Component newContentComponent(String id, final AbstractTree tree, IModel model) { if (model.getObject().isRoot()) { return new Label(id, model); } else { return new CheckedFolder(id, tree, model) { ... } What I'd like to do now is to reproduce 'check all/uncheck all' features I was able to do using a linear/plain list view data structure (the original structure I'd like to replace with a hierarchical one) best massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3487627.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi Sven, I'm on back on it now. To hidden the checkboxes for roots I've put the 'if' into the 'newContentComponent' method something like this public Component newContentComponent(String id, final AbstractTree tree, IModel model) { if (model.getObject().isRoot()) { return new Label(id, model); } else { return new CheckedFolder(id, tree, model) { ... } What I'd like to do now is to reproduce 'check all/uncheck all' features I was able to do using a linear/plain list view data structure (the original structure I'd like to replace with a hierarchical one) best massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3487626.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree checkboxes managing
Hi Massimo, with wicket-tree you're in full control on what content to display for each node: tree = new NestedTree("tree", provider) { @Override protected Component newContentComponent(String id, IModel model) { // you know best which nodes are roots if (model.getObject().isRoot()) { // return content for root node } else { // return content for other nodes } } }; Hope this helps Sven On 04/25/2011 01:19 PM, massimo_pugni wrote: Hello all, I'm trying out the wicket-tree components by Sven Meier and, does anybody know if there is a way to get the root's 'checkboxes' hidden when using the 'CheckedSelectableFolderContent' content option? best regards massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3472967.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-tree checkboxes managing
Hello all, I'm trying out the wicket-tree components by Sven Meier and, does anybody know if there is a way to get the root's 'checkboxes' hidden when using the 'CheckedSelectableFolderContent' content option? best regards massimo -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-checkboxes-managing-tp3472967p3472967.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree implementation
Hi Erik, wicket-tree doesn't cache any information (in contrast to Wicket's tree implementation). Thus updating the parental branch or adding the whole tree to the request target should work fine, the former method might fail if your equals() method is bogus though. Please set a breakpoint on your provider's getChildren() method to check when it is called. Hope this helps Sven On 03/14/2011 09:48 AM, Erik Johansson wrote: Thanks, that worked well. I am wondering how to update the tree when I add an object to it. I have tried with tree.updateBranch(newObject, target); or tree.updateBranch(newObject.getParent(), target); or target.addComponent(tree); but nothing happens. I haven't done anything in the ITreeProvider's detach(), perhaps I need to do something there? Editing existing objects works well, but not new objects. Thanks, Erik Johansson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wicket-tree implementation
Thanks, that worked well. I am wondering how to update the tree when I add an object to it. I have tried with tree.updateBranch(newObject, target); or tree.updateBranch(newObject.getParent(), target); or target.addComponent(tree); but nothing happens. I haven't done anything in the ITreeProvider's detach(), perhaps I need to do something there? Editing existing objects works well, but not new objects. Thanks, Erik Johansson -Original Message- From: Sven Meier [mailto:s...@meiers.net] Sent: 11. mars 2011 18:57 To: users@wicket.apache.org Subject: Re: wicket-tree implementation Hi Erik, you can override a factory method in a tree subclass: @Override protected Component newContentComponent(String id, IModel model) { return new Folder(id, this, model) { protected IModel newLabelModel(IModel model) { // decide how to render each foo, e.g. use a property model return new PropertyModel(model, "bar"); } }; } Have fun Sven On 03/11/2011 05:37 PM, Erik Johansson wrote: > Hello. > > I am trying out wicket-tree, by Sven Maier. However I can't figure out what > is needed to get it to display the tree properly. > > It shows the content as its toString method. I have overridden it at the > ITreeProvider.model-method, but that isn't it, it seems. The original > object's toString() is not at all appropriate in the tree. > > Where should I do the override in this case? > > I am using Wicket 1.4.15 and wicket-tree 0.4.1 > > Erik Johansson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org __ Information from ESET Smart Security, version of virus signature database 5950 (20110313) __ The message was checked by ESET Smart Security. http://www.eset.com __ Information from ESET Smart Security, version of virus signature database 5950 (20110313) __ The message was checked by ESET Smart Security. http://www.eset.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-tree implementation
Hi Erik, you can override a factory method in a tree subclass: @Override protected Component newContentComponent(String id, IModel model) { return new Folder(id, this, model) { protected IModel newLabelModel(IModel model) { // decide how to render each foo, e.g. use a property model return new PropertyModel(model, "bar"); } }; } Have fun Sven On 03/11/2011 05:37 PM, Erik Johansson wrote: Hello. I am trying out wicket-tree, by Sven Maier. However I can't figure out what is needed to get it to display the tree properly. It shows the content as its toString method. I have overridden it at the ITreeProvider.model-method, but that isn't it, it seems. The original object's toString() is not at all appropriate in the tree. Where should I do the override in this case? I am using Wicket 1.4.15 and wicket-tree 0.4.1 Erik Johansson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket-tree implementation
Hello. I am trying out wicket-tree, by Sven Maier. However I can't figure out what is needed to get it to display the tree properly. It shows the content as its toString method. I have overridden it at the ITreeProvider.model-method, but that isn't it, it seems. The original object's toString() is not at all appropriate in the tree. Where should I do the override in this case? I am using Wicket 1.4.15 and wicket-tree 0.4.1 Erik Johansson
Re: wicket tree
ok well I was in fact able to override the width by placing this style on the page:
Re: wicket tree
Just out of curiosity, are you using a theme with your wicket-tree? Meaning new WicketTree(...,new WindowsTheme());... Pretty sure this is the wicket-tree from wicket-stuff project. You can just look at their css and write your own, I am not sure why this is not working at all... have you tried using firefox debug to see if the css changes you want will have the component look the way you want. Maybe they are being applied but due to css there is a bug with your browser or css code in the bigger scheme of things? I am just curious so we can narrow down the issue. Btw, with the wicket-tree code being open source you can always add a method to tack on to its onComponentTag of the WicketTree component itself just write: String addition = ""; public void addToComponentTag(String...){addition = ...;} @Override public void onComponentTag(ComponentTag tag){...} Personally not the way I would want to do it, but if your getting fed up it is feasible, at least as a way to check if the css would work etc msj121 mlabs wrote: > > well i'm beginning to get the impression that this particular tree isn't > intended for re-use .. and grepping around here I see that others have run > into this little chestnut too.. and that there is a better tree to use now > .. the LinkTree ? Ok so I tried that and no problems with sizing .. much > better.. so I guess the wicket examples are just out of date with respect > to trees..? > > just noticed that link selection highlight doesn't work properly with this > tree > *sigh* > > are there any working tree examples out there? > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3314799.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree
well i'm beginning to get the impression that this particular tree isn't intended for re-use .. and grepping around here I see that others have run into this little chestnut too.. and that there is a better tree to use now .. the LinkTree ? Ok so I tried that and no problems with sizing .. much better.. so I guess the wicket examples are just out of date with respect to trees..? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313789.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree
that method puts the style on the enclosing div like so: ... and the inner 'wicket-tree' style definition still seems to be taking preference... so still no joy :( -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313661.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree
Interestingly if the tree component has its own style unique to the component I think it will or could override a css style applied for the page even matching classes. Perhaps you can also try on the component: @Override public void onComponentTag(ComponentTag tag){ super.onComponentTag(); tag.put("style", "white-space: nowrap;width: 60em;overflow: auto;margin: 10px;line-height: 1.5em; "); } The above is from memory but it should work... just put it inside the tree component ie: Tree tree = new Tree(...){ @Override public void onComponentTag(...){...} }; I hope this helps, it will certainly narrow down the problem I think Matthew -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313613.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree
I tried adding this to the on the page containing the tree: div.wicket-tree { white-space: nowrap; /*border: 1px solid #ccc; remove border*/ width: 60em; /* increase width to 60em*/ overflow: auto; margin: 10px; line-height: 1.5em; } but it didn't seem to have any effect..? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313566.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket tree
Just write your own style with the same id, it will override the other, isn't? Sent from my iPhone Le 18 févr. 2011 à 21:40, mlabs a écrit : > > wicket noob question: > I'm trying to change the width of the simple Tree component .. it seems to > be defined in tree.css as 20em .. what's the correct way to override this? > TIA > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313498.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicket tree
wicket noob question: I'm trying to change the width of the simple Tree component .. it seems to be defined in tree.css as 20em .. what's the correct way to override this? TIA -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-tree-tp3313498p3313498.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree
Hi, with wicket-tree you can of course use multiple trees on a single page. >moving tree nodes around from one tree to another tree. How to you want to move the nodes? You could use selectable nodes which are moved on a button click. Or you add wicket-dnd to the mix and use drag&drop gestures. See the following example (one tree only though): http://wicket-dnd.appspot.com/ Regards Sven ping ping wrote: How to post my question to the forum? I'm new to wicket development and currently working on wicket tree.. Ive previously tried on the checkbox wickettree from http://code.google.com/p/wicket-tree/ But now i would like to work on displaying multiple treeview(with or without) display on a single page for the purpose of moving tree nodes around from one tree to another tree. Was wondering whether the wickettree would be able to perform to that extent of flexibbility. I came across the dojo tree, but not have never tried using it though and not sure whether its applicable. Am looking forward for some suggestions and guidance here for a wicket newbie to get started on dynamic tree nodes manipulation. _ NEW! Get Windows Live FREE. http://www.get.live.com/wl/all - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Tree
How to post my question to the forum? I'm new to wicket development and currently working on wicket tree.. Ive previously tried on the checkbox wickettree from http://code.google.com/p/wicket-tree/ But now i would like to work on displaying multiple treeview(with or without) display on a single page for the purpose of moving tree nodes around from one tree to another tree. Was wondering whether the wickettree would be able to perform to that extent of flexibbility. I came across the dojo tree, but not have never tried using it though and not sure whether its applicable. Am looking forward for some suggestions and guidance here for a wicket newbie to get started on dynamic tree nodes manipulation. _ NEW! Get Windows Live FREE. http://www.get.live.com/wl/all
Re: confused about wicket Tree component with panel swapping
can anybody help me? thanks. On Wed, Aug 19, 2009 at 11:15 PM, Haulyn R. Jason wrote: > Hi, all > I refactor my pages from inheritance to panel swapping with a tree for > navigation. But I can not make the tree work. > > I add some links like this: > add(new Link("settingPageLink") { > @Override > public void onClick() { > currentPanel.replaceWith(settingPanel); > currentPanel = settingPanel; > } > }); > these links works well, but the following code does not work: > Tree tree = new Tree("tree", treeModel) { > @Override > protected void onNodeLinkClicked(AjaxRequestTarget target, > TreeNode node) { > DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) > node; > NavigationTreeNode navigationTreeNode = > (NavigationTreeNode) treeNode.getUserObject(); > if (navigationTreeNode.isURL) { > Panel clickedPanel = > navigationTreeNode.getClickedPanel(); > currentPanel.replaceWith(clickedPanel); > currentPanel = clickedPanel; > } else { > super.onNodeLinkClicked(target, node); > } > } > }; > > I do not know how to make this tree work. Do I lose something? > > -- > -- > Enjoy. Thanks! > > Haulyn Microproduction > > Mobile: +086-15864011231 > email: saharab...@gmail.com, > hmp.hau...@foxmail.com > website: http://haulynjason.net > gtalk: saharab...@gmail.com > yahoo: jia_hao...@yahoo.com > msn: saharab...@gmail.com > skype: saharabear > QQ: 378606292 > > Haulyn Jason > > > -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
confused about wicket Tree component with panel swapping
Hi, all I refactor my pages from inheritance to panel swapping with a tree for navigation. But I can not make the tree work. I add some links like this: add(new Link("settingPageLink") { @Override public void onClick() { currentPanel.replaceWith(settingPanel); currentPanel = settingPanel; } }); these links works well, but the following code does not work: Tree tree = new Tree("tree", treeModel) { @Override protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node; NavigationTreeNode navigationTreeNode = (NavigationTreeNode) treeNode.getUserObject(); if (navigationTreeNode.isURL) { Panel clickedPanel = navigationTreeNode.getClickedPanel(); currentPanel.replaceWith(clickedPanel); currentPanel = clickedPanel; } else { super.onNodeLinkClicked(target, node); } } }; I do not know how to make this tree work. Do I lose something? -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Re: how to use wicket tree in extension
>> > TreeNode node) { > >>> >> >DefaultMutableTreeNode treeNode = > >>> >> (DefaultMutableTreeNode) > >>> >> > node; > >>> >> >NavigationTreeNode navigationTreeNode = > >>> >> (NavigationTreeNode) > >>> >> > treeNode.getUserObject(); > >>> >> >if (navigationTreeNode.isURL) { > >>> >> >setResponsePage(navigationTreeNode.getURL()); > >>> >> >super.onNodeLinkClicked(target, node); > >>> >> >} else { > >>> >> >super.onNodeLinkClicked(target, node); > >>> >> >} > >>> >> >} > >>> >> > > >>> >> > this looks work well, but when I clink on a link, the page > redirect > >>> to > >>> >> the > >>> >> > target page, but I can not keep the tree with the selected node > >>> expand. > >>> >> > > >>> >> > Can anyone help me or give me some reference URLs? Thanks! > >>> >> > > >>> >> > -- > >>> >> > -- > >>> >> > Enjoy. Thanks! > >>> >> > > >>> >> > Mobile: +086-15864011231 > >>> >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com > >>> >> > website: http://haulynjason.net > >>> >> > gtalk: saharab...@gmail.com > >>> >> > yahoo: jia_hao...@yahoo.com > >>> >> > msn: saharab...@gmail.com > >>> >> > skype: saharabear > >>> >> > QQ: 378606292 > >>> >> > > >>> >> > Haulyn Jason > >>> >> > > >>> >> > >>> >> > - > >>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>> >> For additional commands, e-mail: users-h...@wicket.apache.org > >>> >> > >>> >> > >>> > > >>> > > >>> > -- > >>> > -- > >>> > Enjoy. Thanks! > >>> > > >>> > Mobile: +086-15864011231 > >>> > email: saharab...@gmail.com, hmp.hau...@foxmail.com > >>> > website: http://haulynjason.net > >>> > gtalk: saharab...@gmail.com > >>> > yahoo: jia_hao...@yahoo.com > >>> > msn: saharab...@gmail.com > >>> > skype: saharabear > >>> > QQ: 378606292 > >>> > > >>> > 贾昊林 Haulyn Jason > >>> > > >>> > > >>> > >>> -- > >>> View this message in context: > >>> > http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p24980702.html > >>> Sent from the Wicket - User mailing list archive at Nabble.com. > >>> > >>> > >>> - > >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>> For additional commands, e-mail: users-h...@wicket.apache.org > >>> > >>> > >> > >> > >> -- > >> -- > >> Enjoy. Thanks! > >> > >> Haulyn Microproduction > >> > >> Mobile: +086-15864011231 > >> email: saharab...@gmail.com, > >> hmp.hau...@foxmail.com > >> website: http://haulynjason.net > >> gtalk: saharab...@gmail.com > >> yahoo: jia_hao...@yahoo.com > >> msn: saharab...@gmail.com > >> skype: saharabear > >> QQ: 378606292 > >> > >> Haulyn Jason > >> > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p25011340.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Re: how to use wicket tree in extension
Yes, Igor's solution is easier (and will remember other tree state beyond just which nodes are expanded) if you are able to use this panel swapping technique instead of your current markup-inheritance solution for the common menu (tree). It looks like a common decision one has to make: whether to pass components around (remember, only ever use a component instance on a single page instance at any one time!) versus just passing around component state (in this case, which nodes are expanded and which are collapsed). Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com igor.vaynberg wrote: > > instead of navigating between pages and passing the tree state around > why not simply swap panels. that way the tree instance is the same and > keeps its state. > > -igor > > On Mon, Aug 17, 2009 at 8:23 AM, Haulyn R. Jason > wrote: >> Yes, that's right, is that a way to tell the new page(and the new >> instance >> of the tree), the status of the old tree? >> I means expand the node which I clicked? >> >> Thanks! >> >> >> On Sat, Aug 15, 2009 at 9:00 AM, jWeekend >> wrote: >> >>> >>> Is your menu (tree) in some parent page class that both the first and >>> the >>> linked-to page extend? When you go to a new page instance you will get a >>> new >>> instance of the Tree. >>> >>> Regards - Cemal >>> jWeekend >>> OO & Java Technologies, Wicket Training and Development >>> http://jWeekend.com >>> >>> >>> Haulyn Jason-2 wrote: >>> > >>> > No, just use Tree in extension package. >>> > >>> > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg >>> > wrote: >>> > >>> >> are you using LinkTree? >>> >> >>> >> -igor >>> >> >>> >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. >>> Jason >>> >> wrote: >>> >> > Hi,all: >>> >> > >>> >> > I design a page with a tree for page navigation. But I can not find >>> >> more >>> >> > information from Internet to learn how to use the Tree component. >>> >> > >>> >> > I can display the tree as >>> >> > >>> >> > menu1 >>> >> > |-sub_menu1 >>> >> > |-sub_menu2 >>> >> > menu2 >>> >> > |-sub_menu3 >>> >> > |-sub_menu4 >>> >> > >>> >> > and I remove root node, make all tree expand while init the tree, >>> but >>> I >>> >> do >>> >> > not know how to add links to the sub_menus, I tried to add some >>> code >>> >> like >>> >> > this: >>> >> > �...@override >>> >> > protected void onNodeLinkClicked(AjaxRequestTarget >>> target, >>> >> > TreeNode node) { >>> >> > DefaultMutableTreeNode treeNode = >>> >> (DefaultMutableTreeNode) >>> >> > node; >>> >> > NavigationTreeNode navigationTreeNode = >>> >> (NavigationTreeNode) >>> >> > treeNode.getUserObject(); >>> >> > if (navigationTreeNode.isURL) { >>> >> > setResponsePage(navigationTreeNode.getURL()); >>> >> > super.onNodeLinkClicked(target, node); >>> >> > } else { >>> >> > super.onNodeLinkClicked(target, node); >>> >> > } >>> >> > } >>> >> > >>> >> > this looks work well, but when I clink on a link, the page redirect >>> to >>> >> the >>> >> > target page, but I can not keep the tree with the selected node >>> expand. >>> >> > >>> >> > Can anyone help me or give me some reference URLs? Thanks! >>> >> > >>> >> > -- >>> >> > -- >>> >> > Enjoy. Thanks! >>> >> > >>> >> > Mobile: +086-15864011231 >>> >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >>> >> > website: http://haulynjason.net >>> >> > gtalk: saharab...@gmail.com >>> >> > yahoo: jia_hao...@yahoo.
Re: how to use wicket tree in extension
instead of navigating between pages and passing the tree state around why not simply swap panels. that way the tree instance is the same and keeps its state. -igor On Mon, Aug 17, 2009 at 8:23 AM, Haulyn R. Jason wrote: > Yes, that's right, is that a way to tell the new page(and the new instance > of the tree), the status of the old tree? > I means expand the node which I clicked? > > Thanks! > > > On Sat, Aug 15, 2009 at 9:00 AM, jWeekend wrote: > >> >> Is your menu (tree) in some parent page class that both the first and the >> linked-to page extend? When you go to a new page instance you will get a >> new >> instance of the Tree. >> >> Regards - Cemal >> jWeekend >> OO & Java Technologies, Wicket Training and Development >> http://jWeekend.com >> >> >> Haulyn Jason-2 wrote: >> > >> > No, just use Tree in extension package. >> > >> > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg >> > wrote: >> > >> >> are you using LinkTree? >> >> >> >> -igor >> >> >> >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason >> >> wrote: >> >> > Hi,all: >> >> > >> >> > I design a page with a tree for page navigation. But I can not find >> >> more >> >> > information from Internet to learn how to use the Tree component. >> >> > >> >> > I can display the tree as >> >> > >> >> > menu1 >> >> > |-sub_menu1 >> >> > |-sub_menu2 >> >> > menu2 >> >> > |-sub_menu3 >> >> > |-sub_menu4 >> >> > >> >> > and I remove root node, make all tree expand while init the tree, but >> I >> >> do >> >> > not know how to add links to the sub_menus, I tried to add some code >> >> like >> >> > this: >> >> > �...@override >> >> > protected void onNodeLinkClicked(AjaxRequestTarget target, >> >> > TreeNode node) { >> >> > DefaultMutableTreeNode treeNode = >> >> (DefaultMutableTreeNode) >> >> > node; >> >> > NavigationTreeNode navigationTreeNode = >> >> (NavigationTreeNode) >> >> > treeNode.getUserObject(); >> >> > if (navigationTreeNode.isURL) { >> >> > setResponsePage(navigationTreeNode.getURL()); >> >> > super.onNodeLinkClicked(target, node); >> >> > } else { >> >> > super.onNodeLinkClicked(target, node); >> >> > } >> >> > } >> >> > >> >> > this looks work well, but when I clink on a link, the page redirect to >> >> the >> >> > target page, but I can not keep the tree with the selected node >> expand. >> >> > >> >> > Can anyone help me or give me some reference URLs? Thanks! >> >> > >> >> > -- >> >> > -- >> >> > Enjoy. Thanks! >> >> > >> >> > Mobile: +086-15864011231 >> >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >> >> > website: http://haulynjason.net >> >> > gtalk: saharab...@gmail.com >> >> > yahoo: jia_hao...@yahoo.com >> >> > msn: saharab...@gmail.com >> >> > skype: saharabear >> >> > QQ: 378606292 >> >> > >> >> > Haulyn Jason >> >> > >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> > >> > >> > -- >> > -- >> > Enjoy. Thanks! >> > >> > Mobile: +086-15864011231 >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >> > website: http://haulynjason.net >> > gtalk: saharab...@gmail.com >> > yahoo: jia_hao...@yahoo.com >> > msn: saharab...@gmail.com >> > skype: saharabear >> > QQ: 378606292 >> > >> > 贾昊林 Haulyn Jason >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p24980702.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > -- > Enjoy. Thanks! > > Haulyn Microproduction > > Mobile: +086-15864011231 > email: saharab...@gmail.com, > hmp.hau...@foxmail.com > website: http://haulynjason.net > gtalk: saharab...@gmail.com > yahoo: jia_hao...@yahoo.com > msn: saharab...@gmail.com > skype: saharabear > QQ: 378606292 > > Haulyn Jason > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to use wicket tree in extension
Assuming the class diagram at http://jweekend.com/dev/ArticlesPage/ is up-to-date for your version of Wicket, perhaps you can override "protected ITreeState newTreeState()" to return an ITreeState that you pass between pages (or, put in your custom WebSession if that makes more sense in your app or in a table or ). I wouldn't be surprised if Matej comes back to say there's a neater way than that! Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com Haulyn Jason-2 wrote: > > Yes, that's right, is that a way to tell the new page(and the new instance > of the tree), the status of the old tree? > I means expand the node which I clicked? > > Thanks! > > > On Sat, Aug 15, 2009 at 9:00 AM, jWeekend > wrote: > >> >> Is your menu (tree) in some parent page class that both the first and the >> linked-to page extend? When you go to a new page instance you will get a >> new >> instance of the Tree. >> >> Regards - Cemal >> jWeekend >> OO & Java Technologies, Wicket Training and Development >> http://jWeekend.com >> >> >> Haulyn Jason-2 wrote: >> > >> > No, just use Tree in extension package. >> > >> > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg >> > wrote: >> > >> >> are you using LinkTree? >> >> >> >> -igor >> >> >> >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. >> Jason >> >> wrote: >> >> > Hi,all: >> >> > >> >> > I design a page with a tree for page navigation. But I can not find >> >> more >> >> > information from Internet to learn how to use the Tree component. >> >> > >> >> > I can display the tree as >> >> > >> >> > menu1 >> >> >|-sub_menu1 >> >> >|-sub_menu2 >> >> > menu2 >> >> >|-sub_menu3 >> >> >|-sub_menu4 >> >> > >> >> > and I remove root node, make all tree expand while init the tree, >> but >> I >> >> do >> >> > not know how to add links to the sub_menus, I tried to add some code >> >> like >> >> > this: >> >> >@Override >> >> >protected void onNodeLinkClicked(AjaxRequestTarget >> target, >> >> > TreeNode node) { >> >> >DefaultMutableTreeNode treeNode = >> >> (DefaultMutableTreeNode) >> >> > node; >> >> >NavigationTreeNode navigationTreeNode = >> >> (NavigationTreeNode) >> >> > treeNode.getUserObject(); >> >> >if (navigationTreeNode.isURL) { >> >> >setResponsePage(navigationTreeNode.getURL()); >> >> >super.onNodeLinkClicked(target, node); >> >> >} else { >> >> >super.onNodeLinkClicked(target, node); >> >> >} >> >> >} >> >> > >> >> > this looks work well, but when I clink on a link, the page redirect >> to >> >> the >> >> > target page, but I can not keep the tree with the selected node >> expand. >> >> > >> >> > Can anyone help me or give me some reference URLs? Thanks! >> >> > >> >> > -- >> >> > -- >> >> > Enjoy. Thanks! >> >> > >> >> > Mobile: +086-15864011231 >> >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >> >> > website: http://haulynjason.net >> >> > gtalk: saharab...@gmail.com >> >> > yahoo: jia_hao...@yahoo.com >> >> > msn: saharab...@gmail.com >> >> > skype: saharabear >> >> > QQ: 378606292 >> >> > >> >> > Haulyn Jason >> >> > >> >> >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> > >> > >> > -- >> > -- >> > Enjoy. Thanks! >> > >> > Mobile: +086-15864011231 >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >> > website: http:/
Re: how to use wicket tree in extension
Yes, that's right, is that a way to tell the new page(and the new instance of the tree), the status of the old tree? I means expand the node which I clicked? Thanks! On Sat, Aug 15, 2009 at 9:00 AM, jWeekend wrote: > > Is your menu (tree) in some parent page class that both the first and the > linked-to page extend? When you go to a new page instance you will get a > new > instance of the Tree. > > Regards - Cemal > jWeekend > OO & Java Technologies, Wicket Training and Development > http://jWeekend.com > > > Haulyn Jason-2 wrote: > > > > No, just use Tree in extension package. > > > > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg > > wrote: > > > >> are you using LinkTree? > >> > >> -igor > >> > >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason > >> wrote: > >> > Hi,all: > >> > > >> > I design a page with a tree for page navigation. But I can not find > >> more > >> > information from Internet to learn how to use the Tree component. > >> > > >> > I can display the tree as > >> > > >> > menu1 > >> >|-sub_menu1 > >> >|-sub_menu2 > >> > menu2 > >> >|-sub_menu3 > >> >|-sub_menu4 > >> > > >> > and I remove root node, make all tree expand while init the tree, but > I > >> do > >> > not know how to add links to the sub_menus, I tried to add some code > >> like > >> > this: > >> >@Override > >> >protected void onNodeLinkClicked(AjaxRequestTarget target, > >> > TreeNode node) { > >> >DefaultMutableTreeNode treeNode = > >> (DefaultMutableTreeNode) > >> > node; > >> >NavigationTreeNode navigationTreeNode = > >> (NavigationTreeNode) > >> > treeNode.getUserObject(); > >> >if (navigationTreeNode.isURL) { > >> >setResponsePage(navigationTreeNode.getURL()); > >> >super.onNodeLinkClicked(target, node); > >> >} else { > >> >super.onNodeLinkClicked(target, node); > >> >} > >> >} > >> > > >> > this looks work well, but when I clink on a link, the page redirect to > >> the > >> > target page, but I can not keep the tree with the selected node > expand. > >> > > >> > Can anyone help me or give me some reference URLs? Thanks! > >> > > >> > -- > >> > -- > >> > Enjoy. Thanks! > >> > > >> > Mobile: +086-15864011231 > >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com > >> > website: http://haulynjason.net > >> > gtalk: saharab...@gmail.com > >> > yahoo: jia_hao...@yahoo.com > >> > msn: saharab...@gmail.com > >> > skype: saharabear > >> > QQ: 378606292 > >> > > >> > Haulyn Jason > >> > > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > > -- > > Enjoy. Thanks! > > > > Mobile: +086-15864011231 > > email: saharab...@gmail.com, hmp.hau...@foxmail.com > > website: http://haulynjason.net > > gtalk: saharab...@gmail.com > > yahoo: jia_hao...@yahoo.com > > msn: saharab...@gmail.com > > skype: saharabear > > QQ: 378606292 > > > > 贾昊林 Haulyn Jason > > > > > > -- > View this message in context: > http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p24980702.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- -- Enjoy. Thanks! Haulyn Microproduction Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Re: how to use wicket tree in extension
Is your menu (tree) in some parent page class that both the first and the linked-to page extend? When you go to a new page instance you will get a new instance of the Tree. Regards - Cemal jWeekend OO & Java Technologies, Wicket Training and Development http://jWeekend.com Haulyn Jason-2 wrote: > > No, just use Tree in extension package. > > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg > wrote: > >> are you using LinkTree? >> >> -igor >> >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason >> wrote: >> > Hi,all: >> > >> > I design a page with a tree for page navigation. But I can not find >> more >> > information from Internet to learn how to use the Tree component. >> > >> > I can display the tree as >> > >> > menu1 >> >|-sub_menu1 >> >|-sub_menu2 >> > menu2 >> >|-sub_menu3 >> >|-sub_menu4 >> > >> > and I remove root node, make all tree expand while init the tree, but I >> do >> > not know how to add links to the sub_menus, I tried to add some code >> like >> > this: >> >@Override >> >protected void onNodeLinkClicked(AjaxRequestTarget target, >> > TreeNode node) { >> >DefaultMutableTreeNode treeNode = >> (DefaultMutableTreeNode) >> > node; >> >NavigationTreeNode navigationTreeNode = >> (NavigationTreeNode) >> > treeNode.getUserObject(); >> >if (navigationTreeNode.isURL) { >> >setResponsePage(navigationTreeNode.getURL()); >> >super.onNodeLinkClicked(target, node); >> >} else { >> >super.onNodeLinkClicked(target, node); >> >} >> >} >> > >> > this looks work well, but when I clink on a link, the page redirect to >> the >> > target page, but I can not keep the tree with the selected node expand. >> > >> > Can anyone help me or give me some reference URLs? Thanks! >> > >> > -- >> > -- >> > Enjoy. Thanks! >> > >> > Mobile: +086-15864011231 >> > email: saharab...@gmail.com, hmp.hau...@foxmail.com >> > website: http://haulynjason.net >> > gtalk: saharab...@gmail.com >> > yahoo: jia_hao...@yahoo.com >> > msn: saharab...@gmail.com >> > skype: saharabear >> > QQ: 378606292 >> > >> > Haulyn Jason >> > >> >> --------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > -- > Enjoy. Thanks! > > Mobile: +086-15864011231 > email: saharab...@gmail.com, hmp.hau...@foxmail.com > website: http://haulynjason.net > gtalk: saharab...@gmail.com > yahoo: jia_hao...@yahoo.com > msn: saharab...@gmail.com > skype: saharabear > QQ: 378606292 > > 贾昊林 Haulyn Jason > > -- View this message in context: http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p24980702.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to use wicket tree in extension
No, just use Tree in extension package. On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg wrote: > are you using LinkTree? > > -igor > > On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason > wrote: > > Hi,all: > > > > I design a page with a tree for page navigation. But I can not find more > > information from Internet to learn how to use the Tree component. > > > > I can display the tree as > > > > menu1 > >|-sub_menu1 > >|-sub_menu2 > > menu2 > >|-sub_menu3 > >|-sub_menu4 > > > > and I remove root node, make all tree expand while init the tree, but I > do > > not know how to add links to the sub_menus, I tried to add some code like > > this: > >@Override > >protected void onNodeLinkClicked(AjaxRequestTarget target, > > TreeNode node) { > >DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) > > node; > >NavigationTreeNode navigationTreeNode = > (NavigationTreeNode) > > treeNode.getUserObject(); > >if (navigationTreeNode.isURL) { > >setResponsePage(navigationTreeNode.getURL()); > >super.onNodeLinkClicked(target, node); > >} else { > >super.onNodeLinkClicked(target, node); > >} > >} > > > > this looks work well, but when I clink on a link, the page redirect to > the > > target page, but I can not keep the tree with the selected node expand. > > > > Can anyone help me or give me some reference URLs? Thanks! > > > > -- > > -- > > Enjoy. Thanks! > > > > Mobile: +086-15864011231 > > email: saharab...@gmail.com, hmp.hau...@foxmail.com > > website: http://haulynjason.net > > gtalk: saharab...@gmail.com > > yahoo: jia_hao...@yahoo.com > > msn: saharab...@gmail.com > > skype: saharabear > > QQ: 378606292 > > > > Haulyn Jason > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- -- Enjoy. Thanks! Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 贾昊林 Haulyn Jason
Re: how to use wicket tree in extension
are you using LinkTree? -igor On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason wrote: > Hi,all: > > I design a page with a tree for page navigation. But I can not find more > information from Internet to learn how to use the Tree component. > > I can display the tree as > > menu1 > |-sub_menu1 > |-sub_menu2 > menu2 > |-sub_menu3 > |-sub_menu4 > > and I remove root node, make all tree expand while init the tree, but I do > not know how to add links to the sub_menus, I tried to add some code like > this: > �...@override > protected void onNodeLinkClicked(AjaxRequestTarget target, > TreeNode node) { > DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) > node; > NavigationTreeNode navigationTreeNode = (NavigationTreeNode) > treeNode.getUserObject(); > if (navigationTreeNode.isURL) { > setResponsePage(navigationTreeNode.getURL()); > super.onNodeLinkClicked(target, node); > } else { > super.onNodeLinkClicked(target, node); > } > } > > this looks work well, but when I clink on a link, the page redirect to the > target page, but I can not keep the tree with the selected node expand. > > Can anyone help me or give me some reference URLs? Thanks! > > -- > -- > Enjoy. Thanks! > > Mobile: +086-15864011231 > email: saharab...@gmail.com, hmp.hau...@foxmail.com > website: http://haulynjason.net > gtalk: saharab...@gmail.com > yahoo: jia_hao...@yahoo.com > msn: saharab...@gmail.com > skype: saharabear > QQ: 378606292 > > Haulyn Jason > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
how to use wicket tree in extension
Hi,all: I design a page with a tree for page navigation. But I can not find more information from Internet to learn how to use the Tree component. I can display the tree as menu1 |-sub_menu1 |-sub_menu2 menu2 |-sub_menu3 |-sub_menu4 and I remove root node, make all tree expand while init the tree, but I do not know how to add links to the sub_menus, I tried to add some code like this: @Override protected void onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node; NavigationTreeNode navigationTreeNode = (NavigationTreeNode) treeNode.getUserObject(); if (navigationTreeNode.isURL) { setResponsePage(navigationTreeNode.getURL()); super.onNodeLinkClicked(target, node); } else { super.onNodeLinkClicked(target, node); } } this looks work well, but when I clink on a link, the page redirect to the target page, but I can not keep the tree with the selected node expand. Can anyone help me or give me some reference URLs? Thanks! -- -- Enjoy. Thanks! Mobile: +086-15864011231 email: saharab...@gmail.com, hmp.hau...@foxmail.com website: http://haulynjason.net gtalk: saharab...@gmail.com yahoo: jia_hao...@yahoo.com msn: saharab...@gmail.com skype: saharabear QQ: 378606292 Haulyn Jason
Re: [ANN] wicket-tree project
Hi, *Nested*Tree... *Table*Tree... I hope this makes sense ;). I will align the markup for TableTree with the markup of DataTable, thanks for the hint. Sven On So, 2009-07-26 at 16:29 -0700, Vladimir K wrote: > Sven, > > i added TableTree (why not TreeTable?) to my panel and added a button to > switch between tree and table representation. > > The problem is that DataTable relies on the user that binds it to the > tag at the time when your TableTree contains within. > > It is not a big deal just an unconvinience. I have 12 lines of code and 5 > lines of markup instead of single addOrReplace call. > > Hmm ... from the other hand I see a showstopper - I can't add my attributes > and styles to TableTree because it is hidden inside. That's a big problem. > > Please consider removing tags from TableTree markup. You can make > sure that the user provided correct tag in onComponentTag method. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Since you update AbstractTree in ajax request I can't omit etra 'div' tag that encloses tag neither by using nor by calling setRenderBodyOnly(true). Vladimir K wrote: > > Sven, > > i added TableTree (why not TreeTable?) to my panel and added a button to > switch between tree and table representation. > > The problem is that DataTable relies on the user that binds it to the > tag at the time when your TableTree contains within. > > It is not a big deal just an unconvinience. I have 12 lines of code and 5 > lines of markup instead of single addOrReplace call. > > Hmm ... from the other hand I see a showstopper - I can't add my > attributes and styles to TableTree because it is hidden inside. That's a > big problem. > > Please consider removing tags from TableTree markup. You can make > sure that the user provided correct tag in onComponentTag method. > -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24672778.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Sven, i added TableTree (why not TreeTable?) to my panel and added a button to switch between tree and table representation. The problem is that DataTable relies on the user that binds it to the tag at the time when your TableTree contains within. It is not a big deal just an unconvinience. I have 12 lines of code and 5 lines of markup instead of single addOrReplace call. Hmm ... from the other hand I see a showstopper - I can't add my attributes and styles to TableTree because it is hidden inside. That's a big problem. Please consider removing tags from TableTree markup. You can make sure that the user provided correct tag in onComponentTag method. -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24671586.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
> > ITreeProvider and IDataProvider are not exactly compatible, I don't > > think we gain anything by extending the former from the latter. > I don't insist. But you do have IDataProvider wrapper over ITreeProvider in > TableTree.java :) Yes, indeed ;). > I din't find API to control expanded state of node. Say I would like to add > a button to collapse all nodes, or I would like to save expanded state and > restore when the user returns back to this page again. AbstractTree offers expand(), collapse() and getState(). All expanded nodes are put in the tree's model. You may implement this model as you like (e.g. store ids) but ProviderSubset is a default implementation which offers detachment out-of-the-box. > Please explain how I should operate with the state of tree (what nodes are > expanded and what nodes are selected). Once I realize I will be able to > override newRowItem properly. The tree implementation does not know anything about selection, this is not part of a tree's state. If you need it, implement it by yourself - please see the examples. You can expand/collect nodes with the corresponding methods in AbstracTree and benefit from an AJAX update automatically (only the relevant branch for NestedTree or the complete Tree for TableTree). Or you control the expand state directly in the tree's model - in case of an AJAX request you have to add the tree for rendering by yourself though. Regards Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
It does not. It is stated at the bottom of the home page http://code.google.com/p/wicket-tree/ For ajax updates it should behave not worse than DataTable component. Matej, I find the idea of re-using data provider, columns and cells developed for DataTable very important. Matej Knopp-2 wrote: > > Does TableTree support partial (ajax) updates? > > -Matej > > On Sun, Jul 26, 2009 at 3:00 PM, Vladimir K wrote: >> >> >> svenmeier wrote: >>> >>> ITreeProvider and IDataProvider are not exactly compatible, I don't >>> think we gain anything by extending the former from the latter. >>> >> >> I don't insist. But you do have IDataProvider wrapper over ITreeProvider >> in >> TableTree.java :) >> >> >> >>> Selection is not part of the tree components. There are just to many >>> different notions of selection: >>> - single/multiple selection >>> - subtree selection >>> - continuous/discontinuous selection >>> - several selections on a single tree (see example with checkable *and* >>> selectable content) >>> - no selection at all >>> - ... >>> >>> IMHO it's better to leave these requirements out of a tree >>> implementation. >>> If you need a "selected" class attribute on a TableTree, override >>> #newRowItem() and do it yourself. Ever noticed that DataTable has no >>> notion of selection too? >>> tag. Whatever. >> >> I din't find API to control expanded state of node. Say I would like to >> add >> a button to collapse all nodes, or I would like to save expanded state >> and >> restore when the user returns back to this page again. >> >> Please explain how I should operate with the state of tree (what nodes >> are >> expanded and what nodes are selected). Once I realize I will be able to >> override newRowItem properly. >> >> Also you have 2 Branch classes. I find it confusing a bit. >> >> I'm going to play with TreeTable tomorrow. >> >> -- >> View this message in context: >> http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24666766.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24666861.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Does TableTree support partial (ajax) updates? -Matej On Sun, Jul 26, 2009 at 3:00 PM, Vladimir K wrote: > > > svenmeier wrote: >> >> ITreeProvider and IDataProvider are not exactly compatible, I don't >> think we gain anything by extending the former from the latter. >> > > I don't insist. But you do have IDataProvider wrapper over ITreeProvider in > TableTree.java :) > > > >> Selection is not part of the tree components. There are just to many >> different notions of selection: >> - single/multiple selection >> - subtree selection >> - continuous/discontinuous selection >> - several selections on a single tree (see example with checkable *and* >> selectable content) >> - no selection at all >> - ... >> >> IMHO it's better to leave these requirements out of a tree >> implementation. >> If you need a "selected" class attribute on a TableTree, override >> #newRowItem() and do it yourself. Ever noticed that DataTable has no >> notion of selection too? >> tag. Whatever. > > I din't find API to control expanded state of node. Say I would like to add > a button to collapse all nodes, or I would like to save expanded state and > restore when the user returns back to this page again. > > Please explain how I should operate with the state of tree (what nodes are > expanded and what nodes are selected). Once I realize I will be able to > override newRowItem properly. > > Also you have 2 Branch classes. I find it confusing a bit. > > I'm going to play with TreeTable tomorrow. > > -- > View this message in context: > http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24666766.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
svenmeier wrote: > > ITreeProvider and IDataProvider are not exactly compatible, I don't > think we gain anything by extending the former from the latter. > I don't insist. But you do have IDataProvider wrapper over ITreeProvider in TableTree.java :) > Selection is not part of the tree components. There are just to many > different notions of selection: > - single/multiple selection > - subtree selection > - continuous/discontinuous selection > - several selections on a single tree (see example with checkable *and* > selectable content) > - no selection at all > - ... > > IMHO it's better to leave these requirements out of a tree > implementation. > If you need a "selected" class attribute on a TableTree, override > #newRowItem() and do it yourself. Ever noticed that DataTable has no > notion of selection too? > tag. Whatever. I din't find API to control expanded state of node. Say I would like to add a button to collapse all nodes, or I would like to save expanded state and restore when the user returns back to this page again. Please explain how I should operate with the state of tree (what nodes are expanded and what nodes are selected). Once I realize I will be able to override newRowItem properly. Also you have 2 Branch classes. I find it confusing a bit. I'm going to play with TreeTable tomorrow. -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24666766.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Hi, ITreeProvider and IDataProvider are not exactly compatible, I don't think we gain anything by extending the former from the latter. Selection is not part of the tree components. There are just to many different notions of selection: - single/multiple selection - subtree selection - continuous/discontinuous selection - several selections on a single tree (see example with checkable *and* selectable content) - no selection at all - ... IMHO it's better to leave these requirements out of a tree implementation. If you need a "selected" class attribute on a TableTree, override #newRowItem() and do it yourself. Ever noticed that DataTable has no notion of selection too? Regards Sven On So, 2009-07-26 at 02:13 -0700, Vladimir K wrote: > Why you don't extend ITreeProvider from IDataProvider? They looks compatible > for now. I can add IDataProvider to my implementation class and delegate > roots() to iterator(). From the other hand it is just extra method. > > One thing to mention. There should be "full row select" option. You just > need to add a "selected" class attribute for selected s. > > > Vladimir K wrote: > > > > Nested tree and tree table seems promicing. > > > > What I missed in your example is single-selection mode, and sortable > > headers with filters. > > > > One of my the upcoming tasks is to build a selector component that knows > > whether the object is hierarchical and puts inside a datatable with > > navigator or treetable. Since wicket-extentions project has completely > > incompatible components in this regard my component that unifies both > > looks pretty complex to do. Your treetable components seems to be more > > close to datable so it definitely might come in handy. > > > > When are you going to finalize the component contract (api)? > > > > > > svenmeier wrote: > >> > >> Sure, wicket-tree is still in its conception phase. > >> > >> I'll tidy up the project structure soon. > >> > >> Sven > >> > >> On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: > >>> So is the project a war (since it runs with jetty:run)? Wouldn't that > >>> make > >>> it hard to use in other projects? > >>> > >>> On Jul 25, 2009 6:18 PM, "Major Péter" wrote: > >>> > >>> Cool, that was exactly, what I was looking for. > >>> Thanks. > >>> > >>> Peter > >>> > >>> 2009-07-26 00:06 keltezéssel, Sven Meier írta: > >>> > >>> > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example > >>> if I > >>> check the >> parent, t... > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > >> > > > > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Just make IDataProvider in charge for sorting and filtering like DataTable does. Filtering in tree could be seen in Eclipse preferences for instance. svenmeier wrote: > > Hi, > > I've added single selection to the example. I'm not sure how sorting and > filtering applies to hierarchical data though. > > API will be finalized after sufficient feedback from the Wicket > community - so keep on firing questions ;). > > Sven > > On So, 2009-07-26 at 01:51 -0700, Vladimir K wrote: >> Nested tree and tree table seems promicing. >> >> What I missed in your example is single-selection mode, and sortable >> headers >> with filters. >> >> One of my the upcoming tasks is to build a selector component that knows >> whether the object is hierarchical and puts inside a datatable with >> navigator or treetable. Since wicket-extentions project has completely >> incompatible components in this regard my component that unifies both >> looks >> pretty complex to do. Your treetable components seems to be more close to >> datable so it definitely might come in handy. >> >> When are you going to finalize the component contract (api)? >> >> >> svenmeier wrote: >> > >> > Sure, wicket-tree is still in its conception phase. >> > >> > I'll tidy up the project structure soon. >> > >> > Sven >> > >> > On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: >> >> So is the project a war (since it runs with jetty:run)? Wouldn't that >> >> make >> >> it hard to use in other projects? >> >> >> >> On Jul 25, 2009 6:18 PM, "Major Péter" wrote: >> >> >> >> Cool, that was exactly, what I was looking for. >> >> Thanks. >> >> >> >> Peter >> >> >> >> 2009-07-26 00:06 keltezéssel, Sven Meier írta: >> >> >> >> > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) >> example >> >> if I >> >> check the >> parent, t... >> > >> > >> > ----- >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> > >> > >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24665608.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Hi, I've added single selection to the example. I'm not sure how sorting and filtering applies to hierarchical data though. API will be finalized after sufficient feedback from the Wicket community - so keep on firing questions ;). Sven On So, 2009-07-26 at 01:51 -0700, Vladimir K wrote: > Nested tree and tree table seems promicing. > > What I missed in your example is single-selection mode, and sortable headers > with filters. > > One of my the upcoming tasks is to build a selector component that knows > whether the object is hierarchical and puts inside a datatable with > navigator or treetable. Since wicket-extentions project has completely > incompatible components in this regard my component that unifies both looks > pretty complex to do. Your treetable components seems to be more close to > datable so it definitely might come in handy. > > When are you going to finalize the component contract (api)? > > > svenmeier wrote: > > > > Sure, wicket-tree is still in its conception phase. > > > > I'll tidy up the project structure soon. > > > > Sven > > > > On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: > >> So is the project a war (since it runs with jetty:run)? Wouldn't that > >> make > >> it hard to use in other projects? > >> > >> On Jul 25, 2009 6:18 PM, "Major Péter" wrote: > >> > >> Cool, that was exactly, what I was looking for. > >> Thanks. > >> > >> Peter > >> > >> 2009-07-26 00:06 keltezéssel, Sven Meier írta: > >> > >> > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example > >> if I > >> check the >> parent, t... > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
I find the source code pretty clean and easy to understand. Especially if you are familiar with DataTable component. For instance I see that it is easy to use Ajax versions of Toolbars instead of static (however DefaultAjaxFallbackTreeTable would be usefull) Looking forward for the post-conception version :) I would suggest adding it to the Wicket right next to DataTable. -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24665301.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Why you don't extend ITreeProvider from IDataProvider? They looks compatible for now. I can add IDataProvider to my implementation class and delegate roots() to iterator(). From the other hand it is just extra method. One thing to mention. There should be "full row select" option. You just need to add a "selected" class attribute for selected s. Vladimir K wrote: > > Nested tree and tree table seems promicing. > > What I missed in your example is single-selection mode, and sortable > headers with filters. > > One of my the upcoming tasks is to build a selector component that knows > whether the object is hierarchical and puts inside a datatable with > navigator or treetable. Since wicket-extentions project has completely > incompatible components in this regard my component that unifies both > looks pretty complex to do. Your treetable components seems to be more > close to datable so it definitely might come in handy. > > When are you going to finalize the component contract (api)? > > > svenmeier wrote: >> >> Sure, wicket-tree is still in its conception phase. >> >> I'll tidy up the project structure soon. >> >> Sven >> >> On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: >>> So is the project a war (since it runs with jetty:run)? Wouldn't that >>> make >>> it hard to use in other projects? >>> >>> On Jul 25, 2009 6:18 PM, "Major Péter" wrote: >>> >>> Cool, that was exactly, what I was looking for. >>> Thanks. >>> >>> Peter >>> >>> 2009-07-26 00:06 keltezéssel, Sven Meier írta: >>> >>> > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example >>> if I >>> check the >> parent, t... >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24665206.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Nested tree and tree table seems promicing. What I missed in your example is single-selection mode, and sortable headers with filters. One of my the upcoming tasks is to build a selector component that knows whether the object is hierarchical and puts inside a datatable with navigator or treetable. Since wicket-extentions project has completely incompatible components in this regard my component that unifies both looks pretty complex to do. Your treetable components seems to be more close to datable so it definitely might come in handy. When are you going to finalize the component contract (api)? svenmeier wrote: > > Sure, wicket-tree is still in its conception phase. > > I'll tidy up the project structure soon. > > Sven > > On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: >> So is the project a war (since it runs with jetty:run)? Wouldn't that >> make >> it hard to use in other projects? >> >> On Jul 25, 2009 6:18 PM, "Major Péter" wrote: >> >> Cool, that was exactly, what I was looking for. >> Thanks. >> >> Peter >> >> 2009-07-26 00:06 keltezéssel, Sven Meier írta: >> >> > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example >> if I >> check the >> parent, t... > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/-ANN--wicket-tree-project-tp24660403p24665096.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Sure, wicket-tree is still in its conception phase. I'll tidy up the project structure soon. Sven On Sa, 2009-07-25 at 18:57 -0400, James Carman wrote: > So is the project a war (since it runs with jetty:run)? Wouldn't that make > it hard to use in other projects? > > On Jul 25, 2009 6:18 PM, "Major Péter" wrote: > > Cool, that was exactly, what I was looking for. > Thanks. > > Peter > > 2009-07-26 00:06 keltezéssel, Sven Meier írta: > > > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example if I > check the >> parent, t... - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
So is the project a war (since it runs with jetty:run)? Wouldn't that make it hard to use in other projects? On Jul 25, 2009 6:18 PM, "Major Péter" wrote: Cool, that was exactly, what I was looking for. Thanks. Peter 2009-07-26 00:06 keltezéssel, Sven Meier írta: > > Hi Peter, > >> // at the chekcedfoldercontent (nested tree) example if I check the >> parent, t...
Re: [ANN] wicket-tree project
Cool, that was exactly, what I was looking for. Thanks. Peter 2009-07-26 00:06 keltezéssel, Sven Meier írta: Hi Peter, // at the chekcedfoldercontent (nested tree) example if I check the parent, then the kids won't be checked in, is this for purpose? no purpose here, it's just an example and has nothing to do with the tree code. Is there any chance, that a tree would come, which nodes are links (maybe folders could disable this function) and the opening of the nodes is via ajax, but the links would be normal bookmarkablepagelinks This is just a matter of tree usage, create you custom content and do what ever you want. See the new example: http://code.google.com/p/wicket-tree/source/browse/trunk/wicket-tree/src/main/java/wickettree/examples/content/BookmarkableFolderContent.java Hope this helps Sven , so in the markup wouldn't be only #'s? :) (as you can see: http://www.wicket-library.com/wicket-examples/ajax/tree/simple.3 when you open the folders, the nodes gonna be links to simple.3# , so instead of simple.3# i'm wanna a normal link) Great work anyway Regards, Peter 2009-07-25 21:29 keltezéssel, Martin Makundi írta: Any live examples, would be nice? ** Martin 2009/7/25 Sven Meier: Hi all, i would like to announce wicket-tree, a new project hosting a clean slate development of tree components for Wicket. The API has not been fully stabilized yet but you are invited to take a first look: http://code.google.com/p/wicket-tree/ Have fun Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Hi Peter, > // at the chekcedfoldercontent (nested tree) example if I check the > parent, then the kids won't be checked in, is this for purpose? no purpose here, it's just an example and has nothing to do with the tree code. > Is there any chance, that a tree would come, which nodes are links > (maybe folders could disable this function) and the opening of the nodes > is via ajax, but the links would be normal bookmarkablepagelinks This is just a matter of tree usage, create you custom content and do what ever you want. See the new example: http://code.google.com/p/wicket-tree/source/browse/trunk/wicket-tree/src/main/java/wickettree/examples/content/BookmarkableFolderContent.java Hope this helps Sven > , so in > the markup wouldn't be only #'s? :) (as you can see: > http://www.wicket-library.com/wicket-examples/ajax/tree/simple.3 when > you open the folders, the nodes gonna be links to simple.3# , so instead > of simple.3# i'm wanna a normal link) > > Great work anyway > > Regards, > Peter > > 2009-07-25 21:29 keltezéssel, Martin Makundi írta: > > Any live examples, would be nice? > > > > ** > > Martin > > > > 2009/7/25 Sven Meier: > >> Hi all, > >> > >> i would like to announce wicket-tree, a new project hosting a clean > >> slate development of tree components for Wicket. > >> > >> The API has not been fully stabilized yet but you are invited to take a > >> first look: > >> > >> http://code.google.com/p/wicket-tree/ > >> > >> Have fun > >> > >> Sven > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Hi, the project contains an example application: mvn jetty:run ... should get you going. The usual Jetty start class is contained too. So do a mvn eclipse:eclipse ... and you're able to play with it in Eclipse. Regards Sven On Sa, 2009-07-25 at 22:29 +0300, Martin Makundi wrote: > Any live examples, would be nice? > > ** > Martin > > 2009/7/25 Sven Meier : > > Hi all, > > > > i would like to announce wicket-tree, a new project hosting a clean > > slate development of tree components for Wicket. > > > > The API has not been fully stabilized yet but you are invited to take a > > first look: > > > > http://code.google.com/p/wicket-tree/ > > > > Have fun > > > > Sven > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
I didn't found live examples neither, but after checking out ( svn checkout http://wicket-tree.googlecode.com/svn/trunk/ wicket-tree-read-only ) and building the project, there is a war file, which you could deploy and see the examples. // at the chekcedfoldercontent (nested tree) example if I check the parent, then the kids won't be checked in, is this for purpose? Is there any chance, that a tree would come, which nodes are links (maybe folders could disable this function) and the opening of the nodes is via ajax, but the links would be normal bookmarkablepagelinks, so in the markup wouldn't be only #'s? :) (as you can see: http://www.wicket-library.com/wicket-examples/ajax/tree/simple.3 when you open the folders, the nodes gonna be links to simple.3# , so instead of simple.3# i'm wanna a normal link) Great work anyway Regards, Peter 2009-07-25 21:29 keltezéssel, Martin Makundi írta: Any live examples, would be nice? ** Martin 2009/7/25 Sven Meier: Hi all, i would like to announce wicket-tree, a new project hosting a clean slate development of tree components for Wicket. The API has not been fully stabilized yet but you are invited to take a first look: http://code.google.com/p/wicket-tree/ Have fun Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANN] wicket-tree project
Any live examples, would be nice? ** Martin 2009/7/25 Sven Meier : > Hi all, > > i would like to announce wicket-tree, a new project hosting a clean > slate development of tree components for Wicket. > > The API has not been fully stabilized yet but you are invited to take a > first look: > > http://code.google.com/p/wicket-tree/ > > Have fun > > Sven > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[ANN] wicket-tree project
Hi all, i would like to announce wicket-tree, a new project hosting a clean slate development of tree components for Wicket. The API has not been fully stabilized yet but you are invited to take a first look: http://code.google.com/p/wicket-tree/ Have fun Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to Hidden/Disabled Wicket tree with implementation wicket security (Help)
Hi, i have tried to disable/hide component like buttons (as Warren example) with success. but how to Wicket tree not populateTreeItem( hide) because my Class Page not include in my hive file? Does anyone can do it? or my way that call all menu from db for all principals then lets wicket security hide unsecured link is wrong method? any hints/example will be appreciated. thanks --- Pada Jum, 17/7/09, Warren Bell menulis: > Dari: Warren Bell > Judul: Re: How to Hidden/Disabled Wicket tree with implementation wicket > security > Kepada: "Rizal Indra" , users@wicket.apache.org > Tanggal: Jumat, 17 Juli, 2009, 10:50 AM > Your hive should have something like > this with whatever actions you want: > > permission ${ComponentPermission} > "${MyPage}:myPanel:myForm:myWebMarkupContainer", "inherit, > render, enable"; > > And also secure anything in the container like buttons: > > permission ${ComponentPermission} > "${MyPage}:myPanel:myForm:myWebMarkupContainer:myButton", > "inherit, render, enable"; > > I seem to remember a similar problem that I had. It > involved the way I used a WebMarkupContainer, a form and a > panel. I messed around with how I nested the different > components and I got it to work. Go figure? > > Warren > > Rizal Indra wrote: > > Thanks for quick reply Warren, > > exactly my code SecureWebMarkupContainer.java is same > as with your code. > > But its still not working. I am newbie in java wicket, > so i need more example/hint for understanding its. I am sure > that missing something but i dont know how to solve it. > > > > Can anyone help me? thanks > > > > > > --- Pada Kam, 16/7/09, Warren Bell > menulis: > > > > > >> Dari: Warren Bell > >> Judul: Re: How to Hidden/Disabled Wicket tree with > implementation wicket security > >> Kepada: users@wicket.apache.org, > bujang_kuan...@yahoo.com > >> Tanggal: Kamis, 16 Juli, 2009, 11:09 AM > >> Try this: > >> > >> Warren > >> > >> public class SecureWebMarkupContainer extends > >> WebMarkupContainer implements ISecureComponent { > >> > >> public > SecureWebMarkupContainer(String > >> id) > >> { > >> super(id); > >> > >> setSecurityCheck(new > >> ComponentSecurityCheck(this)); > >> } > >> public > >> SecureWebMarkupContainer(String id, IModel model) > >> { > >> super(id, model); > >> setSecurityCheck(new > >> ComponentSecurityCheck(this)); > >> } > >> public final void > >> setSecurityCheck(ISecurityCheck check) > >> { > >> > SecureComponentHelper.setSecurityCheck(this, > >> check); > >> } > >> > >> public final ISecurityCheck > >> getSecurityCheck() > >> { > >> return > >> SecureComponentHelper.getSecurityCheck(this); > >> } > >> > >> public boolean > isActionAuthorized(String > >> action) > >> { > >> return > >> SecureComponentHelper.isActionAuthorized(this, > action); > >> } > >> > >> public boolean > >> isActionAuthorized(WaspAction action) > >> { > >> return > >> SecureComponentHelper.isActionAuthorized(this, > action); > >> } > >> > >> public boolean isAuthenticated() > >> { > >> return > >> SecureComponentHelper.isAuthenticated(this); > >> } > >> public boolean > >> isAuthenticatedAndAuthorized(String action) > >> { > >> return > isAuthenticated() > >> && isActionAuthorized(action); > >> } > >> > >> { > >> > >> > >> Rizal Indra wrote: > >> > >>> Hi, > >>> I have created my welcome page with menu tree > (http://wicketstuff.org/wicket13/nested/ > ). I want to > >>> > >> hide/disabled some item menu depend on user right > >> principal. > >> > >>> I have try put some tricks but not work :-) > >>> MyTree.java > >>> public class MyTree extends Tree { > >>> @Override > >>> protected void > >>> > >> populateTreeItem(WebMarkupContainer item, int > level) { > >> > >>> > >> Syst
Re: How to Hidden/Disabled Wicket tree with implementation wicket security
Your hive should have something like this with whatever actions you want: permission ${ComponentPermission} "${MyPage}:myPanel:myForm:myWebMarkupContainer", "inherit, render, enable"; And also secure anything in the container like buttons: permission ${ComponentPermission} "${MyPage}:myPanel:myForm:myWebMarkupContainer:myButton", "inherit, render, enable"; I seem to remember a similar problem that I had. It involved the way I used a WebMarkupContainer, a form and a panel. I messed around with how I nested the different components and I got it to work. Go figure? Warren Rizal Indra wrote: Thanks for quick reply Warren, exactly my code SecureWebMarkupContainer.java is same as with your code. But its still not working. I am newbie in java wicket, so i need more example/hint for understanding its. I am sure that missing something but i dont know how to solve it. Can anyone help me? thanks --- Pada Kam, 16/7/09, Warren Bell menulis: Dari: Warren Bell Judul: Re: How to Hidden/Disabled Wicket tree with implementation wicket security Kepada: users@wicket.apache.org, bujang_kuan...@yahoo.com Tanggal: Kamis, 16 Juli, 2009, 11:09 AM Try this: Warren public class SecureWebMarkupContainer extends WebMarkupContainer implements ISecureComponent { public SecureWebMarkupContainer(String id) { super(id); setSecurityCheck(new ComponentSecurityCheck(this)); } public SecureWebMarkupContainer(String id, IModel model) { super(id, model); setSecurityCheck(new ComponentSecurityCheck(this)); } public final void setSecurityCheck(ISecurityCheck check) { SecureComponentHelper.setSecurityCheck(this, check); } public final ISecurityCheck getSecurityCheck() { return SecureComponentHelper.getSecurityCheck(this); } public boolean isActionAuthorized(String action) { return SecureComponentHelper.isActionAuthorized(this, action); } public boolean isActionAuthorized(WaspAction action) { return SecureComponentHelper.isActionAuthorized(this, action); } public boolean isAuthenticated() { return SecureComponentHelper.isAuthenticated(this); } public boolean isAuthenticatedAndAuthorized(String action) { return isAuthenticated() && isActionAuthorized(action); } { Rizal Indra wrote: Hi, I have created my welcome page with menu tree (http://wicketstuff.org/wicket13/nested/ ). I want to hide/disabled some item menu depend on user right principal. I have try put some tricks but not work :-) MyTree.java public class MyTree extends Tree { @Override protected void populateTreeItem(WebMarkupContainer item, int level) { System.out.println(" getting populateTreeItem..."); super.populateTreeItem(item, level); final TreeNode node = (TreeNode)item.getModelObject(); MarkupContainer nodeLink = newNodeLink(item, "nodeLink", node); SecureWebMarkupContainer swmc = new SecureWebMarkupContainer("hiddenMenu"); swmc.add(nodeLink); //item.add(nodeLink); item.add(swmc); } } SecureWebMarkupContainer.java public class SecureWebMarkupContainer extends WebMarkupContainer implements ISecureComponent { ... } can anyone give some example/advice how to make it work. thanks Pemanasan global? Apa sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Berbagi foto Flickr dengan teman di dalam Messenger. Jelajahi Yahoo! Messenger yang serba baru sekarang! http://id.messenger.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to Hidden/Disabled Wicket tree with implementation wicket security
Thanks for quick reply Warren, exactly my code SecureWebMarkupContainer.java is same as with your code. But its still not working. I am newbie in java wicket, so i need more example/hint for understanding its. I am sure that missing something but i dont know how to solve it. Can anyone help me? thanks --- Pada Kam, 16/7/09, Warren Bell menulis: > Dari: Warren Bell > Judul: Re: How to Hidden/Disabled Wicket tree with implementation wicket > security > Kepada: users@wicket.apache.org, bujang_kuan...@yahoo.com > Tanggal: Kamis, 16 Juli, 2009, 11:09 AM > Try this: > > Warren > > public class SecureWebMarkupContainer extends > WebMarkupContainer implements ISecureComponent { > > public SecureWebMarkupContainer(String > id) > { > super(id); > > setSecurityCheck(new > ComponentSecurityCheck(this)); > } > public > SecureWebMarkupContainer(String id, IModel model) > { > super(id, model); > setSecurityCheck(new > ComponentSecurityCheck(this)); > } > public final void > setSecurityCheck(ISecurityCheck check) > { > > SecureComponentHelper.setSecurityCheck(this, > check); > } > > public final ISecurityCheck > getSecurityCheck() > { > return > SecureComponentHelper.getSecurityCheck(this); > } > > public boolean isActionAuthorized(String > action) > { > return > SecureComponentHelper.isActionAuthorized(this, action); > } > > public boolean > isActionAuthorized(WaspAction action) > { > return > SecureComponentHelper.isActionAuthorized(this, action); > } > > public boolean isAuthenticated() > { > return > SecureComponentHelper.isAuthenticated(this); > } > public boolean > isAuthenticatedAndAuthorized(String action) > { > return isAuthenticated() > && isActionAuthorized(action); > } > > { > > > Rizal Indra wrote: > > Hi, > > I have created my welcome page with menu tree > > (http://wicketstuff.org/wicket13/nested/ ). I want to > hide/disabled some item menu depend on user right > principal. > > > > I have try put some tricks but not work :-) > > MyTree.java > > public class MyTree extends Tree { > > @Override > > protected void > populateTreeItem(WebMarkupContainer item, int level) { > > > System.out.println(" getting > populateTreeItem..."); > > > super.populateTreeItem(item, level); > > final TreeNode > node = (TreeNode)item.getModelObject(); > > MarkupContainer > nodeLink = newNodeLink(item, "nodeLink", node); > > > SecureWebMarkupContainer swmc = new > SecureWebMarkupContainer("hiddenMenu"); > > > swmc.add(nodeLink); > > > //item.add(nodeLink); > > item.add(swmc); > > } > > } > > > > SecureWebMarkupContainer.java > > public class SecureWebMarkupContainer extends > WebMarkupContainer implements ISecureComponent { > > ... > > } > > > > can anyone give some example/advice how to make it > work. thanks > > > > > > Pemanasan global? Apa > sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > Berbagi foto Flickr dengan teman di dalam Messenger. Jelajahi Yahoo! Messenger yang serba baru sekarang! http://id.messenger.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to Hidden/Disabled Wicket tree with implementation wicket security
Try this: Warren public class SecureWebMarkupContainer extends WebMarkupContainer implements ISecureComponent { public SecureWebMarkupContainer(String id) { super(id); setSecurityCheck(new ComponentSecurityCheck(this)); } public SecureWebMarkupContainer(String id, IModel model) { super(id, model); setSecurityCheck(new ComponentSecurityCheck(this)); } public final void setSecurityCheck(ISecurityCheck check) { SecureComponentHelper.setSecurityCheck(this, check); } public final ISecurityCheck getSecurityCheck() { return SecureComponentHelper.getSecurityCheck(this); } public boolean isActionAuthorized(String action) { return SecureComponentHelper.isActionAuthorized(this, action); } public boolean isActionAuthorized(WaspAction action) { return SecureComponentHelper.isActionAuthorized(this, action); } public boolean isAuthenticated() { return SecureComponentHelper.isAuthenticated(this); } public boolean isAuthenticatedAndAuthorized(String action) { return isAuthenticated() && isActionAuthorized(action); } { Rizal Indra wrote: Hi, I have created my welcome page with menu tree (http://wicketstuff.org/wicket13/nested/ ). I want to hide/disabled some item menu depend on user right principal. I have try put some tricks but not work :-) MyTree.java public class MyTree extends Tree { @Override protected void populateTreeItem(WebMarkupContainer item, int level) { System.out.println(" getting populateTreeItem..."); super.populateTreeItem(item, level); final TreeNode node = (TreeNode)item.getModelObject(); MarkupContainer nodeLink = newNodeLink(item, "nodeLink", node); SecureWebMarkupContainer swmc = new SecureWebMarkupContainer("hiddenMenu"); swmc.add(nodeLink); //item.add(nodeLink); item.add(swmc); } } SecureWebMarkupContainer.java public class SecureWebMarkupContainer extends WebMarkupContainer implements ISecureComponent { ... } can anyone give some example/advice how to make it work. thanks Pemanasan global? Apa sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to Hidden/Disabled Wicket tree with implementation wicket security
Hi, I have created my welcome page with menu tree (http://wicketstuff.org/wicket13/nested/ ). I want to hide/disabled some item menu depend on user right principal. I have try put some tricks but not work :-) MyTree.java public class MyTree extends Tree { @Override protected void populateTreeItem(WebMarkupContainer item, int level) { System.out.println(" getting populateTreeItem..."); super.populateTreeItem(item, level); final TreeNode node = (TreeNode)item.getModelObject(); MarkupContainer nodeLink = newNodeLink(item, "nodeLink", node); SecureWebMarkupContainer swmc = new SecureWebMarkupContainer("hiddenMenu"); swmc.add(nodeLink); //item.add(nodeLink); item.add(swmc); } } SecureWebMarkupContainer.java public class SecureWebMarkupContainer extends WebMarkupContainer implements ISecureComponent { ... } can anyone give some example/advice how to make it work. thanks Pemanasan global? Apa sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
Hello, I am facing the same issue. I can't able to get the selected node by this implemenation. I have the code like this TreeModel t = createTreeModel(); tree = new Tree("tree", t) { protected void onNodeLinkClicked(TreeNode node, AjaxRequestTarget target) { final TreeNode m_node = node; System.out.println("selected value "+ node.toString()); } }; If you know what the problem is, Kindly let me know. PSkarthic wrote: > > Thank you its worked :jumping:, what i did wrong was i override the tree > onNodeLinkClicked method > > > > > Newgro wrote: >> >> AFAIK you can use Tree. It's extending already the DefaultAbstractTree. >> Cheers >> Per >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p23273139.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree with Swing DefaultMutableTreeNode
Hi, I did it a different way. I have no problem adding checkboxes with this technique. See http://javathoughts.capesugarbird.com/2009/03/jquery-tree-table-for-wicket.html. -- View this message in context: http://www.nabble.com/Wicket-Tree-with-Swing-DefaultMutableTreeNode-tp18486972p23175575.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree with Swing DefaultMutableTreeNode
Hello, I have a wicket tree code. Is it possible to each node with checkboxk in a wicket tree. herewith I have attached my source code. Without checkout box of tree is working fine. But I am not able to add checkbox. Please check the attachment code and advise. Thanks and Regards, Edi http://www.nabble.com/file/p23170043/Treepanel.java Treepanel.java http://www.nabble.com/file/p23170043/TreePanel.html TreePanel.html Michael Allan wrote: > > Can't answser the Wicket side, but consider: > > a) Swing is not thread-safe > > b) it is often better to code your own TreeNode as a bridge to the > underlying reality (Wicket's models?); rather than using > DefaultMutableTreeNode, which is a full-blown model in itself > > -- > Michael Allan > > Toronto, 647-436-4521 > http://zelea.com/ > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Wicket-Tree-with-Swing-DefaultMutableTreeNode-tp18486972p23170043.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
I have a new problem in inserting/adding nodes dynamically to tree. When i inserted/added a node on click, the plus icon appears but it is not expanded, that is it is not showing the child node i have tried tree.update but not worked. My Code protected void onNodeLinkClicked(org.apache.wicket.ajax.AjaxRequestTarget target, javax.swing.tree.TreeNode node){ MyTreeNode nd = (MyTreeNode)node; //nd.add(new DefaultMutableTreeNode("sample")); System.out.println(node + "Ajax Clicked"); nd.insert(new MyTreeNode(node + "child"), 0); //this.modelChanged(); //this.nodeExpanded(node); this.updateTree(); } Why it is happening like. Thanks Karthic -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p21472531.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
Thank you its worked :jumping:, what i did wrong was i override the tree onNodeLinkClicked method Newgro wrote: > > AFAIK you can use Tree. It's extending already the DefaultAbstractTree. > Cheers > Per > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p21431002.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
AFAIK you can use Tree. It's extending already the DefaultAbstractTree. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
Thank you for your reply. So i have to extend the DefaultAbstractTree and override the onNodeLinkClicked is that right? I am trying that. Newgro wrote: > > Hi, > > a bit more code would help getting a good answer. > > You could overwrite the > DefaultAbstractTree.onNodeLinkClicked(AjaxRequestTarget target, TreeNode > node) method. Why this should not work - i only can hit the air. > Another way is to call the > AbstractTree.getTreeState()..isNodeSelected(pNode) or > getSelectedNodes(). But this will not give you the clicked but the > selected nodes. > > PS: Based on Wicket 1.3.5 > > HTH (at least a bit) > > Per > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p21430564.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
Hi, a bit more code would help getting a good answer. You could overwrite the DefaultAbstractTree.onNodeLinkClicked(AjaxRequestTarget target, TreeNode node) method. Why this should not work - i only can hit the air. Another way is to call the AbstractTree.getTreeState()..isNodeSelected(pNode) or getSelectedNodes(). But this will not give you the clicked but the selected nodes. PS: Based on Wicket 1.3.5 HTH (at least a bit) Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket tree
Is There any one to solve this Hi I have constructed my tree but i cant get the clicked node. The nodeLinkClicked() function is not working. I used the nodeLinkClicked method in two ways 1. exetending Tree class 2. while creating the object new(){ nodeLinkClicked() }; In both i just put standard output statement but that doesn't get called. -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p21428684.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket tree
Hi I have constructed my tree but i cant get the clicked node. The nodeLinkClicked() function is not working. I used the nodeLinkClicked method in two ways 1. exetending Tree class 2. while creating the object new(){ nodeLinkClicked() }; In both i just put standard output statement but that doesn't get called. -- View this message in context: http://www.nabble.com/Wicket-tree-tp21410500p21410500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Tree with Swing DefaultMutableTreeNode
Can't answser the Wicket side, but consider: a) Swing is not thread-safe b) it is often better to code your own TreeNode as a bridge to the underlying reality (Wicket's models?); rather than using DefaultMutableTreeNode, which is a full-blown model in itself -- Michael Allan Toronto, 647-436-4521 http://zelea.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Tree with Swing DefaultMutableTreeNode
Hello, I am using wicket tree with swing DefaultMutableTreeNode. In render node, i am writing the tree headers labels. protected String renderNode(TreeNode node) { TreeItem item = (TreeItem) ((DefaultMutableTreeNode) node).getUserObject(); return item.getName(); } before writing labels, how can I add the checkboxes. I want tree view with checkboxes.. thanks and regards, edi -- View this message in context: http://www.nabble.com/Wicket-Tree-with-Swing-DefaultMutableTreeNode-tp18486972p18486972.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]