Re: wicket:enclosure ( setting visible when hidden on render )
. > > Then I set visible(true) during runtime and at the component to the > AjaxTarget. > > The component is not rendered. > > Is there a way to get this to work? > Add the parent component that contains the wicket:enclosure markup to the AjaxRequestTarget.
Re: Dynamically update TreeTable model
You should not recreate the TreeModel and for most cases DefaultTreeModel is what you want. If you are adding a node, add it with: http://java.sun.com/javase/6/docs/api/javax/swing/tree/DefaultTreeModel.html#insertNodeInto(javax.swing.tree.MutableTreeNode,%20javax.swing.tree.MutableTreeNode,%20int) which will notify all the listeners, such as the wicket tree On Wed, Apr 22, 2009 at 10:56 AM, CrocodileShoes wrote: > > I have the same problem but with a different tree use case. I'm > implementing > a facet search which needs to update the tree after a user selects a tree > node (facet). If I recreate the tree model like you were doing it doesn't > persistent the selection, obviously. > > I'm not experienced with Swings trees but I think I may have to implment my > own TreeModel. > > Does anybody have the solution for this? > > > jchappelle wrote: > > > > I have a TreeTable and I have links within it. When a user clicks a link > > they are presented with a modal window with a FileUpload component in it. > > When they upload a new file and click close on the modal window, the > > TreeTable is not updated. I tried to use a LoadableDetachableModel that > > returns a DefaultTreeModel but if I do that then every time I click to > > expand a folder node the tree refreshes the model and the tree state and > > the icon doesn't expand(i'm guessing it's because the treestate gets > > recreated?). > > > > I searched but couldn't find anyone with this specific problem in the > > forum. Can someone please help? > > > > I am using wicket 1.3.4. > > > > Thanks, > > > > Josh > > > > -- > View this message in context: > http://www.nabble.com/Dynamically-update-TreeTable-model-tp21056846p23175533.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 > > -- Jim McLaughlin Lead Software Engineer Stonewater Control Systems (o) 847.864.1060 x107 (c) 773.416.0994
Re: LinkTree will not be updated
add tree.updateTree(target) before adding the tree to the target. hth, jim > > tree.addTreeListener(new TreeListener() { > >@Override >public void onActivityClicked(String nameOfNode,AjaxRequestTarget >target){ >... >target.addComponent(tree); >} >@Override >public void onProcessClicked(AjaxRequestTarget target) { >... >target.addComponent(tree); >} > > }); > > > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Application Context
Have a look at Springs WebApplicationContextUtils.getWebApplicationContext(...). This in conjunction with org.springframework.web.context.ContextLoaderListener should give you what you need. best, jim On Wed, Apr 9, 2008 at 12:41 PM, Pinger <[EMAIL PROTECTED]> wrote: > > So I am using wicket annot. > > So I have classes elsewhere in my app that are using JMS and other services > in a web service. The issue I am having is I need the ApplicationContext in > non-wicket files. > > When I Do public static ApplicationContext spring = new > ClassPathXmlApplicationContext("applicationContext.xml"); > > this causes issues cause things are created 2 times.. > > > Thanks > -- > View this message in context: > http://www.nabble.com/Application-Context-tp16592544p16592544.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [vote] Release 1.4 with only generics and stop support for 1.3
+1, Wicket 1.4 is 1.3 + generics, drop support for 1.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: "parse" directive in velocity template failing
fattymelt, yes that looks right. This used to work. I will try to get some time later today to see what is going on. There should be a velocity.log somewhere that could be helpful. wicket-velocity has an Initializer that searches for and loads the properties file, so set a breakpoint in init to see what is going on. best, jim On Jan 22, 2008 7:56 AM, fattymelt <[EMAIL PROTECTED]> wrote: > > Thanks for the help, James. I tried adding the following to my web.xml (and > putting the velocity.properties file in that location). Does this look right > to you? > > > ClientApplication > wicket.protocol.http.WicketServlet > > applicationClassName > com.foo.bar.client.ClientApplication > > > configuration > development > > > velocityPropertiesFolder > WEB-INF/classes > > > velocity.properties > velocity.properties > > 2 > > > > > James McLaughlin-3 wrote: > > > > On Jan 21, 2008 11:45 PM, fattymelt <[EMAIL PROTECTED]> wrote: > >> > >> Just to be sure... > >> > >> In the Wicket section of web.xml I am going to add the two init-params. > >> One > >> of which defines the folder in which to find my properties file, and the > >> other is the actual filename. Then I can use that properties file to > >> specify > >> what my TEMPLATE_ROOT is. > > > > Yes, that should do it. > > > >> > >> The only I don't get, is that I have working templates now that are in > >> WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them. > >> So > >> I'm not sure why the "parse" directive isn't looking there, too? > > > > For some reason, the velocity.properties that comes with > > wicket-velocity specifies the root as "." . It probably would have > > been better left as the default, which behaves as you would expect. > > Maybe if you provide the full path to the template you are parsing, > > the classpath loader will pick it up. Hope this helps, fattymelt. > > > >> > >> > >> James McLaughlin-3 wrote: > >> > > >> > fattymelt, > >> > It used to work that you could jar up your templates and put them > >> > under WEB-INF/lib. If that doesn't work, create your own > >> > velocity.properties file and define the init-params > >> > velocityPropertiesFolder and velocity.properties in your web.xml. You > >> > can define there which loaders to use and what root the > >> > FileResourceLoader should use. Best of luck, fattymelt! > >> > > > > > > > > > -- > View this message in context: > http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15019014.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] > > -- Jim McLaughlin Director, Software Engineering Stonewater Control Systems (o) 847.864.1060 x107 (c) 773.416.0994 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: "parse" directive in velocity template failing
On Jan 21, 2008 11:45 PM, fattymelt <[EMAIL PROTECTED]> wrote: > > Just to be sure... > > In the Wicket section of web.xml I am going to add the two init-params. One > of which defines the folder in which to find my properties file, and the > other is the actual filename. Then I can use that properties file to specify > what my TEMPLATE_ROOT is. Yes, that should do it. > > The only I don't get, is that I have working templates now that are in > WEB-IN/templates. So, it isn't like velocity-contrib isn't finding them. So > I'm not sure why the "parse" directive isn't looking there, too? For some reason, the velocity.properties that comes with wicket-velocity specifies the root as "." . It probably would have been better left as the default, which behaves as you would expect. Maybe if you provide the full path to the template you are parsing, the classpath loader will pick it up. Hope this helps, fattymelt. > > > James McLaughlin-3 wrote: > > > > fattymelt, > > It used to work that you could jar up your templates and put them > > under WEB-INF/lib. If that doesn't work, create your own > > velocity.properties file and define the init-params > > velocityPropertiesFolder and velocity.properties in your web.xml. You > > can define there which loaders to use and what root the > > FileResourceLoader should use. Best of luck, fattymelt! > > > > -- > View this message in context: > http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p15013060.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: "parse" directive in velocity template failing
fattymelt, It used to work that you could jar up your templates and put them under WEB-INF/lib. If that doesn't work, create your own velocity.properties file and define the init-params velocityPropertiesFolder and velocity.properties in your web.xml. You can define there which loaders to use and what root the FileResourceLoader should use. Best of luck, fattymelt! On Jan 21, 2008 9:27 AM, fattymelt <[EMAIL PROTECTED]> wrote: > > I am using a velocity template, and within it would like to use velocity's > "parse" directive (to include another template within the current template) > but it complains that it can not find the template in velocity's > "TEMPLATE_ROOT." I have triple-checked that the template is in the same > directory as all of my other working templates. Anyone know why velocity > can't find a template when using "parse" ? > > Does Wicket specify its own template location? If so, does anyone know where > the default Velocity "TEMPLATE_ROOT" would be? > > http://velocity.apache.org/engine/devel/user-guide.html#parse Velocity's > Parse Directive > > TIA > -- > View this message in context: > http://www.nabble.com/%22parse%22-directive-in-velocity-template-failing-tp14999823p14999823.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] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TreeGrid and DataGrid open source
> Looking ahead, I can imagine that as Wicket becomes ever more popular, there > will be many organisations who will see it as a big plus that there are > well-respected developers building, selling and maintaining well engineered, > reliable and high-quality components with interesting features that they > cannot or cannot afford to build and maintain themselves. I strongly second this. I would love to have libraries of sophisticated, well engineered, documented and supported components, and also see the dev team get something back for all the hard work they've put into the community. This benefits everyone. It would be a no brainer to sell my boss on spending a few hundred or thousand on such a library rather than spending an equivalent amount of time building it ourselves. Great looking stuff, Matej (as always)! best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot render a menubar using menu2 package
Hi Doug, We definitely don't want to require users to strip wicket tags, if that still needs to be done. I think we did that just to get it working. I thought setRenderBodyOnly was enough, but if we still have issues we should add in a MarkupFilter or use a Transformer. If menu2 only works with stripping wicket tags, then we should fix it. I need to get back in the game so we can dump menu and elevate menu2 to its place as the one and only menu (I've been in a c++ house of pain for the past couple of months) best, jim On Dec 3, 2007 12:15 PM, Doug Leeper <[EMAIL PROTECTED]> wrote: > > James, > > I was not aware of the issue (or if I was...I forgot) With this in > mind...do I need to change the menu2 impl? > > - Doug > -- > View this message in context: > http://www.nabble.com/wicket-success-stories-tf4877640.html#a14135575 > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot render a menubar using menu2 package
A quickstart attached to jira would be most appreciated. http://wicketstuff.org/jira/browse/WSYUI. Yui menu's distaste for wicket tags has been a long standing issue. To get around it at first, we did tMarkupSettings().setStripWicketTags(true). But then I thought that was changed to calling setRenderBodyOnly on the components? If this isn't working, maybe we need to hack up a markup filter to have done with it once and for all. On Dec 3, 2007 10:49 AM, Doug Leeper <[EMAIL PROTECTED]> wrote: > > Rik, > > This doesn't make sense...it should work. Not that it matters...but want to > ask anyway...are you executing the wicket examples within Eclipse? If so, > please verify that your classpath is setup properly (looking for Wicket > 1.3.x...preferably the latest...TRUNK/SNAPSHOT/rc1) > > I am assuming that you are still getting YAHOO not found. This indicates > that the proper file has not been found. Also, there nuances with YUI in > the order of the files retrieved in the Browser. Wicket I know for a fact > handles this correctly. Could you double check the outputted HTML to > ensure the links are correct (copy/paste into a browser). If any are 404, > then the link formation is incorrect. > > What might be best is to have you send me your example (quick start if > possible) to reproduce your error on my end. Otherwise...I am grasping at > straws here. > > - Doug > -- > View this message in context: > http://www.nabble.com/wicket-success-stories-tf4877640.html#a14133768 > > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot render a menubar using menu2 package
rik rik, you don't need to include the yui libraries. YuiMenuBar will do that automatically. Remove them from your html and everything should work fine. best, jim On Nov 30, 2007 3:58 AM, rik rik <[EMAIL PROTECTED]> wrote: > Hi to all, > I've downloaded the sources of menu2 from svn, but I'm not able to make it > working properly, because the page is not correctly rendered > My code (very simple) is this > > YuiMenuBar menubar=new YuiMenuBar("menubar","menubar"); > YuiMenuBarItem fileitem=menubar.addMenu("file"); > YuiMenuBarItem edititem=menubar.addMenu("edit"); > add(menubar); > > and this is the html > > > > > > > > > > menu > > > The js files have been downloaded from the yui site, and they are correctly > referenced from the html > Where am I going wrong? > Thanks > > Rik > > _ > Organizza le tue foto e condividile con i tuoi amici con Raccolta foto di > Windows Live! > http://www.windowslive.it - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Best practice question
Hi Doug, It is hard to say without knowing more about your app. As a rule, I never keep references to data in my components. Components have only refs to services (injectable) and all the data are encapsulated by IModels of one sort or another. The IModels always implement IDetachable and keep only the minumum of info necessary to rehydrate the data. Usually, LoadableDetachableModel provides all the functionality I need. Check to make sure you have followed these rules of thumb. You should be ok if you have. best, jim On 11/1/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > That is good that you do the same thing...so it must be my implementation > that is wrong. I use an optimizer to find the issue. Do you recommend a > reasonable one? > > Also, is it possible to introspect the serialized data? > > Also, I am using Hibernate. Would classes obtained via Hibernate that are > local objects to a page be a problem? > -- > View this message in context: > http://www.nabble.com/Best-practice-question-tf4732767.html#a13534427 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax question
On 10/18/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > I am using 1.3 (Trunk). > > I am calling AjaxRequestTarget.target.appendJavascript() right after i call > AjaxRequestTarget.target.addComponent(). Is this the right approach? > > Do I have access to IHeaderResponse in an Ajax call? Have your component implement IHeaderContributor and override void renderHead(final IHeaderResponse response); > > Thanks > - Doug > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Simple Tree question
Hi Doug, You need to set up the TreeState when the tree first renders. You can do this by overriding newTreeState. Below is a snippet that shows one way of accomplishing this: @Override protected ITreeState newTreeState() { ITreeState state = new DefaultTreeState(); state.collapseAll(); TreeModel treeModel = (TreeModel) getModelObject(); RealTimeTreeNode root = (RealTimeTreeNode) treeModel.getRoot(); checkNodeForExpansion(root, state); return state; } protected void checkNodeForExpansion(RealTimeTreeNode root, ITreeState state) { state.expandNode(root); Enumeration e = root.children(); while (e.hasMoreElements()) { Object node = e.nextElement(); if (node instanceof RealTimeTreeNode) { RealTimeTreeNode rtnode = (RealTimeTreeNode) node; SWTree tree = rtnode.getNode(); switch (tree.getSWTreeType()) { case Provider: case Account: case Site: case Gateway: case System: checkNodeForExpansion(rtnode, state); break; case Device: case Card: case Meter: break; } } } } best, jim On 10/18/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > How does one get a Tree node that allows children but has no children display > as a folder rather than a leaf node? > > I thought if allowsChildren was true it would always default to a folder > icon. > -- > View this message in context: > http://www.nabble.com/Simple-Tree-question-tf4648222.html#a13278582 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context menu within a LinkTree?
On 9/27/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > Has anyone been able to create a context menu for items on a LinkTree? > > If so, was it all JS based (like YUI)? or did you create a small framework > to be used in Wicket? > > If the latter, would it be possible to contribute to the wicket-contrib-yui > (menu2) package? It would be great if you could put that into wicket-contrib-yui. And any other contributions you can dream up :). I will need such a contect menu some time soon, so I look forward to seeing it. Are you thinking a right click context menu? > > I am in need of a tree component with the ability to display a context menu > based on what node has been selected. best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: yui examples
On 9/24/07, Mattijs Hoitink <[EMAIL PROTECTED]> wrote: > hi all, > > i just checked out wicket-contrib-yui and wicket-contrib-yui-examples > to do some testing. > When i ran maven on it, the projects wouldn't build because of some > wrong dependencies in the pom.xml. > In a lot of places references are made to wicket 1.3.0-SNAPSHOT. But > this doesn't exist in the maven repository. > > Can anyone tell me if the yui examples are updated frequently or still > running on an old version of wicket-contrib-yui. When i checked it out, > the yui examples project wouldn't build either. > > greets, > > PS: is this the right mailing list to ask these questions? > I've updated the poms to reference the wicketstuff repo so it should build for you now. Give it another shot and let us know if you have any problems. The examples should be up to date as of a couple of weeks ago, thanks to the efforts of Doug Leeper and Korbinian Bachl. Feel free to ask any questions you have on this list. Just preface the subject with [wicketstuff-yui]. best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WicketTester, FormTester, and AjaxSubmitLink
Hi, Hacking away at some tests, I figured the proper way to test an AjaxSubmitLink would have been as follows: Panel p = tester.startPanel(EventPanel.class); FormTester ft = tester.newFormTester(p.getId() + ":eventForm"); ft.setValue("messageField", ALARM_MESSAGE); tester.clickLink(p.getId() + ":eventFormSubmitLink", true); However, the values set in the FormTester don't get submitted for some reason. It works if I change it to: Panel p = tester.startPanel(EventPanel.class); tester.setParameterForNextRequest(p.getId() + ":eventForm:messageField", ALARM_MESSAGE); tester.clickLink(p.getId() + ":eventFormSubmitLink", true); which while 1 line briefer, didn't seem intuitive (to me at least). Is it possible to make it work like the former, or is it better left as it is? best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket contrib yui
> > IMHO hardwiring is somehow an antipattern for me - maybe we could have a > "setYuiPath" in it that defaults to the delivered YUI but leaves the > possibility to have other YUI versions as well? > Well, its not really hardwired, its just a default fallback used by the static factory methods. Other factory methods exist to provide choice for these attributes. But while you are in there adapting it to 2.3.0, by all means feel free to make whatever adjustments you want. You might even want to start with a clean slate, since the work YuiHeaderContributor was set up to do has been made redundant with the addition of the dynamic loader. best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket contrib yui
On 8/28/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > Hi James, > > i checked out of svn today and changed yui to 2.3.0 - at first, all > seemed ok, but when looking closer its a bit irritating. No doubt. Exactly why I have procrastinated on this for the past month. > > In 2.2 you seem to have to attach much JS files to the header, while in > 2.3.0 1 (the loader) is enough (as far as I understood it). > > This means, the big YuiHeaderContributor could shrink to some few lines. > In a short dirty test where i just replaced the > static final String DEFAULT_YUI_BUILD = "2.3.0"; > all seemed quite ok - but the real big work would be to add the new > yui-content to the contrib. Yes, my understanding is that 2.3.0 will return most of YuiHeaderContributor back to the compost pile. Do you think you will be able to do this? Let me know if you have questions. > > BTW: i find the naming very confusing - is there a reason not all > classes have a "Yui" in front of them? (so you can see them faster as > calling it e.g.: SortBox or Slider) Not sure. A few people have worked on the project and no naming convention was ever established. It is a good idea to enforce one, though. You should enter an issue in wicketstuff.org so it won't be forgotten. > > the include of "YuiHeaderContributor.forModule("menu", null, false, > "2.3.0")" at page level however doesnt work as the components call it by > themselfes, meaning if you add it to page, it will load 2.3 and 2.2. Right, you either need to change the default version in the HeaderContributor, or change the components you want to use to call the above method. best, jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket contrib yui
> Also note that we did something similar in wicket-datetime. Maybe, in > some future, it would be great to have all the YUI components > together. For now, we could look whether the projects can at least be > used together without having them bite. A thread of two weeks ago > discussed this. The conclusion was that we probably would like > something like a separate YUI project with all the js dependencies in > it, so that projects using them can access it in a consistent fashion. > If someone is up to it, please dig up that discussion and create a > feature request linking to that discussion (nabble). > > Eelco Done: https://issues.apache.org/jira/browse/WICKET-902, with some minor blathering by yours truly. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket contrib yui
Yes there is. I haven't had much time to see what the impact of the change would be, but I set up YuiHeaderContributor to be able to select versions. If you have the time and inclination, you can setup the 2.3.0 library under org/wicketstuff/yui/inc, and include the library with something like this: YuiHeaderContributor.forModule("menu", null, false, "2.3.0") then let us know what works and what doesn't. Ultimately, the yuiloader in 2.3.0 will eliminate most of the work that YuiHeaderContributer does (resolving deps), so if you want to take a stab at porting it the headercontributor to yuiloader, that would be great too. best, jim On 8/27/07, Korbinian Bachl <[EMAIL PROTECTED]> wrote: > Hi, > > i stumbled over yui some time ago, and noticed that there is also a > wicket-contrib-yui project. However, the version under > https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicket-contrib-yui/ > seem to rely on 2.2.0. > > Are there any plans for a 2.3.0 or sth. like that? > > Best Regards, > > Korbinian > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Menu implementation?
I have a functional base for this already in wicket-contrib-yui trunk. Needs a friendlier api and a bit of polish, but all the pieces are there. I've been very short on time, so if anyone feels like picking it up that would be great. On 8/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Nope. There was one wicket-stuff project a while ago, but that wasn't > too great (I'm guilty). > > I think it would be great to build a component around the YUI menu[1], > but we need a couple (or at least one) volunteer to work on that, and > people who are going to use it (dogfood, eating) so that it can > quickly reach a useful state. Unfortunately, I can't spent to much > time on it myself at this time. Volunteers? > > Eelco > > > [1] http://developer.yahoo.com/yui/menu/ > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Menu???
I actually have a rough version of yui menu done in wicket-contrib-yui. It needs to be polished up quite a bit, which I have been intending on doing for about 5 months now. It works with yui 2.2.2 with the exception that you must strip wicket tags or else the yui menu parser barfs. Any help moving it forward would be greatly appreciated. In 2.3.0, yui added added a feature where by you can retrieve menuitems by domId. This will make the code significantly simpler. I also think the code would benefit greatly from the addition of a menuevent/listener pattern a la swing. Have at it and I will help anyway I can. best, jim On 8/4/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > Well I have the "itch". > > As I am new to all this, where would I start if the menu menus were to > utilize yui's menu? Is there is "cheat sheet" on how to create components? > > Thanks > - Doug > -- > View this message in context: > http://www.nabble.com/Menutf4213073.html#a11996192 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically adding tree nodes upon selection
Hi Doug, First I would make sure your TreeNode implementation creates children lazily. You probably should only create children when children() is actually called and provide logic for isLeaf and getChildCount() that don't require creating the children. You can create the initial state for the tree by overrriding newTreeState(). I usually do something like this: protected ITreeState newTreeState() { ITreeState state = new DefaultTreeState(); state.collapseAll(); TreeModel treeModel = (TreeModel) getModelObject(); OutLineNode root = (OutLineNode) treeModel.getRoot(); if(null != childNodeExpansionStrategy) { childNodeExpansionStrategy.expandNode(root, state); } else { if (log.isInfoEnabled()) { log.info("childNodeExpansionStrategy is NULL. expanding root only"); } state.expandNode(root); } return state; } where childNodeExpansionStrategy holds the logic to determine the level to expand to, and recurses through the nodes to get there, calling state.expandNode(node) until it does. best, jim On 8/3/07, Doug Leeper <[EMAIL PROTECTED]> wrote: > > I would like to dynamically add tree nodes to an AbstractTree instead of > loading the entire tree up front. Not sure how do this. I thought I would > be able to override nodeExpanded(TreeNode) and check if the node had been > "loaded" ...if not then load 1 level deep. However, all ITreeStateListeners > are final in AbstractTree. > > Is there a way to do this without creating my own version of AbstractTree? > Better yet...is there an example of this...it could mimic the file structure > of your computer. > > Thanks > - Doug > -- > View this message in context: > http://www.nabble.com/Dynamically-adding-tree-nodes-upon-selection-tf4212940.html#a11984616 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Wicket-user] LoadableDetachableModels and Trees
Hi Sean, Sure, if you have something in your XTreeModel that needs to be detached. But I was suggesting to make the TreeNode implement IDetachable. This way each TreeItem will detach its TreeNode when the request is over. Are you asking if you need to make your TreeModel detachable in order to have your TreeNodes detach? No, that is not necessary. best, jim On 8/1/07, Sean Sullivan <[EMAIL PROTECTED]> wrote: > James, > > I am using Wicket 1.3's LinkTree class in my application. I built a custom > tree model class that extends Swing's DefaultTreeModel: > >public class XTreeModel extends javax.swing.tree.DefaultTreeModel > > Should my class, XTreeModel, implement IDetachable? > > Sean > > > On 8/1/07, James McLaughlin <[EMAIL PROTECTED]> wrote: > > > > For the trees in 1.3 (I haven't used 1.2.x in a long time), if your > > TreeNodes implement IDetachable, they wil be detached when the > > requestcycle completes. Then it is up to you to implement some logic > > in the methods you call to retrieve the user object (such as > > getUserObject()) from the TreeNode to check and perform reattachement. > > > > best, > > jim > > > > On 8/1/07, Ivana Cace <[EMAIL PROTECTED]> wrote: > > > What do you want to use the model for? > > > > > > > > Is it possible to use LDMs and *Trees*? > > > > > > Here's a question (from the old user-list) i'd like reopened. > > > I'm using a Tree to show a directory structure, the user selects folders > > > > > to upload files into. It should be updated every submit. > > > Is there a best practice for using a Tree with a > > LoadableDetachableModel? > > > > > > I now have a Tree that is updated on every mouseClick (in a node) and > > > this seems a little too much. I would like to see a behaviour similar > > > to ListView. > > > > > > Has anyone tried something like this? > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Wicket-user] LoadableDetachableModels and Trees
For the trees in 1.3 (I haven't used 1.2.x in a long time), if your TreeNodes implement IDetachable, they wil be detached when the requestcycle completes. Then it is up to you to implement some logic in the methods you call to retrieve the user object (such as getUserObject()) from the TreeNode to check and perform reattachement. best, jim On 8/1/07, Ivana Cace <[EMAIL PROTECTED]> wrote: > What do you want to use the model for? > > > > Is it possible to use LDMs and *Trees*? > > Here's a question (from the old user-list) i'd like reopened. > I'm using a Tree to show a directory structure, the user selects folders > to upload files into. It should be updated every submit. > Is there a best practice for using a Tree with a LoadableDetachableModel? > > I now have a Tree that is updated on every mouseClick (in a node) and > this seems a little too much. I would like to see a behaviour similar > to ListView. > > Has anyone tried something like this? > > ciao, > Ivana > > -- > Ivana Cace > Func. Internet Integration > W http://www.func.nl > T +31 20 423 > F +31 20 4223500 > > > > > -- > Ivana Cace > Func. Internet Integration > W http://www.func.nl > T +31 20 423 > F +31 20 4223500 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]