US: Wicket Dev hourly consulting fee
Hey Wicketers, For those of you located in US, what's the fair market hourly consulting fee you charge in 2018 / 2019?
Have a Heineken on me Wicket team!
Soon we will lunch a small little site for the new James Bond 007 movie and as some of you might now, he started drinking Heineken now-a-day :) http://hknbond-us.heineken.com/ Just wanted to thank the Wicket team for making such simple projects even easier !!! - ~ Thank you, p...@bors.ws -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Have-a-Heineken-on-me-Wicket-team-tp4672013.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TabbedPanel
At a first glimpse it looks okay. Not sure what you mean by your application terminating... but here's a working example for you to correct you page: http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.TabbedPanelPage;jsessionid=76A4F74BA9600E5D001006980818BB0A?0 On Sat, Nov 29, 2014 at 6:11 AM, K kondetiudayki...@gmail.com wrote: Hi I am trying to implement an example for tabbed panel page in wicket but it does not work. I have stripped off few methods that i thought were not necessary for my current scenario. I am not sure if i missed something. Please suggest. Mark-up: Tabbed Panel Page tabbedpanelpage.txt http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage.txt Java Code: Tabbed Panel Page tabbedpanelpage(1).txt http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabbedpanelpage%281%29.txt Mark-up: TabPanel1 (TabPanel2 TabPanel3 are same ) tabpanel1.txt http://apache-wicket.1842946.n4.nabble.com/file/n4668589/tabpanel1.txt My Log: Constructor: AbstractTab : 1 AbstractTab : 2 AbstractTab : 3 getPanel: 1 TabPanel1 my application terminates at this point. Thanks in advance. - K -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TabbedPanel-tp4668589.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- ~ Thank you, Paul Bors
Re: Wicket6 setResponsePage() stackoverflow error.
I'm no expert but it looks as if your filter from Liferay is looping calls into Wicket's filter and vice-versa. What's your web.xml config? On Tue, Nov 25, 2014 at 12:22 AM, Milind m.gaw...@maxxton.com wrote: Hello, I am using Liferay liferay-portal-6.2-ce-ga2 with Wicket6 and when setResponsePage(MyClass.class, params); is called it gives stackoverflow error. Does anyone came across similar error? http://www.liferay.com/community/forums/-/message_boards/message/45604006 http://www.liferay.com/community/forums/-/message_boards/message/45604006 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket6-setResponsePage-stackoverflow-error-tp4668538.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: GitHub
That's a GitHub question and not a Wicket one. Wrong mailing list. But here: https://help.github.com/articles/fork-a-repo/ 2014-11-13 20:58 GMT-05:00 Zala Pierre GOUPIL goupilpie...@gmail.com: Hi all, When I try and fork Wicket github repo, I don't get all the branches and tags. Does anyone has a clue regarding that? Cheers, Pierre -- Si le sang ne coule pas assez chaud dans tes veines, je le répandrai sur le sable pour qu'il bouille au soleil.
Re: PropertyModel / PropertyResolver / Map or List access
I think that should have worked as per: http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_2 Label label = new Label(firstChildName, new PropertyModel(person, children.0.name)); What version of Wicket are you using? On Thu, Nov 6, 2014 at 11:03 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, the javadoc of PropertyResolver says, map or list access is possible via keys or index. Accessing an map via key is no problem, but I dont get it working for lists and index. for instance: MyPage extends Page{ private IModelListAnything list; public MyPage(IModelListAnything list){ super(); this.list = list; add(new Label(mylabel, new PropertyModel(MyPage.this, list[1].anyProperty))); } } ends up in a Exception like this: Last cause: No get method defined for class: class MyPage$1 expression: 1 I also made a try with list.1.anyProperty. Not working... Any ideas? best regards Patrick
Re: PropertyModel / PropertyResolver / Map or List access
Create a quick-start, open a Jira ticket and provide a push request fixing it :) On Thu, Nov 6, 2014 at 11:38 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi Paul, v6.17.0. Maybe, I made a too reduced example. My property navigates further... its more like this: list[1].anyProperty[key] Is such a combination allowed? Patrick Am 06.11.2014 17:24, schrieb Paul Bors: I think that should have worked as per: http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_2 Label label = new Label(firstChildName, new PropertyModel(person, children.0.name)); What version of Wicket are you using? On Thu, Nov 6, 2014 at 11:03 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, the javadoc of PropertyResolver says, map or list access is possible via keys or index. Accessing an map via key is no problem, but I dont get it working for lists and index. for instance: MyPage extends Page{ private IModelListAnything list; public MyPage(IModelListAnything list){ super(); this.list = list; add(new Label(mylabel, new PropertyModel(MyPage.this, list[1].anyProperty))); } } ends up in a Exception like this: Last cause: No get method defined for class: class MyPage$1 expression: 1 I also made a try with list.1.anyProperty. Not working... Any ideas? best regards Patrick
Re: Modify items in quickview?
Are you talking about this QuickView? https://github.com/vineetsemwal/quickview On Thu, Oct 30, 2014 at 1:16 PM, Boris Goldowsky bgoldow...@cast.org wrote: How would you set things up to have the best of both worlds with a QuickView? I need to have (a) a button like an AjaxItemsNavigator that adds additional elements to the QuickView without repainting the entire view, AND (b) some AJAX operations that change the entire content of the QuickView – for example, they can change the data provider. If I use the ReuseAllStrategy I can’t determine how to accomplish (b). Other item reuse strategies don’t seem to allow (a). Does a custom item reuse strategy with a “reset” method make sense or is there a better way? Boris
Re: Unit testing RadioChoice with AjaxFormComponentUpdatingBehavior
Since you want to test a AjaxFormComponentUpdatingBehav ior and not a standard form component (non-ajax) you don't use formTester.selectRadioChoice( propertyType, 2 ) you have to create the AjaxTarget and etc. See Testing AJAX behaviors section at: http://wicket.apache.org/guide/guide/testing.html On Thu, Oct 30, 2014 at 4:27 PM, Andrea Del Bene an.delb...@gmail.com wrote: On 30/10/14 21:08, Nick Pratt wrote: Wicket 6.17.0 I have a RadioChoice (in a Form) that has an attached AjaxFormComponentUpdatingBehavior. The onUpdate() method of the Behavior fires an event for other components on the page to update (change visibility depending on user selection in radio choice). Im trying to unit test it using: formTester.selectRadioChoice( propertyType, 2 ); I guess that's a typo :) or are you using a custom formTester? and then I'm trying to trigger the behavior to fire so that I can check that the various components are visible/invisible: Component component = baseTester.getComponentFromLastRenderedPage( form:propertyType ); for ( Behavior b : component.getBehaviors() ) { if ( b instanceof AjaxFormComponentUpdatingBehavior ) { baseTester.executeBehavior( (AbstractAjaxBehavior) b ); } } However, I'm running in to this when the behavior is executed: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedEx ception: Behavior rejected interface invocation. Is it possible to unit test this specific behavior, and am I going about this the right way? I've verified that the application works as expected in a browser. BTW, multiple-choice component should use AjaxFormChoiceComponentUpdatingBehavior instead of AjaxFormComponentUpdatingBehavior. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get this URL pattern working in newer versions of Wicket?
Check out Wicket's source code and put a break point then follow through :) On Tue, Oct 7, 2014 at 2:09 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi Paul, Yeah the UUID will change in different placements of the app, I was just trying to get this particular instance working :) Just wondering why it didn't work, given that UUID? The UUID is correct for this placement and the URL it generated was correct though it kept redirecting until the browser stopped it. cheers, Steve On Tue, Oct 7, 2014 at 3:49 AM, Paul Bors p...@bors.ws wrote: Hey Steve, You should not mount it yourself given the long session ID of 'a79c7348-6c8b- 4912-8cc7-3b4419344f7f' since that will change anyhow. To understand how Wicket handles the URL mapping see the user guide's Chapter 10 Wicket Links and URL generation at: http://wicket.apache.org/guide/guide/single.html#urls I guess you want to provide your own IMapperContext? On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi all, I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6 I've found an inconsistency in the way URLs are handled, specifically in the inmethod data grid but also the editable data grid. I have a particular context path that I need to maintain as the webapp rendering is inside a portal type framework. I have taken the example webapps from both 1.4 and 6 and customised them so they run in the framework. In Wicket 1.4, the page is mounted like: mount(new HybridUrlCodingStrategy(/data-grid/editable, EditableDataGridPage.class)); and works fine. The URL is: http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 In Wicket 6, the page is mounted as: mount(/data-grid/editable, EditableDataGridPage.class); ... getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, pageClass)); and it does not work. It strips my leading context bits (/portal/tool/UUID). I tried to mount it myself: mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f, EditableDataGridPage.class); But that goes into an infinite redirect loop if I mount it to the webapp I want. If I mount it to a non wicket webapp, then that mount works fine. I am not sure how to restore the old URL mapping strategy. Can anyone help? thanks, Steve
Re: alternative solution for addOrReplace()?
Why not use Ajax? addOrReplace() is really for when you need the full request cycle and have the page rendered on the server side. With Ajax you get your target for which you can add all the components you want to refresh on the page. Given the day and age we live in, I don't think there is a need to even worry about browsers that do not support Ajax. Than again, that depends on your product's requirements. Otherwise, you can keep on using addOrReplace() but stop using instaceof and start using Generics. If you need an example code-snippet of that let me know and I'll dig some out for you. On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, I have a panel, which renders a inner markupcontainer (different panels for different ways of displaying my model object) depending on its model objects type. I do this by addOrReplace() the inner panel in an onConfigure() having an if instanceof; and it also iterates over a list... I'm not sure, if it is a good solution (I dont like the instanceof approach), but the panel works quite good for ajax rendering and refreshing use-cases. But, the addOrReplace() has one big disadvantage. It forces to detach the model on each iteration, so on each iteration I get a database access to retrieve it again. Is there anyway to keep the model attached until the entire request cycle is finished? Or should I try to find complete other solution for this kind of high dynamic iterating panel? Is it better to use e.g. Fragments to display a model object in different ways depending on its state? Please give some inspirations... I ran out of ideas. Help! kind regards :-) Patrick - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Could not clear select2Choice component model value.
You can also ask the developer via: https://github.com/ivaynberg/wicket-select2/issues You should probably take a look over the open issues so that you are familiar with that other developers faced. Maybe one of those issues might be a road block for you? Although you will get a faster reply from Igor or another Wicket developer via this list :) On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, You should call formComponent.clearInput() too. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian madas...@mcruncher.com wrote: This is regarding wicket-select2 project. I could not find any mailing list for this project. That is why sending here. Please some one help me. I have created clear link to clear the form input values. After click the clear link, all components values are cleared except Select2Choice component. Here with attached quickstart to recreate this problem. Follow below steps to recreate this problem * Download attachment and extract it. * cd select2-quickstart. * Then execute mvn clean package jetty:run * Type localhost:8080 in browser * Give the input to name and country field. * Click clear link Now name(*TextField*) field value is cleared and country(*Select2Choice*) field value is not cleared. -- Thanks and regards Madasamy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Could not clear select2Choice component model value.
Can you update this issue then? https://github.com/ivaynberg/wicket-select2/issues/93 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik solomax...@gmail.com wrote: we recently moved this component to wicketstuff: https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent to get Wicket7 compatible version On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote: You can also ask the developer via: https://github.com/ivaynberg/wicket-select2/issues You should probably take a look over the open issues so that you are familiar with that other developers faced. Maybe one of those issues might be a road block for you? Although you will get a faster reply from Igor or another Wicket developer via this list :) On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, You should call formComponent.clearInput() too. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian madas...@mcruncher.com wrote: This is regarding wicket-select2 project. I could not find any mailing list for this project. That is why sending here. Please some one help me. I have created clear link to clear the form input values. After click the clear link, all components values are cleared except Select2Choice component. Here with attached quickstart to recreate this problem. Follow below steps to recreate this problem * Download attachment and extract it. * cd select2-quickstart. * Then execute mvn clean package jetty:run * Type localhost:8080 in browser * Give the input to name and country field. * Click clear link Now name(*TextField*) field value is cleared and country(*Select2Choice*) field value is not cleared. -- Thanks and regards Madasamy - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- WBR Maxim aka solomax
Re: alternative solution for addOrReplace()?
I think you might have over-complicated your design. Your use-case is quite simple, you have user input that filters the display. It might be that there are a lot of panels to be updated but then again it should be simple to update the parent which in turn delegates that responsibility to the children. Take a quick look over how Decebal implemented his Wicket-Dashboards as in his project the entire dashboard is refreshed when adding a new panel which in turn can be quite complicated. His code and examples are at: https://github.com/decebals/wicket-dashboard Study his design and see how much of that you can apply to your page. Otherwise I suggest you get rid of the addOrReplace() and move that logic into your onBeforeRender() methods for those panels to update themself. On Tue, Oct 7, 2014 at 12:43 PM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi Paul, thanx for replying. Oh, I use Ajax very heavily in this case. Thats why I said: the panel works quite good for ajax rendering and refreshing use-cases Hmm... ok... I think I missed some details. I try to explain. My page contains two sections seperated from each other. A kind of data-entry and a kind of displaying the results. The section which displays the results is a quite complicated panel, having an RefreshingView for about 30 (I will name them) sub-panels. These sub-panels addOrReplace() an inner container while rendering itself. And the replacement depends on my model object type. So, my sub-panel class has a hugh knowledge about how to render the results. On entering some data on the data-entry section I refresh the whole panel in the display section with all its sub-panels using Ajax. And this works great. Some of the sub-panels also rerender/refresh own there own, by listening to events etc pepe. All this behaviours are working very well. The only disadvantage is, using addOrReplace(), I have a heavy detaching/attaching situation and a performance problem. So, the best solution for now would be, keeping my panel implementation as it is, but just having my models detached only once, not for iteration. And here I dont have any idea how to solve that... :-/ thanx and kind regards Patrick Am 07.10.2014 17:52, schrieb Paul Bors: Why not use Ajax? addOrReplace() is really for when you need the full request cycle and have the page rendered on the server side. With Ajax you get your target for which you can add all the components you want to refresh on the page. Given the day and age we live in, I don't think there is a need to even worry about browsers that do not support Ajax. Than again, that depends on your product's requirements. Otherwise, you can keep on using addOrReplace() but stop using instaceof and start using Generics. If you need an example code-snippet of that let me know and I'll dig some out for you. On Tue, Oct 7, 2014 at 9:51 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, I have a panel, which renders a inner markupcontainer (different panels for different ways of displaying my model object) depending on its model objects type. I do this by addOrReplace() the inner panel in an onConfigure() having an if instanceof; and it also iterates over a list... I'm not sure, if it is a good solution (I dont like the instanceof approach), but the panel works quite good for ajax rendering and refreshing use-cases. But, the addOrReplace() has one big disadvantage. It forces to detach the model on each iteration, so on each iteration I get a database access to retrieve it again. Is there anyway to keep the model attached until the entire request cycle is finished? Or should I try to find complete other solution for this kind of high dynamic iterating panel? Is it better to use e.g. Fragments to display a model object in different ways depending on its state? Please give some inspirations... I ran out of ideas. Help! kind regards :-) Patrick - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mapping two UI componets to Single Model
Please reffer to the free user guide, section 12.9 Creating complex form components with FormComponentPanel at: http://wicket.apache.org/guide/guide/single.html#forms2_9 In short you need to create your own compound FormComponentPanel that encapsulates both from components and accepts a single model. Then you would take that model and pass each individual part of it to the corresponding form component you want. On Mon, Oct 6, 2014 at 3:50 AM, manoj kumar malathkarma...@gmail.com wrote: Yes Sebastien it is related to my previous post. Actually we are using this for adding filters for a Report, where each filter is a Row consisting of: for ex: a Report might be on the Employee Table. where user could add a filter as: Attribute OperatorValue Editor Department IN In this case it is Multi Select DOB EQ DateTimeField EmpName LIKEtextField joining dateBetween DateTimeFeild1 DateTimeField2. There are Two Drop downs one for a attribute of a report and a value Editor: Based on The Attribute selected: 1. The Value Editor is changed to either text Field, Date or multi select also 2. The List of the Operators allowed for that attribute is shown. 3. Now We have added the Between Operator for the Date attributes. For Date we are using org.apache.wicket.extensions.yui.calendar.DateTimeField. which only accepts the Single date model object. so my Question is when between is checked i will show two DateTimeFields, and these two should map to a Single Model object, is this possible? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Mapping-two-UI-componets-to-Single-Model-tp4667796p4667829.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get this URL pattern working in newer versions of Wicket?
Hey Steve, You should not mount it yourself given the long session ID of 'a79c7348-6c8b- 4912-8cc7-3b4419344f7f' since that will change anyhow. To understand how Wicket handles the URL mapping see the user guide's Chapter 10 Wicket Links and URL generation at: http://wicket.apache.org/guide/guide/single.html#urls I guess you want to provide your own IMapperContext? On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg steve.swinsb...@gmail.com wrote: Hi all, I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6 I've found an inconsistency in the way URLs are handled, specifically in the inmethod data grid but also the editable data grid. I have a particular context path that I need to maintain as the webapp rendering is inside a portal type framework. I have taken the example webapps from both 1.4 and 6 and customised them so they run in the framework. In Wicket 1.4, the page is mounted like: mount(new HybridUrlCodingStrategy(/data-grid/editable, EditableDataGridPage.class)); and works fine. The URL is: http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 In Wicket 6, the page is mounted as: mount(/data-grid/editable, EditableDataGridPage.class); ... getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, pageClass)); and it does not work. It strips my leading context bits (/portal/tool/UUID). I tried to mount it myself: mountPage(/a79c7348-6c8b-4912-8cc7-3b4419344f7f, EditableDataGridPage.class); But that goes into an infinite redirect loop if I mount it to the webapp I want. If I mount it to a non wicket webapp, then that mount works fine. I am not sure how to restore the old URL mapping strategy. Can anyone help? thanks, Steve
Re: how to handle null pointer exception while submit button
Must be the wrong mailing list, ignore :) On Sun, Oct 5, 2014 at 11:15 PM, Warren Bell warr...@clarksnutrition.com wrote: OK, a little confused, AWT, Applet ? Is Wicket up to something I haven’t heard about ? Warren On Oct 5, 2014, at 7:57 PM, Taught by SM qaidjoharbarbh...@gmail.com wrote: This code will help to handle exceptions when there is a single TextField: import java.awt.*; import java.awt.event.*; import java.applet.*; /* applet code=throwsDemo.class height=250 width=300 /applet */ class FieldZeroException extends Exception { FieldZeroException() { } public String toString() { return Text field is empty.; } } public class throwsDemo extends Applet implements ActionListener { Button b1; TextField tf1,tf2; Label l1,l2; public void init() { setLayout(new FlowLayout(FlowLayout.LEFT)); l1=new Label(NULL); l1.setForeground(Color.RED); l2=new Label(); l2.setForeground(Color.GREEN); tf1=new TextField(10); b1=new Button(Check); add(tf1); add(b1); add(l1); add(l2); b1.addActionListener(this); } public void actionPerformed(ActionEvent ae) { if(ae.getSource()==b1) { String str1=tf1.getText(); int i=str1.length(); try { if(i==0) { throw new FieldZeroException(); } else { l1.setText(Success); } } catch(FieldZeroException fze) { l1.setText(fze.toString()); } } } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-handle-null-pointer-exception-while-submit-button-tp4666392p4667826.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- This email was Virus checked by Clark's Nutrition's Astaro Security Gateway. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Transpose html table
If you want to transpose your table (ie: change the rows and columns) then it turn this implies that you want to change the structure of the table both the format and the model. ie: You need to provide new columns and new data model. You would do so in 2 steps: 1) Create the new table with the new columns 2) Provide it the new data model Then use the addOrReplace(tableId, transposedTableRef) and you're done. Otherwise... look at transposing your table in jQuery alone on the client side and not on the server side. On Fri, Oct 3, 2014 at 11:53 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! We have a html table in wicket implemented as: foreach :: listview of table rows { .. foreach :: list view of table cells { .. } } (note: that was pseudocode) What we would like to do, is offer users possibility to transpose the table, however, with minimum changes to the code. Anybody done this? Any insights? We acknowledge that there are some inherent differences in the transposed versions of a html table. For example table rows can be ajax updated but table columns cannot. This might suggest that a div suitable layout should be used? Or should we simply ajaxRequestTarget.addComponent(xx::foreach::firstChildOfRow) visit each first child of '*row*' when transposed? Maybe the transpose could be done using a simple onrender string replace operation (think along the lines of a *complex regexp operation*). Any ideas, comments? Would be nice to accomplish this with a neat trick... NOT looking for a js gimmick because that will be slow with our heavy duty tables. Some references: - http://assaneonline.blogspot.fi/2011/02/looking-for-simpler-way-to-transpose.html - http://adomas.eu/transposing-html-table-even-with-colspan-and-rowspan-used-with-jquery-javascript-code/ ** Martin
Re: AuthenticatedWebSession.authenticate() not being called
Irrespective of the UI, have your read through http://wicket.apache.org/learn/projects/authroles.html ? Most likely the wicket-auth-roles login page is using one of the documented annotations that makes all the difference for you. Try to place that annotation on your page (I haven't read your code...) On Wed, Sep 17, 2014 at 5:20 AM, Lucio Crusca lu...@sulweb.org wrote: I've moved one step forward: the authenticate() method now gets called if I use the SignInPage class included in wicket-auth-roles instead of my own SignInPage. However, as you can see in the code I posted yesterday, my SignInPage is very simple and, compared to the one bundled with wicket, it only has a additional Label and some minor html differences. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ComponentNotFoundException when googlebot scrapes wicket page
Well, you have the wicket component tree path to what's not found: titleBar:menu:2:link The 3rd (index 2) menu link was missing at the point your page was rendered. Start thinking about how your 'menu' component could miss that from the mode. Or perhaps someone used the back-page button and your page was not in the page store? On Tue, Sep 16, 2014 at 3:42 AM, Robert Gründler rob...@dubture.com wrote: Hi, we’ve a very odd problem and are somewhat stuck, maybe someone here on the list has seen this sort of behaviour before. We’ve deployed a small wicket app (4 pages) to a tomcat7 server and all 4 pages work just fine on the live system. However, when googlebot scrapes the pages, we see ComponentNotFound exceptions: ComponentNotFoundException: Could not find component 'titleBar:menu:2:link' on page XYZ We’ve tried to fetch the page as google bot from the webmaster tools, but the exception is not being triggered either. No matter how we request the page, we cannot reproduce this exception. Only 2 or 3 times a day when the bot indexes us, we see this in the logs. We’ve also made sure the pages are stateless using the @StalessComponent annotation in combination with the StatelessChecker listener. Has anyone an idea what could cause this? thanks! -robert
Re: ComponentNotFoundException when googlebot scrapes wicket page
ie: How do you create the menu links? Where does the model come from and are those links dynamic? On Tue, Sep 16, 2014 at 11:15 AM, Paul Bors p...@bors.ws wrote: Well, you have the wicket component tree path to what's not found: titleBar:menu:2:link The 3rd (index 2) menu link was missing at the point your page was rendered. Start thinking about how your 'menu' component could miss that from the mode. Or perhaps someone used the back-page button and your page was not in the page store? On Tue, Sep 16, 2014 at 3:42 AM, Robert Gründler rob...@dubture.com wrote: Hi, we’ve a very odd problem and are somewhat stuck, maybe someone here on the list has seen this sort of behaviour before. We’ve deployed a small wicket app (4 pages) to a tomcat7 server and all 4 pages work just fine on the live system. However, when googlebot scrapes the pages, we see ComponentNotFound exceptions: ComponentNotFoundException: Could not find component 'titleBar:menu:2:link' on page XYZ We’ve tried to fetch the page as google bot from the webmaster tools, but the exception is not being triggered either. No matter how we request the page, we cannot reproduce this exception. Only 2 or 3 times a day when the bot indexes us, we see this in the logs. We’ve also made sure the pages are stateless using the @StalessComponent annotation in combination with the StatelessChecker listener. Has anyone an idea what could cause this? thanks! -robert
Re: Referencing DataTable rows within the table column header
Hey Ephraim, At Knoa for the console code I created an API around those components. You don't have to re-invent the wheel, all you have to do is get familiar with the console commons and which DropDown component to use. Remember wicket is a component driven framework similar to Swing. I would recommend using one of the Ajax enabled drop downs and override the method to refresh the data table rows of interest. There are plenty of examples in the console's code base... look at how other table such as the ones for the End User attributes are refreshed or how the edit button in a table cell will turn the table row into form components. Use the same principle. Also, if this is just a filter toolbar, then look at how other Ajax filter toolbars work and you won't loos focus of the drop down since it's Ajax that does the refresh. If you are to re-implement this from scratch and re-invent the wheel you can also but I won't recommend it. Just look over the current available components in your commons API and use the appropriate one, or extend it and make it do what you need. Martin was referring to the event mechanism build in Wicket documented in the Wicket Guide at: http://wicket.apache.org/guide/guide/single.html#advanced_1 But for a simple filter toolbar you don't need to get that complicated. ~ Have fun, Paul Bors On Tue, Sep 9, 2014 at 12:29 PM, Ephraim Rosenfeld erosenf...@knoa.com wrote: Hi Martin: Thank you for your quick response. I was initially updating the entire table, but that was causing me to lose focus from the drop-down menu in which I made the selection. Also, my hope was that I could update as few row items/components as possible, thereby expediting the table-refresh process. When you mention 'Wicket's Event System', are you referring to inter-component events, like the example portrayed here: http://savicprvoslav.blogspot.com/2012/06/wicket-15-inter-component-events.html Regards, - Ephraim -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, September 09, 2014 12:10 PM To: users@wicket.apache.org Subject: Re: Referencing DataTable rows within the table column header Hi, Why don't you update the table itself ? This will update all its children components too. Otherwise I'd use Wicket's Event system to send a notification to all interested parties. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Sep 9, 2014 at 7:01 PM, Ephraim Rosenfeld erosenf...@knoa.com mailto:erosenf...@knoa.com wrote: Hello All, I am creating a table with a DropDownChoice component in the header of one of the columns. When a selection is made in the drop down in the column header, I want to update all of the rows in the table. Would the following snippet be the best approach to reference each row Item component from the column header, or is there an alternative to using the get() method? Thank you in advance, - Ephraim WebMarkupContainer container = ((WebMarkupContainer)dropDownChoice.findParent(DataTable.class).get(1)); DataGridView gridView = (DataGridView)container.get(0); for(int i = 0; i NUM_OF_ROWS; i++) { Item item = (Item)gridView.get(i); // do row updates }
Re: Referencing DataTable rows within the table column header
Another piece of advice, Avoid unnecessary casts (Wicket 6 supports generics) and try not to use code to navigate the wicket component tree unnecessary like this line of code: WebMarkupContainer container = ((WebMarkupContainer) dropDownChoice.findParent(DataTable.class).get(1)); Get familiar with the best practices documented at: http://wicket.apache.org/guide/guide/single.html#bestpractices You should give the free guide a read back to back and treat it as your bible until you get a bit more intimate with Wicket :) Other resources available for you to learn and master Wicket are the Wicket Stuff (http://wicketstuff.org/) and the examples at: http://www.wicket-library.com/wicket-examples-6.0.x/index.html Get familiar to those as well. For a filter toolbar see: http://www.wicket-library.com/wicket-examples-6.0.x/repeater/wicket/bookmarkable/org.apache.wicket.examples.repeater.DataTableFilterToolbarPage;jsessionid=03E1374082C8198F0F052CED6E54F7A1?0 Although is not using a drop-down but you'll get the idea :) ~ Thank you, Paul Bors On Tue, Sep 9, 2014 at 2:57 PM, Paul Bors p...@bors.ws wrote: Hey Ephraim, At Knoa for the console code I created an API around those components. You don't have to re-invent the wheel, all you have to do is get familiar with the console commons and which DropDown component to use. Remember wicket is a component driven framework similar to Swing. I would recommend using one of the Ajax enabled drop downs and override the method to refresh the data table rows of interest. There are plenty of examples in the console's code base... look at how other table such as the ones for the End User attributes are refreshed or how the edit button in a table cell will turn the table row into form components. Use the same principle. Also, if this is just a filter toolbar, then look at how other Ajax filter toolbars work and you won't loos focus of the drop down since it's Ajax that does the refresh. If you are to re-implement this from scratch and re-invent the wheel you can also but I won't recommend it. Just look over the current available components in your commons API and use the appropriate one, or extend it and make it do what you need. Martin was referring to the event mechanism build in Wicket documented in the Wicket Guide at: http://wicket.apache.org/guide/guide/single.html#advanced_1 But for a simple filter toolbar you don't need to get that complicated. ~ Have fun, Paul Bors On Tue, Sep 9, 2014 at 12:29 PM, Ephraim Rosenfeld erosenf...@knoa.com wrote: Hi Martin: Thank you for your quick response. I was initially updating the entire table, but that was causing me to lose focus from the drop-down menu in which I made the selection. Also, my hope was that I could update as few row items/components as possible, thereby expediting the table-refresh process. When you mention 'Wicket's Event System', are you referring to inter-component events, like the example portrayed here: http://savicprvoslav.blogspot.com/2012/06/wicket-15-inter-component-events.html Regards, - Ephraim -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Tuesday, September 09, 2014 12:10 PM To: users@wicket.apache.org Subject: Re: Referencing DataTable rows within the table column header Hi, Why don't you update the table itself ? This will update all its children components too. Otherwise I'd use Wicket's Event system to send a notification to all interested parties. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Sep 9, 2014 at 7:01 PM, Ephraim Rosenfeld erosenf...@knoa.com mailto:erosenf...@knoa.com wrote: Hello All, I am creating a table with a DropDownChoice component in the header of one of the columns. When a selection is made in the drop down in the column header, I want to update all of the rows in the table. Would the following snippet be the best approach to reference each row Item component from the column header, or is there an alternative to using the get() method? Thank you in advance, - Ephraim WebMarkupContainer container = ((WebMarkupContainer)dropDownChoice.findParent(DataTable.class).get(1)); DataGridView gridView = (DataGridView)container.get(0); for(int i = 0; i NUM_OF_ROWS; i++) { Item item = (Item)gridView.get(i); // do row updates }
Re: Foundation integrated in wicket
Right, that’s all custom to your web app. Suppose I want to take your SASS and apply it to my form field, more precisely a Wicket class. Suppose I want to be able to “theme” the entire look-n-feel of the web app and only have to customize the theme and not the entire product. That’s what I mean. On Aug 7, 2014, at 10:15 AM, vp143 vishal.po...@cipriati.co.uk wrote: I am not sure I understand what you are after... I do not have anything on GitHub. I used SASS to install and compile my sass files and put my js files in my webapp directory. Let me know if you have any specific questions. Regards Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Foundation-integrated-in-wicket-tp4666792p4666936.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Foundation integrated in wicket
I guess this doesn’t matter as long as one uses a theme outside of wicket. n/m On Aug 9, 2014, at 2:13 PM, Paul Bors p...@bors.ws wrote: Right, that’s all custom to your web app. Suppose I want to take your SASS and apply it to my form field, more precisely a Wicket class. Suppose I want to be able to “theme” the entire look-n-feel of the web app and only have to customize the theme and not the entire product. That’s what I mean. On Aug 7, 2014, at 10:15 AM, vp143 vishal.po...@cipriati.co.uk wrote: I am not sure I understand what you are after... I do not have anything on GitHub. I used SASS to install and compile my sass files and put my js files in my webapp directory. Let me know if you have any specific questions. Regards Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Foundation-integrated-in-wicket-tp4666792p4666936.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Mailbox component
Suppose you take the jQuery Table and style it something like this (in a responsive web 'theamable' manner): http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/ Suppose you integrate it in Wicket and have it functional and suppose you want the following basic features implemented: * SMTP/POP and IMAP support * Properties or settings screen to configure the basics * Add Star / Unstar Messages * Delete Single Message * Delete Multiple Messages * Mark as Read * Mark as Unread One would have to handle a pretty good abstraction of the actual interaction with the mail server which might or might not support all those features. And if a feature is not supported it should be disabled. I think this is at least a week's effort. On Wed, Jul 30, 2014 at 1:35 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Pierre, Hi, I have rolled out something like that for a private application. I'm not sure how configurable/complete it is at the moment. I would not be against open sourcing it. On Wed, Jul 30, 2014 at 3:43 AM, Pierre Goupil goupilpie...@gmail.com wrote: Good evening, Does anyone know about a mailbox component, please? I'm looking for something to allow my users send and browse private messages through my webapp. And I'd be surprised that there is no good open-source components to do that out there. Any suggestion? Thanks in advance, Pierre -- Regards - Ernesto Reinaldo Barreiro
Re: wicket-select2 - adding sub categories seen in select2
Your question is better asked on that project’s mailing list at: https://groups.google.com/forum/#!forum/select2 Or if you prefer on the wicket-select2 project mailing list at: https://github.com/ivaynberg/wicket-select2/issues (this is actually the bug tracker) ~ Thank you, Paul Bors On Jul 7, 2014, at 6:43 AM, Vishal Popat vishal.po...@cipriati.co.uk wrote: Hi, Is it possible to add categories to the lists in wicket-select2 like seen in http://ivaynberg.github.io/select2/#basics (The Time Zone labels)? Also is it possible to add functionality like the flag images as well? Regards Vishal
Re: HTML headings
I can’t view your HTML in my email client, but here’s a quick example of what I think you’re asking for: HTML: html xmlns:wicket=http://wicket.apache.org; wicket:panel span wicket:id=label[[label]]/spaninput wicket:id=textField type=text onkeypress=return suppressEnterKey(event) onkeydown=return suppressEnterKey(event) /wicket:panel /html Java: import java.util.Collections; import java.util.Iterator; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.form.OnChangeAjaxBehavior; import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings; import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.TextField; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.IModel; public class LabeledEditTextFieldT extends Panel { private boolean editable; private Label label; private TextFieldT textField; public LabelEditTextField(String id, IModelString labelModel, IModelT textFieldModel) { this(id, labelModel, textFieldModel, false); } /** * Create a {@link Label} that can turn into an {@link AutoCompleteTextField} * if the bautoCompleteChoices/b is not codenull/code. * * @param id{@link Component} id * @param labelModel{@link IModel} to use for the {@link Label} * @param textFieldModel{@link IModel} to use for the {@link AjaxTextField} or the {@link AutoCompleteTextField} * @param autoCompleteTextField codetrue/code if an {@link AutoCompleteTextField} is to be used in which case you * must override {@link #getAutoCompleteChoices(String)}. codefalse/code is a simple * {@link AjaxTextField} is to be used. */ public LabelEditTextField(String id, IModelString labelModel, IModelT textFieldModel, boolean autoCompleteTextField) { super(id); label = new Label(label, labelModel); textField = (autoCompleteTextField) ? new AutoCompleteTextFieldT(textField, textFieldModel, new AutoCompleteSettings().setPreselect(false)) { @Override protected Iterator getChoices(String input) { return getAutoCompleteChoices(input); } } : new AjaxTextFieldT(textField, textFieldModel) { @Override public void doAjaxUpdates(AjaxRequestTarget target) { LabelEditTextField.this.ajaxCallback(target); } @Override public void doAjaxUpdatesOnError(AjaxRequestTarget target) { LabelEditTextField.this.ajaxCallbackOnError(target); } }; if(autoCompleteTextField) { textField.add(new OnChangeAjaxBehavior() { @Override public void onUpdate(AjaxRequestTarget target) { LabelEditTextField.this.ajaxCallback(target); } @Override public void onError(AjaxRequestTarget target, RuntimeException re) { LabelEditTextField.this.ajaxCallbackOnError(target); } }); } adjustVisibility(); add(label); add(textField); } /** * Provides list of auto-complete choices for the AutoCompleteTextField. * * @param input User input * @return Iterator to the list of auto-complete choices based on the user input. */ protected IteratorString getAutoCompleteChoices(String userInput) { ListString emptyList = Collections.emptyList(); return emptyList.iterator(); } private void adjustVisibility() { if(isEditable()) { label.setVisible(false); textField.setVisible(true); } else { label.setVisible(true); textField.setVisible(false); } } /** * Toggle between the view mode and the edit mode. * * @param editable codefalse/code by default if the Label is to be displayed, * codetrue/code if the Text Field is to be displayed. */ public void setEditable(boolean editable) { this.editable = editable; adjustVisibility(); } public TextFieldT getEditComponent() { return this.textField; } public boolean isEditable() { return this.editable; } public void ajaxCallback(AjaxRequestTarget target) { // Optionally overridden by subclasses } public void ajaxCallbackOnError(AjaxRequestTarget target) { // Optionally
Re: Can I process a POST with simple non-Json parameters using wicket-restannotations
I think you might be looking for the query parameters of the http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/Request.html class. See Chapter 9 of the Wicket Guide: http://wicket.apache.org/guide/guide/single.html#requestProcessing You can get to the Request from any of the Components on your page. Thus you can have a bookmarkable URL and in the constructor of that page you can grab the request and extract the parameters from it. Do you care if the request is POST or GET? Wicket abstracts that out for you via the query parameters. ~ Thank you, Paul Bors On Aug 5, 2014, at 5:07 PM, Bruce Lombardi brlom...@gmail.com wrote: Hi, I have successfully setup a restful service using Wicketstuff wicket-restannotation that accepts Json parameters. But I need to write something in Wicket that will accepts a post of an order confirmation from another source that does not use Json. Is there a simple way of doing that with wicket-restannotations? I only see how to process Json. I know that Json standard for a restful service, so I may have to do something else, like using @MountPath and pulling the parameters out of the request. Bruce
Re: Mailbox component
This is Wicket not GMail :) Perhaps you could write your own? Integrate something like this in your own page/panel (or ask Google for a better one): http://w3lessons.info/2013/05/13/gmail-style-message-inbox-design-with-jquery-css/ Then you can use templates to send those e-mails: http://www.wicket-library.com/wicket-examples/mailtemplate/ I haven't tried any of this so you're on your own. Please refrain from asking such general question in this mailing list. If you have a specific Wicket question, then by all means start a new topic/thread/post. On Tue, Jul 29, 2014 at 9:43 PM, Pierre Goupil goupilpie...@gmail.com wrote: Good evening, Does anyone know about a mailbox component, please? I'm looking for something to allow my users send and browse private messages through my webapp. And I'd be surprised that there is no good open-source components to do that out there. Any suggestion? Thanks in advance, Pierre
Foundation integrated in wicket
Has anyone integrated Foundation from http://foundation.zurb.com/ in Wicket? Each time I search for it the search engine comes back to Apache's Wicket Foundation :)
Re: Custom Pagination
You're half way home. You extended PagingNavigator but forgot to read its code. See line 150 of PagingNavigator or better said the newNavigation() method: /** * Create a new PagingNavigation. May be subclassed to make us of specialized PagingNavigation. * * @param id *The id of the navigation component * @param pageable *the pageable component * @param labelProvider *The label provider for the link text. * @return the navigation object */ protected PagingNavigation newNavigation(final String id, final IPageable pageable, final IPagingLabelProvider labelProvider) { return new PagingNavigation(id, pageable, labelProvider); } In your class, override that factory method to return the type of PagingNavigation you want. Also, get more familiar with that component's code. Read and understand how those classes are related to each other: https://github.com/apache/wicket/tree/442932d4e4c5cc27940bc2ef956cb24c1ba54df0/wicket-core/src/main/java/org/apache/wicket/markup/html/navigation/paging On Fri, Jun 27, 2014 at 6:44 AM, K kondetiudayki...@gmail.com wrote: Hey sven thanks for the reply i have resolve the issue now i have been trying to trying to implement something like (textbox) of (totalnumberofpages) any suggestions on this - K -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Custom-Pagination-tp4666387p4666397.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback/Error message.
Have a look at the Sortable DataTable: https://cwiki.apache.org/confluence/display/WICKET/Simple+Sortable+DataTable+Example It has a build in message for when there are no results matching your filter or the model is empty. You can override it to display your own custom message as well. On Sat, Jun 21, 2014 at 9:11 AM, K kondetiudayki...@gmail.com wrote: Hi I am trying to build a web application in which i have to display list of items on search... this part has been done but i have to add a errror message in the same page if the search result comes out null... I am using DataView for displaying the results. using condition in java is simple but for the unreachable id that i mention in condition the mark up is not being rendered if the condition is true. any help is well appriciated... Thanks - K -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Feedback-Error-message-tp1874404p4666330.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax Form Submit via jquery plugin / javascript
Instead of calling form.submit() from your jQuery, call ${‘#someButtonID’}.click() or whatever, then register your event under the button’s onClick in Wicket. You can have that button shared, or you can write your own Behavior to submit the form via a hidden button (i.e.: X and Y coordinates set to negative so it’s way off the page as well as its display property set to hidden). Those are just couple of ideas. On Jun 13, 2014, at 11:45 AM, vp143 vishal.po...@cipriati.co.uk wrote: Paul Bors wrote http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html Ajax event behavior that submits a form via ajax when the event it is attached to, is invoked.” You’re attaching the submit event so who fires that? You are right, I missed that but I am still a little stumped on what to do. I am assuming the form gets submitted when calling jQuery(#selectionForm).submit() I was assuming this part add(new AjaxFormSubmitBehavior(this, onsubmit) { would be waiting for the submit of the form and then get executed. Have I understood correctly? What am I missing? Regards Vishal -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666257.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called [PARTIALLY SOLVED]
How about an AjaxBehavior with the onChange event? On Jun 11, 2014, at 9:10 AM, Lucio Crusca lu...@sulweb.org wrote: Martin was right, there were Javascript errors, but for some reason the webconsole didn't display them the first time I looked at it. However the problem is only partially solved. onUpdate() now gets called, but only when the TextField looses focus. I need it to be called on every single keypress... is there anything I should do for that? - 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: Newbie question : How do I display a tabbed list vertically rather than horizontally?
Extend the Wicket class you want like the AjaxTabbedPanel in Java (Model and Controller) and change the HTML (viewer) as you please. You would need access to Wicket’s source code thus if you use Maven see the sources classifier at: http://maven.apache.org/pom.html Perhaps your IDE (Eclipse, Netbeans, IntelliJ IDEA, etc) is already configured to view the sources of your project’s dependencies. If not download the sources manually from maven central or view the source code in the right branch online at GitHub: https://github.com/apache/wicket/tree/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tabs Note the TabbedPanel.html contents: wicket:panel xmlns:wicket=http://wicket.apache.org; div wicket:id=tabs-container class=tab-row ul li wicket:id=tabsa href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a/li /ul /div div wicket:id=panel class=tab-panel!-- no panel --/div /wicket:panel So create your own VerticalTabbedPanel.html and change the HTML mark-up to say a table but preserve the wicket:id hierarchy: html xmlns:wicket=http://wicket.apache.org; wicket:panel table width=100% border=0 cellpadding=0 cellspacing=0 tr valign=top td valign=top nowrap=nowrap div wicket:id=tabs-container class=tab-row ul li wicket:id=tabs a href=# wicket:id=linkspan wicket:id=title[[tab title]]/span/a /li /ul /div /td tdnbsp;/td td valign=top width=100% div wicket:id=panel class=tab-panel[panel]/div /td /tr /table /wicket:panel /html Then you need to extend the AjaxTabbedPanel java class to your own VerticalTabbedPanel.java say: public class VerticalTabbedPanel extends TabbedPanel { // In your own VerticalTabbedPanel constructors call super.* } From then on, feel free to use your new VerticalTabbedPanel. Alternately you can use CSS to style the original markup of the TabbedPanel.html to be vertical which might be an easier solution as earlier suggested. I only provided this answer to you so you can learn how easy it is to override Wicket’s code and its markup if so desired. On Jun 9, 2014, at 10:34 AM, Tim Collins tcoll...@greatergood.com wrote: I am rather new to wicket and am trying to do something that ought to be rather easy... I want to make the tabs I display show up vertically rather than horizontally. I am currently building a arraylist of tabs and then passing them to AjaxTabbedPanel, but as far as I can see there is no way to make the resulting tabs on a page show up down the left side of a page rather than across the top... Is there an easy way to do that? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: OnChangeAjaxBehavior.onUpdate() not called
Well, by hidden do you mean an input type of hidden or not present on the DOM? On Jun 10, 2014, at 7:03 PM, Lucio Crusca lu...@sulweb.org wrote: everything looks OK to me check whether there are any JS errors in the browser's Dev Tools console. No errors. Can the fact that the input fields are inside a div that is initially hidden and then slid down via jQuery make a difference? - 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: Link in repeaters
You need to wrap a the Anchor around a Label and you can do so either in a fragment or your own LablledLinkPanel… On Jun 10, 2014, at 2:01 PM, Sven Meier s...@meiers.net wrote: Hi, a link does not output a label. Read here for two possible solutions: https://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg28621.html Regards Sven On 06/10/2014 06:02 PM, kumar ramanathan wrote: Hi Friends , I have successfully generated the view using repeaters using the following code. HTML: body Name Id /body HelloWorld.java public HelloWorld(){ ListPersons list = new ArrayListPersons(); list.add(new Persons(sam,one)); list.add(new Persons(ram,two)); ListDataProviderPersons listDataProvider = new ListDataProviderPersons(list); DataViewPersons dataView = new DataViewPersons(rows, listDataProvider) { @Override protected void populateItem(ItemPersons item) { Persons person = item.getModelObject(); RepeatingView repeatingView = new RepeatingView(dataRow); repeatingView.add(new Label(repeatingView.newChildId(), person.getName())); repeatingView.add(new Label( repeatingView.newChildId(),person.getId())); item.add(repeatingView); } }; add(dataView); } Ouput I got : Name Id sam one(not link) ram two(not link) Now I have tried to display the above ouput as below with link Name Id sam one(link) ram two(link) For this ouput i have altered the code in helloword.java as below DataViewPersons dataView = new DataViewPersons(rows, listDataProvider){ protected void populateItem(ItemPersons item){ Persons person = item.getModelObject(); RepeatingView repeatingView = new RepeatingView(dataRow); repeatingView.add(new Label(repeatingView.newChildId(), person.getName())); repeatingView.add(new Link(person.getId()){ public void onClick(){ setResponsePage(Output.class); } }); item.add(repeatingView); } }; add(dataView);}} Output I got for the above code change is Name Id sam ram No Id value is displayed. I need your help on making code changes to display the id as link. Kindly help me what are the things i need to update. Thanks, Kumar -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Link-in-repeaters-tp4666176.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax Form Submit via jquery plugin / javascript
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html Ajax event behavior that submits a form via ajax when the event it is attached to, is invoked.” You’re attaching the submit event so who fires that? On Jun 10, 2014, at 5:28 AM, Vishal Popat vishal.po...@cipriati.co.uk wrote: Hi, I am using a jquery steps plugin which has the ability to change options. One of the options I have is: onFinished: function (event, currentIndex) { var form = document.forms[selectionForm]; form.submit(); }, The javascript above submits the associated form. However I would like to submit the form via ajax. Normally I would use an AjaxButton for ajax processing but in this case I need something else. I have tried selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, onsubmit) { @Override protected void onSubmit(AjaxRequestTarget target) { log.debug(*** ajax form submit); } } but this does not seem to work as the debug does not get outputted. Additionally, the onSubmit Form version is called. Is there a way to stop this? Let me know if should be using something else instead. Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dataview help
Have you tried one of the Repeaters from: http://www.wicket-library.com/wicket-examples/index.html Direct link: http://www.wicket-library.com/wicket-examples/repeater/ They are also explained in the Wicket Free Guide at: http://wicket.apache.org/guide/guide/single.html#repeaters Let us know if you have a more specific question. On Fri, Jun 6, 2014 at 9:29 AM, kumar ramanathan kumarramana...@gmail.com wrote: Hi Friends, I am new beginner of wicket and trying to implement the table as below using data view. name id sam 21(link) ram 16(link) once i click the id it show the sam/ram details in next page. I have tried many ways to implement it using simple data view , but not able to do. Hoping you for help on this. I have tried cwiki examples, wicket library examples but those are very long to understand.Can you please share a simple project similar to my requirement above. Please help me, am struggling for nearly three months on this. Thanks, Kumar -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dataview-help-tp4666151.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Error page stack trace
Why? You don't have access to your own log file? On Wed, Jun 4, 2014 at 10:43 AM, Entropy blmulholl...@gmail.com wrote: We set our error page via setInternalErrorPage on IApplicationSettings in 1.6. I'd like to bury the stack trace in a comment in the rendered page in our staging and dev environments to save time. But I have no idea how to get the originating trace in the error page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Error page stack trace
Btw, this is what you want: http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/request/cycle/AbstractRequestCycleListener.html#onException%28org.apache.wicket.request.cycle.RequestCycle,%20java.lang.Exception%29 Add your own IRequestCycleListener (AbstractRequestCycleListener) with org.apache.wicket.Application.getRequestCycleListeners().add() and implement its #onException(RequestCycle, Exception) then drop that in your HTML comment. On Wed, Jun 4, 2014 at 11:31 AM, Paul Bors p...@bors.ws wrote: Why? You don't have access to your own log file? On Wed, Jun 4, 2014 at 10:43 AM, Entropy blmulholl...@gmail.com wrote: We set our error page via setInternalErrorPage on IApplicationSettings in 1.6. I'd like to bury the stack trace in a comment in the rendered page in our staging and dev environments to save time. But I have no idea how to get the originating trace in the error page. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Error-page-stack-trace-tp4666119.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Question / Best Practise / (List)Model vs. (List)DataProvider
Models: http://wicket.apache.org/guide/guide/modelsforms.html Data Providers (ie: Repeaters): http://wicket.apache.org/guide/guide/repeaters.html Long story short, a repeater's DataProvider gives you a single items model. A model who wraps a collection, gives you a collection of items for a single component. On Thursday, May 8, 2014, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, what I often think about, and I cannot really say is; when to use Model or DataProvider as data providing object for components they repeat some thing? Javadoc says, DataProvider are (good) for DataViews. Hmm... ok, and they allow easer iterating (first index, count). I also can achieve this by using a LoadableDetachableModelList combined with a ModelIteratorAdapater. Both have detaching logic... both featuring extension, both have a sort of load-method (getObject() vs. getData()). Sometimes I think, they are so similar to each other... where is the key difference? Would be cool if some of yours just reply his two cents of daily programming experience... so I can get some new point of views. When do you use DataProvider or ModelList? Did you experienced the same, not to exactly know which one you will use for your new page/panel/component? And often think about pro and cons using it with RepeatingViews? And later on, you see... I could have used both... hmm... thanx a lot for feedback and kind regards Patrick - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org javascript:; For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;
Re: DiskDataStore errors in production
Or simply know that Wicket has a page data store which can't update on your disk due to your file system permissions hence: java.io.FileNotFoundException: /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data (Permission denied) Also see: http://wicket.apache.org/guide/guide/versioningCaching.html On Wednesday, May 14, 2014, eaglei22 jchojnack...@gmail.com wrote: Hi, my application in production often gets this error: May 14 09:12:27 ERROR DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data (Too many open files) java.io.FileNotFoundException: /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/4729/2939/909EAC3343856968BA7B1864B71CEA85/data (Too many open files) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:233) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181) at org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:228) at org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:120) at org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:154) at org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:412) at org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:181) and now I am getting this error for every page opened making the log file extremely large: May 14 11:36:31 WARN DiskDataStore-Cannot save page with id '866' because the data file cannot be opened. May 14 11:36:31 ERROR DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data (Permission denied) java.io.FileNotFoundException: /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data (Permission denied) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:233) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355) at java.lang.Thread.run(Thread.java:722) May 14 11:36:31 WARN DiskDataStore-Cannot save page with id '0' because the data file cannot be opened. May 14 11:36:32 ERROR DiskDataStore-/opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data (Permission denied) java.io.FileNotFoundException: /opt/ssa/tomcat/apache-tomcat-7.0.29/work/Catalina/localhost/SSA/wicket.ssa-webapp-filestore/3943/9005/A851AC58C741B566C0E40BE1791649E1/data (Permission denied) at java.io.RandomAccessFile.open(Native Method) at java.io.RandomAccessFile.init(RandomAccessFile.java:233) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.getFileChannel(DiskDataStore.java:425) at org.apache.wicket.pageStore.DiskDataStore$SessionEntry.savePage(DiskDataStore.java:343) at org.apache.wicket.pageStore.DiskDataStore.storeData(DiskDataStore.java:181) at org.apache.wicket.pageStore.AsynchronousDataStore$PageSavingRunnable.run(AsynchronousDataStore.java:355) View this message in context: http://apache-wicket.1842946.n4.nabble.com/DiskDataStore-errors-in-production-tp4665839.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org javascript:; For additional commands, e-mail: users-h...@wicket.apache.orgjavascript:;
Re: AjaxTabbedPanel and validation for all tabs
My recommendation would be to use bean validation and Ajax to update the UI. On Tuesday, May 6, 2014, mscoon msc...@gmail.com wrote: Hi all, I have a complex form for editing existing objects. I am planning to use AjaxTabbedPanel with adapted ajax links for the tabs to submit the current tab when the user switches tabs. There will be a save button under the tabbed panel that will save the entire object. For new objects, I could force the user to visit all tabs before allowing them to save, to guarantee that the validators have ran for all form components and all tabs. The twist here is that the object, when loaded, may be invalid. But I don't want to force the user to visit all tabs when editing an existing object because it will very unfriendly (imagine the user wanting to update just one field in the first tab and being forced to visit all five tabs before saving). So I am looking for a way to make sure that all validators run when the user clicks save. As far as I understand there is no way to force all wicket validators to execute because the request will only contain post data for the active tab. Is there a way to solve this? Client side tabs are a solution I guess but one I'd like to avoid if possible. I did consider moving my validation logic to a server side validation method. The problem here is that you cannot leverage wicket's existing validators and error messages and also it becomes considerably harder to provide visual feedback for errors (e.g. highlight the components with errors). On the plus side, you do have a validation method that can be reused if you have alternate methods for updating the same data (e.g. via a REST service). Are there any pointers on using server side validation with wicket forms? Thanks in advance, Marios
Re: Include Files form Filesystem
Wicket is just Java, so you can also have your Base class be the page template and have other pages extend it ;) On Sunday, May 11, 2014, Martin Grigorov mgrigo...@apache.org wrote: Hi, See http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ Create a custom ResourceReference and mount it. Then use RequestCycle#urlFor() to get the relative url to it and pass it to Include Martin Grigorov Wicket Training and Consulting On Fri, May 9, 2014 at 5:12 PM, Mikulicic, Vladimir vladimir.mikuli...@br.de javascript:; wrote: Hello, im using Wicket 6.15 Does someone know how to include a static HTML file from the filesystem in my Wicket-App. I have a folder on my machine like /local/wtr/ with two files header.html and footer.html in it. The files are not in the docroot of my server, but somewhere in the filesystem. I would like to include these Files with: new Include(include, header.html); My approach is: getSharedResources().add(extern, new FolderContentResource(new File(/local/wtr))); mountResource(/resource/, new SharedResourceReference(extern)); But I don’t know how to use it with new Include()? How to get the correct path to the header.html? Any help would be fine. Thanks a lot! Vladi -- Bayerischer Rundfunk; Rundfunkplatz 1; 80335 München Telefon: +49 89 590001; E-Mail: i...@br.de; Website: http://www.BR.de
Re: DataTable's FilterToolbar generics broken
I think you're confused. If you want to filter a collection based on type T, then your filter your extend T. The idea here is that your model object type for the filter is the same as that retrieved by the data provider. As such you can have a POJO of the same type T on which you apply the filtering. Otherwise what would you filter the collection based on? There will be no standard, will there? ~ Thank you, Paul Bors On Sat, Apr 26, 2014 at 9:39 AM, Leszek Gawron lgaw...@apache.org wrote: I started migrating my code from wicket 1.4.19 to 6. Finally ! :) I found a FilterToolbar bug: Once you were able to create DataTableUser wrapped inside of FilterFormUserFilterDto currently FilterToolbar requires you for those two types to be identical: public T, S FilterToolbar(final DataTableT, S table, final FilterFormT form, final IFilterStateLocatorT stateLocator) It looks like commit 9b3f9ca1df064fe9c6fde64ccc37fecc504b09a6 introduced a bug long time ago and it carried on: - public T FilterToolbar(final DataTable? table, final FilterFormT form, + public T FilterToolbar(final DataTableT table, final FilterFormT form, FilterToolbar constructor should state: public T, F, S FilterToolbar(final DataTableT, S table, final FilterFormF form, final IFilterStateLocatorF stateLocator) cheers. -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket in Action outage: back online, better than ever!
Hey Martijn, Is there going to be an updated release of Wicket in Action based on Wicket 6? Or has that effort been replaced by the Wicket Guide? ~ Thank you, Paul Bors On Mar 30, 2014, at 5:45 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: I just wanted to let everybody know that the Wicket in Action blog is online again, and should now perform better than ever. Thank you all for your patience if you wanted to get content from the website but found it unavailable. Here's the rundown of what happened and how I spent my weekend: http://wicketinaction.com/2014/03/wicket-in-action-makeover/ Martijn PS. if you want to look at the source: https://github.com/dashorst/wicketinaction.com -- Become a Wicket expert, learn from the best: http://wicketinaction.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Does wicket:link tag work inside pages in different packages?
Instead of using in-line wicket:link why not use a a wicket:id=“homePage” and then add(new Link(“homePage”, HomePage.class)); to your parent class? That will resolve no matter where its used from. After all wicket:link is just a Link class at the end of the day. Also see the examples page: http://www.wicket-library.com/wicket-examples/linkomatic/home On Feb 27, 2014, at 11:03 AM, Alberto Brosich abros...@ogs.trieste.it wrote: Yes, I read it. Does it mean that have to do a different header panel for every suppages level (using ../(../)HomePage.html link)? Alberto On Thu, 2014-02-27 at 16:30 +0100, Sven Meier wrote: Have you read http://wicket.apache.org/guide/guide/urls.html#urls_3 ? Sven On 02/27/2014 03:44 PM, Alberto Brosich wrote: Hi, I have an header panel with a link to the homepage of the site. This panel is included in every page of the site. If I use the wicket:link tag for that link it works fine (for example, it is disabled in the homepage) for the pages in the same package of the Homepage class. If I am on a page inside another package (subpackage in my case) the link became the name of that package plus the href specified in the html panel. For example: wicket:linka href=HomePage.html...//wicket:link In a page inside package subpackage the link is: subpackage/HomePage.html and not ../. What I'm doing wrong? Regards Alberto - 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: How to start Wizard with an active step? / Best practise?
We need to build the WizardModel in a dynamic way. Although I think there is a better more dynamic step too that can be used here. So one cheap solution is to keep an enum or some sort of a definition of your wizard steps: public static enum WizStep { /** Step 1 of N */ STEP_ONE(1), /** Step N of N */ STEP_N; ... private int stepNum; WizStep(int stepNum) { this.stepNum = stepNum; } public int getNum() { return this.stepNum; } } Then extend the wizard and build the model starting at the given step like so: private class MyWizard extends Wizard { private static final long serialVersionUID = 1L; public MyWizard(String id, WizStep startStep) { super(id); setDefaultModel(ediPojoModel); WizardModel model = new WizardModel(); if(WizStep.STEP_ONE.getNum() = startStep.getNum()) { model.add(new FirstWiwardStep()}); } // Keep adding the rest of the steps ... if(WizStep.STEP_N.getNum() = startStep.getNum()) { model.add(new NthStep()); } init(model); } } Maybe a better approach is to create your own parent intelligent wizard step that will skip itself in the init() or onInit() method till it get to the Active step then you could build your model as normal. Have fun. On Mon, Feb 17, 2014 at 12:21 PM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, what is the best way to start a Wizard in a particular step? I tried: - to override onInit of WizardStep and setting this to activeStep, when the state is the right one, but init() of WizardModel always determines the next step after me (the current active), so this seems not to be a good way. I could set the prevoius, but this is quite faked. - to implement a condition; state is determined correct, but than all buttons are deactive, hmm... - manually setting setActiveStep() after init of WizardModel, but this needs to unpack model object to construction time to evaluate my state on my own (but it worked as expected). Did I miss something? Or is the third implementation the best trade-off? kind regards Patrick - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: understanding looking for wicket:id
Also take a look over the user guide's section on inheritance: http://wicket.apache.org/guide/guide/layout.html#layout_2 ~ Thank you, Paul Bors On Fri, Feb 14, 2014 at 3:42 PM, Richter, Marvin marvin.rich...@jestadigital.com wrote: That is definitely not a good way to do inheritance. This way you force everyone who extends from MyBasePage to know that he has to have a tag in his markup file with a wicket:id he might not know. The right way would be to have a markup file for MyBasePage.java and include the wicket:extend tag. MyBasePage.html html body span wicket:id=panel/ wicket:extend/wicket:extend /body /html This way every page which extends MyBasePage.java inherits the panel and the components you add in the subclasses will be placed in the place where you defined wicket:extend Best, Marvin Am 14.02.2014 um 20:04 schrieb Farrukh SATTOROV fireda...@gmail.com: my code work, if by definition each WebPage and Panel must have own markup ? MyBasePage.java: public class MyBasePage extends WebPage { public MyBasePage() { add(new MyPanel(panel)); } } no MyBasePage.html, i remove it. SubPage.java: public class SubPage extends MyBasePage { public SubPage() { } } SubPage.html: html body span wicket:id=panel/ /body /html MyPanel.html body wicket:panel spanMyPanel/span /wicket:panel /body On Fri, Feb 14, 2014 at 10:56 PM, Sven Meier s...@meiers.net wrote: With a wicket:id declared in Html markup, a corresponding component with the same id has to present as child. It doesn't matter when the child component is added: in the constructor or one of its super constructors (or even later). This does not have anything to do with markup inheritance. Hope this helps Sven On 02/14/2014 07:34 PM, Farrukh SATTOROV wrote: Hi everyone. I confused when i look to standard wicket heloworld example and try understanding snippet of span wicket:id=mainNavigation/. How HelloWorld.html works without extend/extend while id mainNavigation located in superclass (WicketExamplePage). Explain to me mechanism of looking for wicket:id in this case. - 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: Leaving page after closing modal results in browser pop up
Have you tried setting this on your page? wicket:head scriptWicket.Window.unloadConfirmation = false;/script /wicket:head It should work, and if you want to apply it to all of the modal pop-ups in your app, consider using a header contribution that you would add to your parent page. ~ Thank you, Pau Bors On Sat, Feb 15, 2014 at 9:02 AM, PDiefent pdief...@csc.com wrote: Hi Ernesto, I didn't try because with former versions of Wicket the confirmation doesn't rise. The problem seams to exist since Wicket 6.13. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Leaving-page-after-closing-modal-results-in-browser-pop-up-tp4664471p4664475.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hybrid palette with DropDownChoice and ListView
I don't think you need to go nuts and worry much about a ListView. Use a Select2 instead of the drop-down and have a custom panel instead of the plain old option. You can place an Add button or something or better yet, check boxes and then you won't need the second list. Suppose you do stick to old HTML components like a DropDown and a ListView. First off, get off the list view and use a multiple Select. Take a look at how the wicket pallet is done at: http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage All you would have to do is change the left available multi select with your drop down. Now, I would recommend using jQuery UI's widgets since they are easier to use and more fun to work with (both for the developer and the application user): http://jqueryui.com/demos/ Have fun! On Thu, Feb 13, 2014 at 11:05 AM, ChambreNoire a...@tentelemed.com wrote: Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds it to the list and vice-versa for item 'removal'. I have already started but I fear that this is probably going to be fairly complicated as it involves using ListViews in a form and DropDownChoice customisation so any pointers to get me going would be most appreciated. I'll post some code once I have something vaguely functional! Thanks, Chambre -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hybrid palette with DropDownChoice and ListView
Btw, Select2 demos are at: http://ivaynberg.github.io/select2/ Its Wicket integration at: https://github.com/ivaynberg/select2 That's Igor's baby (you might have seen Igor's name in Wicket's API JavaDocs :) On Thu, Feb 13, 2014 at 11:34 AM, Paul Bors p...@bors.ws wrote: I don't think you need to go nuts and worry much about a ListView. Use a Select2 instead of the drop-down and have a custom panel instead of the plain old option. You can place an Add button or something or better yet, check boxes and then you won't need the second list. Suppose you do stick to old HTML components like a DropDown and a ListView. First off, get off the list view and use a multiple Select. Take a look at how the wicket pallet is done at: http://www.wicket-library.com/wicket-examples/compref/wicket/bookmarkable/org.apache.wicket.examples.compref.PalettePage All you would have to do is change the left available multi select with your drop down. Now, I would recommend using jQuery UI's widgets since they are easier to use and more fun to work with (both for the developer and the application user): http://jqueryui.com/demos/ Have fun! On Thu, Feb 13, 2014 at 11:05 AM, ChambreNoire a...@tentelemed.com wrote: Hello, I'd like to create a hybrid 'palette'. First there's a DropDownChoice with an 'Add' link and next to this a vertical list of selected items, each with a 'remove' link. Of course, adding an item removes it from the DropDownChoice and adds it to the list and vice-versa for item 'removal'. I have already started but I fear that this is probably going to be fairly complicated as it involves using ListViews in a form and DropDownChoice customisation so any pointers to get me going would be most appreciated. I'll post some code once I have something vaguely functional! Thanks, Chambre -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Hybrid-palette-with-DropDownChoice-and-ListView-tp4664445.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: replaceWith method in Panel not working with AjaxLazyLoadPanel
Replace it it on the parent, then add the parent to the ajax target to be refreshed on the screen. ~ Thank you, Paul Bors On Feb 6, 2014, at 5:25 AM, Vishal Popat vishal_po...@hotmail.com wrote: Hi, I have the following panel layout: SomeOtherPanel AjaxLazyLoadPanel Panel loading with AjaxLazyLoadPanel PanelToReplace I am trying to replace PanelToReplace using replaceWith within IndicatingAjaxFallbackLink onClick method but I get the message: Component '[EmptyPanel [Component id = additionalInfo]]' with markupid: 'additionalInfo3e' not rendered because it was already removed from page. Using the same approach, I have replaced SomeOtherPanel which is not inside AjaxLazyLoadPanel and it works fine. So it seems I cannot use replaceWith when the Panel is within AjaxLazyLoadPanel. Is there an alternative way to do this? Regards Vishal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Wizzard Question / Custom Overview Bars
Find the panel you want to modify, say the WizardButtonBar and extend it: public class MyWizardButtonBar extends WizardButtonBar { private static final long serialVersionUID = 1L; public MyWizardButtonBar(String id, Wizard wizard, final boolean finishOnAnyStep) { super(id, wizard); addOrReplace(new MyFinishButton(finish, wizard) { private static final long serialVersionUID = 1L; @Override public boolean isEnabled() { return (super.isEnabled() || finishOnAnyStep); } }); } } Then change its HTML to whatever you want, ie MyWizardButtonBar.html I have as: html xmlns:wicket=http://wicket.apache.org; wicket:panel div align=right input wicket:id=previous type=submit class=toolbox-form-submit value=[Previous] / input wicket:id=next type=submit class=toolbox-form-submit value=[Next] / input wicket:id=last type=submit class=toolbox-form-submit value=[Last] / input wicket:id=cancel type=submit class=toolbox-form-submit value=[Cancel] / input wicket:id=finish type=submit class=toolbox-form-submit value=[Finish] / /div /wicket:panel /html Finally, extend the Wizard itself and override the factory method you need changed: public class MyWizard extends Wizard { ... @Override protected Component newButtonBar(String id) { return new MyWizardButtonBar(id, this, finishOnAnyStep()); } ... } Then change the Wizard's HTML as you please but preserve the Wicket component tree hirarachy. Something like this: html xmlns:wicket=http://wicket.apache.org; wicket:panel form wicket:id=form table class=wicketExtensionsWizardOuterTable tr td valign=top span wicket:id=overview[[Overview]]/span /td td valign=top table class=wicketExtensionsWizardInnerTable tr class=wicketExtensionsWizardHeaderRow td valign=top class=wicketExtensionsWizardHeaderspan wicket:id=header[[Header]]/span/td /tr tr class=wicketExtensionsWizardViewRow td valign=top class=wicketExtensionsWizardViewdiv wicket:id=view class=wicketExtensionsWizardViewInner[[View]]/div/td /tr tr class=wicketExtensionsWizardFeedbackRow td valign=top class=wicketExtensionsWizardFeedbackspan wicket:id=feedback[[Feeback]]/span/td /tr tr class=wicketExtensionsWizardButtonBarRow td valign=top class=wicketExtensionsWizardButtonBarspan wicket:id=buttons[[Buttons]]/span/td /tr /table /td /tr /table /form /wicket:panel /html On a side note, I didn't like the default of the Finish button so I changed that too: public class MyFinishButton extends WizardButton { private static final long serialVersionUID = 1L; public MyFinishButton(String id, IWizard wizard) { super(id, wizard, org.apache.wicket.extensions.wizard.finish); } /** * @see org.apache.wicket.Component#isEnabled() */ public boolean isEnabled() { IWizardStep activeStep = getWizardModel().getActiveStep(); return (activeStep != null getWizardModel().isLastStep(activeStep)); } /** * @see org.apache.wicket.extensions.wizard.WizardButton#onClick() */ public final void onClick() { IWizardModel wizardModel = getWizardModel(); IWizardStep step = wizardModel.getActiveStep(); // let the step apply any state step.applyState(); // if the step completed after applying the state, notify the wizard if(step.isComplete()) { getWizardModel().finish(); } else { error(getLocalizer().getString( org.apache.wicket.extensions.wizard.FinishButton.step.did.not.complete, this) ); } } } On Fri, Feb 7, 2014 at 9:04 AM, Patrick Davids patrick.dav...@nubologic.com wrote: Hi all, did someone already noticed, a custom overriden overview-bar of wickets wizzard is displayed in a td left of the Step contents ? I thought it would be on the top... Or did I misunderstood the meaning of the overview bar? Is it meant as kind of menu?! kind regards Patrick
Re: I have not found file where per session data get store under work Folder in wicket application
Are you after the user session or the cashed page store, page map? https://cwiki.apache.org/confluence/display/WICKET/Page+maps Drop the wicket debug artifact in your wicket webapp then load this URL to see the Wicket Debug Bar and you can get to see the Wicket Sessions Inspector. Set this to true in your application when running in debug getDebugSettings().setDevelopmentUtilitiesEnabled(true); Have fun! On Feb 8, 2014, at 4:02 AM, Sharad Raut raut.sha...@gmail.com wrote: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/I-have-not-found-file-where-per-session-data-get-store-under-work-Folder-in-wicket-application-tp4664316.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modular Wicket Application
I’m no expert, but it looks like your filter is not started right. That should be configured via the web.xml file. Perhaps you could create a quick-start and package your project for us to see it as a whole? Only the minimal code that produces the error should be packaged. On Feb 8, 2014, at 4:12 AM, IowA reginald...@gmail.com wrote: Hello all, I am new to Wicket. When I use Guice in Wicket's quickstart everything works like a charm and it is possible to deploy it on Tomcat. But when i use same code + write my module deploying to Tomcat ends with errors. Catalina - http://pastebin.com/CaFGzDta Tomcat - http://pastebin.com/prEU4RX5 wicket module pom.xml - http://pastebin.com/zF0z2MiN domain module pom.xml - http://pastebin.com/bLkbwhsN parent pom.xml - http://pastebin.com/hC9sLpuJ Any ideas what I am doing wrong? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modular-Wicket-Application-tp4664317.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Visual HTML diff in Wicket?
I would say to find out what Jira is using to diff the CSV commits and use that :) On Feb 6, 2014, at 4:06 PM, Stephan Schrader zsteph...@gmail.com wrote: You could try https://github.com/alkacon/alkacon-diff Stephan Am 06.02.2014 um 10:53 schrieb Martin Dietze d...@fh-wedel.de: In my system there is an editorial submodule for creating HTML contents. As I am about to add a versioning history to it, I'd like to add some kind of visualisation of what changed from edit to edit. Does anyone here know of something like a library for this that can be used conveniently in a Wicket-based application? Free would be nice, but commercial (depending on the price, of course) would be an option, too. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Albert Camus wrote that the only serious question is whether to kill yourself or not. Tom Robbins wrote that the only serious question is whether time has a beginning and an end. Camus clearly got up on the wrong side of bed, and Robbins must have forgotten to set the alarm. -- Tom Robbins - 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: Apache wicket project as osgi compoments
We solved this by using customized security permissions. If a user wasn’t given the permission for module A, so be it :) On Feb 4, 2014, at 7:49 PM, Shengche Hsiao shengchehs...@gmail.com wrote: Hello Thanks for reply, indeed I plan to implement my wicket project in osgi way! But I don't know how to start it, thanks for hyper links, I'll check it out. On Wed, Feb 5, 2014 at 3:42 AM, Francois Meillet francois.meil...@gmail.com wrote: You should have a look at http://code.google.com/p/osgi-enterprise/wiki/WicketAndOsgi https://github.com/wicketstuff/core/wiki/Osgi http://hwellmann.blogspot.fr/2011/06/wicket-and-osgi.html http://www.volkomenjuist.nl/blog/2012/07/25/wicket-mounting-in-an-osgi-environment/ https://ops4j1.jira.com/wiki/display/paxwicket/Install+Pax+Wicket http://karaf.922171.n3.nabble.com/pax-wicket-example-running-on-karaf-td4027622.html François Meillet Formation Wicket - Développement Wicket Le 4 févr. 2014 à 17:01, tho...@jarnot.de a écrit : Although we don't know anything about your application structure, I tend to answer YES. Assuming from the subject, that we are talking about OSGi modules (or rather bundles), making the application capable of that dynamism is surely possible. It simply depends on your decision of utilizing the OSGi programming model and execution environment. Do you have your application modules OSGi ready? Having a look a the wicket-distribution it seems to be OSGi-ready. You also may have a look at the Pax Wicket extension. So you're probably good to go. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Apache-wicket-project-as-osgi-compoments-tp4664159p4664164.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- --- We do this not because it is easy. We do this because it is hard. --- ShengChe Hsiao --- front...@gmail.com front...@tc.edu.tw --- VoIP : 070-910-2450 --- - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Singleton for empty models
While I have re-usable panels, I don't want them to look up the component tree hirarchy for a compound property model. So I end up creating a lot of empty models such as: super(id, new Model()); How do you guys manage your empty models? Won't it make sense to have a Model.EMPTY_INSTANCE or similar? Of course I can have Spring or some other DI handle that empty instance as a singleton, but I am curious as to how other users solve this problem?
Re: Singleton for empty models
n/m as I wrote this e-mail I realized that I don't need a FormComponentPanel and going with a simple Panel is all have to do. Sorry for the noise... On Thu, Jan 30, 2014 at 2:41 PM, Paul Bors p...@bors.ws wrote: Btw, in my use-case I extends FormComponentPanelVoid since if I were to set its panel to null or a compund property one, I would have to change my model object to include the wicket id for the FormComponentPanel itself and then go to the fields I need. Inside my panel I warpped what I needed in PropertyModels. On Thu, Jan 30, 2014 at 2:34 PM, Paul Bors p...@bors.ws wrote: While I have re-usable panels, I don't want them to look up the component tree hirarchy for a compound property model. So I end up creating a lot of empty models such as: super(id, new Model()); How do you guys manage your empty models? Won't it make sense to have a Model.EMPTY_INSTANCE or similar? Of course I can have Spring or some other DI handle that empty instance as a singleton, but I am curious as to how other users solve this problem?
Re: onchange event always being fired before onclick event
What makes you think that the only way to focus on something is by clicking on it? I would aproach your problem from a different angle. I would ask the browser to give me whatever has the focus via document.activeElement: https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement http://msdn.microsoft.com/en-us/library/ie/ms533065(v=vs.85).aspx Or simply use the focus selector in jQuery: http://api.jquery.com/focus-selector/ On Thu, Jan 30, 2014 at 2:15 PM, Rafael Barrera Oro boraf...@gmail.comwrote: Hello everyone! I'm trying to to mantain the focus of the last component that was clicked regardless of the refresh of part of the page when certain text field changes. The problem i have is that the onchange event is always fired before the onclick method, and this causes that the latter is either fired over the wrong component or not fired at all, is there a way to delay the onchange event until after the onclick event takes place? My goal is to use the onclick event to save the id of the clicked component, then let the onchange event do its thing (refresh a part of the page which maybe includes the clicked component). Has anyone achieved something similiar and/or has any ideas? Thanks in advance! Rafael
Re: onchange event always being fired before onclick event
Btw, your use-case sounds strange. Why would you refresh what's in focus via some other's tag onChange? Why not just simply refresh whatever component lost focus whenever its onChagne is fired? On Thu, Jan 30, 2014 at 3:37 PM, Paul Bors p...@bors.ws wrote: What makes you think that the only way to focus on something is by clicking on it? I would aproach your problem from a different angle. I would ask the browser to give me whatever has the focus via document.activeElement: https://developer.mozilla.org/en-US/docs/Web/API/document.activeElement http://msdn.microsoft.com/en-us/library/ie/ms533065(v=vs.85).aspx Or simply use the focus selector in jQuery: http://api.jquery.com/focus-selector/ On Thu, Jan 30, 2014 at 2:15 PM, Rafael Barrera Oro boraf...@gmail.comwrote: Hello everyone! I'm trying to to mantain the focus of the last component that was clicked regardless of the refresh of part of the page when certain text field changes. The problem i have is that the onchange event is always fired before the onclick method, and this causes that the latter is either fired over the wrong component or not fired at all, is there a way to delay the onchange event until after the onclick event takes place? My goal is to use the onclick event to save the id of the clicked component, then let the onchange event do its thing (refresh a part of the page which maybe includes the clicked component). Has anyone achieved something similiar and/or has any ideas? Thanks in advance! Rafael
Re: XSS in wicket. Wicket fault or my fault?
No need, Wicket escapes your model objects, see Component#setEscapeModelStrings(true) for when HTML should be escaped and thus the browser won't execute it as HTML or JS. http://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/Component.html#setEscapeModelStrings(boolean) That is on by default, so you should switch to using a wicket model for your label. See the bottom section 11.1 What is a model? of the wicket free guide at: http://wicket.apache.org/guide/guide/modelsforms.html#modelsforms_1 Also, older Wicket in Action: http://www.javaranch.com/journal/2008/10/using-wicket-labels-and-links.html On Wed, Jan 29, 2014 at 12:26 PM, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote: Hi there, I'm building an application for a client and my security advisor told me about a XSS attack that can be performed on the site. When user logs-in I welcome they by Saying Hello user. div class=thumbnail p wicket:id=message Hello ${realName}. Welcome to the Synapse web. /p /div As you can see I use I18N so this is not the real text that will show up, but's similar. I used to think that wicket validated output before building web but the white hat hacked it by just putting a fake name into the database. Too easy for me... The content of realName is: '';!--SCRIPTalert('XSS')/SCRIPT={()} So I ended with: Hellob'';!--scriptalert('XSS')/script=amp;{()} In the web page. And the script executed on login. I was thinking about baking a method into my DAO classes to validate everything that goes to the database. But it should be a better solution. Can you point me to right one? Best regards,
Re: Which is recomended way to implemen an editable repeating view
Take your pick at one of the Repeaters from: http://www.wicket-library.com/wicket-examples/index.html More on them in Ch 13 Displaying multiple items with repeaters of the Wicket free guide at: http://wicket.apache.org/guide/guide/repeaters.html Or pruchase a book on Wicket such as Wicket in Action: http://wicket.apache.org/learn/books/ On Wed, Jan 29, 2014 at 5:23 AM, cosmindumy cosmind...@yahoo.com wrote: Hello, I want to know which is the best way to implement a repeating view, preferable data view which contains an input field in each row. On submit, I need to get an iterator to get reference both to row model (example a Person object) and to editable component (ex an input text for age). The input must be processed and model updated. Thanks in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Which-is-recomended-way-to-implemen-an-editable-repeating-view-tp4664028.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Web Sockets proxying
I don't think segmentation faults fall (no pun intended) under Wicket :) You might want to look for help under the Unbuntu's user mailing lists and/or search on Google. Here's a starting point for you: http://www.amoss.me.uk/2013/06/apache-2-2-websocket-proxying-ubuntu-mod_proxy_wstunnel/ On Mon, Jan 27, 2014 at 12:42 PM, Maxim Solodovnik solomax...@gmail.comwrote: Hello All, Is there any way to perform proxying of web sockets? I have tried mod_proxy_wstunnel but with no luck due to 1) I might compile something to very stable (Segmentation fault under Ubuntu 13.10 HTTP 2.4.6) 2) both main app and ws URL are looks the same: http://localhost/openmeetings and ws://localhost/openmeetings. Should I create additional page/mapping for performing ws tunneling? Maybe anyone can share example config/how to? Thanks in advance :) -- WBR Maxim aka solomax
Re: How to get data from Panels
Your question is too generic to answer. If you’re new to Wicket that’s okay, I would suggest starting with chapter 12 “Wicket forms in detail of the Wicket free User Guide at: http://wicket.apache.org/guide/guide/single.html#chapter11 You should also read the entire guide to pick up Wicket faster: http://wicket.apache.org/start/userguide.html ~ Thank you, Paul Bors On Jan 19, 2014, at 12:22 PM, Baba pakruddins...@gmail.com wrote: A panel contain form, after submitting form how to get user input as part of MyWebPage(which extends WebPage) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-data-from-Panels-tp4663822.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get data from Panels
Reading your question closer, I think you’re looking for setResponsePage(new MyWebPage(objModel, or model, or PageParameters). Anyway that’s explained in detailed in the guide. On Jan 19, 2014, at 11:18 PM, Paul Bors p...@bors.ws wrote: Your question is too generic to answer. If you’re new to Wicket that’s okay, I would suggest starting with chapter 12 “Wicket forms in detail of the Wicket free User Guide at: http://wicket.apache.org/guide/guide/single.html#chapter11 You should also read the entire guide to pick up Wicket faster: http://wicket.apache.org/start/userguide.html ~ Thank you, Paul Bors On Jan 19, 2014, at 12:22 PM, Baba pakruddins...@gmail.com wrote: A panel contain form, after submitting form how to get user input as part of MyWebPage(which extends WebPage) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-get-data-from-Panels-tp4663822.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to version resource references and not the resources?
Can’t you just use your own map strategy? See section 10.6 Generating structured and clear URLs http://wicket.apache.org/guide/guide/chapter9.html#chapter9_6 Outside of that, I guess you can always have a second servlet for those versioned instances. ~ Thank you, Paul Bors On Jan 19, 2014, at 7:15 PM, tertioptus benpaige...@hotmail.com wrote: Recently I experimented with using DOJO AMD JavaScript modules http://dojotoolkit.org/documentation/tutorials/1.9/modules/ , of which the hierarchy of 'js' files were all bound to a particular resource reference class. AMD allows for asynchronous loading of javascript code. *My question is whether or not the resource reference path can be versioned instead of the actual resource? *So that my module loader doesn't have to know the version of the files in it's hierarchy of modules, and it can still get up to date versions. For instance, this: /wicket/resource/my.project.DojoResourceReference_[some version code (date or hash)]/some_module.js Instead of: /wicket/resource/my.project.DojoResourceReference/some_module[some version code (date or hash)].js /BTW My experiment was successful for an ArcGis map project, in which the all the map code is in a separate project that is used by the web project. And the dojo module loader is able to pull modules asynchronously, yet not versioned resources./ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-version-resource-references-and-not-the-resources-tp4663823.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [ANNOUNCE] Apache Wicket 6.13.0 adds free online user guide
I think this release broke the quick start at: http://wicket.apache.org/start/quickstart.html When the page loads at first the Command Line is empty at first. Null initial model object? Selecting a different version from the drop down and then back to 6.13.0 will fill in the form field. On Mon, Jan 13, 2014 at 11:00 AM, Martijn Dashorst dasho...@apache.orgwrote: The Apache Wicket PMC is proud to announce Apache Wicket 6.13.0! This release marks the thirteenth minor release of Wicket 6. Starting with Wicket 6 we use semantic versioning for the future development of Wicket, and as such no API breaks are present in this release compared to 6.0.0. New and noteworthy -- This release fixes 25 bugs and adds the following improvements: * Online Wicket User guide (see below) * CDI 1.1 support (see below) * JQuery upgraded from 1.10.1 to 1.10.2 * Implemented BigIntegerConverter * Migrate Wicket-Atmosphere to Atmosphere 2 New Wicket User guide - After many years of people asking for a reference guide for Apache Wicket we finally were able to add one to our site thanks to Andrea del Bene and comSysto for writing the guide and providing the hours of converting it to our site. You can read the manual in 3 forms: multi page HTML, single page HTML and PDF. The contents: - Introduction - How to use the example code - Why should I learn Wicket? - Wicket says Hello, World! - Wicket as page layout manager - Keeping control over HTML - Component Lifecycle - Page versioning and caching - Under the hood of request processing - Wicket Links and URL generation - Wicket models and forms - Wicket forms in detail - Displaying multiple items with repeaters - Internationalization with Wicket - Resource management with Wicket - An example of integration with JavaScript - Wicket advanced topics - Working with AJAX - Integration with enterprise containers - Security with Wicket - Test Driven Development with Wicket - Test Driven Development with Wicket and Spring - Wicket Best Practices - Working with Maven (Appendix) - Project WicketStuff (Appendix) - Lost in redirection with Apache Wicket (Appendix) - Contributing to this guide (Appendix) Read more in the User guide by following this link: http://wicket.apache.org/start/userguide.html New CDI-1.1 integration project --- A new (experimental) module for CDI integration was added to support CDI 1.1 with Wicket. As CDI 1.0 and 1.1 are different beasts and not compatible, we had to craft a new module with specific support for the new CDI standard. The module is still experimental, but we expect to make it a default module in a couple of releases. You can use the new Wicket CDI module by including the following dependency in your POM: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-cdi-1.1/artifactId version0.2/version /dependency Note that you have to remove the old wicket-cdi module and the Seam conversation dependency: org.jboss.seam.conversation:seam-conversation-weld For more information about what is new in CDI 1.1 read this blog post by Pete Muir: http://s.apache.org/newincdi11 JQuery update in 6.9.0 -- As of Wicket 6.9 we ship JQuery 1.10.1. The JQuery project has decided to remove deprecated APIs from their codebase from JQuery 1.9 and up. This means that JQuery plugins using these deprecated APIs no longer work. See the JQuery migration guide for more information, available from http://jquery.com/upgrade-guide/1.9/ If your application depends on these deprecated APIs you can easily downgrade to JQuery 1.8.3-the previously provided JQuery that still contains these APIs. Download the 1.8.3 release of jquery and add it to your project in its application's init method: @Override protected void init() { getJavaScriptLibrarySettings() .setJQueryReference(yourJquery183ResourceReference); } CDI injection issue --- In the CDI releases of Weld 2.0.1 and prior, it was assumed that injection in anonymous inner classes was not legal and when attempted, it resulted in an exception: Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-70 Simple bean [EnhancedAnnotatedTypeImpl] private class com.example.HomePage$AForm cannot be a non-static inner class This was reported as https://issues.apache.org/jira/browse/WICKET-5226, as it became an issue in Glassfish 4, which ships with Weld 2.0.1 (or earlier). We implemented a fix for this particular issue by not injecting into anonymous inner classes. Unfortunately this was not a bug that needed fixing on our part, but rather in the Weld framework (see https://issues.jboss.org/browse/WELD-1441) Therefore we reverted the commits done for WICKET-5226 and hope that Glassfish will upgrade their Weld
Re: [ANNOUNCE] Apache Wicket 6.13.0 adds free online user guide
Also, the quick start has this in its HTML: Please mention the correct Wicket version: wicket:container wicket:id=version1.5-SNAPSHOT/wicket:container. Maybe we should change it with: Please mention the correct Wicket version: wicket:container wicket:id=version[version will be inserted here]/wicket:container. or similar so that newbies don't get confused. On Wed, Jan 15, 2014 at 12:14 PM, Paul Bors p...@bors.ws wrote: I think this release broke the quick start at: http://wicket.apache.org/start/quickstart.html When the page loads at first the Command Line is empty at first. Null initial model object? Selecting a different version from the drop down and then back to 6.13.0 will fill in the form field. On Mon, Jan 13, 2014 at 11:00 AM, Martijn Dashorst dasho...@apache.orgwrote: The Apache Wicket PMC is proud to announce Apache Wicket 6.13.0! This release marks the thirteenth minor release of Wicket 6. Starting with Wicket 6 we use semantic versioning for the future development of Wicket, and as such no API breaks are present in this release compared to 6.0.0. New and noteworthy -- This release fixes 25 bugs and adds the following improvements: * Online Wicket User guide (see below) * CDI 1.1 support (see below) * JQuery upgraded from 1.10.1 to 1.10.2 * Implemented BigIntegerConverter * Migrate Wicket-Atmosphere to Atmosphere 2 New Wicket User guide - After many years of people asking for a reference guide for Apache Wicket we finally were able to add one to our site thanks to Andrea del Bene and comSysto for writing the guide and providing the hours of converting it to our site. You can read the manual in 3 forms: multi page HTML, single page HTML and PDF. The contents: - Introduction - How to use the example code - Why should I learn Wicket? - Wicket says Hello, World! - Wicket as page layout manager - Keeping control over HTML - Component Lifecycle - Page versioning and caching - Under the hood of request processing - Wicket Links and URL generation - Wicket models and forms - Wicket forms in detail - Displaying multiple items with repeaters - Internationalization with Wicket - Resource management with Wicket - An example of integration with JavaScript - Wicket advanced topics - Working with AJAX - Integration with enterprise containers - Security with Wicket - Test Driven Development with Wicket - Test Driven Development with Wicket and Spring - Wicket Best Practices - Working with Maven (Appendix) - Project WicketStuff (Appendix) - Lost in redirection with Apache Wicket (Appendix) - Contributing to this guide (Appendix) Read more in the User guide by following this link: http://wicket.apache.org/start/userguide.html New CDI-1.1 integration project --- A new (experimental) module for CDI integration was added to support CDI 1.1 with Wicket. As CDI 1.0 and 1.1 are different beasts and not compatible, we had to craft a new module with specific support for the new CDI standard. The module is still experimental, but we expect to make it a default module in a couple of releases. You can use the new Wicket CDI module by including the following dependency in your POM: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-cdi-1.1/artifactId version0.2/version /dependency Note that you have to remove the old wicket-cdi module and the Seam conversation dependency: org.jboss.seam.conversation:seam-conversation-weld For more information about what is new in CDI 1.1 read this blog post by Pete Muir: http://s.apache.org/newincdi11 JQuery update in 6.9.0 -- As of Wicket 6.9 we ship JQuery 1.10.1. The JQuery project has decided to remove deprecated APIs from their codebase from JQuery 1.9 and up. This means that JQuery plugins using these deprecated APIs no longer work. See the JQuery migration guide for more information, available from http://jquery.com/upgrade-guide/1.9/ If your application depends on these deprecated APIs you can easily downgrade to JQuery 1.8.3-the previously provided JQuery that still contains these APIs. Download the 1.8.3 release of jquery and add it to your project in its application's init method: @Override protected void init() { getJavaScriptLibrarySettings() .setJQueryReference(yourJquery183ResourceReference); } CDI injection issue --- In the CDI releases of Weld 2.0.1 and prior, it was assumed that injection in anonymous inner classes was not legal and when attempted, it resulted in an exception: Caused by: org.jboss.weld.exceptions.DefinitionException: WELD-70 Simple bean [EnhancedAnnotatedTypeImpl] private class com.example.HomePage$AForm cannot be a non-static inner class This was reported as https://issues.apache.org/jira/browse/WICKET-5226
Should we expect empty PageParameters for pages that have such a constructor yet no parameters are available?
Suppose I have a page with the default constructor and with the page parameter constructor. Should my page parameter constructor be called with an empty not null PageParameter instance when no parameters are provided? Shouldn't the default constructor be used instead? What about in unit tests? I've seen the tester use the page parameter constructor and pass it a reference to an empty PageParameters when I invoke tester.startPage(MyPage.class, null).
Re: Should we expect empty PageParameters for pages that have such a constructor yet no parameters are available?
Btw, I just noticed that adding this constructor eliminates the problem: public MyPage() { this(null); } So I take it Wicket tries to build the page via the Page(PageParameters) but instead of using a null reference to the PageParameters it builds an object without any parameters in it. If the default constructor is added, then it can invoke the custom PageParameters constructor with the null reference. I don't recall this behavior. Has this changed recently? On Wed, Jan 15, 2014 at 1:45 PM, Paul Bors p...@bors.ws wrote: Suppose I have a page with the default constructor and with the page parameter constructor. Should my page parameter constructor be called with an empty not null PageParameter instance when no parameters are provided? Shouldn't the default constructor be used instead? What about in unit tests? I've seen the tester use the page parameter constructor and pass it a reference to an empty PageParameters when I invoke tester.startPage(MyPage.class, null).
Re: Should we expect empty PageParameters for pages that have such a constructor yet no parameters are available?
Awsome, thanks! One last question, in my tests I keep a collection of page parameters for my pages. I've noticed at some point wicket tester (or deeper in the framework, prob. in the page factory) that the PageParameter instance used had the parameters combined from different instances. That scared me a bit. ie: I have customConstructors = new HashMapClass? extends AdminPage, PageParameters(); customConstructors.put(PageA.class, new PageParameters().set(pageID, -1)); customConstructors.put(PageB.class, new PageParameters().set(sessionID, -2)); and then later when running the test: PageParameters pageParameters = customConstructors.get(pageClass); if(pageParameters != null) { log.info(Running + pageTest.getTestName() + for + pageClass.getName() + with pageParameters of + pageParameters); pageTest.runTest(getTester(), pageClass, customConstructors.get(pageClass)); } Above log stamenent would print correct, but when in the page constructor both pageID AND sessionID are present althrough those are 2 different instances of PageParameters. Should I dig more into that? To me that sounds like a bug :( On Wed, Jan 15, 2014 at 2:24 PM, Martin Grigorov mgrigo...@apache.orgwrote: AFAIR if there are no request parameters then Wicket first uses the Java default constructor (no parameters) if available. If there is no such constructor then Wicket constructs an empty PageParameters and uses it for the constructor with PageParameters. If none are available then an error is thrown. Consult with DefaultPageFactory.java Martin Grigorov Wicket Training and Consulting On Wed, Jan 15, 2014 at 8:50 PM, Paul Bors p...@bors.ws wrote: Btw, I just noticed that adding this constructor eliminates the problem: public MyPage() { this(null); } So I take it Wicket tries to build the page via the Page(PageParameters) but instead of using a null reference to the PageParameters it builds an object without any parameters in it. If the default constructor is added, then it can invoke the custom PageParameters constructor with the null reference. I don't recall this behavior. Has this changed recently? On Wed, Jan 15, 2014 at 1:45 PM, Paul Bors p...@bors.ws wrote: Suppose I have a page with the default constructor and with the page parameter constructor. Should my page parameter constructor be called with an empty not null PageParameter instance when no parameters are provided? Shouldn't the default constructor be used instead? What about in unit tests? I've seen the tester use the page parameter constructor and pass it a reference to an empty PageParameters when I invoke tester.startPage(MyPage.class, null).
Re: [ANNOUNCE] Apache Wicket 6.13.0 adds free online user guide
Thanks Andres, and also as per the rest of the community... Thank you for the guide :) On Wed, Jan 15, 2014 at 1:17 PM, Andrea Del Bene an.delb...@gmail.comwrote: Thank you Paul, I've fixed the quickstart I think this release broke the quick start at: http://wicket.apache.org/start/quickstart.html When the page loads at first the Command Line is empty at first. Null initial model object? Selecting a different version from the drop down and then back to 6.13.0 will fill in the form field. On Mon, Jan 13, 2014 at 11:00 AM, Martijn Dashorst dasho...@apache.org wrote: - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Static HTML is validating the dynamic content
When I develop my components I drop example output so that if the HTML file is open by itself once can get a preview of a mock-up of how the app might look like. Usefull for when the component is to be styled and etc. I just noticed that at runtime in development mode the HTML validation fails when you use HTML tags like strings for mock-ups such as: a href=# wicket:id=url wicket:remove[http:// host:port/troubleshooting.clients?id=###]/wicket:remove/a Unexpected RuntimeException Last cause: Tag 'port' (line 14, column 79) has a mismatched close tag at '/wicket:remove' (line 14, column 117) Markup The problem is in file:/C:/MsSQL/glassfish/glassfish/domains/knoa/generated/jsp/console-war-7.1.21-SNAPSHOT/loader_10085307/com/mycom/console/admin/clients/troubleshooting/ExtractAgentLogsPanel$SuccessPanel.html:
Re: Nested Forms
Also see section 12.5 Nested forms of the Free Guide at http://wicket.apache.org/guide/guide/chapter11.html#chapter11_5 On Fri, Jan 10, 2014 at 12:56 PM, Marios Skounakis msc...@gmail.com wrote: Html does not support nested forms. Wicket works around this limitation and allows form nesting. I think it changes the html so that the inner form tags become span tags. This means that whenever any of the forms needs to be posted, everything is posted since in the result html there's only one form element. Wicket provides some mechanisms so that submitting the outer form submits (validates and updates models) the inner forms too, whereas submitting an inner form only validates and updates the model for this inner form. You can find more details in the wicket free guide ( https://code.google.com/p/wicket-guide) and at https://cwiki.apache.org/confluence/display/WICKET/Nested+Forms (not sure how up-to-date is the latter). On Fri, Jan 10, 2014 at 7:04 PM, gmparker2000 greg.par...@brovada.com wrote: When submitting an inner form it appears that the request contains all of the outer and inner form fields. Is this the expected behaviour? From what I can see it appears that the outer form is submitted, and only the inner form parameters are validated and used for model updates. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Nested-Forms-tp4663620.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Publish Javadoc or big number of Static pages
I'm not following, you want to show 200 static HTML pages in your webapp? Your webapp must be running on top of a web server, why not just let the web server server the static content? What's the dynamic part of those 200 static HTML pages? Do you need to authenticate the user first or something before they can view the static content? On Fri, Jan 10, 2014 at 12:23 PM, andre seame andre1...@hotmail.fr wrote: Hello, I have a wicket site to manage different points on the project. I receive 200 HTML pages for the developer teams. These pages are javadoc pages. I add some dynamic pages built over the static pages with wicket. And I will to publish all pages with wicket. As I have static HTML pages and as want to use them immediately, I must use the Frame HTML mechanism. So I will have a page with a left part: the menu or the list of pages, and on the right part (in another frame) the associated page. So I am using the http://www.wicket-library.com/wicket-examples/frames/ examples. This works, but I have 2 problems: - I have to created 200 page.java/page.class, one per static pages! - I have to modify the code (creating a new page.java/page.class) if there is a new static page. So what is the easiest way to manage this problem? May be an idea is to say to wicket: just for this time, the associated html page to genericsaticpage.class is staticpage1.html. Of course for another link, the associated html page to genericsaticpage.class will be staticpage2.html. I can also image to have staticpage.html : ...bodydiv wicket:id=The body will be read from the static page/body. In this case, I will lost the css or the javascript code that may be included in the original static page. Thanks for any pointers or suggestion.
Re: ListenerInvocationNotAllowedException and EmptyRequestHandler
Do you have a stack trace? On Fri, Jan 10, 2014 at 11:00 AM, jchappelle jchappe...@4redi.com wrote: We are starting to get ListenerInvocationNotAllowedExceptions intermittently in production. What are some suggestions for handling this? My first thought is return an EmptyRequestHandler in my custom IExceptionMapper implementation. Is this a bad practice? Thanks for your time. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListenerInvocationNotAllowedException-and-EmptyRequestHandler-tp4663618.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Auto-save feature
Well yes, that work in progress might be a mistake. Think of it as getting a lock on a db record for too long. Or worst, not locking at all and then later updating the record. You would override the state without knowing it changed since you last read it. So, if you devise such work in progress you should also be concerned about warning the user that some field's value has been changed by another concurrent user that saved the same form while the first user was still editing the page. What I'm more curious about is, how did you come up against this use-case in the first place? Why is it that your user edits a form for so long that the session times out and its user input is lost? On Wed, Jan 8, 2014 at 9:42 AM, gmparker2000 greg.par...@brovada.comwrote: The idea would be to save the form data as work in progress in a separate storage area. If the user's session times out they would be directed to a page telling them that their session timed out which would give them the option to attempt to resume the work. I was able to bypass validation by setting a flag on the form. Since we use a layer of composite controls on top of the standard wicket controls I was able to tap into the form validation flag in each control to override required fields and validations as required. I understand why turning off the default form processing doesn't apply validations and therefore does not update models, but it would be nice to have a way to override this and just update models. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Auto-save-feature-tp4663517p4663549.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Auto-save feature
You can take a look over the Form Porcessing at http://wickettraining.com/ten-things-every-wicket-programmer-should-know.html I'm supprised that the free guide didn't include such an ilustration (or maybe I missed it). Check out also the Default Form Processing of the free Guide: http://wicket.apache.org/guide/guide/single.html#chapter11_1 On Wed, Jan 8, 2014 at 11:32 AM, Paul Bors p...@bors.ws wrote: Well yes, that work in progress might be a mistake. Think of it as getting a lock on a db record for too long. Or worst, not locking at all and then later updating the record. You would override the state without knowing it changed since you last read it. So, if you devise such work in progress you should also be concerned about warning the user that some field's value has been changed by another concurrent user that saved the same form while the first user was still editing the page. What I'm more curious about is, how did you come up against this use-case in the first place? Why is it that your user edits a form for so long that the session times out and its user input is lost? On Wed, Jan 8, 2014 at 9:42 AM, gmparker2000 greg.par...@brovada.comwrote: The idea would be to save the form data as work in progress in a separate storage area. If the user's session times out they would be directed to a page telling them that their session timed out which would give them the option to attempt to resume the work. I was able to bypass validation by setting a flag on the form. Since we use a layer of composite controls on top of the standard wicket controls I was able to tap into the form validation flag in each control to override required fields and validations as required. I understand why turning off the default form processing doesn't apply validations and therefore does not update models, but it would be nice to have a way to override this and just update models. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Auto-save-feature-tp4663517p4663549.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Auto-save feature
So how do you solve the problem of two users concurrently editing the same record? You could do something like gMail that saves a draft of your e-mail only that your draft is your model(s) serialized. However, you still need to indicate to the user that some of the fields which have been saved in the draft have been updated. ie: You would need to restore the draft model and compare it against the life one. Perhaps you should do that on an Ajax timer event on the page that would check each 10 secs or so for changes done to the back-end? Boy, I'm glad I don't have to worry about your use-case :) Perhaps you should start a new e-mail thread specific to your use-case instead of auto-save. On Wed, Jan 8, 2014 at 11:43 AM, gmparker2000 greg.par...@brovada.comwrote: Its not so much that the user will actively be working on the form that long. Its more a case that users can get distracted for extended periods of time while they are working with our form. If they half finish the data entry, then have to take a few phone calls, it wouldn't be great if they lost everything they were working on. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Auto-save-feature-tp4663517p4663559.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Auto-save feature
This is a bizarre use-case to some extent. You want the user's input to be saved prior to the user's session expiring. Wouldn't it be easier to run validation and save the user's input as the field level? This way as the user leaves a form field, the validation kicks in and if correct the new input is saved. Granted you would have to work some other flows, you might want different states of saving the user input. One committed to the storage tier, the other committed to the user's name space as one can navigate through your UI and leave from one page to another. Should you still show the auto-saved form fields which override the actual state of the application? Probably not, so you'll have to reset the auto-saved data each time the page is rendered. Is a cool idea duh, persist the user's input between sessions (although not right as you'll hide the actual state). ie: What happens when it takes me 1 hr to time out my session, I come back tomorrow and see my old input instead of what's really in the database? ~ Thank you, Paul Bors On Tue, Jan 7, 2014 at 2:52 PM, Marios Skounakis msc...@gmail.com wrote: In a similar case I've used a wrapper around validators which controls whether they run or not. This way you can automatically parse the form component tree, find all validators and wrap them in a new Validator that runs them only if needed. I've done this because I wanted to be able to have the standard wicket validators run in onValidateModelObjects(). I.e. I wanted my model to be updated even if some validations did not pass. So here's the basic idea (this is slightly modified from my actual code so it may have small errors). public abstract class ValidatorWrapperT implements IValidatorT { IValidatorT validator; public DelayedValidator(IValidatorT validator) { super(); this.validator = validator; } protected abstract boolean shouldRun(); @Override public void validate(IValidatableT validatable) { if (!shouldRun()) return; if (validatable.getValue() == null) { if (!(validator instanceof INullAcceptingValidator?)) { return; } } validator.validate(validatable); } } It is reasonably easy to extend this for FormValidators as well. This does not handle the case of conversion errors, i.e. in an Integer TextField if the user input is not a valid integer, it won't update the model object. So if you auto-save and the reload, such fields will be empty. This is something that would actually be a lot of work to handle because you would need a custom model that would actually store string values. Cheers Marios On Tue, Jan 7, 2014 at 9:32 PM, gmparker2000 greg.par...@brovada.com wrote: Interesting but unfortunately our form is very complex with repeaters, etc. So I don't think this would work for us. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Auto-save-feature-tp4663517p4663522.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Incorrect error message?
Well, is actually correct. Let me draw your component tree for you: Page - Border border -- Label l - Label l So thus, did you add the l label to the Page? If not, shouldn't the markup error rise? If you would have defined a wicket:id=l in the Page's HTML then you'd get a missing component by ID 'l. At least if I remember how those 2 exception work. I haven't gotten them in a while since we have tools in our IDEs to ensure that Java's and HTML's component tree match. See the Eclipse market place or IntelliJ IDEA's plugin market places and search for Wicket :) On Tue, Jan 7, 2014 at 3:55 PM, Thies Edeling tedel...@gmail.com wrote: Hi With 6.12.0 I have: val border = new Border(border) val l = new Label(l, label) l.setOutputMarkupId(true) border.add(l) and when handling an ajax call, I'm add/replacing it in the wrong spot in the hierarchy: val replacement = new Label(l, labe2l) replacement.setOutputMarkupId(true) addOrReplace(replacement) target.add(replacement) Wicket gives me a MarkupNotFoundException which is a little odd and least put me in the complete wrong direction. It doesn't seem like the correct exception, right? org.apache.wicket.markup.MarkupNotFoundException: Markup not found for Component: [Component id = l] at org.apache.wicket.Component.internalRender(Component.java:2347) at org.apache.wicket.Component.render(Component.java:2307) gr, Thies
Re: MultiThreading issues with Wicket.
As per the API: Exception invoked when when stale link has been clicked. The page should then be rerendered with an explanatory error message. Read more about the Sateless Links http://wicket.apache.org/guide/guide/chapter9.html#chapter9_5 And about Page Versions: http://wicket.apache.org/guide/guide/chapter7.html Or provide us with a quickstart so we can see what's going on. Or the full stack trace at least. On Fri, Jan 3, 2014 at 10:13 AM, eaglei22 jchojnack...@gmail.com wrote: I seem to be able to avoid this by limiting the amount of rows I print to the screen from the ListView. I turned it into a PageableListView and put a max of 200 per page, and the problem went away. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MultiThreading-issues-with-Wicket-tp4663325p4663438.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Rationale for Converting to AngularJS/Spring MVC
Both reasons provided don't carry much wight. 1) Dificulty of maintanance/upgrading between major releases Our webapp was our reporting tool which morphed into a system administative tool currently with 54k lines of code in well over 1k public classes (conform Sonar). I migrated the webapp from Wicket 1.3.x to 6.x by myself in under 2 weeks simply by following the migration tutorials one by one. 2) Cost of tranning new developers Wicket itself is model much after the Java's Swing and it promotes fast adaptation for new developers (they teach Swing in college). Perhaps the new staff should consider spending 1 to 2 weeks reading one of the many books avaialble on Wicket, see: http://wicket.apache.org/learn/books/ I spent a good 3-4 weeks reading over Andreas' free guide whcih took so long because I was reading it a chpater a day on the subway ride to work while at the same time proof reading his new material. You can print the free guide via: http://wicket.apache.org/start/userguide.html I don't know AngualrJS too much as I never worked with it. To me it looks like another JS framework out there in the mixture of many that can very easily be integrated with Wicket. Perhaps you should suggest that to your upper management. Anyhow, that's my two cents. On Fri, Jan 3, 2014 at 12:12 PM, Richard W. Adams rwada...@up.com wrote: I don't have first hand knowledge of the decision making process, but I understand there were two main factors: 1. Difficulty in changing/maintaining the intermediate corporate libraries, especially when considering whether to make the leap from Wicket 1.4.17 to 6.x. 2. A perception of excessive cost in training new developers to use Wicket. I myself am fairly comfortable with Wicket now (after 2 years experience), but have to admit the leaning curve was pretty steep. From: Ernesto Reinaldo Barreiro reier...@gmail.com To: users@wicket.apache.org Date: 01/03/2014 10:58 AM Subject:Re: Converting Wicket to AngularJS/Spring MVC May I ask what was the rationale of choosing Angular JS + Spring MVC over Wicket? I have been using Backbone + Spring MVC in a project, imposed by client, for the last month and to be honest I'm not impressed with productivity you achieve using the combination: not to mention that developers need to know both JavaScript + Java server side to be completely productive. IMHO this will impact your productivity in a negative way. The only reason I could see to make that move is if scalability is an issue. Best regards, Ernesto ** This email and any attachments may contain information that is confidential and/or privileged for the sole use of the intended recipient. Any use, review, disclosure, copying, distribution or reliance by others, and any forwarding of this email or its contents, without the express permission of the sender is strictly prohibited by law. If you are not the intended recipient, please contact the sender immediately, delete the e-mail and destroy all copies. **
Re: Component hierarchy
Look over how ModalWindow is implemented in Wicket. It allows a Panel or WebPage as its content in a modal JS window. Heck, you might just want to style that. ~ Thank you, Paul Bors On Fri, Jan 3, 2014 at 8:41 AM, Pierre Goupil goupilpie...@gmail.comwrote: Good afternoon, all, and happy new year! I'm currently trying to implement a component: a jQuery dialog window which could have any component (extending Panel?) as its content. Let me explain: I'd have a dialog which would be added to the page by the client code of the dialog so that it's the client who would take care of having a a unique wicket:id for the dialog and then, in return the dialog would add to its own markup the client Panel, maybe with a CompoundPropertyModel in order to have state, forms, etc. in the dialog. And the question is: how could I have a generic dialog container which adds any component to its children? May be I'm not looking in the right direction, any advice will be appreciated. Regards, Pierre
Re: MultiThreading issues with Wicket.
Looks like your Jetty is calling the Wicket filter that in turn crashes because of an EOF Exception. How about a quick start? On Fri, Jan 3, 2014 at 6:06 PM, eaglei22 jchojnack...@gmail.com wrote: Here is the errors I get: Jan 03 17:04:20 WARN RequestCycleExtra- Jan 03 17:04:20 WARN RequestCycleExtra-Handling the following exception org.eclipse.jetty.io.RuntimeIOException: org.eclipse.jetty.io.EofException at org.eclipse.jetty.io.UncheckedPrintWriter.setError(UncheckedPrintWriter.java:107) at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:280) at org.eclipse.jetty.io.UncheckedPrintWriter.write(UncheckedPrintWriter.java:295) at org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:251) at org.apache.wicket.protocol.http.HeaderBufferingWebResponse.sendRedirect(HeaderBufferingWebResponse.java:117) at org.apache.wicket.request.handler.render.WebPageRenderer.redirectTo(WebPageRenderer.java:157) at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:300) at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:310) at org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) at org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) at org.apache.wicket.request.cycle.RequestCycle.executeExceptionRequestHandler(RequestCycle.java:319) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:233) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:474) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:934) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:404) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:869) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:151) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114) at org.eclipse.jetty.server.Server.handle(Server.java:341) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1065) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:220) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:515) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) at java.lang.Thread.run(Thread.java:662) Caused by: org.eclipse.jetty.io.EofException at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:149) at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:96) at java.io.ByteArrayOutputStream.writeTo(ByteArrayOutputStream.java:109) at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:283) at org.eclipse.jetty.server.HttpWriter.write(HttpWriter.java:107) at
Re: Is Behavior.beforeRender useful for component configuration?
Do you want the configuration code to run each time before the component your behavior is attached to renders? Then go ahead and place your code there, otherwise if you only want the configuration code to run only once see the onConfigure() method: /** * Called immediately after the onConfigure method in a component. Since this is before the * rendering cycle has begun, the behavior can modify the configuration of the component (i.e. * setVisible(false)) * * @param component *the component being configured */ public void onConfigure(Component component) { } On Thu, Jan 2, 2014 at 4:00 AM, Per Newgro per.new...@gmx.ch wrote: Hi, we have an admin menu in our menu bar. All items in admin menu are configured by @AuthorizeAction. I would like to hide the admin item in main menu if no menu item is visible in the admin menu (e.g. user is not an admin). To avoid repeating myself in every onBeforeRender method of the included components i've tried to use a behavior. It tries to hide parent by checking if all items are invisible and configure the parent's visibility. But this is not working (configure(component) and beforeRender(component)). Configure is not usable because the render permission (setRenderAllowed) is determined after the Behavior.onConfigure was called. So the action takes place before the child is authorized. Then i thaught let's do it in beforeRender. But there we got a message org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy after render phase has started (page version cant change then anymore) at org.apache.wicket.Component.checkHierarchyChange(Component.java:3595) at org.apache.wicket.Component.addStateChange(Component.java:3524) at org.apache.wicket.Component.setVisible(Component.java:3213) This is comprehensible for me so far. No change after rendering started. But how shall i hide the parent without repeating myself in every Component.onBeforeRender method? This is working. But i have to duplicate my code for ListItem, ListView and AdminPanel. We use wicket-6.11 Thanks for helping me out of the wood. Per Here some markup of my admin menu markup. code html xmlns:wicket wicket:panel a href=# data-dropdown-toggle=#admin-navigation wicket:message=title:navigation.fullHeading.administration i class=icon-admin?/i /a div id=admin-navigation ul wicket:container wicket:id=items wicket:enclosure child=menu-item li a wicket:id=menu-item span wicket:container wicket:id=short-titleShort title/wicket:container /span /a /li /wicket:enclosure /wicket:container wicket:enclosure child=reindexSearch li a wicket:id=reindexSearch onclick=alert('Rebuild initiated'); return true; wicket:message key=navigation.fullHeading.reindexReindex Search Server/wicket:message /a /li /wicket:enclosure /ul /div /wicket:panel /html code In page menu is included this way: code ... ul class=button-toolbar id=main-navigation wicket:container wicket:id=buttonMenu/wicket:container wicket:enclosure child=adminNavigation li wicket:id=adminNavigation/li /wicket:enclosure /ul ... /code --- Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus Schutz ist aktiv. http://www.avast.com
Re: MultiThreading issues with Wicket.
I don't think that's a good idea since ArrayList is not thread-safe :) http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html *Note that this implementation is not synchronized.* If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it *must* be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. If no such object exists, the list should be wrapped using the Collections.synchronizedListhttp://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList(java.util.List)method. This is best done at creation time, to prevent accidental unsynchronized access to the list: List list = Collections.synchronizedList(new ArrayList(...)); On Thu, Jan 2, 2014 at 11:43 AM, eaglei22 jchojnack...@gmail.com wrote: I have temporarily fixed it by first loading the lines into a string ArrayList and just read from that list.. I don't really see any latency issues, so maybe this can be considered a good alternative? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MultiThreading-issues-with-Wicket-tp4663325p4663389.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is Behavior.beforeRender useful for component configuration?
For my AuthorizationBehavior I've used bind(): /** * Bind this handler to the given component. This method is called by the host component * immediately after this behavior is added to it. This method is useful if you need to do * initialization based on the component it is attached and you can't wait to do it at render * time. Keep in mind that if you decide to keep a reference to the host component, it is not * thread safe anymore, and should thus only be used in situations where you do not reuse the * behavior for multiple components. * * @param component *the component to bind to */ @Override public void bind(Component component) { super.bind(component); if(!isAuthorized(component)) { updateComponent(component); } } protected void updateComponent(Component component) { if(permission.getType() == Permission.Type.VIEW) { if(Page.class.isAssignableFrom(component.getClass())) { Session.get().error(ResourceKeyHelper.resourceValue(access.denied)); throw new RestartResponseAtInterceptPageException(ConsoleApplication.console().getHomePage()); } component.setVisible(false); } else { if(LabeledWebMarkupContainer.class.isAssignableFrom(component.getClass())) { component.setEnabled(false);// Form components are disabled } else { component.setVisible(false);// Everything else is hidden } } } Then I have different subclasses that override my own updateComponent() with the business logic similar to what you describe. Only I don't go up the component tree looking for the parent, I like attaching this to the parent and have it deterministic based on its children. On Thu, Jan 2, 2014 at 1:47 PM, Per Newgro per.new...@gmx.ch wrote: Hey Paul, thanks for your reply. Sadly i can not use Behavior.configure(Component). The code will be executed (see Component.configure) before the render action is granted to the component by applying the isActionAuthorized(Render). See Component.java line 1030 to 1039 for details. Do i have another option? Thanks Per Am 02.01.2014 16:55, schrieb Paul Bors: Do you want the configuration code to run each time before the component your behavior is attached to renders? Then go ahead and place your code there, otherwise if you only want the configuration code to run only once see the onConfigure() method: /** * Called immediately after the onConfigure method in a component. Since this is before the * rendering cycle has begun, the behavior can modify the configuration of the component (i.e. * setVisible(false)) * * @param component *the component being configured */ public void onConfigure(Component component) { } On Thu, Jan 2, 2014 at 4:00 AM, Per Newgro per.new...@gmx.ch wrote: Hi, we have an admin menu in our menu bar. All items in admin menu are configured by @AuthorizeAction. I would like to hide the admin item in main menu if no menu item is visible in the admin menu (e.g. user is not an admin). To avoid repeating myself in every onBeforeRender method of the included components i've tried to use a behavior. It tries to hide parent by checking if all items are invisible and configure the parent's visibility. But this is not working (configure(component) and beforeRender(component)). Configure is not usable because the render permission (setRenderAllowed) is determined after the Behavior.onConfigure was called. So the action takes place before the child is authorized. Then i thaught let's do it in beforeRender. But there we got a message org.apache.wicket.WicketRuntimeException: Cannot modify component hierarchy after render phase has started (page version cant change then anymore) at org.apache.wicket.Component.checkHierarchyChange(Component.java:3595) at org.apache.wicket.Component.addStateChange(Component.java:3524) at org.apache.wicket.Component.setVisible(Component.java:3213) This is comprehensible for me so far. No change after rendering started. But how shall i hide the parent without repeating myself in every Component.onBeforeRender method? This is working. But i have to duplicate my code for ListItem, ListView and AdminPanel. We use wicket-6.11 Thanks for helping me out of the wood. Per Here some markup of my admin menu markup. code html xmlns:wicket wicket:panel a href=# data-dropdown-toggle=#admin-navigation wicket:message=title:navigation.fullHeading.administration i class=icon-admin?/i /a div id=admin-navigation ul wicket:container wicket:id=items wicket:enclosure child=menu-item li a wicket:id=menu-item span
Re: MultiThreading issues with Wicket.
Your main thread must be the request cycle's worker thread that wicket has for your syncronized on the page. If something takes more than 1 sec as you would expect ti to, it must mean that whatever you're doing on the page is running your CPU high keeping it bussy long enough for the 10 secs. In other words, you must be doing something wrong. Here's an example of how to detach a thread from your Wicket page: public class DictionaryMappingPage extends AdminPage { ... // Background thread's status private TaskStatus taskStatus = new TaskStatus(); // Progress bar that will replace the button private ProgressBar progressBar = new ProgressBar(progress, new ModelInteger(0)); public DictionaryMappingPage() { ... // timer that will be started on the button press final AjaxSelfUpdatingTimerBehavior updatingTimerBehavior = new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)) { private static final long serialVersionUID = 1L; @Override protected void onPostProcessTarget(final AjaxRequestTarget target) { // Progress bar is deterministic, so hack around it to make it look non-deterministic (we don't know how long this will take) if(progressBar.getModelObject() = 90) { progressBar.setModelObject(0); } progressBar.forward(target, 10); if (taskStatus.isDone()) { stop(target); if (taskStatus.getError() == null) { info(ResourceKeyHelper.resourceValue(dictionary.mapping.export.success)); ajaxDownload.initiate(target); } else { log.debug(taskStatus.getError().getLocalizedMessage(), taskStatus.getError()); error(ResourceKeyHelper.resourceValue(taskStatus.getFeedbackKey())); } // Toggle visibility of components on the page (button and progress bar) exportButton.setEnabled(true); exportButton.setVisible(true); progressBar.setVisible(false); MyPageUtils.refreshComp(target, exportButton); MyPageUtils.refreshComp(target, progressBar); MyPageUtils.refreshFeedback(target, exportButton); } else { if(exportButton.isEnabled()) { stop(target); } } } }; // Adds the behaviour somewhere on the page, title in this case pageTitle.add(updatingTimerBehavior); ... FormVoid exportForm = ... add(exportForm); // Default page state progressBar.setVisible(false); progressBar.setOutputMarkupId(true); progressBar.setOutputMarkupPlaceholderTag(true); exportForm.add(progressBar); // There we go... exportButton = new AjaxButton(exportButton, new ResourceModel(dictionary.mapping.export.file.button)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { // User selected the Export button, toggle hide the button and show the progress bar (they are overlayed) setEnabled(false); setVisible(false); progressBar.setVisible(true); progressBar.setModelObject(0); // Let's keep track of the background task taskStatus = new TaskStatus(taskStatus.getError(), taskStatus.getFeedbackKey()); // Start the timer event that will update the UI each second via Ajax updatingTimerBehavior.restart(target); // We have a thread pool at the application level to share for background tasks ConsoleApplication.THREAD_POOL.submit(new Runnable() { // This is our Runnable detached from the page, updatingTimerBehavior will keep refreshing the page public void run() { try { // Inside working thread, perform your background tasks here } finally { taskStatus.setDone(true); } } }); MyPageUtils.refreshComp(target, this); MyPageUtils.refreshComp(target, progressBar); } }; exportButton.setOutputMarkupId(true); exportButton.setOutputMarkupPlaceholderTag(true); exportButton.add(buttonStyle); exportForm.add(exportButton); ... } ... /** * Lightweight implementation of a background task's state as it integrates with the UI. * * TODO: If we start using more than one background task we might as well switch to using wicket-progressbar. * @see a href=https://github.com/wicketstuff/core/wiki/Progressbar wicket-progressbar/a */ private class TaskStatus
Re: MultiThreading issues with Wicket.
And for your curiosity, the THREAD_POOL is nothing but an ExecutorService inside the WebApplication: /** * Cashed thread pool used for background tasks that are outside of the Quartz scheduler. * TODO: We might be better off using a spring service */ public static final ExecutorService THREAD_POOL = Executors.newCachedThreadPool(); As per the JavaDoc, this is not the best solution but is working so far for the single button we have. Once we'll add a second use-case I'm planning on switching it to a Spring service so we can inject the pool itself. On Thu, Jan 2, 2014 at 3:15 PM, Paul Bors p...@bors.ws wrote: Your main thread must be the request cycle's worker thread that wicket has for your syncronized on the page. If something takes more than 1 sec as you would expect ti to, it must mean that whatever you're doing on the page is running your CPU high keeping it bussy long enough for the 10 secs. In other words, you must be doing something wrong. Here's an example of how to detach a thread from your Wicket page: public class DictionaryMappingPage extends AdminPage { ... // Background thread's status private TaskStatus taskStatus = new TaskStatus(); // Progress bar that will replace the button private ProgressBar progressBar = new ProgressBar(progress, new ModelInteger(0)); public DictionaryMappingPage() { ... // timer that will be started on the button press final AjaxSelfUpdatingTimerBehavior updatingTimerBehavior = new AjaxSelfUpdatingTimerBehavior(Duration.seconds(1)) { private static final long serialVersionUID = 1L; @Override protected void onPostProcessTarget(final AjaxRequestTarget target) { // Progress bar is deterministic, so hack around it to make it look non-deterministic (we don't know how long this will take) if(progressBar.getModelObject() = 90) { progressBar.setModelObject(0); } progressBar.forward(target, 10); if (taskStatus.isDone()) { stop(target); if (taskStatus.getError() == null) { info(ResourceKeyHelper.resourceValue(dictionary.mapping.export.success)); ajaxDownload.initiate(target); } else { log.debug(taskStatus.getError().getLocalizedMessage(), taskStatus.getError()); error(ResourceKeyHelper.resourceValue(taskStatus.getFeedbackKey())); } // Toggle visibility of components on the page (button and progress bar) exportButton.setEnabled(true); exportButton.setVisible(true); progressBar.setVisible(false); MyPageUtils.refreshComp(target, exportButton); MyPageUtils.refreshComp(target, progressBar); MyPageUtils.refreshFeedback(target, exportButton); } else { if(exportButton.isEnabled()) { stop(target); } } } }; // Adds the behaviour somewhere on the page, title in this case pageTitle.add(updatingTimerBehavior); ... FormVoid exportForm = ... add(exportForm); // Default page state progressBar.setVisible(false); progressBar.setOutputMarkupId(true); progressBar.setOutputMarkupPlaceholderTag(true); exportForm.add(progressBar); // There we go... exportButton = new AjaxButton(exportButton, new ResourceModel(dictionary.mapping.export.file.button)) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { // User selected the Export button, toggle hide the button and show the progress bar (they are overlayed) setEnabled(false); setVisible(false); progressBar.setVisible(true); progressBar.setModelObject(0); // Let's keep track of the background task taskStatus = new TaskStatus(taskStatus.getError(), taskStatus.getFeedbackKey()); // Start the timer event that will update the UI each second via Ajax updatingTimerBehavior.restart(target); // We have a thread pool at the application level to share for background tasks ConsoleApplication.THREAD_POOL.submit(new Runnable() { // This is our Runnable detached from the page, updatingTimerBehavior will keep refreshing the page public void run() { try { // Inside working thread, perform your background tasks here } finally { taskStatus.setDone(true
Re: Calendar is showing below the DatePicker, when cliked in IE8
Check your HTML's DOCTYPE and/or override the CSS for the DatePicker on that page to make it work for IE8 as well. On Tue, Dec 17, 2013 at 7:25 AM, wicket_new_user venkyra...@gmail.comwrote: Hi, When DatePicker is clicked, the Calendar is showing below the icon in IE8. But it is displaying properly in IE 9,10, Chrome browsers. As this is the last one in the page, has to scroll down to select the date value. Any suggestions on this. thanks in advance. Venky -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Calendar-is-showing-below-the-DatePicker-when-cliked-in-IE8-tp4663073.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: RadioGroup selected model value
See also section 12.10 of the Wicket Guide Working with radio buttons and checkboxes at: http://wicket.apache.org/guide/guide/chapter11.html#chapter11_10 On Mon, Dec 16, 2013 at 3:44 AM, Selom pierre.kou...@uhb.fr wrote: Hi Sven, Thanks for the clarification . Now I understand much more. I tried out your code your code with the following modification. Now when the page is shown , * the object with value debut2 is effectively selected as expected*. I Thanks you . - Selom -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/RadioGroup-selected-model-value-tp4662998p4663034.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: a little question about add(new XComponent(id).setVisible(false))
@Serban, Careful with the comsysto.com links as there is already a version of the Wicket Guide at wicket.apache.org/guide. I think the link you're looking for is: http://wicket.apache.org/guide/guide/chapter6.html#chapter6_4 Jira tickets for the guide can be logged in Wicket's Jira queue under the Guide component: https://issues.apache.org/jira/browse/WICKET/component/12321210 @Decebal, I use the EmptyPanel instead of setting the visibility to false as the component tree is smaller :) I do toggle the EmptyPanel and later replace it with whatever I need in onBeforeRender() and then re-render the parent component via Ajax. ~ Thank you, Paul Bors On Tue, Dec 17, 2013 at 6:53 AM, Serban.Balamaci thespamtr...@gmail.comwrote: I've found it nicely explained here: http://wicketguide.comsysto.com/guide/chapter6.html#chapter6_4 seems it's a great guide. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/a-little-question-about-add-new-XComponent-id-setVisible-false-tp4663041p4663072.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wrong JavaDoc for FeedbackMessages#hasMessage(int)
We should still edit the JavaDoc for FeedbackMessages#hasMessage(int) and instruct to use ExactLevelFeedbackMessageFilter. Otherwise might get confused if the don't review the implementation. ~ Thank you, Paul Bors On Fri, Dec 6, 2013 at 4:11 AM, Martin Grigorov mgrigo...@apache.orgwrote: I've backported ExactLevelFeedbackMessageFilter from master branch. It has been introduced for: WICKET-4585 WicketTester.assertErrorMessages passes even if the message isn't visible on the page WICKET-5128 Allow for Testing Component relative Feedback-Messages in Wicket-Tester No need of new ticket. On Thu, Dec 5, 2013 at 6:33 PM, Paul Bors p...@bors.ws wrote: Yes, we are using the .FeedbackMessages#hasMessage(IFeedbackMessageFilter) as we had no other choice. I'll file a ticket with a pull request now that I got used to GitHub :) ~ Thank you, Paul Bors On Thu, Dec 5, 2013 at 11:39 AM, Martin Grigorov mgrigo...@apache.org wrote: Hi, You are right. But I think we can only improve the javadoc. You will have to use org.apache.wicket.feedback.FeedbackMessages#hasMessage(org.apache.wicket.feedback.IFeedbackMessageFilter) with a filter that makes exact match. I have the feeling that we added such filter but I can only see org.apache.wicket.feedback.ErrorLevelFeedbackMessageFilter that has the same behavior as #hasMessage(int). Please file a ticket and we will add it. On Thu, Dec 5, 2013 at 5:24 PM, Paul Bors p...@bors.ws wrote: Currently (as of 6.10.0) the JavaDoc on the FeedbackMessages#hasMessage(int) states that it returns true if and only if a message with the specified level was registered. However it relies on FeedbackMessage#isLevel(int) which in turn return true if whether the message level is greater than or equal to the given level. Isn't that contradicting? I registered an Error message for my form field and I have a new behavior checking for Warnings that performs its duties because an Error message is at a lever greater than the Warning level. ~ Thank you, Paul Bors
Wrong JavaDoc for FeedbackMessages#hasMessage(int)
Currently (as of 6.10.0) the JavaDoc on the FeedbackMessages#hasMessage(int) states that it returns true if and only if a message with the specified level was registered. However it relies on FeedbackMessage#isLevel(int) which in turn return true if whether the message level is greater than or equal to the given level. Isn't that contradicting? I registered an Error message for my form field and I have a new behavior checking for Warnings that performs its duties because an Error message is at a lever greater than the Warning level. ~ Thank you, Paul Bors
Re: Wrong JavaDoc for FeedbackMessages#hasMessage(int)
Yes, we are using the .FeedbackMessages#hasMessage(IFeedbackMessageFilter) as we had no other choice. I'll file a ticket with a pull request now that I got used to GitHub :) ~ Thank you, Paul Bors On Thu, Dec 5, 2013 at 11:39 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, You are right. But I think we can only improve the javadoc. You will have to use org.apache.wicket.feedback.FeedbackMessages#hasMessage(org.apache.wicket.feedback.IFeedbackMessageFilter) with a filter that makes exact match. I have the feeling that we added such filter but I can only see org.apache.wicket.feedback.ErrorLevelFeedbackMessageFilter that has the same behavior as #hasMessage(int). Please file a ticket and we will add it. On Thu, Dec 5, 2013 at 5:24 PM, Paul Bors p...@bors.ws wrote: Currently (as of 6.10.0) the JavaDoc on the FeedbackMessages#hasMessage(int) states that it returns true if and only if a message with the specified level was registered. However it relies on FeedbackMessage#isLevel(int) which in turn return true if whether the message level is greater than or equal to the given level. Isn't that contradicting? I registered an Error message for my form field and I have a new behavior checking for Warnings that performs its duties because an Error message is at a lever greater than the Warning level. ~ Thank you, Paul Bors