Re: setting the value of a radio input field
Server side state as a performance problem is WAY overrated. If you're not working for Google, it's probably not a problem. That said: if your Web application has state it has state however much you may wish it were not so. The only way to remove that state is when you move it to the client. Then, however, you have to transfer the state to the server in order to do anything with it, so you're trading memory vs. bandwith. You may also transfer the state to an external system (which Wicket does with most pages in the session). Then you're trading memory vs. time. If you have a MB of state per session (which is already quite a lot), you can serve 1024 concurrent sessions per GB of server memory. These days, you can buy 16GB of memory for just about the price of one day of work from me (oh, perhaps I really shouldn't tell you that ;-). You'll need to measure and then decide how important technical statelessness is for you. State is bad has become an article of faith somehow. There are many applications where that is simply not true. Thomas PS: Arghhh...preaching again! On Wed, Feb 11, 2009 at 2:43 AM, Story Henry henry.st...@bblfish.netwrote: Thanks for the tip Thomas! I have it now. I am really keen to avoid state on the servers, as a design principle. It forces me to think the web way as much as possible, and when one does, possibilities start becoming evident. So no I did not do any measurements there. But these principles are also what brought be to Wicket. I like the separation of html and logic. I think more needs to be done perhaps to make stateless programming as easy, or easier than stateful programming, but I won't pass judgement until I have used Wicket more, and feel like I understand it properly. In this case I think it also makes for nice URLs. I am using Wicket 1.4rc2 btw. So here is the code that works. I even deployed it at http://test.foafssl.org/cert/ The following html http://bit.ly/wFLi and the following Java: http://bit.ly/p735F Give the following html form method=GET action= input type=submit name=Select / span wicket:id=person p input wicket:id=radio type=radio value= http://axel.deri.ie/~axepol/foaf.rdf#mehttp://axel.deri.ie/%7Eaxepol/foaf.rdf#me id=webid1-radio2 name=webid/ table trtdName/tdtd wicket:id=nameAxel Polleres/td/tr trtdURI/tdtd wicket:id=uri http://axel.deri.ie/~axepol/foaf.rdf#mehttp://axel.deri.ie/%7Eaxepol/foaf.rdf#me /td/tr /table /p /span On 10 Feb 2009, at 17:29, Thomas Mäder wrote: The approach with Component radio= new Radio(radio, ...); is the right one. You can still try to add the AttributeModifier, but probably, you'll end up fighting the Radio implementation (perhaps you'll have to create a subclass?) However, I don't see why you don't just use the regular wicket approach? Did you actually measure that there is more load on the server? I highly doubt it. Thomas On Tue, Feb 10, 2009 at 4:35 PM, Story Henry henry.st...@bblfish.net wrote: Hi, I have been looking at how to set the value of a radio input field to a value of my choosing. If I use the Radio and Radio Group code as shown here: http://pastebin.com/m40b9b073 I get html such as input wicket:id=radio type=radio value=radio2 name=selectionGroup/ input wicket:id=radio type=radio value=radio3 name=selectionGroup/ ... whereas I was hoping to get input wicket:id=radio type=radio value= http://bblfish.net/people/henry/card#me; name=selectionGroup/ Searching the web I found the thread Setting a relevant value for radio buttons without using RadioChoice from December 2008 ( http://tinyurl.com/cpfj49 ) I came to understand that RadioGroup saves all the mapping itself. I would rather it did not, reducing the load on the server, as I am using URLs as primary keys. This more RESTful and I think clearner. So if I cannot set this using the Radio component I thought perhaps I can use an AttributeModifier with code like the following: class ChoiceForm extends Form { ChoiceForm(String string, ListAgent agents) { super(string); ListView persons; add(persons=new ListView(person, agents) { @Override protected void populateItem(ListItem item) { Agent agt = (Agent) item.getModelObject(); Component radio = item.get(radio); //this is wrong! looking for solution radio.add(new AttributeModifier(value,new Model(agt.getWebID().toString(; item.add(new Label(name, agt.getName())); item.add(new Label(uri, agt.getWebID().toString())); } }); persons.setReuseItems(true); } } I am not sure how one can get a component in the populateItem function so that one can then change the attribute for it. The html I am trying to work with is this: form wicket:id=select input type=submit name=Select/ span wicket:id=selectionGroup span wicket:id=person p
Re: Page composition question
Hi Uwe, what is not clear is: are the detail info panels different for each of the 5 customer infos? Then you really would have 15 different html markups for the 5x3 panels? Or are the 3 panel kinds (special, detail, or additiional) always the same, but appear (or not) for the different customer info types? If you have 15 different html markups, you'll have to implement 15 different panels. What's the problem with that? Chuck it in it's own package and forget it. Thomas On Wed, Feb 11, 2009 at 9:37 AM, uwe janner ujan...@googlemail.com wrote: thx igor! but i still cant see how i can define the subPanels. in facelets, in the parent i would have written: ui:include name=detailInfo/ otherHTML/ ui:include name=specialInfo/ otherHTML/ ui:include name=additionalInfo/ then there would be 5 different childs, each one defining the 3 html-snippets: ui:define name=detailInfohtmlStuff for detailInfo/ui:define ui:define name=aditionalInfohtmlStuff for additionalInfo/ui:define . that means, the parent knows, somebody of his children has defined a snippet for detailInfo, and this will be inserted at the ui:include and so the three snippets can stay within the same file, e.g. in a SimpleCustomerDetails.xhtml and in wicket? i see how i would construct 3 different panels ( newpanel1,2 and 3 in your example) within the child class extending parentpanel - but every panel i create in the overwritten methods needs its own html file, doesnt it? that means, for one of the 5 types of customers i would have to write 3 panels, one for each of the 3 parts: SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html, SimpleCustomerAdditionalInfoPanel.html, then 3 for VipCustomerDetailInfoPanel.html, and so on, ending up with 15 different html files. i still dont see the way how i can put e.g. SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html and SimpleCustomerAdditionalInfoPanel.html into one html file (as i can do it with facelets above), thereby reducing the nr of html files to 5. the 3 parts belong together. thx4anyhint, uwe! On Wed, Feb 11, 2009 at 2:34 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: class abstract parentpanel extends panel { private panel panel1, panel2, panel3; protected abstract panel newpanel1(string id, imodel model); protected abstract panel newpanel2(string id, imodel model); protected abstract panel newpanel3(string id, imodel model); protected void onbeforerender() { if (panel1==null) { add(panel1=newpanel1(p1, getdefaultmodel()); add(panel2=newpanel1(p2, getdefaultmodel()); add(panel3=newpanel1(p3, getdefaultmodel()); } super.onbeforerender(); } } -igor On Tue, Feb 10, 2009 at 4:46 PM, uwe janner ujan...@googlemail.com wrote: dear wicketeers, i'm facing a problem with page composition where i cant find an elegant solution; i hope i can explain it comprehensible: i have a panel named CustomerInfo. there are 5 types of customers in the application. most of the CustomerInfo.html is the same for all types of customers - except three div's: DetailInfo, SpecialInfo and AdditionalInfo these two div's contain different html and different components for each type of customer; one way would be to create 15 different panels (DetailInfoCustomerType1, DetailInfoCustomerType2, DetailInfoCustomerType3, , SpecialInfoCustomerType1, .) then, in CustomerInfo-panel i would include the right 3 panels depending on the customer type, e.g. (DetailInfoCustomerType1, SpecialInfoCustomerType1, AdditionalInfoCustomerType1); ok, its no good idea to have 15 separate panels, i want to group the 3 html-snippets together (Detail, Special, Additional) how can i achieve this? as i understood, neither panels, nor fragments nor borders can be used for this. how could a parent container ( CustomerInfo ) fill 3 different areas (the 3 div's) with 3 different fragments of a child (e.g. DetailInfoCustomerType2, SpecialInfoCustomerType2, AdditionalInfoCustomerType2)? if the 3 different areas were contiguous/adjacent i could use simple page inheritance, bc then the parent container pulls out the whole child's content with wicket:child/ . in my case i needed sth like wicket:child id=detailInfo/ .much html/...wicket:child id=specialInfo/ .much html/...wicket:child id=additionalInfo/ . where with wicket:child id=xxx/ the parent would only include the part of the child with wicket:id xxx thxinadvance,uwe! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thomas Mäder Wicket Eclipse Consulting www.devotek-it.ch
Tabbed Page
Is it possible to have other tabbed pannels inside a tabbed panel? Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1 If I click on first tab, instead of showing This is tab-panel 1 it would show, or at least I would like to, show another tabbed panel with tabs and those would have panels. Is it possible? how? On Wed, Feb 11, 2009 at 6:37 AM, uwe janner ujan...@googlemail.com wrote: thx igor! but i still cant see how i can define the subPanels. in facelets, in the parent i would have written: ui:include name=detailInfo/ otherHTML/ ui:include name=specialInfo/ otherHTML/ ui:include name=additionalInfo/ then there would be 5 different childs, each one defining the 3 html-snippets: ui:define name=detailInfohtmlStuff for detailInfo/ui:define ui:define name=aditionalInfohtmlStuff for additionalInfo/ui:define . that means, the parent knows, somebody of his children has defined a snippet for detailInfo, and this will be inserted at the ui:include and so the three snippets can stay within the same file, e.g. in a SimpleCustomerDetails.xhtml and in wicket? i see how i would construct 3 different panels ( newpanel1,2 and 3 in your example) within the child class extending parentpanel - but every panel i create in the overwritten methods needs its own html file, doesnt it? that means, for one of the 5 types of customers i would have to write 3 panels, one for each of the 3 parts: SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html, SimpleCustomerAdditionalInfoPanel.html, then 3 for VipCustomerDetailInfoPanel.html, and so on, ending up with 15 different html files. i still dont see the way how i can put e.g. SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html and SimpleCustomerAdditionalInfoPanel.html into one html file (as i can do it with facelets above), thereby reducing the nr of html files to 5. the 3 parts belong together. thx4anyhint, uwe! On Wed, Feb 11, 2009 at 2:34 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote: class abstract parentpanel extends panel { private panel panel1, panel2, panel3; protected abstract panel newpanel1(string id, imodel model); protected abstract panel newpanel2(string id, imodel model); protected abstract panel newpanel3(string id, imodel model); protected void onbeforerender() { if (panel1==null) { add(panel1=newpanel1(p1, getdefaultmodel()); add(panel2=newpanel1(p2, getdefaultmodel()); add(panel3=newpanel1(p3, getdefaultmodel()); } super.onbeforerender(); } } -igor On Tue, Feb 10, 2009 at 4:46 PM, uwe janner ujan...@googlemail.com wrote: dear wicketeers, i'm facing a problem with page composition where i cant find an elegant solution; i hope i can explain it comprehensible: i have a panel named CustomerInfo. there are 5 types of customers in the application. most of the CustomerInfo.html is the same for all types of customers - except three div's: DetailInfo, SpecialInfo and AdditionalInfo these two div's contain different html and different components for each type of customer; one way would be to create 15 different panels (DetailInfoCustomerType1, DetailInfoCustomerType2, DetailInfoCustomerType3, , SpecialInfoCustomerType1, .) then, in CustomerInfo-panel i would include the right 3 panels depending on the customer type, e.g. (DetailInfoCustomerType1, SpecialInfoCustomerType1, AdditionalInfoCustomerType1); ok, its no good idea to have 15 separate panels, i want to group the 3 html-snippets together (Detail, Special, Additional) how can i achieve this? as i understood, neither panels, nor fragments nor borders can be used for this. how could a parent container ( CustomerInfo ) fill 3 different areas (the 3 div's) with 3 different fragments of a child (e.g. DetailInfoCustomerType2, SpecialInfoCustomerType2, AdditionalInfoCustomerType2)? if the 3 different areas were contiguous/adjacent i could use simple page inheritance, bc then the parent container pulls out the whole child's content with wicket:child/ . in my case i needed sth like wicket:child id=detailInfo/ .much html/...wicket:child id=specialInfo/ .much html/...wicket:child id=additionalInfo/ . where with wicket:child id=xxx/ the parent would only include the part of the child with wicket:id xxx thxinadvance,uwe! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Two rules to succeed in life: 1 - don´t tell people everything you know. We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and
Re: Tabbed Page
What's the problem? A TabbedPanel is a Panel, so you can return it from ITabl.getPanel(). Thomas On Wed, Feb 11, 2009 at 12:21 PM, Daniel Ferreira Castro dfcas...@gmail.com wrote: Is it possible to have other tabbed pannels inside a tabbed panel? Imagine the example http://wicketstuff.org/wicket13/ajax/tabbed-panel.1 If I click on first tab, instead of showing This is tab-panel 1 it would show, or at least I would like to, show another tabbed panel with tabs and those would have panels. Is it possible? how? -- Thomas Mäder Wicket Eclipse Consulting www.devotek-it.ch
WicketServlet-filestore and FileNotFoundException
Hi All, I know this issue was discussed in some depth in: http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--td13638411.html#a13644332 How To Change Page Store Size in DiskPageStore? but I'm still not clear as to the best practice. I have a Wicket-based application that was recently launched into production. It is based on v1.3.5 of Wicket and operates within WebSphere 6.1 on an AIX o/s. It is regularly throwing a FileNotFoundException; an example is shown at the bottom of this message. Based on the above DiskPageStore post, I am assuming that the available file handles are being used as expired sessions are not being cleaned up properly in the file store -- is that correct? If so, is the recommended best practice to create a cron job to clean up 'old' folders in the file store? Thanks, Steve [2/11/09 8:04:46:867 EST] 0076 SystemOut O 08:04:46,867 ERROR DiskPageStore:424 - Failed to make directory /opt/IBM/WebSphere/mastodon/profiles/prd1. node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/WicketServlet-filestore/GPfJlRcX_H4dda4AdcVtmHU [2/11/09 8:04:46:867 EST] 0076 SystemOut O 08:04:46,867 ERROR DiskPageStore:901 - Error flushing page java.lang.RuntimeException: java.io.FileNotFoundException: /opt/IBM/WebSphere/mastodon/profiles/prd1.node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/Wick etServlet-filestore/GPfJlRcX_H4dda4AdcVtmHU/pm-null (No such file or directory) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:895) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:965) at java.lang.Thread.run(Thread.java:810) Caused by: java.io.FileNotFoundException: /opt/IBM/WebSphere/mastodon/profiles/prd1.node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/WicketServlet-filesto re/GPfJlRcX_H4dda4AdcVtmHU/pm-null (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:243) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) ... 5 more -- View this message in context: http://www.nabble.com/WicketServlet-filestore-and-FileNotFoundException-tp21955499p21955499.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
How to place form in own public class for extending
I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version //td /tr tr tdwicket:message key=author //td tdinput wicket:id=author //td /tr tr tdwicket:message key=active //td tdinput type=checkbox wicket:id=active //td /tr tr tdwicket:message key=description //td tdspan wicket:id=description/span/td /tr tr tdwicket:message key=type //td tdselect wicket:id=type option/option /select/td /tr tr td colspan=2input wicket:id=submit type=submit/td /tr /table /wicket:extend
Re: How to handle this exception properly
Igor, Excuse me, but I really don't understand. I'm asking about how to show Wicket error page. I thought that throwing WicketRuntimeException will result in showing it. But I get SERVER error page. I attached an image to clarify matters. And error below is seen in Tomcat output, not in Wicket error page: ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: getOutputStream() has already been called for this response On Wed, Feb 11, 2009 at 5:20 AM, Marcelo Morales marcelomorales.n...@gmail.com wrote: On Tue, Feb 10, 2009 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the status code and the error page are orthogonal. you should still see the standard error page, its just that it is returned with status 500. ... with a proper browser (a cent) -- Marcelo Morales - 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: How to place form in own public class for extending
I usually make a panel, add the form to the panel and write up the form in the panel's markup. http://wicketstuff.org/wicket13/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignIn Ryan Gravener http://ryangravener.com/flex | http://twitter.com/ryangravener On Wed, Feb 11, 2009 at 9:40 AM, pieter claassen pie...@claassen.co.ukwrote: I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version //td /tr tr tdwicket:message key=author //td tdinput wicket:id=author //td /tr tr tdwicket:message key=active //td tdinput type=checkbox wicket:id=active //td /tr tr tdwicket:message key=description //td tdspan wicket:id=description/span/td /tr tr tdwicket:message key=type //td tdselect wicket:id=type option/option /select/td /tr tr td colspan=2input wicket:id=submit type=submit/td /tr /table /wicket:extend
Wicket question
I have made a tree and this is working fine but i am facing a problem when i want to click on the tree node so it doesnot work(expand).Can some one help me in this matter? Help me as soon as possible. Thanks in advance. import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.TreeModel; import javax.swing.tree.TreeNode; import org.apache.wicket.ajax.AjaxRequestTarget; import no.vismaunique.ebilag.data.Bilag; import no.vismaunique.ebilag.data.BilagNivaaKode; import no.vismaunique.ebilag.data.Oppgave; import no.vismaunique.ebilag.db.EbilaghdFunctions; import no.webcenter.webmal.okonomi.e30.SelRegAar; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.extensions.markup.html.tree.*; import org.apache.wicket.extensions.markup.html.tree.DefaultAbstractTree.LinkType; import org.apache.wicket.Page; import org.apache.wicket.markup.html.link.Link; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.markup.html.tree.AbstractTree; public class VenstrePanel extends Panel implements Serializable { private static final long serialVersionUID = 1L; public VenstrePanel(String id) { super(id); // create a list with sublists String user = ((EBilagSession) getSession()).getUser(); SelRegAar selRegAar = new SelRegAar(1, 0, 2008); List l1 = new ArrayList(); for (BilagNivaaKode bilagkode : BilagNivaaKode.values()) { ArrayList temp = (ArrayList) EbilaghdFunctions.hentEbilag(selRegAar, user, bilagkode); if(temp.size() 0) l1.add(temp); }; TreeModel treeModel = convertToTreeModel(l1); final Tree tree = new Tree(tre, treeModel) { protected String renderNode(TreeNode node) { DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) node; Object userObject = treeNode.getUserObject(); String text = ; if (userObject instanceof List) { if(((List) userObject).size() 0) { Bilag bilag = ((Bilag)((List)userObject).get(0)); text = bilag.getNivaaKode().getDescription(null); } } else if (userObject instanceof Oppgave) { Oppgave oppgave = (Oppgave) userObject; text = oppgave.getNavn(); } return text; } }; tree.setRootLess(true); tree.setLinkType(LinkType.AJAX); add(tree); add(new AjaxLink(expandAll) { @Override public void onClick(AjaxRequestTarget target) { // TODO Auto-generated method stub tree.getTreeState().expandAll(); target.addComponent(tree); } }); add(new AjaxLink(collapseAll) { @Override public void onClick(AjaxRequestTarget target) { tree.getTreeState().collapseAll(); target.addComponent(tree); } }); } private void add(DefaultMutableTreeNode parent, List sub) { for (Iterator i = sub.iterator(); i.hasNext();) { Object o = i.next(); if (o instanceof List) { DefaultMutableTreeNode child = new DefaultMutableTreeNode(o); parent.add(child); add(child, (List) o); } else { DefaultMutableTreeNode child = new DefaultMutableTreeNode(o); parent.add(child); } } } private TreeModel convertToTreeModel(List list) { TreeModel model = null; DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(Tre);
Intercepting Calls To Domain Setters For Dynamic Feedback
All, I am using a custom domain which handles errors by doing checks when setters are called. If there is a problem with the input it throws an exception. I would like to use this in our wicket page to display errors, I've been able to intercept errors as they come down from Form.process(), however, for the granularity of showing errors next to a component that has the error, I actually need to know which field and which setter is excepting... The question is, if I have a setter on a model object, and through reflection wicket invokes it while doing a form process, is there an ideal place to catch it where I will have component and field info. Thanks! Justin -- View this message in context: http://www.nabble.com/Intercepting-Calls-To-Domain-Setters-For-Dynamic-Feedback-tp21956656p21956656.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
inmethod grid and add/delete examples
I have just started to look at the inmethod datagrid in wicketstuff. The one thing that the examples don't show are how to add and delete items. Are there such examples somewhere? Will
Re: How to place form in own public class for extending
But how do you then extend the form in the panel and more importantly, how do you override the onSubmit() method of that form? Cheers, Pieter On Wed, Feb 11, 2009 at 3:50 PM, Ryan Gravener r...@ryangravener.comwrote: I usually make a panel, add the form to the panel and write up the form in the panel's markup. http://wicketstuff.org/wicket13/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignIn Ryan Gravener http://ryangravener.com/flex | http://twitter.com/ryangravener On Wed, Feb 11, 2009 at 9:40 AM, pieter claassen pie...@claassen.co.uk wrote: I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version //td /tr tr tdwicket:message key=author //td tdinput wicket:id=author //td /tr tr tdwicket:message key=active //td tdinput type=checkbox wicket:id=active //td /tr tr tdwicket:message key=description //td tdspan wicket:id=description/span/td /tr tr tdwicket:message key=type //td tdselect wicket:id=type option/option /select/td /tr tr td colspan=2input wicket:id=submit type=submit/td /tr /table /wicket:extend
Re: Problem with WebRequestCodingStrategy's and mobile phones
we would have to add it to almost all coding strategies because almost all of them use the colon. -igor On Tue, Feb 10, 2009 at 11:50 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Can one of the core devs add a note to the javadoc of UrlCompressingWebCodingStrategy to the effect of NOTE: Using this strategy may cause errors in some mobile phone browsers, specifically the Motorola V3 and other UP.Link browser mobile phones -- Jeremy Thomerson http://www.wickettraining.com On Mon, Feb 9, 2009 at 2:11 PM, Jeremy Levy jer...@meetmoi.com wrote: We figured out something very interesting with the default URL coding strategy's that Wicket uses when using mobile phones / devices. We run a fairly heavily trafficked mobile site, and having been using CryptedUrlWebRequestCodingStrategy for sometime. While attempting to debug some page timeout issues we switched to UrlCompressingWebCodingStrategy and we started getting compaints from users that they were getting HTTP error 400's. We were able to repeat the error locally, it happened only when using some specific phones and mobile browsers. Specifically on the Motorola V3 (useragent: MOT-V3re/0E.40.29R MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/6.3.1.20.06.3.1.20.0) and other UP.Link browser moble phones. We noticed that when the user got the 400 error there was nothing in our tomcat logs, or even in our apache logs. Switching to standard WebRequestCodingStrategy had the same issue. I suspect that there are some characters in the form submit url ( :'s ?) that this crappy browser can't figure out to post to. Swiching back to CryptedUrlWebRequestCodingStrategy fixed the problem. We tested this on several other handsets that we have available and can confirm that it breaks all form submits. This is a some what obsecure case, and perhaps irrelvant if you don't run a mobile site, but we saw our number's drop by about 20% - 50% until we figured this out. Hope this helps someone else. Jeremy -- Jeremy Levy See my location in real-time: http://seemywhere.com/jeremy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page composition question
then simply change Panel to Fragment, and keep the entire html in one place. -igor On Wed, Feb 11, 2009 at 12:37 AM, uwe janner ujan...@googlemail.com wrote: thx igor! but i still cant see how i can define the subPanels. in facelets, in the parent i would have written: ui:include name=detailInfo/ otherHTML/ ui:include name=specialInfo/ otherHTML/ ui:include name=additionalInfo/ then there would be 5 different childs, each one defining the 3 html-snippets: ui:define name=detailInfohtmlStuff for detailInfo/ui:define ui:define name=aditionalInfohtmlStuff for additionalInfo/ui:define . that means, the parent knows, somebody of his children has defined a snippet for detailInfo, and this will be inserted at the ui:include and so the three snippets can stay within the same file, e.g. in a SimpleCustomerDetails.xhtml and in wicket? i see how i would construct 3 different panels ( newpanel1,2 and 3 in your example) within the child class extending parentpanel - but every panel i create in the overwritten methods needs its own html file, doesnt it? that means, for one of the 5 types of customers i would have to write 3 panels, one for each of the 3 parts: SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html, SimpleCustomerAdditionalInfoPanel.html, then 3 for VipCustomerDetailInfoPanel.html, and so on, ending up with 15 different html files. i still dont see the way how i can put e.g. SimpleCustomerDetailInfoPanel.html, SimpleCustomerSpecialInfoPanel.html and SimpleCustomerAdditionalInfoPanel.html into one html file (as i can do it with facelets above), thereby reducing the nr of html files to 5. the 3 parts belong together. thx4anyhint, uwe! On Wed, Feb 11, 2009 at 2:34 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote: class abstract parentpanel extends panel { private panel panel1, panel2, panel3; protected abstract panel newpanel1(string id, imodel model); protected abstract panel newpanel2(string id, imodel model); protected abstract panel newpanel3(string id, imodel model); protected void onbeforerender() { if (panel1==null) { add(panel1=newpanel1(p1, getdefaultmodel()); add(panel2=newpanel1(p2, getdefaultmodel()); add(panel3=newpanel1(p3, getdefaultmodel()); } super.onbeforerender(); } } -igor On Tue, Feb 10, 2009 at 4:46 PM, uwe janner ujan...@googlemail.com wrote: dear wicketeers, i'm facing a problem with page composition where i cant find an elegant solution; i hope i can explain it comprehensible: i have a panel named CustomerInfo. there are 5 types of customers in the application. most of the CustomerInfo.html is the same for all types of customers - except three div's: DetailInfo, SpecialInfo and AdditionalInfo these two div's contain different html and different components for each type of customer; one way would be to create 15 different panels (DetailInfoCustomerType1, DetailInfoCustomerType2, DetailInfoCustomerType3, , SpecialInfoCustomerType1, .) then, in CustomerInfo-panel i would include the right 3 panels depending on the customer type, e.g. (DetailInfoCustomerType1, SpecialInfoCustomerType1, AdditionalInfoCustomerType1); ok, its no good idea to have 15 separate panels, i want to group the 3 html-snippets together (Detail, Special, Additional) how can i achieve this? as i understood, neither panels, nor fragments nor borders can be used for this. how could a parent container ( CustomerInfo ) fill 3 different areas (the 3 div's) with 3 different fragments of a child (e.g. DetailInfoCustomerType2, SpecialInfoCustomerType2, AdditionalInfoCustomerType2)? if the 3 different areas were contiguous/adjacent i could use simple page inheritance, bc then the parent container pulls out the whole child's content with wicket:child/ . in my case i needed sth like wicket:child id=detailInfo/ .much html/...wicket:child id=specialInfo/ .much html/...wicket:child id=additionalInfo/ . where with wicket:child id=xxx/ the parent would only include the part of the child with wicket:id xxx thxinadvance,uwe! - 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: How to handle this exception properly
your attachment got stripped, but i can imagine what it looks like. all runtime exceptions, wicket or not, are handled in the same way - redirect to the error page. do you have a custom error page? if you do - if your error page has an error then what you describe might happen. -igor On Wed, Feb 11, 2009 at 6:49 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Igor, Excuse me, but I really don't understand. I'm asking about how to show Wicket error page. I thought that throwing WicketRuntimeException will result in showing it. But I get SERVER error page. I attached an image to clarify matters. And error below is seen in Tomcat output, not in Wicket error page: ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: getOutputStream() has already been called for this response On Wed, Feb 11, 2009 at 5:20 AM, Marcelo Morales marcelomorales.n...@gmail.com wrote: On Tue, Feb 10, 2009 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the status code and the error page are orthogonal. you should still see the standard error page, its just that it is returned with status 500. ... with a proper browser (a cent) -- Marcelo Morales - 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: How to place form in own public class for extending
what is the problem of having the form as an inner class? public class mypage extends webpage { private class myform extends form { ... } public mypage() { add(new myform(..) { protected void onsubmit() {...}}); } } -igor On Wed, Feb 11, 2009 at 6:40 AM, pieter claassen pie...@claassen.co.uk wrote: I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version //td /tr tr tdwicket:message key=author //td tdinput wicket:id=author //td /tr tr tdwicket:message key=active //td tdinput type=checkbox wicket:id=active //td /tr tr tdwicket:message key=description //td tdspan wicket:id=description/span/td /tr tr tdwicket:message key=type //td tdselect wicket:id=type option/option /select/td /tr tr td colspan=2input wicket:id=submit type=submit/td /tr /table /wicket:extend - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to handle this exception properly
I don't have custom error page. Link to image: http://img3.imageshack.us/img3/2244/bb476f8ece2116133419587ba3.gif On Wed, Feb 11, 2009 at 10:22 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: your attachment got stripped, but i can imagine what it looks like. all runtime exceptions, wicket or not, are handled in the same way - redirect to the error page. do you have a custom error page? if you do - if your error page has an error then what you describe might happen. -igor On Wed, Feb 11, 2009 at 6:49 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Igor, Excuse me, but I really don't understand. I'm asking about how to show Wicket error page. I thought that throwing WicketRuntimeException will result in showing it. But I get SERVER error page. I attached an image to clarify matters. And error below is seen in Tomcat output, not in Wicket error page: ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: getOutputStream() has already been called for this response On Wed, Feb 11, 2009 at 5:20 AM, Marcelo Morales marcelomorales.n...@gmail.com wrote: On Tue, Feb 10, 2009 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the status code and the error page are orthogonal. you should still see the standard error page, its just that it is returned with status 500. ... with a proper browser (a cent) -- Marcelo Morales - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with multiple AjaxLazyLoadPanel and DynamicImageResource
I am also stuck in the same situation. I have a page with several AjaxLazyLoadPanels(ALLP) with one of them loading a DynamicImageResource. If the ALLP contaning the DynamicImageResource gets loaded before some of the other ALLP the remaining ones do not load. It's like if that ALLP (the one with the DynamicImageResource) changed the state of the page. Examing the ajax response from the server I can see that those ALLP that fail get this response: ajaxResponse/ajaxResponse I don't what's going on. Has anyone any idea? Sergio García wrote: Well, i will try to explain the situation as good as i can. We have a grid with multiple AjaxLazyLoadPanel(ALLP) that load a query each one. One of the ALLP is a ListView with an ALLP into each row (each row is a different query). This enviroment works very well. The problem comes with a ALLP with a Jfreechart image inside. When wicket loads the image, i think it changes the state of the page from domready to load, and this makes that the rest of the ALLP don't load properly. I fix it making a new implementation of ALLP for that image. The new version substitutes the call of response.renderOnDomReadyJavascript(getCallbackScript().toString()); to a new call of response.renderOnLoadJavascript(getCallbackScript().toString());. With the new call the image loads at the end. But i still have a problem. The rows do not load because they will load at end and changing the javascript event from render to load does not fix anything. Any ideas? -- View this message in context: http://www.nabble.com/Problem-with-multiple-AjaxLazyLoadPanel-and-DynamicImageResource-tp21939285p21958242.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
how to give static pages consistant look with wicket - partial repeat
I am looking at wicket trying to decide if i would want to use it for my project. Currently I am struggling trying to give static and dynamic pages consistent look with wicket without using sitemesh. I was able to get wicket application to direct all static page requests to my wicket StaticPage that would read the content of a file and add it to the page as MultiLineLabel. However my problem is that i don't want to add whole html file. I need to extract the content of title, body and meta tags and add these separately. Is there anything in api or any examples i should look at ? Please see the code below. in Aplication.java init() mount(new URIRequestTargetUrlCodingStrategy(/docs) { @Override public IRequestTarget decode(RequestParameters requestParameters) { String path = /app/ + getURI(requestParameters); return new PageRequestTarget(new StaticPage(new WebExternalResourceRequestTarget(path))); } }); in StaicPage.java public class StaticPage extends BasePage implements AuthenticatedWebPage { public StaticPage(WebExternalResourceRequestTarget staticResource) { String staticResourceContent = ; try { staticResourceContent = convertStreamToString(staticResource.getResourceStream().getInputStream()); } catch (ResourceStreamNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } add(new MultiLineLabel(staticContent, staticResourceContent)); } } --- Here is what i get in the browser when click on static link: !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleInsert title here/title /head body this is a test /body /html This is in the footer -- Another variation of StaticPage.java i tried was public class StaticPage extends BasePage implements AuthenticatedWebPage { public StaticPage(WebExternalResourceRequestTarget staticResource) { MarkupResourceStream markupStream = new MarkupResourceStream(staticResource.getResourceStream()); MarkupParser parser = new MarkupParser(markupStream); Markup markup = parser.parse(); However I got stuck at this point since i still don't see a way of getting individual html tags from Markup thank you in advance, Vicky -- View this message in context: http://www.nabble.com/how-to-give-static-pages-consistant-look-with-wicket---partial-repeat-tp21958254p21958254.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 place form in own public class for extending
What if you want to reuse the inner class form in another page (you have to make it public and non-inner for visibility) and then you want to override the onSubmit() method. If I just create a public class MyForm and stick the form contents (minus the form tags) in MyForm.html, then wicket cannot find any wicket variables on the form (see first post). If you encapsulate the form in a panel, then the only problem is that you cannot get to the onSubmit() method of the form (but if you delegate all the work to a public method on the panel, then you can override that). Not so pretty. This is a bit of a corner case, but the fact is that forms are not readily accessible wicket objects like panels and pages ( you cannot easily extend your own publically accessible forms) or am I missing something? Pieter On Wed, Feb 11, 2009 at 4:28 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what is the problem of having the form as an inner class? public class mypage extends webpage { private class myform extends form { ... } public mypage() { add(new myform(..) { protected void onsubmit() {...}}); } } -igor On Wed, Feb 11, 2009 at 6:40 AM, pieter claassen pie...@claassen.co.uk wrote: I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version //td /tr tr tdwicket:message key=author //td tdinput wicket:id=author //td /tr tr tdwicket:message key=active //td tdinput type=checkbox wicket:id=active //td /tr tr tdwicket:message key=description //td tdspan wicket:id=description/span/td /tr tr tdwicket:message key=type //td tdselect wicket:id=type option/option /select/td /tr tr td colspan=2input wicket:id=submit type=submit/td /tr /table /wicket:extend - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to handle this exception properly
The problem is that you are calling getResponse().getOutputStream(), which invokes getOutputSteam from the http servlet response. After handling your request, Wicket calls getWriter from the same response. From the ServletResponse.getOutputStream Javadoc: Either this method or getWritereclipse-javadoc:%E2%98%82=lpscad/C:%5C/Documents%20and%20Settings%5C/deinf.crk%5C/.m2%5C/repository%5C/javax%5C/servlet%5C/servlet-api%5C/2.5%5C/servlet-api-2.5.jar%3Cjavax.servlet%28ServletResponse.class%E2%98%83ServletResponse%7EgetOutputStream%E2%98%82%E2%98%82getWritermay be called to write the body, not both. Throws:IllegalStateExceptioneclipse-javadoc:%E2%98%82=lpscad/C:%5C/Documents%20and%20Settings%5C/deinf.crk%5C/.m2%5C/repository%5C/javax%5C/servlet%5C/servlet-api%5C/2.5%5C/servlet-api-2.5.jar%3Cjavax.servlet%28ServletResponse.class%E2%98%83ServletResponse%7EgetOutputStream%E2%98%82IllegalStateException- if the getWriter method has been called on this response So, Wicket can't render the error page. -- Cristiano On Tue, Feb 10, 2009 at 5:57 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Hello, all wicket users! I receive HTTP Status 500 error in this situation: I have a page with empty html-file and page's onRender() looks like: OutputStreamWriter writer = null; try { writer = new OutputStreamWriter(getResponse().getOutputStream(), encoding); String enc = getRequestCycle().getResponse().getCharacterEncoding(); writer.append(!-- + enc + --\n); writer.append(.); } catch (UnsupportedEncodingException ex) { throw new WicketRuntimeException(Invalid charset: + ex.getMessage()); } catch (IOException ex) { throw new WicketRuntimeException(IOException: + ex.getMessage()); } finally { if (writer != null) { try { writer.close(); } catch (IOException ex) { } } } The problem is when this first catch is reached (because encoding desired is sent as a parameter that could be errouneous) and new WicketRuntimeException(Invalid charset: + ex.getMessage()); is thrown I see HTTP Status 500 error with this: ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: getOutputStream() has already been called for this response at org.apache.catalina.connector.Response.getWriter(Response.java:610) at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198) at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:365) at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:471) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:288) I would like to know is it proper to throw WicketRuntimeException in such situation. For example I want to show standart Wicket Error page. Thank you very much. -- Tony - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Inconsistent Model Binding on Form Submit
That's a good consideration. However, the error logs show that the error does not appear to be browser dependent. It occurs with Firefox, Safari, and IE. I just checked it by hitting Enter rather than clicking the Submit button, but that doesn't appear to change anything. -Original Message- From: Timo Rantalaiho [mailto:timo.rantala...@ri.fi] Could it be that they are submitting the form with Enter on a certain browser? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Intellij Idea Plugin Bounty
I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to get to it!, so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the wicket:message key attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a wicket:message with a key of userform.detailfieldset.username.label I would expect that when I created another wicket:message and started typing us in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add wicket:message keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key userform.detailfieldset.username.label would be placed just after other keys with the name userform.detailfieldset.username or userform.detailfieldset.username. The intention should leave the cursor after the = in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. wicket:extend, wicket:message, etc.) in HTML templates. This is something of a lower priority as Idea's Live Template functionality takes much of the pain out of not having code completion for items in the wicket namespace. This doesn't help with the error/warning issue, though. 5) Validation for wicket namespace and attributes in hTML template - In a similar vein, I would like wicket attributes like wicket:id and wicket tags like wicket:message to not show up as either errors or warnings in my HTML templates. This is just off the top of my head. I'm sure there are more and perhaps even some that should be higher on the priority list. Once some kind of feature set is agreed by Idea users here in the mailing list, I'll kick off the bounty on one of the software bounty sites and contribute $200. I know it's not much but I'll try to get my company to pony up a few dollars as well. That along with whatever contributions anyone else would like to make will hopefully be an incentive for someone. Maybe there's someone out there who's been wanting to do this for a while and the bounty will simply be the motivation to finally do it. I don't know, but I don't figure there's any harm in trying. Please post your own ideas and list your preferred priority for the features. -Matt -- View this message in context: http://www.nabble.com/Intellij-Idea-Plugin-Bounty-tp21958284p21958284.html Sent from the Wicket - User mailing list archive at Nabble.com. - To
Re: Problem with multiple AjaxLazyLoadPanel and DynamicImageResource
try calling image.setversioned(false) -igor On Wed, Feb 11, 2009 at 8:29 AM, Felix Cachaldora inffc...@gmail.com wrote: I am also stuck in the same situation. I have a page with several AjaxLazyLoadPanels(ALLP) with one of them loading a DynamicImageResource. If the ALLP contaning the DynamicImageResource gets loaded before some of the other ALLP the remaining ones do not load. It's like if that ALLP (the one with the DynamicImageResource) changed the state of the page. Examing the ajax response from the server I can see that those ALLP that fail get this response: ajaxResponse/ajaxResponse I don't what's going on. Has anyone any idea? Sergio García wrote: Well, i will try to explain the situation as good as i can. We have a grid with multiple AjaxLazyLoadPanel(ALLP) that load a query each one. One of the ALLP is a ListView with an ALLP into each row (each row is a different query). This enviroment works very well. The problem comes with a ALLP with a Jfreechart image inside. When wicket loads the image, i think it changes the state of the page from domready to load, and this makes that the rest of the ALLP don't load properly. I fix it making a new implementation of ALLP for that image. The new version substitutes the call of response.renderOnDomReadyJavascript(getCallbackScript().toString()); to a new call of response.renderOnLoadJavascript(getCallbackScript().toString());. With the new call the image loads at the end. But i still have a problem. The rows do not load because they will load at end and changing the javascript event from render to load does not fix anything. Any ideas? -- View this message in context: http://www.nabble.com/Problem-with-multiple-AjaxLazyLoadPanel-and-DynamicImageResource-tp21939285p21958242.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: how to give static pages consistant look with wicket - partial repeat
all you have to do is this: mount(new indexedparamcodingstrategy(/static, StaticPage.class)); class staticpage extends MyBasePageWithDecoratingMarkup { private final String resource; public staticpage(PageParameters params) { resource=params.get(0); add(new Label(content, new PropertyModel(this, content)).setEscapeModelStrings(false)); } public String getContent() { // load the resource content however you want InputStream is=new FileInputStream(basePath+/+resource); try { return Streams.readIntoString(is); } finally { is.close(); } } } static.page.html: [wicket:extend][wicket:container wicket:id=content]content will be here[/wicket:container][/wicket:extend] then if you go to /static/myfile.html the contents of myfile.html will be shown within your decorated page -igor On Wed, Feb 11, 2009 at 8:45 AM, Vika victoria.elin...@nasa.gov wrote: I am looking at wicket trying to decide if i would want to use it for my project. Currently I am struggling trying to give static and dynamic pages consistent look with wicket without using sitemesh. I was able to get wicket application to direct all static page requests to my wicket StaticPage that would read the content of a file and add it to the page as MultiLineLabel. However my problem is that i don't want to add whole html file. I need to extract the content of title, body and meta tags and add these separately. Is there anything in api or any examples i should look at ? Please see the code below. in Aplication.java init() mount(new URIRequestTargetUrlCodingStrategy(/docs) { @Override public IRequestTarget decode(RequestParameters requestParameters) { String path = /app/ + getURI(requestParameters); return new PageRequestTarget(new StaticPage(new WebExternalResourceRequestTarget(path))); } }); in StaicPage.java public class StaticPage extends BasePage implements AuthenticatedWebPage { public StaticPage(WebExternalResourceRequestTarget staticResource) { String staticResourceContent = ; try { staticResourceContent = convertStreamToString(staticResource.getResourceStream().getInputStream()); } catch (ResourceStreamNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } add(new MultiLineLabel(staticContent, staticResourceContent)); } } --- Here is what i get in the browser when click on static link: !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleInsert title here/title /head body this is a test /body /html This is in the footer -- Another variation of StaticPage.java i tried was public class StaticPage extends BasePage implements AuthenticatedWebPage { public StaticPage(WebExternalResourceRequestTarget staticResource) { MarkupResourceStream markupStream = new MarkupResourceStream(staticResource.getResourceStream()); MarkupParser parser = new MarkupParser(markupStream); Markup markup = parser.parse(); However I got stuck at this point since i still don't see a way of getting individual html tags from Markup thank you in advance, Vicky -- View this message in context: http://www.nabble.com/how-to-give-static-pages-consistant-look-with-wicket---partial-repeat-tp21958254p21958254.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: WicketServlet-filestore and FileNotFoundException
Hi, do you actually have leaking files in the store? Because this looks like wicket tries to create file in folder that has already been removed. How often do you get these? Is it reproduceable? -Matej On Wed, Feb 11, 2009 at 3:05 PM, shetc sh...@bellsouth.net wrote: Hi All, I know this issue was discussed in some depth in: http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--td13638411.html#a13644332 How To Change Page Store Size in DiskPageStore? but I'm still not clear as to the best practice. I have a Wicket-based application that was recently launched into production. It is based on v1.3.5 of Wicket and operates within WebSphere 6.1 on an AIX o/s. It is regularly throwing a FileNotFoundException; an example is shown at the bottom of this message. Based on the above DiskPageStore post, I am assuming that the available file handles are being used as expired sessions are not being cleaned up properly in the file store -- is that correct? If so, is the recommended best practice to create a cron job to clean up 'old' folders in the file store? Thanks, Steve [2/11/09 8:04:46:867 EST] 0076 SystemOut O 08:04:46,867 ERROR DiskPageStore:424 - Failed to make directory /opt/IBM/WebSphere/mastodon/profiles/prd1. node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/WicketServlet-filestore/GPfJlRcX_H4dda4AdcVtmHU [2/11/09 8:04:46:867 EST] 0076 SystemOut O 08:04:46,867 ERROR DiskPageStore:901 - Error flushing page java.lang.RuntimeException: java.io.FileNotFoundException: /opt/IBM/WebSphere/mastodon/profiles/prd1.node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/Wick etServlet-filestore/GPfJlRcX_H4dda4AdcVtmHU/pm-null (No such file or directory) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:104) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel(FileChannelPool.java:171) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage(DiskPageStore.java:241) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList(DiskPageStore.java:895) at org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run(DiskPageStore.java:965) at java.lang.Thread.run(Thread.java:810) Caused by: java.io.FileNotFoundException: /opt/IBM/WebSphere/mastodon/profiles/prd1.node2/temp/prd1.node2/prd1.node2.eob/eob/EobWeb.war/WicketServlet-filesto re/GPfJlRcX_H4dda4AdcVtmHU/pm-null (No such file or directory) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:243) at org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel(FileChannelPool.java:99) ... 5 more -- View this message in context: http://www.nabble.com/WicketServlet-filestore-and-FileNotFoundException-tp21955499p21955499.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: How to place form in own public class for extending
On Wed, Feb 11, 2009 at 8:52 AM, pieter claassen pieter.claas...@gmail.com wrote: What if you want to reuse the inner class form in another page (you have to make it public and non-inner for visibility) and then you want to override the onSubmit() method. If I just create a public class MyForm and stick the form contents (minus the form tags) in MyForm.html, then wicket cannot find any wicket variables on the form (see first post). yes, what if what if. notice i replied to your original email, in which you make no mention of reusability. If you encapsulate the form in a panel, then the only problem is that you cannot get to the onSubmit() method of the form (but if you delegate all the work to a public method on the panel, then you can override that). Not so pretty. so something like this is horrible right: class myform extends panel { protected void onsubmit() {} public myform(string id) { super(id); add(new form(form) { onsubmit() { myform.this.onsubmit(); }}); } } yes, it looks horrific. This is a bit of a corner case, but the fact is that forms are not readily accessible wicket objects like panels and pages ( you cannot easily extend your own publically accessible forms) or am I missing something? in wicket there are two kinds of components: ones that provide their own markup and ones that do not. the core team feels that we have covered all the core usecases with pages, panels, fragments, and formcomponentpanels. your usecase can be handled by selecting the reusability unit to be a formcomponentpanel which contains the innards of your form rather then the form itself. that said, you can easily implement a form variant which provides its own markup. see FormComponentPanel for clues. -igor Pieter On Wed, Feb 11, 2009 at 4:28 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: what is the problem of having the form as an inner class? public class mypage extends webpage { private class myform extends form { ... } public mypage() { add(new myform(..) { protected void onsubmit() {...}}); } } -igor On Wed, Feb 11, 2009 at 6:40 AM, pieter claassen pie...@claassen.co.uk wrote: I am trying to move a form from an inner class that extends Form to a public class. This is so that I can override the onSubmit() method of my form. Below are my files. When I add the form to a wicket page with add(new TemplateEditForm(templateeditform, templatemodel)); and the corresponding html code form wicket:id=templateeditformeditform/form My wicket code doesn't pick the wicket:ids in the TemplateEditForm.html file up WicketMessage: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = name]] 2. [MarkupContainer [Component id = version]] 3. [MarkupContainer [Component id = author]] 4. [MarkupContainer [Component id = active]] 5. [MarkupContainer [Component id = description]] 6. [MarkupContainer [Component id = textarea]] 7. [MarkupContainer [Component id = type]] 8. [MarkupContainer [Component id = submit]] I am sure I am doing something stupid, but I cannot find the solution to this. Any ideas? = public class TemplateEditForm extends Form { private TemplateWebModel templatemodel; public TemplateEditForm(String id, TemplateWebModel templatemodel) { super(id); this.templatemodel = templatemodel; setModel(new CompoundPropertyModel(templatemodel)); add(new RequiredTextField(name)); add(new RequiredTextField(version, java.lang.Long.class)); add(new RequiredTextField(author)); add(new CheckBox(active)); add(new VariableTextFieldPanel(description, new PropertyModel( templatemodel.getObject(), description))); DropDownChoice ddc = new DropDownChoice(type, Arrays .asList(TemplateType.values()), new IChoiceRenderer() { public Object getDisplayValue(Object object) { return getString(object.toString()); } public String getIdValue(Object object, int index) { return object.toString(); } }); ddc.setRequired(true); add(ddc); add(new Button(submit, new ResourceModel(submit))); } @Override public void onSubmit() { WicketApplication.get().getTemplateFactory().store( templatemodel.getEntity()); setResponsePage(new TemplateListPage()); } } And the corresponding html code === wicket:extend table tr tdwicket:message key=name //td tdinput wicket:id=name //td /tr tr tdwicket:message key=version //td tdinput wicket:id=version
Feedback Next To Component
In order to add feedback next to the component I used a behavior. I had some code from Igor which got me on the right track, although I was unable to actually get it to work the same way, I simplified it down to the following code: AbstractBehavior printMessagesNextToComponent = new AbstractBehavior() { @Override public void onRendered(Component component) { super.onRendered(component); FeedbackMessage message = component.getFeedbackMessage(); if (message != null) { final Response out = component.getResponse(); out.write(); out.write(message.getMessage().toString()); out.write(); } } }; It almost seems too simple, I've tried it and with limited testing it seems to work just fine, although there are some odd behaviors with Ajax... does anyone have any comments, better solutions, or possible breaking conditions that I should check out? -- View this message in context: http://www.nabble.com/Feedback-Next-To-Component-tp21959520p21959520.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
LinkTree with BookmarkablePageLinks
I have a LinkTree with BookmarkablePageLinks, wherein the nodes correspond to different types of objects. The models within the nodes tell me what kind of page I need to instantiate, with what parameters. I had some troubles implementing it, but I got it working. Since this kind of pattern is common within UIs and I have been helped on other occasions by people here, I'm posting what I figured out in order to give back to the community. public class MyLinkTree extends LinkTree { public MyLinkTree(String id, TreeModel model) { super(id, model); setLinkType( org.apache.wicket.markup.html.tree.BaseTree.LinkType.REGULAR ); } @Override protected Component newNodeComponent( String id, IModel model ) { return new LinkIconPanel( id, model, MyLinkTree.this ) { private static final long serialVersionUID = 1L; @Override protected void addComponents( final IModel model, final BaseTree tree ) { final Object obj = ( ( DefaultMutableTreeNode )model.getObject() ).getUserObject(); BaseTree.ILinkCallback callback = new BaseTree.ILinkCallback() { private static final long serialVersionUID = 1L; public void onClick( AjaxRequestTarget target ) { PageParameters params = new PageParameters(); if ( obj instanceof BeanA ) { target.appendJavascript(window.location=+MyLinkTree.this.urlFor( PageA.class, params ) ); } else if ( obj instanceof BeanB ) { params.add( myParamKey, myParamVal ); target.appendJavascript(window.location=+MyLinkTree.this.urlFor( PageB.class, params ) ); } } }; MarkupContainer iconContainer = tree.newLink( iconLink, callback ); iconContainer.add(newImageComponent(icon, tree, model)); add( iconContainer ); PageParameters params = new PageParameters(); if ( obj instanceof BeanA ) { final BeanA myBean = ( BeanA )obj; BookmarkablePageLink contentLink = new BookmarkablePageLink( contentLink, PageA.class, params ); contentLink.add( new Label( content, myBean.toString() ) ); add( contentLink ); } else if ( obj instanceof BeanB ) { final BeanB myBean = ( BeanB )obj; params.add( myParamKey, myParamVal ); BookmarkablePageLink contentLink = new BookmarkablePageLink( contentLink, PageB.class, params ); add( contentLink ); } } }; } } -- View this message in context: http://www.nabble.com/LinkTree-with-BookmarkablePageLinks-tp21962723p21962723.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: WicketServlet-filestore and FileNotFoundException
Hi Matej, Thanks for responding! I spent more time looking into this issue. I have checked into 2 environments so far including: 1) WebSphere 6.1 running as my local host on my laptop and 2) as a single node within our development environment. In both cases, Wicket works correctly creating and deleting folders/files from the file store -- this includes cleaning up after session expiration. Meanwhile, our production system still leaves files behind in the file store. The production system consists of a cluster of 2 WebSphere nodes. I plan to test this 2 node setup in our QA system to see if clustering is a factor or not. Steve -- View this message in context: http://www.nabble.com/WicketServlet-filestore-and-FileNotFoundException-tp21955499p21963872.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: Feedback Next To Component
behaviors aren't really designed to work like components and render markup like that, so it's a bit weird... what if you want to go extend or change the markup for the feedback error? it's now embedded in a bunch of code. walnutmon wrote: In order to add feedback next to the component I used a behavior. I had some code from Igor which got me on the right track, although I was unable to actually get it to work the same way, I simplified it down to the following code: AbstractBehavior printMessagesNextToComponent = new AbstractBehavior() { @Override public void onRendered(Component component) { super.onRendered(component); FeedbackMessage message = component.getFeedbackMessage(); if (message != null) { final Response out = component.getResponse(); out.write(); out.write(message.getMessage().toString()); out.write(); } } }; It almost seems too simple, I've tried it and with limited testing it seems to work just fine, although there are some odd behaviors with Ajax... does anyone have any comments, better solutions, or possible breaking conditions that I should check out? -- View this message in context: http://www.nabble.com/Feedback-Next-To-Component-tp21959520p21964449.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: Intellij Idea Plugin Bounty
Hi Matt, I'm sorry the IDEA plugin doesn't meet your needs. I've wanted to implement several of the features you mention, but like everyone else my time is severely limited. That said, WicketForge is open source. I'm happy to accept patches or even turn the project over to someone else. On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch matt...@welchkin.net wrote: I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to get to it!, so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the wicket:message key attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a wicket:message with a key of userform.detailfieldset.username.label I would expect that when I created another wicket:message and started typing us in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add wicket:message keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key userform.detailfieldset.username.label would be placed just after other keys with the name userform.detailfieldset.username or userform.detailfieldset.username. The intention should leave the cursor after the = in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. wicket:extend, wicket:message, etc.) in HTML templates. This is something of a lower priority as Idea's Live Template functionality takes much of the pain out of not having code completion for items in the wicket namespace. This doesn't help with the error/warning issue, though. 5) Validation for wicket namespace and attributes in hTML template - In a similar vein, I would like wicket attributes like wicket:id and wicket tags like wicket:message to not show up as either errors or warnings in my HTML templates. This is just off the top of my head. I'm sure there are more and perhaps even some that should be higher on the priority list. Once some kind of feature set is agreed by Idea users here in the mailing list, I'll kick off the bounty on one of the software bounty sites and contribute $200. I know it's not much but I'll try to get my company to pony up a few dollars as well. That along with whatever contributions anyone else would like to make will hopefully be an incentive for someone. Maybe there's someone out there who's been wanting to do this for a while and the bounty will simply
Re: Very Simple Security
I just had a quick look at wicket-auth-roles. And I like its simplicity. On Wed, Jan 14, 2009 at 5:28 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: You could use wicket-auth-roles. Can't think of anything more simpler: it provides two roles: user and admin. Based on my brief look at playing around with wicket-auth-roles-eamples, I would clarify the above statement like this: it provides two roles _out-of-the-box_ : user and admin, but you're not limited to these two roles, you can use as many custom string-based roles as you wish. Right ? Maarten You can secure your pages and components with annotations. I like it, but be warned: it is simple and intended to stay that way. If you need something more complex or different, use it as inspiration or example. Martijn On Wed, Jan 14, 2009 at 5:20 PM, Dane Laverty danelave...@chemeketa.edu wrote: I'm currently using Swarm to secure my web application, but I think it provides a lot more functionality than I really need. Would simply checking for a User object the session on each page load work as well, or am I overlooking some major security hole? This way, when the user logs in successfully, the session would get a User object, but otherwise it would be null and the application would kick back to the login page. -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Intellij Idea Plugin Bounty
I hope I didn't give the wrong impression. I really appreciate the work you've done and looking at the code, it's a heck of a lot of work. If I hadn't tried wicketforge and saw the potential there I never would have been so motivated to start this process. I just didn't want to be that guy who just said I want this and I want that to someone who had already donated so much of their time. That's why I'm proposing the bounty. That way I can not feel like such a leech when I ask for specific things. -Matt Nick Heudecker wrote: Hi Matt, I'm sorry the IDEA plugin doesn't meet your needs. I've wanted to implement several of the features you mention, but like everyone else my time is severely limited. That said, WicketForge is open source. I'm happy to accept patches or even turn the project over to someone else. On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch matt...@welchkin.net wrote: I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to get to it!, so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the wicket:message key attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a wicket:message with a key of userform.detailfieldset.username.label I would expect that when I created another wicket:message and started typing us in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add wicket:message keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key userform.detailfieldset.username.label would be placed just after other keys with the name userform.detailfieldset.username or userform.detailfieldset.username. The intention should leave the cursor after the = in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. wicket:extend, wicket:message, etc.) in HTML templates. This is something of a lower priority as Idea's Live Template functionality takes much of the pain out of not having code completion for items in the wicket namespace. This doesn't help with the error/warning issue, though. 5) Validation for wicket namespace and attributes in hTML template - In a similar vein, I would like wicket attributes like wicket:id and wicket tags like wicket:message to not show up as either errors or warnings in my HTML templates. This is just off the top
Re: Intellij Idea Plugin Bounty
Hi, I think WicketForge is already VERY nice. About your wishlist: 1) is already implemented in WicketForge 2) and 3) : I have no idea 4) and 5) can be solved by changing the DTD that IDEA uses for validating (x)html. A few months ago I experimented a bit with that DTD and I could make the errors/warnings about the wicket tags disappear but then other things stopped working (I don't remember exactly, in some cases the built-in code completion for html tags stopped working in other cases it was WicketForge that stopped working) I like the idea of a bounty, and when you succeed in attracting bounty-hunters, I hope he/she/they will work on improving WicketForge instead of reinventing the wheel. Maarten On Wed, Feb 11, 2009 at 10:29 PM, Nick Heudecker nheudec...@gmail.comwrote: Hi Matt, I'm sorry the IDEA plugin doesn't meet your needs. I've wanted to implement several of the features you mention, but like everyone else my time is severely limited. That said, WicketForge is open source. I'm happy to accept patches or even turn the project over to someone else. On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch matt...@welchkin.net wrote: I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to get to it!, so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the wicket:message key attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a wicket:message with a key of userform.detailfieldset.username.label I would expect that when I created another wicket:message and started typing us in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add wicket:message keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key userform.detailfieldset.username.label would be placed just after other keys with the name userform.detailfieldset.username or userform.detailfieldset.username. The intention should leave the cursor after the = in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. wicket:extend, wicket:message, etc.) in HTML templates. This is something of a lower priority as Idea's Live Template functionality takes much of the pain out of not having code completion for items in the wicket namespace. This
Re: Intellij Idea Plugin Bounty
No, not at all and I completely understand your frustration from the user perspective. I imagine it's very similar to mine when I try to deal with the IDEA plugin API. :) Let me see what I can put together over the next few days. On Wed, Feb 11, 2009 at 1:52 PM, Matt Welch matt...@welchkin.net wrote: I hope I didn't give the wrong impression. I really appreciate the work you've done and looking at the code, it's a heck of a lot of work. If I hadn't tried wicketforge and saw the potential there I never would have been so motivated to start this process. I just didn't want to be that guy who just said I want this and I want that to someone who had already donated so much of their time. That's why I'm proposing the bounty. That way I can not feel like such a leech when I ask for specific things. -Matt Nick Heudecker wrote: Hi Matt, I'm sorry the IDEA plugin doesn't meet your needs. I've wanted to implement several of the features you mention, but like everyone else my time is severely limited. That said, WicketForge is open source. I'm happy to accept patches or even turn the project over to someone else. On Wed, Feb 11, 2009 at 9:41 AM, Matt Welch matt...@welchkin.net wrote: I use Intellij Idea for my Java development. In fact, that IDE is one of the main reasons I so often come back to using Java for many of my projects. I also use Wicket and am starting to work with it a lot more than I have in the past. While Wicket and Idea get along reasonably well, there's a lot of room for improvement in their relationship. That means a Wicket plugin for Idea. Nick Heudecker has done an admirable job with WicketForge (http://code.google.com/p/wicketforge/), however 1) when I try to use that plugin, I constantly get exceptions and 2) it doesn't do some of the the things I'm really interested in. This is no criticism of Nick. If I recall one of his messages correctly, he developed this plugin for his own use and it was extremely generous of him to publish the code as open source. He's even made pretty regular improvements to it, but at least for me personally, it doesn't meet my needs for a Wicket plugin. Now, I can't, in good conscience just pop on to this mailing list and ask someone out of the goodness of their heart to get to it!, so I'm willing to start the ball rolling on an incentive in the form of a bounty; one that I hope other Wicket and Idea users will contribute to as well. First, though, I'd like to come to some kind of agreement about a feature set for such a plugin so that when I post the bounty I can be as specific as possible in its criteria. Here is a list of my most desired features in the order of priority: 1) Navigation between template and code - I would like the ability to move in both directions between a template and it's Java code. This means in an overall sense (e.g. moving back and forth between a top level page class and the HTML file) and in a more granular sense (e.g. moving back and forth between an HTML element with a wicket:id and the Wicket Java Component with the same id). I should be able to bind a keystroke to this action. It should preferably be the same keystroke in both directions. 2) Code completion for wicket:message keys - I would like code completion for the wicket:message key attribute. It should work something like the XML code completion when there isn't a DTD or schema available. It would be based on other keys already available on the page. So for instance if I had already created a wicket:message with a key of userform.detailfieldset.username.label I would expect that when I created another wicket:message and started typing us in the key attribute, code completion would allow me to expand what I typed similar to what happens when typing package names. 3) Properties file intention - I would like an Idea intention that would allow me to automatically add wicket:message keys to a resource properties file. By default this would add it to a properties file with the same name as the template (even creating the properties file if necessary), however it should be configurable to use an application-wide properties file if that's what the user prefers. When adding the key to the properties file it should be placed in a logical manner according to it's period separated name so the key userform.detailfieldset.username.label would be placed just after other keys with the name userform.detailfieldset.username or userform.detailfieldset.username. The intention should leave the cursor after the = in the properties file. 4) Code completion on wicket tags and attributes - I would like code completion for all wicket tags (e.g. wicket:extend, wicket:message, etc.) in HTML templates. This is something of a lower priority as Idea's Live Template functionality
ApacheCon EU 2009 early bird registration still available!
ApacheCon EU 2009 registration is now open! 23-27 March -- Mövenpick Hotel, Amsterdam, Netherlands http://www.eu.apachecon.com/ Registration for ApacheCon Europe 2009 is now open - act before early bird prices expire 13 February. Remember to book a room at the Mövenpick and use the Registration Code: Special package attendees for the conference registration, and get 150 Euros off your full conference registration. Lower Costs - Thanks to new VAT tax laws, our prices this year are 19% lower than last year in Europe! We've also negotiated a Mövenpick rate of a maximum of 155 Euros per night for attendees in our room block. Quick Links: http://xrl.us/aceu09sp See the schedule http://xrl.us/aceu09hp Get your hotel room http://xrl.us/aceu09rp Register for the conference Other important notes: - Geeks for Geeks is a new mini-track where we can feature advanced technical content from project committers. And our Hackathon on Monday and Tuesday is open to all attendees - be sure to check it off in your registration. - The Call for Papers for ApacheCon US 2009, held 2-6 November 2009 in Oakland, CA, is open through 28 February, so get your submissions in now. This ApacheCon will feature special events with some of the ASF's original founders in celebration of the 10th anniversary of The Apache Software Foundation. http://www.us.apachecon.com/c/acus2009/ - Interested in sponsoring the ApacheCon conferences? There are plenty of sponsor packages available - please contact Delia Frees at de...@apachecon.com for further information. == ApacheCon EU 2008: A week of Open Source at it's best! Hackathon - open to all! | Geeks for Geeks | Lunchtime Sessions In-Depth Trainings | Multi-Track Sessions | BOFs | Business Panel Lightning Talks | Receptions | Fast Feather Track | Expo... and more! - Shane Curcuru, on behalf of Noirin Shirley, Conference Lead, and the whole ApacheCon Europe 2009 Team http://www.eu.apachecon.com/ 23-27 March -- Amsterdam, Netherlands - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Graphs, Charts and Wicket
The javascript is done in the SWFObject. To make it work in a Ajax request you need to add : if (AjaxRequestTarget.get() != null){ AjaxRequestTarget.get().appendJavascript(js); } where js is the javascript generated . This will make evaluate the javascript and therefore add the flash object. -PY Thies Edeling-2 wrote: Works nicely but how to initialize the chart when the panel is loaded through an ajax req/res ? Is there a javascript method that writes out the Flash object tag ? That seems to be completely missing. On Mon, Feb 2, 2009 at 10:28 AM, Maarten Bosteels mbosteels@gmail.comwrote: Also have a look at http://cwiki.apache.org/WICKET/open-flash-chart-and-wicket.html Maarten On Thu, Jan 29, 2009 at 2:45 PM, newbieabc newbie...@yahoo.com wrote: If you don't mind, could you post your code to display the chart you used? I was interested the gradient fill chart they offered, but am really new to wicket and didn't understand how to add it in wicket. Thanks! Jurek Piasek wrote: I have been using Amcharts http://www.amcharts.com/ together with SWFObject http://cwiki.apache.org/WICKET/creating-a-behavior-to-use-a-javascript-library.html Regards, Jurek On Sun, Nov 16, 2008 at 8:20 PM, Yazbek, Daniel (Daniel) dyaz...@avaya.comwrote: Hi all, I'd like to put some simple bar graphs, pie graphs and possible line graphs into my wicket pages. Have any of you used a good framework that you can recommend, that also plays nicely with Wicket? Thanks! -Daniel. -- View this message in context: http://www.nabble.com/Graphs%2C-Charts-and-Wicket-tp20532374p21727142.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 -- View this message in context: http://www.nabble.com/Graphs%2C-Charts-and-Wicket-tp20532374p21965728.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 at ApacheCon EU'09 in Amsterdam
We're happy to announce a lot of Wicket involvement at the upcoming ApacheCon in Amsterdam (23-27 March 2009) First of all we have 2 training sessions available: - Introduction to Wicket by Martijn Dashorst on Mon 23 March (http://tinyurl.com/aceu09wicket1) - Behavior-Driving Your Apache Wicket Application by Timo Rantalaiho on Tue 24 March (http://tinyurl.com/aceu09wicket2) Both courses are hosted by core members. Martijn has co-authored Wicket in Action and Timo has been involved with WicketTester and JDave. There is no better team to get you and your team up to speed with the finest Java web framework available and start cranking out fully tested applications. Martijn will also present Wicket in Action during the normal conference days. A quick introduction to Wicket's core features in just one hour. But attending the conference will give you much more: over 60 sessions covering your favorite Apache projects. Amsterdam is great, but Wicket meetups in Amsterdam are even better! We're attempting to schedule a Wicket meetup during the conference at the conference floor. Details will follow soon. Read more about ApacheCon EU 2009 here: http://www.eu.apachecon.com/c/aceu2009/ See you in Amsterdam! Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Servlet container authentication in Wicket
Hi, I had a look at that specification but it doesn't give any more hints how to use it. Does somebody have any more working examples? Or is there a tutorial how to connect wicket to the local LDAP? Thanks for your help. Philipp j_security_check is part of the Servlet Specification section SRV.12.5.3.1 Login Form Notes (at least for version 2.5). It did exist in earlier versions but I've only quoted the latest. On Sun, Feb 1, 2009 at 5:03 PM, Philipp Daumke dau...@averbis.de wrote: Hi all, I followed the Servlet Container authentication as described in http://cwiki.apache.org/WICKET/servlet-container-authentication.html, but I do not get it working. At the moment I get an error in firefox when invoking the redirectToSecurityCheck() method: http://localhost:5080/j_security_check?j_username=testj_password=test _The requested resource () is not available. _I don't even know exactly what j_security_check is and don't find too much on the web. Do I have to configure Tomcat properly? Below is my full src. MyApp.java and web.xml look like in the example (see link aboe). Thank you for your help! Philipp public final class LoginPage extends WebPage { private String username; private String password; public LoginPage() { redirectToSecurityCheck(); /*if( ( ( MySession )getSession() ).isUserLoggedIn()) { // redirect to hide username and password from URL after user is logged in setRedirect( true ); setResponsePage( Index.class ); } else { redirectToSecurityCheck(); }*/ } /** * Common servlet login workaround */ private void redirectToSecurityCheck() { final Map parametersMap = ( ( WebRequestCycle )RequestCycle.get() ).getWebRequest().getHttpServletRequest().getParameterMap(); if( parametersMap.containsKey( username ) parametersMap.containsKey( password ) ) { // getting parameters from POST request final String userName = ( ( String[] )parametersMap.get( username ) )[ 0 ]; final String userPassword = ( ( String[] )parametersMap.get( password ) )[ 0 ]; // if POST parameters are ok, redirect them to j_security_check if( ( userName != null ) ( userPassword != null ) ) { getRequestCycle().setRedirect( false ); getRequestCycle().setRequestTarget( EmptyRequestTarget.getInstance() ); getResponse().redirect( /j_security_check?j_username= + userName + j_password= + userPassword ); } } } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } } -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - 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 -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket meetup in Amsterdam news
During ApacheCon EU 2009 we can fill a 3 hour slot in the evening with a real Wicket community meetup. The meetup will be hosted in the conference hotel, from 19:00 until 22:00, in one of the conference rooms available on either 23 or 24 March. The conference is held in Amsterdam, the Netherlands, in the Mövenpick hotel, near the central train station. If there's enough interest, presentations and sponsors we can let this meetup take place. So to make this happen we need: - enough people that want to attend the meetup - enough people that want to give a presentation at the meetup - companies that want to sponsor the meetup The deadline for the meetup is next monday, so we need to make this a quick process. Ideally presentations are about 20-30 minutes, but shorter or longer presentations are fine. Just propose and we'll discuss the details (if you wish, contact me off list). [ ] I'll attend the 23rd [ ] I'll attend the 24th [ ] I want to present xyz on the 23rd [ ] I want to present xyz on the 24th If you want to sponsor this event, please contact me off list and I'll hook you up with the right people. Sponsoring the event is not expensive: a recruiter costs more, and you become an official ApacheCon sponsor! Consider all the Apache software your company uses and then think about all the money you've saved during all those years. Give back to the community and sponsor this event! Let's make this happen! Martijn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Interacting with Client Side java application
Hi I am developing a Wicket application that needs to interface with a client side java application. The client app is a biometric application that captures fingerprint images. It is non-graphical. What I need to do now, is show this fingerprint image within a wicket form and capture other user information. The wicket app needs to 'monitor' the java app to see when the fingerprint changes.. I have thought of writing the image to a file, and using an timer within wicket to keep checking the file. Or maybe JMX. Any help would be great Thanks in advance Jeff -- View this message in context: http://www.nabble.com/Interacting-with-Client-Side-java-application-tp21966411p21966411.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: Servlet container authentication in Wicket
I had a look at that specification but it doesn't give any more hints how to use it. Does somebody have any more working examples? Or is there a tutorial how to connect wicket to the local LDAP? I often skip the container and initiate a direct connection to LDAP (usually AD) via JNDI (this is useful if you need additional information from your users like company e-mail address, extendion, mobile phone, office, etc). Here's a tutorial on how to do it (it's not wicket related): http://java.sun.com/products/jndi/tutorial/ldap/security/ldap.html BTW, j_security_check is only available as a resource if you redirect (or post) to it from a secured url. Did you setup your web.xml to guard the login page url from unauthorized access? -- Janos
Re: WicketForge 0.5.0 Available for IDEA 8
I've published WicketForge 0.5.1 to the IDEA plugins site. - Toggling between HTML and Java is fixed. Let me know if you're still having problems with the cursor ending up at the correct location. It's work correctly here but your results may vary. - The intentions are also fixed. Nobody mentioned the intentions not working, so I'm guessing no one knew about them. There are intentions to create a markup page/panel/properties file if you alt-enter while the cursor is on the class name. On Fri, Jan 16, 2009 at 10:05 AM, Don Hass donh...@gmail.com wrote: Here is what I see in Diana #9647 build on Windows XP. Class/HTML Switching (WORKS) Alt + Shift + W switch between class and markup/html. Inspections (PARTLY WORKS) It seems to work in markup/html files, but not in source files for missing Wicket IDs. Goto (DOES NOT APPEAR TO WORK AT ALL) Control+Clicking on a Wicket ID in the Java or markup takes you to the corresponding Wicket ID in the accompanying file. Jumps between files, but not to correct locations. Completion (WORKS) When editing an HTML file, popup completion data provides Wicket IDs in the corresponding Java source file. Progress and thank you Nick. /Don Nick Heudecker wrote: Thanks for the feedback Maarten. I'm going to publish the plugin today to the IDEA site then work on fixing that bug as soon as I can. On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels mbosteels@gmail.comwrote: Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.com wrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.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 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21505093.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail:
Re: WicketForge 0.5.0 Available for IDEA 8
Nick Heudecker schrieb: I've published WicketForge 0.5.1 to the IDEA plugins site. - Toggling between HTML and Java is fixed. Let me know if you're still having problems with the cursor ending up at the correct location. It's work correctly here but your results may vary. - The intentions are also fixed. Nobody mentioned the intentions not working, so I'm guessing no one knew about them. There are intentions to create a markup page/panel/properties file if you alt-enter while the cursor is on the class name. great news! i have been looking forward to this :) thanks a lot for your hard work. small suggestion though: there should be a short descriptions of the funtionality in the plugin description, i did not know about half of the features until now. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketForge 0.5.0 Available for IDEA 8
great news! i have been looking forward to this :) thanks a lot for your hard work. small suggestion though: there should be a short descriptions of the funtionality in the plugin description, i did not know about half of the features until now. If nobody knows about the features, they can't file bugs if something fails to work. ;) -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com
Re: Using converters properly in Wicket?
as long as there are no sets you can run concurrent reads on the hashmap. and since the setters are only called when the application is initialized we are ok. Ok. So if one was to add converters 'on the fly', one must be careful. Like I do with the ParametrizedConverterLocator (because I do not want to guess in advance all the possible combinations). Fair. ** Martin -igor On Mon, Feb 9, 2009 at 9:36 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: which part of it is not threadsafe? /** Maps Classes to ITypeConverters. */ private final MapString, IConverter classToConverter = new HashMapString, IConverter(); The ConverterLocator.get(XX) can be used from multiple threads, can it not? In that case, the HashMap would not be thread-safe..? public final IConverter get(Class? c) { return classToConverter.get(c.getName()); } ** Martin On Mon, Feb 9, 2009 at 9:32 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Ok, then why Wicket's ConverterLocator is not thread safe? Or is it? ** Martin 2009/2/9 Igor Vaynberg igor.vaynb...@gmail.com: yes, they need to be threadsafe if you cache them. numberformat itself is also not threadsafe. another reason i can think of why we clone is that a code that gets a bigdecimalconverter via getconverter() can execute setters on it and modify it- which will affect the converter globally. im not really sure how important the latter is since you would have to downcast the interface, but still. perhaps some sort of instance cache is in order. -igor - 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 - 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: Testing DataView
On Sun, 08 Feb 2009, Erick Fleming wrote: I know Wicket likes everything to be serializable so does this mean that mocking frameworks are not compatible by default? By the way, I've heard from my Scala-using colleagues that some Scala versions have had trouble in serialising some inner classes. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketForge 0.5.0 Available for IDEA 8
Perhaps I'm missing it, but I can't seem to get the intentions to work. So if I have: public class MyPage extends WebPage { } and the cursor is somewhere on MyPage I should be able to activate these intentions? The only intentions I'm seeing now are the built in Idea ones. Everything else, though, is working beautifully. No more exceptions when idea loads and having a shortcut key to toggle between the components and HTML and back is awesome. -Matt Nick Heudecker wrote: I've published WicketForge 0.5.1 to the IDEA plugins site. - Toggling between HTML and Java is fixed. Let me know if you're still having problems with the cursor ending up at the correct location. It's work correctly here but your results may vary. - The intentions are also fixed. Nobody mentioned the intentions not working, so I'm guessing no one knew about them. There are intentions to create a markup page/panel/properties file if you alt-enter while the cursor is on the class name. On Fri, Jan 16, 2009 at 10:05 AM, Don Hass donh...@gmail.com wrote: Here is what I see in Diana #9647 build on Windows XP. Class/HTML Switching (WORKS) Alt + Shift + W switch between class and markup/html. Inspections (PARTLY WORKS) It seems to work in markup/html files, but not in source files for missing Wicket IDs. Goto (DOES NOT APPEAR TO WORK AT ALL) Control+Clicking on a Wicket ID in the Java or markup takes you to the corresponding Wicket ID in the accompanying file. Jumps between files, but not to correct locations. Completion (WORKS) When editing an HTML file, popup completion data provides Wicket IDs in the corresponding Java source file. Progress and thank you Nick. /Don Nick Heudecker wrote: Thanks for the feedback Maarten. I'm going to publish the plugin today to the IDEA site then work on fixing that bug as soon as I can. On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels mbosteels@gmail.comwrote: Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.com wrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.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 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management
Re: Testing DataView
Hi, By the way, I've heard from my Scala-using colleagues that some Scala versions have had trouble in serialising some inner classes. that should work with Scala 2.7.2 - in the current version it's broken if inheriting serializable from Java classes. It's already fixed and should be ok with the next version again. Best regards, --- Jan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketForge 0.5.0 Available for IDEA 8
Make sure the intentions are enabled on the Settings dialog. Other than that it should be working. What's your IDEA version? On Wed, Feb 11, 2009 at 9:35 PM, Matt Welch matt...@welchkin.net wrote: Perhaps I'm missing it, but I can't seem to get the intentions to work. So if I have: public class MyPage extends WebPage { } and the cursor is somewhere on MyPage I should be able to activate these intentions? The only intentions I'm seeing now are the built in Idea ones. Everything else, though, is working beautifully. No more exceptions when idea loads and having a shortcut key to toggle between the components and HTML and back is awesome. -Matt Nick Heudecker wrote: I've published WicketForge 0.5.1 to the IDEA plugins site. - Toggling between HTML and Java is fixed. Let me know if you're still having problems with the cursor ending up at the correct location. It's work correctly here but your results may vary. - The intentions are also fixed. Nobody mentioned the intentions not working, so I'm guessing no one knew about them. There are intentions to create a markup page/panel/properties file if you alt-enter while the cursor is on the class name. On Fri, Jan 16, 2009 at 10:05 AM, Don Hass donh...@gmail.com wrote: Here is what I see in Diana #9647 build on Windows XP. Class/HTML Switching (WORKS) Alt + Shift + W switch between class and markup/html. Inspections (PARTLY WORKS) It seems to work in markup/html files, but not in source files for missing Wicket IDs. Goto (DOES NOT APPEAR TO WORK AT ALL) Control+Clicking on a Wicket ID in the Java or markup takes you to the corresponding Wicket ID in the accompanying file. Jumps between files, but not to correct locations. Completion (WORKS) When editing an HTML file, popup completion data provides Wicket IDs in the corresponding Java source file. Progress and thank you Nick. /Don Nick Heudecker wrote: Thanks for the feedback Maarten. I'm going to publish the plugin today to the IDEA site then work on fixing that bug as soon as I can. On Fri, Jan 16, 2009 at 8:46 AM, Maarten Bosteels mbosteels@gmail.comwrote: Hello Nick, The new plugin installs fine. This is what works on my systems: (a) ALT + SHIFT + W = switching between java and html files (b) in the html file clicking on a wicket:id value = jumps to corresponding Java code (c) CTRL + SPACEBAR when inside a wicket:id value in the html file = dropdown box for completion (d) in html file: warning Wicket ID missing in Java source when using an invalid wicket:id value not working: (e) clicking on a wicket:id in the Java code, expected to jump to correspondig wicket:id in html file, but nothing happens I saw same results on these two machines: Fedora 8 IDEA 8.0.1 EAP build 9164 JDK 1.6.0_11 Fedora 9 IDEA 8.0 build #9572 JDK 1.6.0_11 If I remember correctly, (e) used to work on IDEA 7. Nothing interesting in ~/.IntelliJIdea80/system/log/idea.log Except maybe this: 2009-01-16 17:10:33,433 [ 3126] INFO - api.vfs.impl.local.FileWatcher - Native file watcher failed to startup. Let me know what I can do to help you fix this because your plugin totally rocks ! Thanks, Maarten On Wed, Jan 14, 2009 at 5:28 PM, Nick Heudecker nheudec...@gmail.com wrote: That's what I get for trying to rush things. You can download it from here: http://www.systemmobile.com/code/WicketForge-0.5.0.zip And rename the zip to a jar. I'll update the instructions page next. On Wed, Jan 14, 2009 at 7:40 AM, Don Hass donh...@gmail.com wrote: Ditto. That's just teasing Nick! Maarten Bosteels wrote: Hello, I tried to download http://www.systemmobile.com/code/WicketForge-0.5.0.jar but it's an empty file (zero bytes) Thanks, Maarten On Wed, Jan 14, 2009 at 6:42 AM, Nick Heudecker nheudec...@gmail.comwrote: I'm looking for some people to test WicketForge 0.5.0 with IDEA 8. As far as I can tell, everything seems to be working, but I'd like to get more people testing before I publish it to the IDEA plugin site. Instructions and download here: http://www.systemmobile.com/?page_id=283 -- Nick Heudecker Professional Wicket Training Consulting http://www.systemmobile.com Eventful - Intelligent Event Management http://www.eventfulhq.com -- View this message in context: http://www.nabble.com/WicketForge-0.5.0-Available-for-IDEA-8-tp21450424p21458486.html Sent from the Wicket - User mailing list archive at Nabble.com.
question about adding synchronized on mountsOnPath at WebRequestCodingStrategy
at 1.3.5 class: org.apache.wicket.protocol.http.request.WebRequestCodingStrategy method: urlCodingStrategyForPath the variable mountsOnPath is synchronized is this necessary? because the WebRequestCodingStrategy is initialized once by request cycle processor, which in turns is shared by all requests (i read this at Wicket In Action) so synchornized the mountsOnPath can produce a big lock contention problem if we have many requests at the same time? -- View this message in context: http://www.nabble.com/question-about-adding-%22synchronized%22-on-mountsOnPath-at-WebRequestCodingStrategy-tp21970542p21970542.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 handle this exception properly
Thank you all for usefull tips! -- Tony On Thu, Feb 12, 2009 at 1:51 AM, walnutmon justin.m.boy...@gmail.com wrote: getApplicationSettings().setInternalErrorPage(UniversalErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); Anton Veretennikov wrote: I don't have custom error page. Link to image: http://img3.imageshack.us/img3/2244/bb476f8ece2116133419587ba3.gif On Wed, Feb 11, 2009 at 10:22 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: your attachment got stripped, but i can imagine what it looks like. all runtime exceptions, wicket or not, are handled in the same way - redirect to the error page. do you have a custom error page? if you do - if your error page has an error then what you describe might happen. -igor On Wed, Feb 11, 2009 at 6:49 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Igor, Excuse me, but I really don't understand. I'm asking about how to show Wicket error page. I thought that throwing WicketRuntimeException will result in showing it. But I get SERVER error page. I attached an image to clarify matters. And error below is seen in Tomcat output, not in Wicket error page: ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: getOutputStream() has already been called for this response On Wed, Feb 11, 2009 at 5:20 AM, Marcelo Morales marcelomorales.n...@gmail.com wrote: On Tue, Feb 10, 2009 at 5:00 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: the status code and the error page are orthogonal. you should still see the standard error page, its just that it is returned with status 500. ... with a proper browser (a cent) -- Marcelo Morales - 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 - 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-handle-this-exception-properly-tp21929220p21959762.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
FormTester selectMultiple CheckBoxMultipleChoice help
I am trying to test the case where a user is changing the set of checked options for a CheckBoxMultipleChoice. When using FormTester.selectMultiple the new values are added rather than replacing the existing values. e.g. first pass: formTester.selectMultiple(checkboxMultipleChoice, new int {0, 3}; result: user has selected first and fourth items. second pass: formTester.selectMultiple(checkboxMultipleChoice, new int {1, 2}; result: user has selected first, second, third, fourth items (0, 1, 2, 3) desired (and to me, expected) result would be second and third items (1, 2) How do I get FormTester to unselect values? I see there is an inner class called FormTester.ChoiceSelector but it is protected and the one method that looks promising assignValueToFormComponent(FormComponent formComponent, java.lang.String value) is scant on description. I know I can look at the source code and extend this class, but this seems like an awkward solution for what appears to me to be a very common use case. Am I missing something simple? -- View this message in context: http://www.nabble.com/FormTester-selectMultiple-CheckBoxMultipleChoice-help-tp21971209p21971209.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