Ajax and JS
Hello, I want to perform an Ajax operation using a JS. The situation is that I have a Dialog (from JQuery, well actually WiQuery) and I want a button there to perform an Ajax operation. How do I bind JS and Ajax? I tried AbstractDefaultAjaxBehavior and getUrl. I tried to make an ajaxLink and then to simulate the onclick of it. No success.. Thanks for any help Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
The better way tp add component directly
Hello, I have a situation that I am adding to Panel a Component. This component can actually be of several other panels (there's a factory that returns the correct Panel according to an enum). The Main (parent) panel can be changed via ajax. The ajax might change the enum type. In order to solve it, I am adding the specific (inner) panel in the onBeforeRender method: @Override protected void onBeforeRender() { Component component = myFactory.createSpecificCompnent(myComp, enumValue); add(component); } Is this the best and correct way doing that? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: The better way tp add component directly
actually we do call the addOrReplace method (I copied it incorrectly). However, the question remains, is there a different way of doing it other than in the onBeforeRender ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary 2010/5/2 Uwe Schäfer u...@thomas-daily.de Am 02.05.2010 15:44, schrieb Eyal Golan: The Main (parent) panel can be changed via ajax. The ajax might change the enum type. if you change it at runtime, would you not want to replace, instead of add? cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: New blog post Components v.s. Pages
We (try) to follow what nino suggested. We have pages that are based on reusable components. Pages are simple, and the components do the functionality. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Sun, Apr 18, 2010 at 2:56 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Interesting, I usually write components for my pages.. Have pages target at a specific functionality. Making the pages more simple to understand. my 2 cents. 2010/4/16 Iain Reddick iain.redd...@beatsystems.com: Thanks - I think insights from more experienced wicket developers are very welcome at the moment. I agree very much with what you say in the post that it's hard to find information about the best shape for a wicket application to meet your needs. Also the comment re component swapping - I certainly wasn't aware of this for quite some time, and it does shed a completely different light on how the framework can be used. - Original Message - From: Erwin Bolwidt ebolw...@worldturner.nl To: users@wicket.apache.org Sent: Friday, 16 April, 2010 2:35:50 PM Subject: New blog post Components v.s. Pages Hi, I created a blog posted titled Wicket best practices: Components v.s. Pages http://blog.worldturner.com/worldturner/entry/wicket_best_practices_components_v We've been using wicket at my current location for quite a few projects now and I'm writing a few blog entries on the things that we've found most convenient. Regards, Erwin Bolwidt - 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: resources folder / package
thanks Cemal and Apple. i think i got it. Will test it on Sunday. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Apr 16, 2010 at 5:13 AM, Apple Grew appleg...@gmail.com wrote: @Eyal Maybe you would like to have a look at this thread. http://n4.nabble.com/resource-css-loading-td1878209.html Regards, Apple Grew my blog @ http://blog.applegrew.com/ On Fri, Apr 16, 2010 at 2:41 AM, Eyal Golan egola...@gmail.com wrote: hi, thanks. I know this, but my question was different. I saw in some projects that the JS and CSS files are in the same hierarchy as the class that is used for their scope, but the main folder is different. Example: I have a Java class: com.myCompany.ResourceScope.java it is located under src. I have a file called MyCss.css, which is located under com.myCompany but it is located under resources folder. both src and resources are under the same project. in the projects I saw, you can call for this resource reference with the ResourceScope class. I tried to do the same without success. Any thoughts? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga meedi...@gmail.com wrote: You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
resources folder / package
Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: resources folder / package
hi, thanks. I know this, but my question was different. I saw in some projects that the JS and CSS files are in the same hierarchy as the class that is used for their scope, but the main folder is different. Example: I have a Java class: com.myCompany.ResourceScope.java it is located under src. I have a file called MyCss.css, which is located under com.myCompany but it is located under resources folder. both src and resources are under the same project. in the projects I saw, you can call for this resource reference with the ResourceScope class. I tried to do the same without success. Any thoughts? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Apr 15, 2010 at 4:46 PM, Sigmar Muuga meedi...@gmail.com wrote: You can define packages and put all CSS / JS files into them. Note that there must be some class also along with them, it may be an empty class. Then you can reference these resources using that class declaration. Note that if your css uses images, then you have to put correct paths into that css. Sigmar On Thu, Apr 15, 2010 at 2:43 PM, Eyal Golan egola...@gmail.com wrote: Hello to you all, it's been a very long time since I wrote here. I have a question regarding folder locations. I am working with WiQuery and it is unbelievable great. Also the support there (thanks indiana ;) ) In WiQuery there are 'themes' and the location of the CSS and images is in a separate folder called 'resources' , which has the same structure as of the Java classes themselves. I wanted to do the same in my project without success. Should I configure something other than just put the same hierarchy? thanks for the help. My question is Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
icons as checkboxes
Hi, How can I make a Component to act as a checkbox, but to show an icon instead? I want to show an icon (image) when not selected, and if the user clicks on it, it will be selected = selected icon. The model to use is a Boolean. I guess this is easy, but please provide some code / explanation. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: icons as checkboxes
thanks. i'll look into it and tell you what i've made :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Mar 11, 2010 at 12:06 PM, reiern70 reier...@gmail.com wrote: Hi Eyal, I do something similar here http://code.google.com/p/antilia/source/browse/trunk/com.antilia.web/src/com/antilia/web/beantable/ToggleSelectRowButton.java It is just a Panel with and AjaxLink and an image. When user click link a round-trip to the server toggles boolean state and redisplays the panel changing the image accordingly (selected or un-selected). Feel free to reuse the code or adapt it if it suits your needs. Best, Ernesto egolan74 wrote: Hi, How can I make a Component to act as a checkbox, but to show an icon instead? I want to show an icon (image) when not selected, and if the user clicks on it, it will be selected = selected icon. The model to use is a Boolean. I guess this is easy, but please provide some code / explanation. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - Eyal Golan egola...@gmail.com Visit: JVDrums LinkedIn: LinkedIn -- View this message in context: http://old.nabble.com/icons-as-checkboxes-tp27861120p27861503.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: jquery and wicket
thanks for the LegUp link :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Mar 9, 2010 at 12:11 PM, Richard Wilkinson richardjohnwilkin...@googlemail.com wrote: Hi Thorsten, The latest version of wiQuery is 1.0, which you can download the jar from the wiQuery site [1] or use maven. See the wiQuery LegUp maven archetype [2] for initial help setting it all up. As for working with plugins, yes it can be done quite easily by implementing the IWiQueryPlugin interface in your component, but you are probably better asking for help on the wiQuery mail list [3]. [1] - http://code.google.com/p/wiquery/ [2] - http://jweekend.com/dev/LegUp [3] - http://groups.google.com/group/wiquery -- Regards - Richard Wilkinson Developer, jWeekend: OO Java Technologies - Development and Training http://jWeekend.com On 9 March 2010 09:36, Thorsten aller...@fastmail.fm wrote: Hi, I'd like to use jquery in my wicket application. So far, I need tooltips. I think, I could use wiquery for that, right? On the wiquery homepage the latest build is Revision 44 from 04/07/2009. Is that the most recent one? Can I use jquery plugins in combination with wiquery, e.g. qtip (http://craigsworks.com/projects/qtip/) Thanks, Thorsten - 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: wiQuery components with server side state - live demo
Really cool demo! Is there a place where I can see source for the portal demo? If I show the guys at work I can use it, we will defently choose WiQuery. They're talking about GXT and other stuff which I really don't want to go into. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Mar 2, 2010 at 6:58 PM, Cemal A Bayramoglu ce...@jweekend.comwrote: We've been building a few wiQuery components [0], for clients' and internal projects. These wiQuery components typically maintain some of their state server-side, in the spirit of standard Wicket components. Here's a simple demo [1] to show some of them in action. Look carefully and you'll find lots of stuff to click on [2]. We could plan to open up the ones we may [3] if they look useful to you or you'd like to get involved with design/development/testing. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [0] includes components based on sortable portlet, jqGrid/Tree, jGrowl, jQuery UI: Accordian, Dialog, Tabs all integrated with Wicket using wiQuery (http://code.google.com/p/wiquery/) [1] http://labs.jWeekend.com/public/ [2] We'd naturally prefer if you didn't zap _all_ the records from our toy database! Yes, we know some of you will take this as an invitation to have a go! [3] No promises on dates just now, but it is something we'd like to do soon. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Layout manager
Thanks Ernesto. Luckily our company gave us legal permission to use Wiquery :) I will check it out. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Feb 10, 2010 at 11:12 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Check out [1] and look for LayoutPlugin.java and Layou.java. Ernesto [1]- http://wiquery.googlecode.com/svn/examples/wiquery-presentation-examples On Wed, Feb 10, 2010 at 10:05 AM, Josh Kamau joshnet2...@gmail.com wrote: Hello, Is there any Wicket project for making a layout manager similar to iGoogle or http://www.netvibes.com/#General We found a project with ExtJS that is not supported anymore . Is there a Wicket project for that? or for any other similar? Can Wiquery help with this? Thanks for helping out, I am looking for the same thing and i think i may have to learn JQuery and benefit from the hundreds of plugins availabe. I have been looking at WiQuery and i like the widgets but the layout is not implemented yet. (I perused the javadocs and didnt see the Layout class. The layout in the example seems to use JQuery.ui.layout directly) regards. On Tue, Feb 2, 2010 at 12:56 PM, Eyal Golan egola...@gmail.com wrote: Hello, Is there any Wicket project for making a layout manager similar to iGoogle or http://www.netvibes.com/#General We found a project with ExtJS that is not supported anymore . Is there a Wicket project for that? or for any other similar? Can Wiquery help with this? Thanks for helping out, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Layout manager
ran it. it's not exactly what we're looking for. any other suggestion? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Feb 2, 2010 at 12:20 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Yeah, swit. Service Temporarily Unavailable. ** Martin 2010/2/2 Ernesto Reinaldo Barreiro reier...@gmail.com: Do you mean this one? http://code.google.com/p/swit/ Ernesto On Tue, Feb 2, 2010 at 11:07 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! There was one wicket project which created panels and stylish buttons, but I can't recall where it is. ** Martin 2010/2/2 Eyal Golan egola...@gmail.com: Hello, Is there any Wicket project for making a layout manager similar to iGoogle or http://www.netvibes.com/#General We found a project with ExtJS that is not supported anymore . Is there a Wicket project for that? or for any other similar? Can Wiquery help with this? Thanks for helping out, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - 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
Layout manager
Hello, Is there any Wicket project for making a layout manager similar to iGoogle or http://www.netvibes.com/#General We found a project with ExtJS that is not supported anymore . Is there a Wicket project for that? or for any other similar? Can Wiquery help with this? Thanks for helping out, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: WicketExtensions DataTable : Creating a Links using Model value?
You can either override PropertyColumn's populateItem method, and add to the cell the link you want. Or you can use AbstractColumn. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Jan 18, 2010 at 8:24 AM, Ashika Umanga Umagiliya auma...@biggjapan.com wrote: Greetings, I was going through WicketExtensions DataTable source and I was wondering how to create a hyperlink using PropertyColumn. In docs it says: columns[0] = new PropertyColumn(new Model(Family Id), familyId); What I want to do is, 1) create a Link using the field value familyId,and directing to another page which display SubFamilies related to selected 'familyId' 2) create a Link which direct to another website . eg: http://www.ncbi.org/family?id=$familyid My domain model is as: One 'Family' has many 'SubFamily' objects. ||
Re: clearing a TextField
If you are working with PropertyModel / CompoundPropertyModel, then just set your field to null. Add the textField (or its container) to the Ajax-Target. That should work. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jan 14, 2010 at 6:55 AM, Steve Swinsburg steve.swinsb...@gmail.comwrote: Hello all, I have a list of items and an ajax form at the bottom so you can add items to the list, containing a single textfield and a submit button. On successful submit, the item is saved and the list is redrawn. Great! I want to clear the textfield though so new items can be added, since the textfield and form stays on page at all times. I tried: textField.clearInput(); target.addComponent(textField); and form.clearInput(); target.addComponent(form); and a few combinations of the above (!) but to no avail. Are these methods meant to clear the raw input from either the FormComponent or the Form itself? I would have thought so. The only way I could get it cleared was: textField.setModelObject(null); Is this how its meant to be or a bug? Just double checking. cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
js library to have a tooltip / modal
Hello everyone, I am looking for a nice JS that Wicket supports that will allow me to have a tooltip / modal effect. What I mean by that is, when the user hovers over a link, a tooltip will open and it will also allow the user to add something and submit. We can use a simple Wicket Modal, but I prefer something nicer. Or, thinking about it, what should I add to a link (ajax) so a Modal will be opened when hovering on it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: js library to have a tooltip / modal
thanks. I remembered seeing this a few weeks ago :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Jan 11, 2010 at 12:41 AM, shetc sh...@bellsouth.net wrote: http://flowplayer.org/tools/demos/tooltip/any-html.html http://flowplayer.org/tools/demos/tooltip/any-html.html -- View this message in context: http://old.nabble.com/js-library-to-have-a-tooltip---modal-tp27098635p27103455.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
As my English is not my mother's tongue, even though I do speak it pretty good, what is the meaning of pointy haired bosses? I think I can understand it, but hey, I want to know if these are the kinds of bosses I encountered too often.. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Jan 8, 2010 at 11:26 PM, Jonathan Locke jonathan.lo...@gmail.comwrote: honestly, your response is too thoughtful. these pointy haired bosses are self-serving. they don't care about training costs or developer pain and they don't really care if their org runs efficiently. what they care about is that if there is a failure, their choice didn't cause it. which is why the old saying goes nobody ever got fired for buying IBM. same seems to go for struts. an idiotic technology choice, but you won't get fired for making the same idiotic choice everyone else is making. Loritsch, Berin C. wrote: But why choose an inferior technology just because of its adoption numbers? The pointy haired bosses that do this believe in their heart of hearts that if you choose the same technology everyone else is using that they can turn thinking developers for mindless drones. It has more to do with avoiding training costs and rational thought, and more to do with trying to turn software development into an assembly line process. Reality never fits this mold, but it doesn't stop the pointy haired boss from trying. In this respect they are eternal optimists. -Original Message- From: leo.erlands...@tyringe.com [mailto:leo.erlands...@tyringe.com] Sent: Friday, January 08, 2010 4:09 AM To: users@wicket.apache.org Subject: Re: Help with Wicket Adoption Numbers Hi, We also had the same consideration when we chose Wicket. But why choose an inferior technology just because of it's Adoption Numbers? Also, Wicket is becoming more and more popular as people see the light :) Check out Jobs Trends (Relative Growth) here (JSF vs Struts vs Wicket): http://www.indeed.com/jobtrends?q=Struts%2C+JSF%2C+Wicketl=relative=1 We have a couple of hundred customers and so far the feedback is great both from our Developers and our Software Architects. Customers like that the GUIs are faster due to the simplicity of Ajax Adoption in Wicket. I also know that several large privately held companies in Sweden are using Wicket, as well as large Government Agencies (e.g. the Swedish Immigration Office). Sincerely yours Leo Erlandsson - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Help-with-Wicket-Adoption-Numbers-tp27069702p27082559.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ajax update a column header when changing a cell
Hi, I have a DataTable in which two columns are holding checkboxes (when selecting a checkbox, the other in the same row will be unselected). We chose checkboxes to enable the user to remove selections at all. I want to add a 'Select All' to the header. *My problem is how do I get the component of the header to add it to the ajax checkbox of the column?* I can solve this problem by adding the whole table to ajax checkboxes, but I prefer to pass as few lines in the ajax calls. Here's some code: private AbstractColumn newActionCheckboxColumn(final String approvedRejectReassign) { AbstractColumn p = new AbstractColumn(new ResourceModel(EditingTasksTablePanel. + approvedRejectReassign)) { private static final long serialVersionUID = 1L; public void populateItem(Item cellItem, String componentId, IModel rowModel) { EditingTask task = (EditingTask) rowModel.getObject(); cellItem.add(new TaskActionCheckboxPanel(componentId, task, approvedRejectReassign, cellItem.getParent() .getParent())); } @Override public Component getHeader(String componentId) { return new TaskActionCheckboxAllPanel(componentId, dataProvider, all+approvedRejectReassign, EditingTasksTablePanel.this); } }; return p; } TaskActionCheckboxPanel(String id, final EditingTask task, String approveRejectProperty, final Component... rowComponent) { super(id); final AjaxCheckBox checkbox = new AjaxCheckBox(checkbox, new PropertyModel(task, approveRejectProperty)) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { for (Component component : rowComponent) { target.addComponent(component); } } }; add(checkbox); } public TaskActionCheckboxAllPanel(String id, EditingTasksSortableDataProvider tasksSortableDataProvider, String checkAllProperty, final Component updatedComponent) { super(id); final AjaxCheckBox checkbox = new AjaxCheckBox(checkbox, new PropertyModel(tasksSortableDataProvider, checkAllProperty)) { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.addComponent(updatedComponent); } }; add(checkbox); this.setOutputMarkupId(true); } * I will make the two panels the same after doing all changes... thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
PageParameters and BookmarkablePageLink
Hi, I have a BookmarkablePageLink that I set parameters for it: ... String configurationName = conf; ConfigurastionUser firstEntity = getFirstEntity(); PageParameters parameters = new PageParameters(); parameters.add(configurationName, configurationName); parameters.add(firstEntity, firstEntity); Link link = new BookmarkablePageLink(link, LinkAttributesPage.class, parameters); ... And in LinkAttributesPage, I have: public LinkAttributesPage(PageParameters parameters) { String confName = parameters.getString(configurationName); ConfigurationUser user = parameters.get(firstEntity); ... } ConfigurationUser class is Serializable. I get a ClassCastException for the firstEntity. We use Wicket 1.3.6 Is this OK? My solution is to have a constructor for that page that accepts the correct parameters, but I want to know if it's a bug in the PagePArameters or if I am misusing it. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: PageParameters and BookmarkablePageLink
OK. I understand. Yes, I prefer passing it as an object. So I switched the page LinkAttributesPage to have a constructor that accepts the OBJECTS I need. If I ever need it with URL, then I'll add the PageParameters and will get the objects by keys. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Dec 9, 2009 at 2:23 PM, Bert taser...@gmail.com wrote: Hi, the parameter value (a ConfigurastionUser in your case) is converted to a String using toString(). Are you sure that you want to pass in that object and not an ID of it? Bert On Wed, Dec 9, 2009 at 12:57, Eyal Golan egola...@gmail.com wrote: Hi, I have a BookmarkablePageLink that I set parameters for it: ... String configurationName = conf; ConfigurastionUser firstEntity = getFirstEntity(); PageParameters parameters = new PageParameters(); parameters.add(configurationName, configurationName); parameters.add(firstEntity, firstEntity); Link link = new BookmarkablePageLink(link, LinkAttributesPage.class, parameters); ... And in LinkAttributesPage, I have: public LinkAttributesPage(PageParameters parameters) { String confName = parameters.getString(configurationName); ConfigurationUser user = parameters.get(firstEntity); ... } ConfigurationUser class is Serializable. I get a ClassCastException for the firstEntity. We use Wicket 1.3.6 Is this OK? My solution is to have a constructor for that page that accepts the correct parameters, but I want to know if it's a bug in the PagePArameters or if I am misusing it. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wizard and confirmation screens
Hi, I once had a similar problem and made it work even with static steps. Please allow me to share it. I wanted to use statics steps in order to feel them. Just for the fun, as I did wizard with dynamic steps before. So, I had a class Profile and wanted the wizard to create a new one (the wizard was also for editing. I had a boolean representing that). In the wizard, I use a CompundPropertyModel. My solution was to pass the profile instance to the summary step in the constructor. The magic of the CPM made the profile instance updated. In the summary step, I used onBeforeRender to show the updated profile. Here's some code: private void initProfileWizard(final Profile *profile*, final boolean newProfile, final PageParameters pageParametersForMainPage) { setModel(new CompoundPropertyModel(profile)); final Profile originalProfile = new Profile(profile); // Used in case of canceling edit. WizardModel wizardModel = new WizardModel() { private static final long serialVersionUID = 1L; @Override public void cancel() { super.cancel(); if (newProfile) { setResponsePage(ExtractRdbPage.class, pageParametersForMainPage); } else { final ViewProfilePage profilePage = new ViewProfilePage(originalProfile, pageParametersForMainPage); setResponsePage(profilePage); } } @Override public void finish() { super.finish(); setResponsePage(ExtractRdbPage.class, pageParametersForMainPage); } }; wizardModel.add(new ProfileBasicInfoStep(newProfile, ...)); wizardModel.add(new ProfileParametersStep(...)); wizardModel.add(new ViewProfileStep(*profile*, newProfile, ...)); init(wizardModel); } the above method is called from the constructor. The input profile may be new in one constructor or as parameter in another one. The wizard can be activated from two different pages (new profile, or edit profile), so I override the cancel. Don't mind other parameters... Here's the summary step: public ViewProfileStep(final Profile *profile*, boolean newProfile, ...) { ... @Override public void applyState() { if (newProfile) { profile.add(); } else { profile.update(); } } @Override protected void *onBeforeRende*r() { addOrReplace(new ViewProfilePanel(viewProfile, profile)); super.onBeforeRender(); } ... } I know, I could easily do it with Dynamic steps... Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Dec 2, 2009 at 10:06 AM, John Armstrong siber...@siberian.orgwrote: Found my problem. I needed to be using a DynamicWizardModel, not a WizardModel. This lets me add the steps as required and therefore get access to the version of the model at that stage of the process. I'd done this before, just had to paw through my personal svn to find how I implemented it. Yes, it was a 'Doh!' moment. Tx- John- On Mon, Nov 30, 2009 at 7:21 AM, John Armstrong siber...@siberian.org wrote: I believe my models are dynamic and self-contained. For example one is a Serviceorder that lives in the net.pnc.model.Serviceorder class. I have one instance of this in my wizard that is shared between all screens. All properties of Serviceorder are private to Serviceorder and accessed via getters/setters. So for example: add(new TextField(email, new PropertyModel(theOrder, email))); where 'theOrder' is the wizard scoped instance of a Serviceorder. That seems correct to me, can you confirm? I see in the wicket examples project there is a Wizard that uses a StaticContentStep for just this case. This leads me to believe that the only way to accomplish this task is to do the same and basically wrap that entire last step into the properties file and feed it the model? Feels wrong to me.. John- On Mon, Nov 30, 2009 at 3:07 AM, bgooren b...@iswd.nl wrote: Sounds like you are using static models instead of dynamic models. E.g. if you use Model.of(test), the model is essentialy self-contained. Whereas if you have a property called value in your wizard and you use new PropertyModel( Wizard.this, value ) , the model will depend on the value of the value property. Bas John Armstrong-3 wrote: It may just be late and I am missing the obvious but.. I have a wizard. The last step needs to be a confirmation step however it is constructed when added to the WizardModel in the Wizard constructor and at this stage all of the backing models are empty since, well, the user hasn't done anything. This means when I access models
Re: highlight a line in a table of AjaxLinks
I want to share with you what I took from the example. and to show how I implemented it. The example that Igor gave shows how to toggle a row. I needed a single selection. So: public class HighlitableDataItem extends Item { private static final long serialVersionUID = -1637144139412425548L; private boolean highlite = false; public HighlitableDataItem(String id, int index, IModel model) { super(id, index, model); setOutputMarkupId(true); add(new AttributeAppender(class, true, new Model(highlightItem), ) { private static final long serialVersionUID = 1L; @Override public boolean isEnabled(Component component) { return isHighlite(); } }); } public void setHighlite(boolean highlite) { this.highlite = highlite; } public boolean isHighlite() { return highlite; } } In the table: /** * Enable the user to have rows that can be highlighted */ @Override protected Item newCellItem(String cellItemId, int index, IModel model) { return new HighlitableDataItem(cellItemId, index, model); } And here's the method that is called when the AjaxLink (in the table) is clicked: private void itemClicked(final HighlitableDataItem clickedItem, final AjaxRequestTarget target) { ownersTable.visitChildren(HighlitableDataItem.class, new IVisitor() { public Object component(Component component) { HighlitableDataItem traveresedItem = (HighlitableDataItem) component; if (traveresedItem.isHighlite()) { traveresedItem.setHighlite(false); target.addComponent(traveresedItem); return traveresedItem; } return null; } }); clickedItem.setHighlite(true); target.addComponent(clickedItem); } I think I will create a visitor class exactly for that... Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Nov 16, 2009 at 6:18 PM, Eyal Golan egola...@gmail.com wrote: got it :) thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Nov 16, 2009 at 5:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: this will get you most of the way there http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage -igor On Mon, Nov 16, 2009 at 7:04 AM, Eyal Golan egola...@gmail.com wrote: Hello, we have a DataTable with one column that holds a fragment. In that fragment we put an AjaxLink: @Override public void populateItem(Item item, String componentId, IModel model) { CampaignEntity entity = (CampaignEntity) model.getObject(); Fragment frag = new OwnerLinkFragment(componentId, FirstEntitiesListInnerPanel.this,entity); item.add(frag); } private final class OwnerLinkFragment extends Fragment { private static final long serialVersionUID = 6949616729209808580L; public OwnerLinkFragment(String id, MarkupContainer markupProvider, final CampaignEntity entity) { super(id, linkFragment, markupProvider); AjaxLink link = new AjaxLink(link, new Model(entity.getDisplayName())) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { itemClickProducer.itemClicked(entity, target); } }; add(link); } } I want that when the user clicks on the link, the row will be highlighted and the previous selected (if there was) will be un-highlighted. I know that it is with CSS playing (changing classes), but how do I do that? And I guess that if I add this table to the ajaxTarget, then the previous line will not be highlighted. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: two questions about wizard
1. There is a method in step that evaluate the input and doesn't allow to continue. I'm not next to code, so I can't tell yuo exact;y. However, what I usually do is making a summary step that is the final step. So in your case you will have Step A - Step B - Summary step. summary step will have the finish button as it is the last. I found out that the summary step is really useful and helpful. most of our customers / pm etc want this summary step in all of our wizards. 2. there is an option to add Last button which should direct to the last step. you can enable / disable it (or hide it, i'm not sure) in each step. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Nov 19, 2009 at 4:00 PM, Decebal Suiu decebal.s...@gmail.comwrote: Hello, I have two question about the Wizard from wicket: 1) I have a wizard with two steps A and B both contains a specific panel with validators. As I see, the validation is done on 'Next' button. Clicking 'Next' in the first step will take me to the second one only if everything is ok. But on the second step (the last step) clicking 'Finish' I do not know how to avoid the wizard to be closed if validation is not ok. 2) Is possible in a step before the last one (the last one I want to be optional) to have both Next and Finish buttons enabled? Thanks, Decebal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
highlight a line in a table of AjaxLinks
Hello, we have a DataTable with one column that holds a fragment. In that fragment we put an AjaxLink: @Override public void populateItem(Item item, String componentId, IModel model) { CampaignEntity entity = (CampaignEntity) model.getObject(); Fragment frag = new OwnerLinkFragment(componentId, FirstEntitiesListInnerPanel.this,entity); item.add(frag); } private final class OwnerLinkFragment extends Fragment { private static final long serialVersionUID = 6949616729209808580L; public OwnerLinkFragment(String id, MarkupContainer markupProvider, final CampaignEntity entity) { super(id, linkFragment, markupProvider); AjaxLink link = new AjaxLink(link, new Model(entity.getDisplayName())) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { itemClickProducer.itemClicked(entity, target); } }; add(link); } } I want that when the user clicks on the link, the row will be highlighted and the previous selected (if there was) will be un-highlighted. I know that it is with CSS playing (changing classes), but how do I do that? And I guess that if I add this table to the ajaxTarget, then the previous line will not be highlighted. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: highlight a line in a table of AjaxLinks
got it :) thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Nov 16, 2009 at 5:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: this will get you most of the way there http://wicketstuff.org/wicket14/repeater/?wicket:bookmarkablePage=:org.apache.wicket.examples.repeater.OIRPage -igor On Mon, Nov 16, 2009 at 7:04 AM, Eyal Golan egola...@gmail.com wrote: Hello, we have a DataTable with one column that holds a fragment. In that fragment we put an AjaxLink: @Override public void populateItem(Item item, String componentId, IModel model) { CampaignEntity entity = (CampaignEntity) model.getObject(); Fragment frag = new OwnerLinkFragment(componentId, FirstEntitiesListInnerPanel.this,entity); item.add(frag); } private final class OwnerLinkFragment extends Fragment { private static final long serialVersionUID = 6949616729209808580L; public OwnerLinkFragment(String id, MarkupContainer markupProvider, final CampaignEntity entity) { super(id, linkFragment, markupProvider); AjaxLink link = new AjaxLink(link, new Model(entity.getDisplayName())) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { itemClickProducer.itemClicked(entity, target); } }; add(link); } } I want that when the user clicks on the link, the row will be highlighted and the previous selected (if there was) will be un-highlighted. I know that it is with CSS playing (changing classes), but how do I do that? And I guess that if I add this table to the ajaxTarget, then the previous line will not be highlighted. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getCallbackUrl question
Any one ?
Re: WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5:::: failed: null
Jeremy, That's the problem. I didn't have an exception. It's a warning in a catch clause in WebResponse. I copied the stack trace when I stopped in a break point in that location. I will do what you suggest and look the 'close' method. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Oct 7, 2009 at 4:43 PM, Jeremy Thomerson jer...@wickettraining.comwrote: Well, it's hard to say. When you include a stack trace for an error, it's helpful if you can get the full stack trace (with the exception and caused by) because I can't tell which line actually put you into the catch. But it seems like something is closing your response before you get to this redirect method. I'd put a breakpoint on the close method of the http response to see if it's being closed before you get to this one. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Oct 7, 2009 at 2:05 AM, Eyal Golan egola...@gmail.com wrote: BTW, the 'null' is the message of the exception. Looking at the exception in the break-point: the exception is: org.mortbay.jetty.EofException thanks. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Oct 7, 2009 at 1:18 AM, Jeremy Thomerson jer...@wickettraining.comwrote: null - should mean NullPointerException do you get the stacktrace to see where it's coming from? Paste into reply -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 6, 2009 at 12:41 PM, Eyal Golan egola...@gmail.com wrote: Hi, I did some refactoring in an old Wicket code amd I get the warning message in the subject: 2009-10-06 19:37:34,484 WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5 failed: null I tried to debug, did some breakpointing etc. but could not understand why do I get this. Can someone give me a hint on where to start looking and to understand what's going on? Thanks, Eyal Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5:::: failed: null
Hi Jeremy, Below is the stack trace: Thread [btpool0-0] (Suspended (breakpoint at line 238 in WebResponse)) BufferedWebResponse(WebResponse).redirect(String) line: 238 BufferedWebResponse.close() line: 66 WicketFilter.doGet(HttpServletRequest, HttpServletResponse) line: 372 WicketFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 201 ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1065 SecurityFilter.doFilterInternal(HttpServletRequest, HttpServletResponse, FilterChain) line: 35 SecurityFilter(OncePerRequestFilter).doFilter(ServletRequest, ServletResponse, FilterChain) line: 75 ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1065 ClearUserDetailsFilter.doFilterInternal(HttpServletRequest, HttpServletResponse, FilterChain) line: 23 ClearUserDetailsFilter(OncePerRequestFilter).doFilter(ServletRequest, ServletResponse, FilterChain) line: 75 ServletHandler$CachedChain.doFilter(ServletRequest, ServletResponse) line: 1065 ServletHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 365 SecurityHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 185 SessionHandler.handle(String, HttpServletRequest, HttpServletResponse, int) line: 181 WebAppContext(ContextHandler).handle(String, HttpServletRequest, HttpServletResponse, int) line: 689 WebAppContext.handle(String, HttpServletRequest, HttpServletResponse, int) line: 391 HandlerCollection.handle(String, HttpServletRequest, HttpServletResponse, int) line: 114 Server(HandlerWrapper).handle(String, HttpServletRequest, HttpServletResponse, int) line: 139 Server.handle(HttpConnection) line: 285 HttpConnection.handleRequest() line: 457 HttpConnection$RequestHandler.headerComplete() line: 751 HttpParser.parseNext() line: 500 HttpParser.parseAvailable() line: 209 HttpConnection.handle() line: 357 SelectChannelConnector$ConnectorEndPoint(SelectChannelEndPoint).run() line: 329 BoundedThreadPool$PoolThread.run() line: 475 We use Wicket 1.3.6 Thanks for your help. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Oct 7, 2009 at 1:18 AM, Jeremy Thomerson jer...@wickettraining.comwrote: null - should mean NullPointerException do you get the stacktrace to see where it's coming from? Paste into reply -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 6, 2009 at 12:41 PM, Eyal Golan egola...@gmail.com wrote: Hi, I did some refactoring in an old Wicket code amd I get the warning message in the subject: 2009-10-06 19:37:34,484 WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5 failed: null I tried to debug, did some breakpointing etc. but could not understand why do I get this. Can someone give me a hint on where to start looking and to understand what's going on? Thanks, Eyal Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5:::: failed: null
BTW, the 'null' is the message of the exception. Looking at the exception in the break-point: the exception is: org.mortbay.jetty.EofException thanks. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Oct 7, 2009 at 1:18 AM, Jeremy Thomerson jer...@wickettraining.comwrote: null - should mean NullPointerException do you get the stacktrace to see where it's coming from? Paste into reply -- Jeremy Thomerson http://www.wickettraining.com On Tue, Oct 6, 2009 at 12:41 PM, Eyal Golan egola...@gmail.com wrote: Hi, I did some refactoring in an old Wicket code amd I get the warning message in the subject: 2009-10-06 19:37:34,484 WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5 failed: null I tried to debug, did some breakpointing etc. but could not understand why do I get this. Can someone give me a hint on where to start looking and to understand what's going on? Thanks, Eyal Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5:::: failed: null
Hi, I did some refactoring in an old Wicket code amd I get the warning message in the subject: 2009-10-06 19:37:34,484 WARN [org.apache.wicket.protocol.http.WebResponse] - redirect to ?wicket:interface=:5 failed: null I tried to debug, did some breakpointing etc. but could not understand why do I get this. Can someone give me a hint on where to start looking and to understand what's going on? Thanks, Eyal Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
HttpSessionStore instead of the default SecondLevelCacheSessionStore
Hi, I read this post http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/ and he suggested to use HttpSessionStore instead of the second cache... I looked into the javadoc and the code itself and understood the differences. However, can anyone explain in a bit more detail the implications / differences of using the Http instead of the SecondLayer? The reason I'm asking this, is because, if it's better use, then I want to convince my team that we change the implementation of our application to use Http store. Thanks very much. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: HttpSessionStore instead of the default SecondLevelCacheSessionStore
Thank you all. This thread was very informative and educated. Peter, I will try the two suggestions you've mentioned. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: CSS and Javascript in Modal Panel
we used Page in the modal instead of Panel. In the page we added all header contributers. I'm not sure, but what if you add these contributers to the page that the modal window is in? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Sep 10, 2009 at 9:28 AM, Oliver-Sven Fritsch o...@3blogos.comwrote: Hi everybody! I want to use modal panels for forms which seems to be a good choice. Some of my forms need to have multiple pages which I would like to display on tabs. Tabbing work fine in normal wicket panels and pages when I provide the necessary CSS and Javascript. But somehow the modal panel is completly imune to it. First I tried to include the formatting and script directly in the markup for my modal panel which doesn't work. Then I tried to do this using the JavascriptPackageResource (nad css) in the class which wont work too. Is there a way to add css formating and javascript functionallity to modal panels beyond the default one? Using my scripts and css on ordinary pages works perfectly well. Regards Oliver -- Oliver-Sven Fritsch 3B LOGOS Logik+Logistik GmbH Kaiserdamm 32, D-14057 Berlin, Tel.: 30 61 47 42 Geschäftsführer: Dr. Friedrich Barounig Sitz: Berlin, Amtsgericht Charlottenburg, HRB 69523 UID: DE 198252668, SteuerNummer: 27/004/04695 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to embed one wicket app into another
I go with Martin, use iFrame. This is what we do. We have two Wicket apps, running on the same machine, the web.xml triggers two different Wicket apps. Why you ask? an old and a VERY BAD decision. In order to navigate from one app to the other we actually use URLs. In order to show page from app B in the A app (the main), we show it in iframe and calling URLs. We had to implement a very bad security patch. One of my main assignments currently, is to merge the two applications back to one. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Sep 10, 2009 at 7:33 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Use Iframe ** Martin 2009/9/10 Quan Zhou betoget...@gmail.com: sorry, i forget to say this two apps are installed in different servers.each is a single standalone app. so i think i can't embed panelB into PageA. On Thu, Sep 10, 2009 at 11:58 AM, Jeremy Thomerson jer...@wickettraining.com wrote: If you have created good self-contained components, you should be able to just embed PanelB into PageA -- Jeremy Thomerson http://www.wickettraining.com On Wed, Sep 9, 2009 at 10:54 PM, Quan Zhou betoget...@gmail.com wrote: Hi.I've developed my simple forum with Wicket(we call it A), and I want to embed it into another website (B) developed by Wicket. like, the left panel and the navigator panel are both from B, and the right panel is from A, I dont want to use Frame because my page will be complicated. Does anyone have this kind of experience? Thanks in advance and I hope you understand my question. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DownloadLink and Resource
Hi, I have two separate questions/wishes: we use Wicket 1.3.6 DownloadLink - can we add a getter for fileName (I can open an issue in JIRA if it's necessary). Resource: onResourceRequested is final so I can't override the ResourceStreamRequestTarget in the line cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream)); Is it possible to add something like: protected ResourceStreamRequestTarget getResourceStreamRequestTarget(IResourceStream resourceStream) { return new ResourceStreamRequestTarget(resourceStream); } so we could override the ResourceStreamRequestTarget that is used? thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Help on wizard solution...
I had some experience with what you need so i hope I could help you if you need something. I implemented the dynamic wizard and it was actually lots of fun :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Sep 8, 2009 at 5:51 PM, Muro Copenhagen copenha...@gmail.comwrote: Thanks Pedro and Peter, I'll try the DynamicWizardModel, it seems as the right choice. But a quick google search didn't provide any example, so i must try making it work. Hopefully it will... Best Regards Muro On Tue, Sep 8, 2009 at 4:35 PM, Pedro Santos pedros...@gmail.com wrote: I think the wizard is the correct approach... You can try use DynamicWizardModel on your wizard. javadoc: * Wizard model that is specialized on dynamic wizards. Unlike the default, static * {...@link WizardModel wizard model}, this model isn't very intelligent, but rather delegates much * of the work and knowledge to the {...@link IDynamicWizardStep dynamic wizard steps} it uses. on IDynamicWizardStep you can implement the ordering and navegation rules based on database and page params. On Tue, Sep 8, 2009 at 11:20 AM, Muro Copenhagen copenha...@gmail.com wrote: Hi, I could use some input on how to solve a problem i have. In my web-app i have some cases, and each cases have several questions. And i want the user to flow between the pages in a wizard manner like the example in: http://www.wicket-library.com/wicket-examples/wizard/ The only problem i have is that all the questions are database driven, and is not a fixed set of pages. But the wizard example is in the link is fixed. How would i make a dynamic database driven wizard, where the content of the wizard pages are database driven? Or is the wizard approach not the right way of doing it...? What i want to achieve is a user browsing through several question in case, with the option of moving backwards between the question. Any input from anyone ...? Best Regards Muro
problem with ResourceLink
Hi, We have the following code: static public ResourceLink getResourceLink(String id,byte[] data,final String title,String contentType){ ResourceLink resourceLink = new ResourceLink(id, new CustomResource(data,contentType,title)){ private static final long serialVersionUID = 1L; @Override protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, title); } }; //resourceLink.add(new Label(title,new Model(title))); return resourceLink; } and CustomResource is: public class CustomResource extends Resource{ String filename = ; ByteArrayResource byteArrayResource = null; public CustomResource (byte[] data,String contentType,String filename){ byteArrayResource = new ByteArrayResource(contentType,data,filename); this.filename = filename; } public IResourceStream getResourceStream() { return byteArrayResource.getResourceStream(); //return getFile(); //return getAttachment(); } } when the user presses a link of a file named: myFile.doc a save dialog is opened and the file name is ui.doc I looked into the code and found that in Resource#onResourceRequested there's the line: cycle.setRequestTarget(new ResourceStreamRequestTarget(resourceStream)); When I debugged and changed the value of fileName in ResourceStreamRequestTarget to bla.doc I got the bla.doc in the save dialog. We use Wicket 1.3.6 How can I call the constructor of ResourceStreamRequestTarget with the file name? Another question, Is there a way to get the content type out of the file without hard coding? now we have this: private String getContentType(String fileName){ fileName = fileName.toLowerCase(); String contentType = null; if (fileName.endsWith(.doc)) { contentType = application/msword; } else if (fileName.endsWith(.html) || fileName.endsWith(.txt) || fileName.endsWith(.log) || fileName.endsWith(.properties)) { contentType = text/html; } else if (fileName.endsWith(.pdf)) { contentType = application/pdf; } else if (fileName.endsWith(.xls)) { contentType = application/vnd.ms-excel; } else if (fileName.endsWith(.pot) || fileName.endsWith(.pps) || fileName.endsWith(.ppt)) { contentType = application/vnd.ms-powerpoint; } else if (fileName.endsWith(.zip)) { contentType = application/x-zip-compressed; } else if (fileName.endsWith(.jpg)) { contentType = image/jpeg; } else if (fileName.endsWith(.png)) { contentType = image/png; } else if (fileName.endsWith(.gif)) { contentType = image/gif; } else if (fileName.endsWith(.mp3)) { contentType = audio/mpeg; } else if (fileName.endsWith(.bmp)) { contentType = image/bmp; } else { //try { //contentType =text/+fileName.substring(fileName.lastIndexOf(.)+1); //} catch (Exception e) { //} } return contentType; } BTW, I've noticed that there's DownloadLink. Should we use this? Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Help on wizard solution...
+1 for john Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Form and PageParameters
Is it a must that you use PageParameters for RequestPage? Do you need an access to it also from a URL (after mounting it in your Application). I think that a nicer way is to add a constructor that accepts the values. Even better, I would have created a POJO model. Use a CompoundPropertyModel with the form, and pass this object to the RequestPage. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I have created a RequestPage html page containing a form (= search criteria) and a list (= Data View where the result set of data retrieved in a DB according to search criteria is displayed). When the user clicks on the search criteria button of this page, the request is redirected to the RequestPage where we extract the search criteria values and pass them to the service in charge to retrieve the data. In the java class accompagning this page, I have overrided the onSubmit method of the submit button to pass the value of the form fields public RequestPage(final PageParameters parameters) { ... Form form = new Form(searchCriteriaRequest); // Add fields fRequestId = new TextField(fRequestId, new Model()); fFileName = new TextField(fFileName, new Model()); form.add(fRequestId); form.add(fFileName); // Add buttons button = new Button(button) { @Override public void onSubmit() { parameters.add(requestId, fRequestId.getValue()); parameters.add(fileName, fFileName.getValue()); setResponsePage(RequestPage.class, parameters); } }; form.add(button); add(form); In the constructor of this RequestPage, I call a populate method with PageParameters // Populate list with search criteria values populateList(parameters.getKey(requestId), parameters.getKey(fileName)); Questions : 1) Is it the good way to handle PageParameters and Form in Wicket ? If this is not the case, can someone point me to a good example ? 2) The fields filled in the previous post of my page are not removed when I repost a new request on my page. How can I reset these fields from the request of the new post ? Regards, Charles Moulliard Senior Enterprise Architect Apache Camel Committer * blog : http://cmoulliard.blogspot.com
Re: Form and PageParameters
back to my original question, do you actually need this page to have a constructor with PageParameters? hint - if you want a user to get it with nice URL, then yes. You can call one constructor to the other (sometimes tricky in situation like yours), or you can have an init() method that does everything and call it from each constructor. everything Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Sep 7, 2009 at 4:34 PM, cmoulliard cmoulli...@gmail.com wrote: Many thanks for your help. With the modifications you propose, everything works fine Here is what I changed in the onSubmit method of the button public void onSubmit() { setResponsePage(new RequestPage((RequestModel) this.getForm().getModelObject())); } Question : Do I have need to duplicate the code between the two constructors ? I mean Do I need to have in double ? final FeedbackPanel feedback = new FeedbackPanel(feedback); add(feedback); RequestForm requestForm = new RequestForm(requestForm); add(requestForm); . egolan74 wrote: You can have two constructors in your page. If you work 'internally' then you can use the one that accepts a pojo. If you work with URL, then the one that accepts PageParameters will be used. the setResponsePage can accept a Page and not only a class, so what you can do is create your page: new RequestPage(myPojoModelObject), and then put it in the setResponsePage parameter. IllegalArgumentException: A child with id 'requestList' already means that you added it already to your page. AFAICS you don't go to a new page in the button submit so you add the list over and over again. if you want to update a list, use a dynamic model for the content and update it. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Sep 7, 2009 at 1:58 PM, cmoulliard cmoulli...@gmail.com wrote: Thx for the reply. You are right, it is not a must to use PageParameters but as this is my first Wicket project, I have started to work with simple things. In the meantime, I have had a look to the formInput example where a CompoundPropertyModel is used. I have adapted the Form to work with it. My question is now : When I call the first time my page, the url is : http://localhost/request. Wicket receives this request and the constructor RequestPage(PageParameter pageParameter) is called. Next, after filling my form in the page and clicking on the onSubmit button, the request is submitted to the same page. How can I retrieve the values of the CompoundPropertyModel from my form in this case ? Do I have to do something particular in the setResponsePage(RequestPage.Class) to pass the compoundPropertyModel ? Do I need to create two different constructors : one for PageParameters and the other to handle CompoundPropertyModel ? Regards, Charles egolan74 wrote: Is it a must that you use PageParameters for RequestPage? Do you need an access to it also from a URL (after mounting it in your Application). I think that a nicer way is to add a constructor that accepts the values. Even better, I would have created a POJO model. Use a CompoundPropertyModel with the form, and pass this object to the RequestPage. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Sep 7, 2009 at 11:38 AM, Charles Moulliard cmoulli...@gmail.comwrote: Hi, I have created a RequestPage html page containing a form (= search criteria) and a list (= Data View where the result set of data retrieved in a DB according to search criteria is displayed). When the user clicks on the search criteria button of this page, the request is redirected to the RequestPage where we extract the search criteria values and pass them to the service in charge to retrieve the data. In the java class accompagning this page, I have overrided the onSubmit method of the submit button to pass the value of the form fields public RequestPage(final PageParameters parameters) { ... Form form = new Form(searchCriteriaRequest); // Add fields fRequestId = new TextField(fRequestId, new Model()); fFileName = new TextField(fFileName, new Model()); form.add(fRequestId); form.add(fFileName); // Add buttons button = new Button(button) { @Override public void
AbortWithWebErrorCodeException and RequestCycle newRequestCycle
Hello, We have in our application the following code: /** * @see org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request, * org.apache.wicket.Response) */ @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) { if (PageExpiredException.class.isAssignableFrom(e.getClass())) { return null; } else { e.printStackTrace(); System.out.println(e.getMessage()); return new InternalErrorPage(getErrorDisplay(e)); } } else { // In development we want to see the exception return null; } } }; } Also, in our base page we have this protected void verifyAccess(PageParameters pageParameters) { // Redirect to Login page on invalid access. if (!isUserLoggedIn()) { throw new RestartResponseAtInterceptPageException(Login.class); } else if (! isPageAllowed(pageParameters)) { String url = pageParameters.getString(url); if (url != null) { throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN, url); } else { throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN); } } } 'verifyAccess' is called in the construction of the page. The problem I'm having is when the page is not allowed. We throw AbortWithWebErrorCodeException. The user gets a 403 error page. As expected, the onRuntimeException that configured in the WebApp is not reached. I thought to create a RuntimeException that will be thrown instead of the AbortWithWebErrorCodeException(...) and to analyze it in the onRuntimeException. But, is there a way to map the 403 error page to another page? A setting of the Application or even in the web.xml? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: AbortWithWebErrorCodeException and RequestCycle newRequestCycle
Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Sep 3, 2009 at 2:04 PM, Pedro Santos pedros...@gmail.com wrote: don't you gona fall in to the same problem this way? -- No. because if I throw a RuntimeException, then I will catch it in the onRuntimeError. Set error page in web.xml ?xml version=1.0 encoding=iso-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app error-page error-code 403 /error-code location /403.*html* /location /error-page /web-app --- Thanks. We'll try that. But is there a 'Wicket' way? If not, then I guess we'll use this one. On Thu, Sep 3, 2009 at 5:27 AM, Eyal Golan egola...@gmail.com wrote: Hello, We have in our application the following code: /** * @see org.apache.wicket.Application#newRequestCycle(org.apache.wicket.Request, * org.apache.wicket.Response) */ @Override public RequestCycle newRequestCycle(final Request request, final Response response) { return new WebRequestCycle(this, (WebRequest) request, (WebResponse) response) { @Override public Page onRuntimeException(Page page, RuntimeException e) { if (DEPLOYMENT.equalsIgnoreCase(getConfigurationType())) { if (PageExpiredException.class.isAssignableFrom(e.getClass())) { return null; } else { e.printStackTrace(); System.out.println(e.getMessage()); return new InternalErrorPage(getErrorDisplay(e)); } } else { // In development we want to see the exception return null; } } }; } Also, in our base page we have this protected void verifyAccess(PageParameters pageParameters) { // Redirect to Login page on invalid access. if (!isUserLoggedIn()) { throw new RestartResponseAtInterceptPageException(Login.class); } else if (! isPageAllowed(pageParameters)) { String url = pageParameters.getString(url); if (url != null) { throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN, url); } else { throw new AbortWithWebErrorCodeException(HttpServletResponse.SC_FORBIDDEN); } } } 'verifyAccess' is called in the construction of the page. The problem I'm having is when the page is not allowed. We throw AbortWithWebErrorCodeException. The user gets a 403 error page. As expected, the onRuntimeException that configured in the WebApp is not reached. I thought to create a RuntimeException that will be thrown instead of the AbortWithWebErrorCodeException(...) and to analyze it in the onRuntimeException. But, is there a way to map the 403 error page to another page? A setting of the Application or even in the web.xml? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Grouping messages in FeedbackPanel
Hi, Thanks for the reply, but it's not suitable for us. We want to create a generic FeedbakPanel for hat purpose and not in a specific page. What we actually want is that the messages will be list of lists. In the first iteration he completely created a new FeedbackPanel that inherits from a regular Panel. I suggested him not to break Wicket's framework and to try using the methods that Wicket allow. The main problem was that the list view of the messages is private (MessageListView). He eventually overridden the model and of course newMessageDisplayComponent ... We use version 1.3.6 Wouldn't it be nice to make the creation of the list protected? so we can override it? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Aug 31, 2009 at 11:25 AM, Eyal Golan egola...@gmail.com wrote: Hello, I there a way to change the feedback panel so we we group the messages according to levels: Errors: error message 1. error message 2. Info: info 1. etc. Do we need to *completely* override FeedbackPanel? My team mate wants to do that and I really holding him off. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Dynamic Optgroups in Wicket
I'm not sure this is what you want, but have a look at this: http://www.wicket-library.com/wicket-examples/ajax/choice It's drop down with ajax. What they did is setting in the model Map of values. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Sep 1, 2009 at 4:33 PM, Iain Reddick iain.redd...@beatsystems.comwrote: Looking at the API docs for the Select component, it would seem to be designed for more complex select situations (multi-select and optgroups). Unfortunately, I can't find any examples on using it with dynamically generated optgroups. Can anyone clarify how you would use the component like this, or suggest an alternative? Pedro Santos wrote: correction: In your application u CAN populate your list of options, and pass it to an similar component. On Tue, Sep 1, 2009 at 9:07 AM, Pedro Santos pedros...@gmail.com wrote: Gary, Take a look at wicket.markup.html.form.DropDownChoice http://wicketstuff.org/wicket13/compref/;jsessionid=9632D2AC608C8E9715009EAA5EEBD3FF?wicket:bookmarkablePage=:org.apache.wicket.examples.compref.DropDownChoicePage at http://wicketstuff.org/wicket13/compref/ on these examples, the option values ar not fixed in markup with no wicket:ids. They are passed to constructor of 2 lists that are used by DropDownChoice component model. In your application u can't populate your list of options, and pass it to an similar component. On Tue, Sep 1, 2009 at 8:57 AM, gary black gar20...@yahoo.com wrote: Hi,I am kind of new to Wicket and am having a difficult time finding some decent info on creating optgroups within selects.I basically have a structured list in my DB which in turn has children - perfect solution would be to use dynamically generated optgroups with their children which will of course be option tags.All the examples containing optgroups seem to have the optgroups fixed in markup with no wicket:ids.Any thoughts would be most welcomed.Gary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Grouping messages in FeedbackPanel
Hello, I there a way to change the feedback panel so we we group the messages according to levels: Errors: error message 1. error message 2. Info: info 1. etc. Do we need to *completely* override FeedbackPanel? My team mate wants to do that and I really holding him off. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: wicket auth roles example
10x Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 26, 2009 at 5:17 PM, Robin Sander robin.san...@gmx.net wrote: In wicket-examples there is an authentication and authorization app: http://www.wicket-library.com/wicket-examples/authentication/ http://www.wicket-library.com/wicket-examples/authorization/ On 26.08.2009, at 15:48, Eyal Golan wrote: Hello, is there an example, and if so, which, in wicketstuff or somewhere else for Wicket-Auth-Roles? is it the phone book app? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modal window and SSL
Still have some problems. we use Wicket 1.3.6 This is the JS for creating the modal: if (Wicket.Browser.isIELessThan7() || !Wicket.Browser.isIE()) { s+= iframe src='\/\/:' frameborder=\0\ id='+idContent+' allowtransparency=\false\ style=\height: 200px\+ /iframe; } else { s+= iframe src='about:blank' frameborder=\0\ id='+idContent+' allowtransparency=\false\ style=\height: 200px\+ /iframe; } I changed also the src to 0: without success. (after looking at WICKET-855https://issues.apache.org/jira/browse/WICKET-855 ) Igor, there is no call to any resource that is in an http:// path. Please advice, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 19, 2009 at 11:49 PM, Eyal Golan egola...@gmail.com wrote: Thanks Igor and Peter.Peter, we did change the JS that builds the ModalWindow. I'll look into it. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 19, 2009 at 8:56 PM, Peter Ertl pe...@gmx.org wrote: I remember this issue begin fixed already: https://issues.apache.org/jira/browse/WICKET-855 did someone change ModalWindow in the meantime? Am 19.08.2009 um 17:13 schrieb Igor Vaynberg: it just means that you are on a https page but it links to some http resources, eg images or javascripts. so make sure when you are on a https page all your resources are brought in via relative urls and do not start with http:// one specific example is that you can be on an https page but you include an website analytics script via an http url. -igor On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote: Hello all, We are having a problem when we work on an SSL environment. Whenever we open a modal popup window, there's this annoying message of IE that the user is trying to open both secure and non secure content. We changed the IE settings and the message is gone. But I want to understand what's causing it? I googled a bit about it and found some tips on changing the IREquestCycleProcessor: http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html It this what we should do? BTW, does anyone know how to run the embedded Jetty with SSL? Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - 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: Regarding datepicker popup when inputfield pressed
without looking into code, you probably need to add a behavior with onclick to the text field. look how it's done in the click on icon. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Aug 20, 2009 at 4:19 PM, copenhag copenhagen copenha...@gmail.comwrote: Hi Troy, Thanks for the swift answer. I know that you can attach a TextField to a DatePicker, but how would i make the calendar popup by just pressing the text field. As it is now i have to click the calendar icon, but i want to pop the calendar, by clicking on the field also. Just as in the example: http://blog.davglass.com/files/yui/cal2/ http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/ Best Regards Cemil On Thu, Aug 20, 2009 at 2:52 PM, Troy Cauble troycau...@gmail.com wrote: I'm doing this in 1.3.6. -troy import org.apache.wicket.extensions.markup.html.form.DateTextField; import org.apache.wicket.extensions.yui.calendar.DatePicker; ... DateTextField date = new DateTextField(date, MM/dd/); date.add(new DatePicker()); form.add(date); On Thu, Aug 20, 2009 at 7:52 AM, copenhag copenhagencopenha...@gmail.com wrote: Hi, Has anyone made it possible to attached an input field to the datepicker, so that the calendar popup's when the input field is selected ? I have tried, but i could not make it work. Also searching did not provide any wicket examples. I want the calendar to work as the example in this link: http://www.ajaxbestiary.com/2008/10/19/yui-calendar-popup-from-text-input/ Only difference is i want it to work in a Wicket environment. Please assist if anyone can help. Best Regards Cemil - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Date/Time Validation in Forms
Have a look at DateTimeField from YUI. In any case, you can always create a FormValidator so it can validate several components. BTW, you should really change the fields to be Integer and not String. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 19, 2009 at 5:49 AM, Arun Gupta arun.gu...@gmail.com wrote: I have a form model defined as: -- cut here -- public class RunlogFormModel implements Serializable { private String month; private String day; private String year; private String distance; private String hour; private String minute; private String second; private String comments; -- cut here -- The form provides drop-down list boxes for each of the model elements and added to the form like: add(new DropDownChoice(. new PropertyModel(...).add(new IValidatorString() { }))); The validator can validate each individual field. How do I perform compositve date validation, such as month/day/year = current_date ? Similarly how to perform validation of hour/minute/seconds 0 ? How do I validate presence of date/time ? Is this a good representation of model or should it be represented differently ? Thanks, -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Modal window and SSL
Hello all, We are having a problem when we work on an SSL environment. Whenever we open a modal popup window, there's this annoying message of IE that the user is trying to open both secure and non secure content. We changed the IE settings and the message is gone. But I want to understand what's causing it? I googled a bit about it and found some tips on changing the IREquestCycleProcessor: http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html It this what we should do? BTW, does anyone know how to run the embedded Jetty with SSL? Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Modal window and SSL
Thanks Igor and Peter.Peter, we did change the JS that builds the ModalWindow. I'll look into it. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 19, 2009 at 8:56 PM, Peter Ertl pe...@gmx.org wrote: I remember this issue begin fixed already: https://issues.apache.org/jira/browse/WICKET-855 did someone change ModalWindow in the meantime? Am 19.08.2009 um 17:13 schrieb Igor Vaynberg: it just means that you are on a https page but it links to some http resources, eg images or javascripts. so make sure when you are on a https page all your resources are brought in via relative urls and do not start with http:// one specific example is that you can be on an https page but you include an website analytics script via an http url. -igor On Wed, Aug 19, 2009 at 4:51 AM, Eyal Golanegola...@gmail.com wrote: Hello all, We are having a problem when we work on an SSL environment. Whenever we open a modal popup window, there's this annoying message of IE that the user is trying to open both secure and non secure content. We changed the IE settings and the message is gone. But I want to understand what's causing it? I googled a bit about it and found some tips on changing the IREquestCycleProcessor: http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html It this what we should do? BTW, does anyone know how to run the embedded Jetty with SSL? Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - 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
Dynamic nodes in Tree
Hello, I have a wizard that in the last step I show a tree with the selections made in the previous steps. The wizard uses static steps so actually the last step is built in advance. The problem is that the tree is not updated. For debugging purposes I have in the last step tables that show the same selections. The tables are updated (the DataProvider calls the iterator). I use DetachableModel for the tables. So in short, How can I updated the model of the tree. Below is the code of creating the tree that is made in the constructor: private TreeModel createTreeModel() { final Profile profile = (Profile) getModelObject(); final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(); final ConfigurationsNode configurationsNode = new ConfigurationsNode(profile, getString(extract.rdb.profile.view.section.configurations)); configurationsNode.addToParentNode(profile, rootNode); final CampaignsNode campaignsNode = new CampaignsNode(profile, getString(extract.rdb.profile.view.section.campaigns)); campaignsNode.addToParentNode(profile, rootNode); final UniverseNode universesNode = new UniverseNode(profile, getString(extract.rdb.profile.view.section.universes)); universesNode.addToParentNode(profile, rootNode); final BprsNode bprsNode = new BprsNode(profile, getString(extract.rdb.profile.view.section.bprs)); bprsNode.addToParentNode(profile, rootNode); final AuditCardsNode auditCardsNode = new AuditCardsNode(profile, getString(extract.rdb.profile.view.section.audits)); auditCardsNode.addToParentNode(profile, rootNode); final AllTicketsNode allTicketsNode = new AllTicketsNode( getString(extract.rdb.profile.view.section.allTickets)); allTicketsNode.addToParentNode(profile, rootNode); final TreeModel treeModel = new DefaultTreeModel(rootNode); return treeModel; } Here's one of the nodes: public final class ConfigurationsNode extends AbstractProfileDataNode { private static final long serialVersionUID = 3306972776261689364L; public ConfigurationsNode(final Profile profile, String title) { super(title); final ListConfiguration configurations = profile.getConfigurations(); for (final Configuration configuration : configurations) { final DefaultMutableTreeNode configurationNode = new DefaultMutableTreeNode() { private static final long serialVersionUID = 1L; @Override public Object getUserObject() { return configuration.getConfigurationName(); } }; add(configurationNode); } } @Override protected boolean isVisible(Profile profile) { return CollectionUtils.isNotEmpty(profile.getConfigurations()); } } @SuppressWarnings(serial) abstract class AbstractProfileDataNode extends DefaultMutableTreeNode { private final String title; AbstractProfileDataNode(String title) { this.title = title; } @Override public final Object getUserObject() { return title; } public final void addToParentNode(Profile profile, final DefaultMutableTreeNode parentNode) { if (isVisible(profile)) { parentNode.add(this); } } protected abstract boolean isVisible(Profile profile); } Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Dynamic nodes in Tree
OK. Found the solution: private IModel createTreeModel() { final IModel model = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { final Profile profile = (Profile) getModelObject(); final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(); final ConfigurationsNode configurationsNode = new ConfigurationsNode(profile, getString(extract.rdb.profile.view.section.configurations)); configurationsNode.addToParentNode(profile, rootNode); final CampaignsNode campaignsNode = new CampaignsNode(profile, getString(extract.rdb.profile.view.section.campaigns)); campaignsNode.addToParentNode(profile, rootNode); final UniverseNode universesNode = new UniverseNode(profile, getString(extract.rdb.profile.view.section.universes)); universesNode.addToParentNode(profile, rootNode); final BprsNode bprsNode = new BprsNode(profile, getString(extract.rdb.profile.view.section.bprs)); bprsNode.addToParentNode(profile, rootNode); final AuditCardsNode auditCardsNode = new AuditCardsNode(profile, getString(extract.rdb.profile.view.section.audits)); auditCardsNode.addToParentNode(profile, rootNode); final AllTicketsNode allTicketsNode = new AllTicketsNode( getString(extract.rdb.profile.view.section.allTickets)); allTicketsNode.addToParentNode(profile, rootNode); final TreeModel treeModel = new DefaultTreeModel(rootNode); return treeModel; } }; return model; } I knew it's something with dynamic model !! Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Aug 18, 2009 at 4:55 PM, Eyal Golan egola...@gmail.com wrote: Hello, I have a wizard that in the last step I show a tree with the selections made in the previous steps. The wizard uses static steps so actually the last step is built in advance. The problem is that the tree is not updated. For debugging purposes I have in the last step tables that show the same selections. The tables are updated (the DataProvider calls the iterator). I use DetachableModel for the tables. So in short, How can I updated the model of the tree. Below is the code of creating the tree that is made in the constructor: private TreeModel createTreeModel() { final Profile profile = (Profile) getModelObject(); final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(); final ConfigurationsNode configurationsNode = new ConfigurationsNode(profile, getString(extract.rdb.profile.view.section.configurations)); configurationsNode.addToParentNode(profile, rootNode); final CampaignsNode campaignsNode = new CampaignsNode(profile, getString(extract.rdb.profile.view.section.campaigns)); campaignsNode.addToParentNode(profile, rootNode); final UniverseNode universesNode = new UniverseNode(profile, getString(extract.rdb.profile.view.section.universes)); universesNode.addToParentNode(profile, rootNode); final BprsNode bprsNode = new BprsNode(profile, getString(extract.rdb.profile.view.section.bprs)); bprsNode.addToParentNode(profile, rootNode); final AuditCardsNode auditCardsNode = new AuditCardsNode(profile, getString(extract.rdb.profile.view.section.audits)); auditCardsNode.addToParentNode(profile, rootNode); final AllTicketsNode allTicketsNode = new AllTicketsNode( getString(extract.rdb.profile.view.section.allTickets)); allTicketsNode.addToParentNode(profile, rootNode); final TreeModel treeModel = new DefaultTreeModel(rootNode); return treeModel; } Here's one of the nodes: public final class ConfigurationsNode extends AbstractProfileDataNode { private static final long serialVersionUID = 3306972776261689364L; public ConfigurationsNode(final Profile profile, String title) { super(title); final ListConfiguration configurations = profile.getConfigurations(); for (final Configuration configuration : configurations) { final DefaultMutableTreeNode configurationNode = new DefaultMutableTreeNode() { private static final long serialVersionUID = 1L; @Override public Object getUserObject() { return configuration.getConfigurationName(); } }; add(configurationNode); } } @Override protected boolean isVisible(Profile profile
Re: Time Component for wicket.
Look at DateTimeField of YUI. Also, in the book WIA there's an example for that. The components are not with the arrows, but do have the hour, minutes fileds Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Aug 18, 2009 at 5:27 PM, Raphael Monroe - Leucotron (DES) rmon...@leucotron.com.br wrote: Hi guys, I'm looking for a time component for wicket. I know that DateTimePicker but it isn't usefull for my purposes. Maybe, it can be, but I need something in which I can set both hour and minute by arrows (like up/down). Does anybody knows any component like that? Thx, Raphael Monroe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Dynamic nodes in Tree
Still have a problem. When I use the IModel instead of the TreeModel, in the constructor, the nodes are not responding to the clicks. Any ideas? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Aug 18, 2009 at 4:55 PM, Eyal Golan egola...@gmail.com wrote: Hello, I have a wizard that in the last step I show a tree with the selections made in the previous steps. The wizard uses static steps so actually the last step is built in advance. The problem is that the tree is not updated. For debugging purposes I have in the last step tables that show the same selections. The tables are updated (the DataProvider calls the iterator). I use DetachableModel for the tables. So in short, How can I updated the model of the tree. Below is the code of creating the tree that is made in the constructor: private TreeModel createTreeModel() { final Profile profile = (Profile) getModelObject(); final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(); final ConfigurationsNode configurationsNode = new ConfigurationsNode(profile, getString(extract.rdb.profile.view.section.configurations)); configurationsNode.addToParentNode(profile, rootNode); final CampaignsNode campaignsNode = new CampaignsNode(profile, getString(extract.rdb.profile.view.section.campaigns)); campaignsNode.addToParentNode(profile, rootNode); final UniverseNode universesNode = new UniverseNode(profile, getString(extract.rdb.profile.view.section.universes)); universesNode.addToParentNode(profile, rootNode); final BprsNode bprsNode = new BprsNode(profile, getString(extract.rdb.profile.view.section.bprs)); bprsNode.addToParentNode(profile, rootNode); final AuditCardsNode auditCardsNode = new AuditCardsNode(profile, getString(extract.rdb.profile.view.section.audits)); auditCardsNode.addToParentNode(profile, rootNode); final AllTicketsNode allTicketsNode = new AllTicketsNode( getString(extract.rdb.profile.view.section.allTickets)); allTicketsNode.addToParentNode(profile, rootNode); final TreeModel treeModel = new DefaultTreeModel(rootNode); return treeModel; } Here's one of the nodes: public final class ConfigurationsNode extends AbstractProfileDataNode { private static final long serialVersionUID = 3306972776261689364L; public ConfigurationsNode(final Profile profile, String title) { super(title); final ListConfiguration configurations = profile.getConfigurations(); for (final Configuration configuration : configurations) { final DefaultMutableTreeNode configurationNode = new DefaultMutableTreeNode() { private static final long serialVersionUID = 1L; @Override public Object getUserObject() { return configuration.getConfigurationName(); } }; add(configurationNode); } } @Override protected boolean isVisible(Profile profile) { return CollectionUtils.isNotEmpty(profile.getConfigurations()); } } @SuppressWarnings(serial) abstract class AbstractProfileDataNode extends DefaultMutableTreeNode { private final String title; AbstractProfileDataNode(String title) { this.title = title; } @Override public final Object getUserObject() { return title; } public final void addToParentNode(Profile profile, final DefaultMutableTreeNode parentNode) { if (isVisible(profile)) { parentNode.add(this); } } protected abstract boolean isVisible(Profile profile); } Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: how to create a TabPanel as a separate class.
it's exactly what it says. TabbedPanel doesn't have the default constructor. You must give it at least ID. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Aug 17, 2009 at 2:42 PM, Gerald Fernando gerald.anto.ferna...@gmail.com wrote: Hello Friends, This is my need what i want whenever i need this tabbedPanel i want to place in any page public class choicePanel extends TabbedPanel{ super(); } not like public class choicePanel extends webpage i have created the above one but it shows the error that he constructor TabbedPanel() is undefined please give me urgent Reply -- Thanksregards, Gerald A
Re: Beginner question about wicket:extend
well, markup inheritance lets you create pages (or panels for that mater) with the same layout. Suppose you want to have two pages that both have (the same) header and a footer. Markup inheritance is a way of doing that (there are other options as well). So what you do is, create a Base page. In that page you will add the header and footer normally as in any Wicket page. the html will look something like: html body div wicket:id=header/div wicket:child/ div wicket:id=footer/div /body /html * I eliminate the java code as it is supposed to be simple. But remember, you add the header and footer wicket components in THIS page Now, in pages SubA and SubB you can add whatever you want. It will be put where the wicket:child is located. So, 1. in the html html body wicket:extend ... Here all the sub stuff will be put /wicket:extend /body /html * actually the html and even the body tags are not really necessary, but I am used to put them so my IDE won't get crazy :) In the java you need to extend the base and add the components according to the ones you added in the html. you DON'T need to add the header and footer in the subclasses. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Aug 14, 2009 at 10:53 AM, Oliver-Sven Fritsch o...@3blogos.comwrote: Hi everybody! I'm really new to wicket and it's concepts. I so far created a very simple page having some div containers and some static text. What I want to do now is to include a page header. What I tried is to use the wicket:extend and wicket:child tags to get thing working but with no success. I have my two pages Index and Header. Having some basic jsp experience I thought extending should work like jsp:include. When I try to get my header into the index page nothing is showing up. Code of Index.html html headtitlesome titlet/title link rel=stylesheet type=text/css href=styles.css/ /head body div id=page div id=header wicket:child/ /div [] Code of Header.html html head/head body wicket:extend div id=header h1Header.html/h1 /div /wicket:extend /body /html Maybe I'm getting things totally wrong? Another thing I wonder about is how does wicket know which page to include? Thanks in advance! Oliver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
JS libraries with Wicket
There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: JS libraries with Wicket
thanks guys. i looked into the jquery stuff, but i will also look to your suggestions. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Aug 13, 2009 at 5:46 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Yea use the JSLibraies that jeremy created its in the wicktstuff core project.. You can see openlayers or the input events for reference... Hmm artwork's probably better.. 2009/8/13 Eyal Golan egola...@gmail.com: There was once a nice explanation on how to create a module in wicket that uses a JS library (like JQuery). I checked out wicketstuf core to look into it. I want to try to create my own module of wicket and JS library (and of course to contribute it). Does anyone remember any post / blog / article about it? Or can someone give some pin points on how to do it? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with Palette
I meant, maybe your choices model is not what you think it is. I use the Palette in several locations, and didn't have this kind of problem. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Aug 7, 2009 at 6:06 PM, Elad Katz e...@xtify.com wrote: egolan74 wrote: I guess you've checked that selectedEvents is not empty? yes, they both have stuff in them egolan74 wrote: If it's not, I think you should check your model representing the choices. What do you mean check? egolan74 wrote: BTW, AFAIK, the selected choices should be a subset of the 'all available'. Please corect me if i'm wrong. That's what I understood from reading the forums, and that is how it's done in my implementation - but it still doesn't work any other ideas? anyone? -- View this message in context: http://www.nabble.com/Problem-with-Palette-tp24834525p24866473.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with Palette
I guess you've checked that selectedEvents is not empty? If it's not, I think you should check your model representing the choices. BTW, AFAIK, the selected choices should be a subset of the 'all available'. Please corect me if i'm wrong. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Aug 5, 2009 at 10:18 PM, Elad Katz e...@xtify.com wrote: Hi all, I have a problem with the Palette component: I'm using a palette with a model populated by an EJB entity, and I want it to show the correct selection status when it is displayed. I mean that when the 'edit' button is clicked on a user, the current 'event' that s\he has selected is shown In code: The following: /*all the events (2) - checked this - it's not null*/ ListEventsEntity events = LookupHelper.getInstance().lookupEventsEntityFacade().findAll(); /*selected events for this user (same 2) - checked this - it's not null*/ ListEventsEntity selectedEvents = new ArrayListEventsEntity(model.getObject().getEvents()); IChoiceRendererEventsEntity renderer = new ChoiceRendererEventsEntity(name, id); palette = new PaletteEventsEntity(palette, /*Selected Events*/new ListModelEventsEntity(selectedEvents), /*unselected*/new CollectionModelEventsEntity(events), renderer, 10, false); add(palette); //For debugging purposes: for (IteratorEventsEntity it = palette.getSelectedChoices(); it.hasNext();) { EventsEntity eventsEntity = it.next(); log.error(Selected choice: + eventsEntity.getName()); } Throws an exception saying that the 'palette.getSelectedChoices();' returns null I would expect it to write the selected events to the log... Am I doing something wrong? did I misunderstand the API? it said: Palette public *Palette*(java.lang.String id, org.apache.wicket.model.IModeljava.util.CollectionT http://static.ddpoker.com/javadoc/wicket-extensions/1.4-m2/org/apache/wicket/extensions/markup/html/form/palette/Palette.html model, org.apache.wicket.model.IModeljava.util.Collection? extends T http://static.ddpoker.com/javadoc/wicket-extensions/1.4-m2/org/apache/wicket/extensions/markup/html/form/palette/Palette.html choicesModel, org.apache.wicket.markup.html.form.IChoiceRendererT http://static.ddpoker.com/javadoc/wicket-extensions/1.4-m2/org/apache/wicket/extensions/markup/html/form/palette/Palette.html choiceRenderer, int rows, boolean allowOrder) *Parameters:*id - Component idmodel - Model representing collection of user's selectionschoicesModel - Model representing collection of all available choiceschoiceRenderer - Render used to render choices. This must use unique IDs for the objects, not the index.rows - Number of choices to be visible on the screen with out scrollingallowOrder - Allow user to move selections up and down Using Wicket 1.4, EJB 3, Jboss 5.1 inside of a Liferay Portal environment. TiA, Elad Katz.
Re: Label i18n in 1.4 final
As far as I remember, you need to call the proprty 'header' header = Sidebar Header! Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Aug 4, 2009 at 5:14 PM, Robin Sander robin.san...@gmx.net wrote: Hello, I'm trying to add internationalization to my wicket application using Wicket 1.4 final. In order to customize labels I don't use wicket:message but use Label subclasses. So, both the Wiki page General i18n in Wicket an Wicket in Action state that I may define a property file for a page, say Index.properties and define any label resource in this file. So far so good, it seems to work as long as I don't have a label nested in a panel or in a form! Say I have a page Index and a panel Sidebar like this: public class Sidebar extends Panel { public Sidebar(final String id) { super(id); add(new Label(header, new ResourceModel(header))); ... } } public class Index extends WebPage { public Index() { super(); add(new Sidebar(sidebar)); } } Now, if I define sidebar.header = Sidebar Header! in a file 'Index.properties' a MissingResourceException is thrown. Does anybody know how to do it right? regards, Robin. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Adding javascript after tab clicked
I'm not sure, but are you looking for this: AjaxRequestTarget #appendJavascript(javascript) ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Aug 3, 2009 at 2:11 PM, Cristi Manole cristiman...@gmail.comwrote: Hello, I've got an ajaxTabbedPanel inside a ModalWindow. I would like to call some javascript _after_ the panel from ajaxTabbedPanel is displayed. Overriding onAjaxUpdate(AjaxRequestTarget target) doesn't help as it seems it gets called before the panel gets displayed. Do you have any ideas? Thanks, -- Cristi Manole Nova Creator Software www.novacreator.com
Re: Form skips validation for disabled/not visible components
1. If you in control of the input of these disabled fields, why allowing illegal arguments in the first place? 2. If you can't control the entered values, try use FormValidator. With this class, you can create your own Validate logic with the desired fields. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Aug 3, 2009 at 4:06 PM, Nicola Tucci nytrus...@gmail.com wrote: Hi all! I've a situation where I want the form to validate some hidden or disabled field. An example is a text field where the user is not allowed to write directly but only insert some items from some source, a lookup button (this is much more flexible than a drop down box!). I set this component disabled with .setEnabled(false). Now when the form is validated, the validation for my textfield is skipped (see Form class in wicket 1.4 rc4): public static abstract class ValidationVisitor implements FormComponent.IVisitor { public Object formComponent(IFormVisitorParticipant component) { if (component instanceof FormComponent) { FormComponent? formComponent = (FormComponent?)component; Form? form = formComponent.getForm(); if (!form.isVisibleInHierarchy() || !form.isEnabledInHierarchy()) { // do not validate formComponent or any of formComponent's children return Component.IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } /** HERE WE SKIP!!! */ if (formComponent.isVisibleInHierarchy() formComponent.isValid() formComponent.isEnabledInHierarchy()) { validate(formComponent); } } if (component.processChildren()) { return Component.IVisitor.CONTINUE_TRAVERSAL; } else { return Component.IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } } Now I can override this, as Form.validateComponents() if final. I could only override Form.onSubmit() and doing an ad-hoc validation (not very good). Some hint? Thanks folk
Re: Form skips validation for disabled/not visible components
HiddenField is a good thing to know about :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Aug 3, 2009 at 5:23 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: use HiddenField instead of a TextField, that way there is no need to disable it. then the textfield/lookup button can be client-side things that populate the hidden field. -igor On Mon, Aug 3, 2009 at 7:51 AM, nytrusnytrus...@gmail.com wrote: egolan74 wrote: 1. If you in control of the input of these disabled fields, why allowing illegal arguments in the first place? 2. If you can't control the entered values, try use FormValidator. With this class, you can create your own Validate logic with the desired fields. 1. Good observation, but my goal is checking for required fields. 2. That's an idea: I can write my class imlpementing IFormValidator and then add this to the container form. For checking required fields somethign like this could work: public class RequiredFieldsValidator extends AbstractFormValidator { private ListFormComponents components; public RequiredFieldsValidator(ListFormComponents components) { this.components = components; } public void validate(Form? form) { for(FormComponent c: components) { validateRequired(); } } } -- View this message in context: http://www.nabble.com/Form-skips-validation-for-disabled-not-visible-components-tp24790510p24792189.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug in AbstractOptions of Palette?
Done. *WICKET-2407 https://issues.apache.org/jira/browse/WICKET-2407* Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jul 30, 2009 at 7:19 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: open a jira issue -igor On Thu, Jul 30, 2009 at 1:39 AM, Eyal Golanegola...@gmail.com wrote: Hello, We encountered a small problem in our Palette. Some of the values that were supposed to be in the choices (available and/or selected) had the '' and '' . Because of that the options weren't rendererd correctly. Looking at AbstractAction#onComponentTagBody I saw that it takes the value as it is and put it in the html: String value = getConverter(displayClass).convertToString(displayValue, getLocale()); where displayValue is Object displayValue = renderer.getDisplayValue(choice); In my code I overridden the getDisplayValue and getDisplayId of the renderer: IChoiceRenderer choiceRenderer = new ChoiceRenderer(getFieldName, getFieldName) { private static final long serialVersionUID = 1L; @Override public Object getDisplayValue(Object object) { final String result = (String) super.getDisplayValue(object); return Strings.escapeMarkup(result, true, true).toString(); } @Override public String getIdValue(Object object, int index) { final String result = (String) super.getIdValue(object, index); return Strings.escapeMarkup(result, true, true).toString(); } }; As you can see I took the result and changed it with the Strings utility. Do you think it's a bug in Wicket and I should open a Jira issue? Or is the Palette works as wanted and my change is normal? BTW, we use Wicket 1.3.6 Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Issue WICKET-2409
have you read thishttp://www.codesmell.org/blog/2009/08/pitfall-on-implementing-generic-methods/? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Wicket for non Web/AJAX developers?
I haven't seen any 'special' article of the kind you are looking for. However, I can just say for myself that when I started working with Wicket, all I new was basic HTML. I didn't even know exactly what was CSS. Slowly I became better in that area. Everyday I learned something new about webdev (as yo call it). I even 'stole' many example code. yes i did :) Which I believe is a very good way to learn. I can also tell you that I do feel sometimes the gap of not knowing really good JS and Ajax. For these special occasions we take an outside consultant. I usually look behind his shoulder and learn. or just read the svn difference when I update my project. What I suggest is, read the Wicket wiki, google, check this user list and ask questions (I once asked how to write the JS for closing a window. And was answered really quick.), check the example and if you can, have a phone number of an ajax / js expert for the REALLY complex stuff. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Sun, Aug 2, 2009 at 11:46 PM, Troy Cauble troycau...@gmail.com wrote: On Sun, Aug 2, 2009 at 4:46 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: On Sun, Aug 2, 2009 at 10:40 AM, Troy Caubletroycau...@gmail.com wrote: Much of the class design documentation assume knowledge of these things, especially when you get down to stuff like AjaxFormComponentUpdatingBehavior. WTF? what part of that name or javadoc is hard for you to understand? I'm saying it's hard for someone without a prior web development background. The javadoc says A behavior that updates ... via ajax, but I only have a vague idea why or when I might need to do that. Also it takes a javascript event string argument that is not explained. (I can google javascript events and guess or I can steal from example code.) Even more to the point, AttributeModifier require you to write javascript and know the likely form of what your modifying. Without googling examples of confirmation dialogs, I could have never guessed that AttributeModifier was the relevant class for that. This is not a criticism of Wicket or the docs. I know the target user is someone who's done traditional webdev first and came looking for something better. I was just curious if there happened to be any articles that filled in the gaps for those of us attempting to skip directly to Wicket. Thanks, -troy
Bug in AbstractOptions of Palette?
Hello, We encountered a small problem in our Palette. Some of the values that were supposed to be in the choices (available and/or selected) had the '' and '' . Because of that the options weren't rendererd correctly. Looking at AbstractAction#onComponentTagBody I saw that it takes the value as it is and put it in the html: String value = getConverter(displayClass).convertToString(displayValue, getLocale()); where displayValue is Object displayValue = renderer.getDisplayValue(choice); In my code I overridden the getDisplayValue and getDisplayId of the renderer: IChoiceRenderer choiceRenderer = new ChoiceRenderer(getFieldName, getFieldName) { private static final long serialVersionUID = 1L; @Override public Object getDisplayValue(Object object) { final String result = (String) super.getDisplayValue(object); return Strings.escapeMarkup(result, true, true).toString(); } @Override public String getIdValue(Object object, int index) { final String result = (String) super.getIdValue(object, index); return Strings.escapeMarkup(result, true, true).toString(); } }; As you can see I took the result and changed it with the Strings utility. Do you think it's a bug in Wicket and I should open a Jira issue? Or is the Palette works as wanted and my change is normal? BTW, we use Wicket 1.3.6 Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Modal window X button doesn't work
Hello, I have a table in a page that one of the columns is a Panel. In that panel I have an AjaxLink that opens a Modal window. The modal window has content as a WebPage. Using setPageCreator etc. everything works fine except that the window is not closed when pressing the X button. We have an Abstract general modal window that is used everywhere in our application and it works fine. Only in this situation it doesn't close. Any suggestions? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
weird stuff with TreeTable
Hello, I am having something very strange in my TreeTable. I've put the tree in a Dynamic Wizard Step. When I get to that step (which is the summary), the columns gets wider and wider. After looking at Firebug, I've noticed that the width of the header is increasing: div class=wicket-tree-table div class=header div style=width: 1878px; ... - this is keeping being larger and larger. I was looking at Tree.js but as I'm not a JS expert, I couldn't understand what's wrong. Is it possible that another object in my DOM causes this problem? I am using Wicket 1.3.6 Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: weird stuff with TreeTable
Below are the columns I add: treeColumns.add(new CustomPropertyTreeColumn(new ColumnLocation(Alignment.MIDDLE, 100, Unit.PROPORTIONAL), new ResourceModel(purge.wizard.analyzeDocumentsStep.treeTable.header), userObject.displayName)); treeColumns.add(new PropertyRenderableColumn(new ColumnLocation(Alignment.RIGHT, 100, Unit.PX), purge.wizard.analyzeDocumentsStep.treeTable.header.counters, userObject.counter)); CustomPropertyColumn get IModel instead of String Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Sun, Jul 12, 2009 at 11:40 AM, Eyal Golan egola...@gmail.com wrote: Hello, I am having something very strange in my TreeTable. I've put the tree in a Dynamic Wizard Step. When I get to that step (which is the summary), the columns gets wider and wider. After looking at Firebug, I've noticed that the width of the header is increasing: div class=wicket-tree-table div class=header div style=width: 1878px; ... - this is keeping being larger and larger. I was looking at Tree.js but as I'm not a JS expert, I couldn't understand what's wrong. Is it possible that another object in my DOM causes this problem? I am using Wicket 1.3.6 Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: weird stuff with TreeTable
What I did, and for now it's working, is override one of the js functions:Wicket.TreeTable.attachUpdate It does nothing now. Wicket.TreeTable.attachUpdate = function(treeTableId) { //// get the object that contains ids of elements on which the update method was already attached //var attached = Wicket.TreeTable.attached; // //// force updating the element //Wicket.TreeTable.update(treeTableId); // //// if the update has not been attached to this tree table yet... //if (typeof(attached[treeTableId]) == undefined) { //// ... attach it //attached[treeTableId] = window.setInterval(function() { Wicket.TreeTable.update(treeTableId); }, 100); //} return; } I'm sure this not a good thing. Any suggestions? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Detaching and ModalWindow causes race condition
Per, I see what you're saying and I have a question. How would you implement (UI concern) a setting page? What I mean is, suppose I have a page that shows some statistics. The statistics can be set by the user. We implemented a link / button that opens up a modal window to select the statistics. How would you do it? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Sat, Jul 4, 2009 at 1:40 PM, Per Lundholm per.lundh...@gmail.com wrote: Sorry Martijn but you are so ahead of me that I can't even follow the suggestion you make. However, I just can support you on not using modal windows. We have a back office application written in Swing that use modal windows a lot and it is just getting worse by each feature added. Modal windows are really a last resort and should not be used at all, if you can avoid it. What I have seen is that they tend to grow in functionality over time and suddenly you are faced with the question: should I put a modal window here, oh, I am already in a modal window. (Ranting further), modal windows are primarily for non-expert users that need guidance when you wish to be certain that they know the implications of what they do. There should be nothing but some information and a yes/no question. Apparently, it seems that the users are pushing you around and customer is always right, so what to do? I suggest a step back and present a complete new style of interaction that would give users a much better flow in the interaction than now. Thanks for reading. :-) Kindly, Per On Fri, Jul 3, 2009 at 3:11 PM, Martijn Dashorstmartijn.dasho...@gmail.com wrote: In our apps we (wrongfully IMO) make heavily use of ModalWindow (our users seem to like them). We ran into an issue/race condition where we have shared a model between the calling page and the ModalWindow. We have an autocomplete textfield with an onblur handler attached. This onblur handler is triggered when the modal window is shown resulting in two parallel Ajax requests to the server. This causes the shared model to be attached and detached at the same time, resulting in rather funky behavior. I know that one solution is to not share the model between the ModalWindow and the calling page. But we are looking for alternative (more general) solutions. Options we thought of: - would locking the session for page directed requests implementable (i.e. let resource requests through the barrier, but not both requests to the calling page and the modalwindow page) - would it work to set a client side flag when the ModalWindow is requested, that disables wicket-ajax for the current window to happen (preventing the onblur to trigger Ajax), and is reset when the ModalWindow is rendering in the client? - render the modalwindow page in the current pagemap instead of a new one (would make refresh behavior pretty weird I think) Any other suggestions? Martijn - 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: help with ListMultipleChoice and ajax tab
Ernesto,Thanks a-lot. I keep forgetting about AjaxSubmitLink - That was the answer. I thought about the JS option. Using a module from wicketstuff for it is no option as in our company licensing takes way too much time. Creating my own JS for this would have taken lots of time. So, AjaxSubmitLink... Hope not to forget it next time :) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Jul 1, 2009 at 8:26 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: I see two possible solutions... 1- Replace AYAX link with an AJAX submit link, so switching tabs will do a submit of your selected choices. 2- Have visual tabs where both tabs are rendered at the same time and switching between them is just hiding/showing them via JavaScript. That way no data is lost... Best, Ernesto On Tue, Jun 30, 2009 at 7:56 PM, Eyal Golan egola...@gmail.com wrote: Hi, I have a tab panel that has two tabs. The tabs are Ajaxified using some examples I found here and in the web. Basically in the tab panel we did this: @Override protected WebMarkupContainer newLink(String linkId, final int index) { final WebMarkupContainer c = new TabbedIndicatingAjaxLink(linkId, index); final BrowserTab tab = ((BrowserTab) getTabs().get(index)); c.setEnabled(tab.isEnabled()); return c; } and TabbedIndicatingAjaxLink has this (among other changes): @Override public void onClick(AjaxRequestTarget target) { setSelectedTab(index); if (target != null) { target.addComponent(CustomAjaxTabbedPanel.this); } onAjaxUpdate(target); } Everything works just fine. The problem is with the ListMultipleChoice. Each tab has this list and the list is used with PropertyModel. The data of the model is only set when I press the submit (as expected). So what happens is that I select some values and then go to another tab and when going back to the first one, the selection disappears. I want to keep the selection. Is there a way of doing it? Like listening to the clicks or something? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: How to turn ModalWindow form into multipart form?
Vladimir, no. We didn't patched wicket.jar. We have overridden ModalWindow: Say you call it AbstractCustomModalWindow I force the user to use it with Page: setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 1L; public Page createPage() { return getModalWebPage(); } }); and protected abstract WebPage getModalWebPage(); I also did: private static final String JAVASCRIPT = /myCompany/js/modal.js; and: add(HeaderContributor.forJavaScript(JAVASCRIPT)); and in the modal.js we overridden 'Wicket.Window.getMarkup' to build our own stylish markup ... Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Jun 30, 2009 at 5:43 PM, Vladimir K koval...@gmail.com wrote: Eyal, did you mean you have patched wicket.jar with modal.js on your own? I'm going to omit patching wicket.jar. We'll replace ModalWindow with regular page for a while. I don't understand why ModalWindow hasn't been implemented with regular wicket ajax engine. It would be easier to fix something. Matej, are you going to fix ModalWindow somehow to be capable of taking FileUploadField and UploadProgressBar components? egolan74 wrote: we overridden modal.js and changed the appearance of the modal window Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Jun 26, 2009 at 11:49 AM, Vladimir K koval...@gmail.com wrote: yes it do has. near line 1095 of modal.js: Wicket.Window.getMarkup = function(idWindow, idClassElement, idCaption, idContent, idTop, idTopLeft, idTopRight, idLeft, idRight, idBottomLeft, idBottomRight, idBottom, idCaptionText, isFrame) { var s = div class=\wicket-modal\ id=\+idWindow+\ style=\top: 10px; left: 10px; width: 100px;\form style='background-color:transparent;padding:0px;margin:0px;border-width:0px;position:static'+ div id=\+idClassElement+\+ And it seems hacky and buggy. In our case we would use regular submit for FileUploadField instead of ajax if it wasn't hardcoded. Now we need to hack ModalWindow some way. I don't like iframe approach 'cause it forces user to submit twice at the time when regular submit should have worked. If you don't know this very hardcoded form leads to problem reflecting request parameters to form components models because in java we have a stack of forms and submit request contains just data of this particular form. As the result form components of enclosing forms receive empty data and then ... at least unexpected validation problems. There has been a jira issue already that contains workaround description. I have to go right now. I'll find it later. igor.vaynberg wrote: modalwindow has a hardcoded form? On Thu, Jun 25, 2009 at 8:00 AM, Vladimir Kovalyukkoval...@gmail.com wrote: How to turn ModalWindow form into multipart form? The problem is that the markup code for that particular form is hard-coded into modal.js script (surprise!, surprise!). ModalWindow form submission problems han't been fixed yet, I mean rc5 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-to-turn-ModalWindow-form-into-multipart-form--tp24204896p24216939.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - Eyal Golan egola...@gmail.com Visit: JVDrums LinkedIn: LinkedIn -- View this message in context: http://www.nabble.com/How-to-turn-ModalWindow-form-into-multipart-form--tp24204896p24273227.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
help with ListMultipleChoice and ajax tab
Hi, I have a tab panel that has two tabs. The tabs are Ajaxified using some examples I found here and in the web. Basically in the tab panel we did this: @Override protected WebMarkupContainer newLink(String linkId, final int index) { final WebMarkupContainer c = new TabbedIndicatingAjaxLink(linkId, index); final BrowserTab tab = ((BrowserTab) getTabs().get(index)); c.setEnabled(tab.isEnabled()); return c; } and TabbedIndicatingAjaxLink has this (among other changes): @Override public void onClick(AjaxRequestTarget target) { setSelectedTab(index); if (target != null) { target.addComponent(CustomAjaxTabbedPanel.this); } onAjaxUpdate(target); } Everything works just fine. The problem is with the ListMultipleChoice. Each tab has this list and the list is used with PropertyModel. The data of the model is only set when I press the submit (as expected). So what happens is that I select some values and then go to another tab and when going back to the first one, the selection disappears. I want to keep the selection. Is there a way of doing it? Like listening to the clicks or something? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: changing choices component in Palette
Fernando,I just saw your reply... What I eventually did was overriding Wicket's palette and gave access to each of the sub components. (and of course, we decided to change the whole appearance of the page so we don't need it any more :) ) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 25, 2009 at 6:00 PM, Fernando Wermus fernando.wer...@gmail.comwrote: Eyal, I observed that when you add some items to the selected component (in construction time), you would need to add these same items to the choice component to be rendered. I wanted to make an example for declaring a bug about this, but I didn't have the time. I still need to confirm this. Maybe it is this the problem you are having. On Tue, Jun 16, 2009 at 10:54 AM, Fernando Wermus fernando.wer...@gmail.com wrote: Hi Eyal, First: if you wanna change the components, you will see that you can override the new protected method for that. Second: There are many cases where you dont want to give public access to your component because of implementation reasons. If you wanna change its behavior then extended and be responsable for the implementation. For instance, I saw some cases where the construction of some nested components (of a main component) are done at rendering time. (I think I saw something like this in wizard component). On Sun, Jun 14, 2009 at 11:23 AM, Eyal Golan egola...@gmail.com wrote: any 1 ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Jun 12, 2009 at 7:13 AM, Eyal Golan egola...@gmail.com wrote: BTW, we use Wicket 1.3.6 I will try to rephrase my original question: why are getChoicesComponent and getSelectionComponent() private? Can I add a Wish in Jira to make them public? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 11, 2009 at 5:30 PM, Eyal Golan egola...@gmail.com wrote: Hi, I have a situation that I want to change possible choices in a palette according to a DropDown. I added to the DropDown the Ajax Updating add(new AjaxFormComponentUpdatingBehavior(onchange) {...} I have this palette: final CustomPalette palette = new CustomPalette(palette, new PropertyModel(rolesCoverage, comparedConfigurations), allConfigurationsModel, choiceRenderer, 10, true); and: final IModel allConfigurationsModel = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { final ListConfiguration allConfigs = sageDal.getConfigurations(); allConfigs.remove(rolesCoverage.getMainConfiguration()); return allConfigs; } }; The page uses CompoundPropertModel: super(id, new CompoundPropertyModel(rolesCoverage)); in the constructor. The problem that I encountered is that if I added to the target of the DropDown the palette, it kept remembering my selected values. In order to change that I hacked a bit with our CustomPalette: @Override protected Component newChoicesComponent() { final Component result = super.newChoicesComponent(); externalizedChoiceComponent = result; externalizedChoiceComponent.setOutputMarkupId(true); return result; } public Component getExternalizedChoiceComponent() { return this.externalizedChoiceComponent; } And in the DropDown, instead of adding the palette, I used target.addComponent(customPalette.getExternalizedChoiceComponent()); It works. My question is if this is the correct way? Is there a better way doing that? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: How to turn ModalWindow form into multipart form?
we overridden modal.js and changed the appearance of the modal window Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Jun 26, 2009 at 11:49 AM, Vladimir K koval...@gmail.com wrote: yes it do has. near line 1095 of modal.js: Wicket.Window.getMarkup = function(idWindow, idClassElement, idCaption, idContent, idTop, idTopLeft, idTopRight, idLeft, idRight, idBottomLeft, idBottomRight, idBottom, idCaptionText, isFrame) { var s = div class=\wicket-modal\ id=\+idWindow+\ style=\top: 10px; left: 10px; width: 100px;\form style='background-color:transparent;padding:0px;margin:0px;border-width:0px;position:static'+ div id=\+idClassElement+\+ And it seems hacky and buggy. In our case we would use regular submit for FileUploadField instead of ajax if it wasn't hardcoded. Now we need to hack ModalWindow some way. I don't like iframe approach 'cause it forces user to submit twice at the time when regular submit should have worked. If you don't know this very hardcoded form leads to problem reflecting request parameters to form components models because in java we have a stack of forms and submit request contains just data of this particular form. As the result form components of enclosing forms receive empty data and then ... at least unexpected validation problems. There has been a jira issue already that contains workaround description. I have to go right now. I'll find it later. igor.vaynberg wrote: modalwindow has a hardcoded form? On Thu, Jun 25, 2009 at 8:00 AM, Vladimir Kovalyukkoval...@gmail.com wrote: How to turn ModalWindow form into multipart form? The problem is that the markup code for that particular form is hard-coded into modal.js script (surprise!, surprise!). ModalWindow form submission problems han't been fixed yet, I mean rc5 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/How-to-turn-ModalWindow-form-into-multipart-form--tp24204896p24216939.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
the preferred way to inject to model objects
Hi, Usually I inject to object models (Spring) with the Injector Holder facility: @SpringBean private ExtractionManager extractionManager; and in the constructor: InjectorHolder.getInjector().inject(this); I saw in the book WIA (sorry, I don't remember where exactly. Even after looking), that the bean is passed in order to have less memory (pointers) or something like this. So my question is: Suppose I have a POJO class that is the model and I need to use a bean service. Should I inject as above, or should I pass the bean as a parameter form the component (that the bean was injected there). Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Border vs. Panel Markup Inheritance
I'll be glad to get your opinion. Our application needs to be with specific UI standards. We've got the CSSs and UI design document on how our pages should look. We have something that we call 'sub-section'. Basically it's a section in the page that has a nice title with colors and such. We have to implementations for that: 1. SubSectionPanel inside we have wicket:id=title and in the content we have wicket:child / So using that we inherit from it, adding what is necessary and we have a method that returns a component for the title (so we can put more than just a label). 2. PageSectionBorder The HTML is just like of the SubSectionPanel. Just instead of the wicket:child/ we have wicket:body/ So actually, it's like we have duplicate code. Which is the better solution for such situation? Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: How to add filter to palette component?
It looks just like what I did. Did you break-point at public Object getObject() { return this.avaliableList; } ? or at avaliableList = getNewList(); Is the list full? Maybe you should try AjaxSubmitLink (Just a thought. I don't use it that often)? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: How to add filter to palette component?
BTW, here the whole code of the palette creationg: private CustomPalette newSelectedSection(final Form form) { final RolesCoverageDasboard rolesCoverageDasboard = (RolesCoverageDasboard) getModelObject(); final IChoiceRenderer choiceRenderer = new ChoiceRenderer(getConfigurationName, getConfigurationName); final IModel allConfigurationsModel = new AbstractReadOnlyModel() { // Model for choices private static final long serialVersionUID = 1L; @Override public Object getObject() { final ListConfiguration allConfigsFromMap; if (rolesCoverageDasboard.getUniverse() == null) { allConfigsFromMap = Collections.emptyList(); return allConfigsFromMap; } allConfigsFromMap = universesConfigurationsMap.get(rolesCoverageDasboard.getUniverse()); final ListConfiguration configsForPalette = new ArrayListConfiguration(allConfigsFromMap); configsForPalette.remove(rolesCoverageDasboard.getMainConfiguration()); return configsForPalette; } }; final CustomPalette palette = new CustomPalette(palette, new PropertyModel(rolesCoverageDasboard, comparedConfigurations), allConfigurationsModel, choiceRenderer, 10, true); palette.setOutputMarkupId(true); form.add(palette); return palette; } It is very similar to yours. (list etc.) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: changing choices component in Palette
any 1 ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Fri, Jun 12, 2009 at 7:13 AM, Eyal Golan egola...@gmail.com wrote: BTW, we use Wicket 1.3.6 I will try to rephrase my original question: why are getChoicesComponent and getSelectionComponent() private? Can I add a Wish in Jira to make them public? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 11, 2009 at 5:30 PM, Eyal Golan egola...@gmail.com wrote: Hi, I have a situation that I want to change possible choices in a palette according to a DropDown. I added to the DropDown the Ajax Updating add(new AjaxFormComponentUpdatingBehavior(onchange) {...} I have this palette: final CustomPalette palette = new CustomPalette(palette, new PropertyModel(rolesCoverage, comparedConfigurations), allConfigurationsModel, choiceRenderer, 10, true); and: final IModel allConfigurationsModel = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { final ListConfiguration allConfigs = sageDal.getConfigurations(); allConfigs.remove(rolesCoverage.getMainConfiguration()); return allConfigs; } }; The page uses CompoundPropertModel: super(id, new CompoundPropertyModel(rolesCoverage)); in the constructor. The problem that I encountered is that if I added to the target of the DropDown the palette, it kept remembering my selected values. In order to change that I hacked a bit with our CustomPalette: @Override protected Component newChoicesComponent() { final Component result = super.newChoicesComponent(); externalizedChoiceComponent = result; externalizedChoiceComponent.setOutputMarkupId(true); return result; } public Component getExternalizedChoiceComponent() { return this.externalizedChoiceComponent; } And in the DropDown, instead of adding the palette, I used target.addComponent(customPalette.getExternalizedChoiceComponent()); It works. My question is if this is the correct way? Is there a better way doing that? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
changing choices component in Palette
Hi, I have a situation that I want to change possible choices in a palette according to a DropDown. I added to the DropDown the Ajax Updating add(new AjaxFormComponentUpdatingBehavior(onchange) {...} I have this palette: final CustomPalette palette = new CustomPalette(palette, new PropertyModel(rolesCoverage, comparedConfigurations), allConfigurationsModel, choiceRenderer, 10, true); and: final IModel allConfigurationsModel = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { final ListConfiguration allConfigs = sageDal.getConfigurations(); allConfigs.remove(rolesCoverage.getMainConfiguration()); return allConfigs; } }; The page uses CompoundPropertModel: super(id, new CompoundPropertyModel(rolesCoverage)); in the constructor. The problem that I encountered is that if I added to the target of the DropDown the palette, it kept remembering my selected values. In order to change that I hacked a bit with our CustomPalette: @Override protected Component newChoicesComponent() { final Component result = super.newChoicesComponent(); externalizedChoiceComponent = result; externalizedChoiceComponent.setOutputMarkupId(true); return result; } public Component getExternalizedChoiceComponent() { return this.externalizedChoiceComponent; } And in the DropDown, instead of adding the palette, I used target.addComponent(customPalette.getExternalizedChoiceComponent()); It works. My question is if this is the correct way? Is there a better way doing that? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: changing choices component in Palette
BTW, we use Wicket 1.3.6 I will try to rephrase my original question: why are getChoicesComponent and getSelectionComponent() private? Can I add a Wish in Jira to make them public? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 11, 2009 at 5:30 PM, Eyal Golan egola...@gmail.com wrote: Hi, I have a situation that I want to change possible choices in a palette according to a DropDown. I added to the DropDown the Ajax Updating add(new AjaxFormComponentUpdatingBehavior(onchange) {...} I have this palette: final CustomPalette palette = new CustomPalette(palette, new PropertyModel(rolesCoverage, comparedConfigurations), allConfigurationsModel, choiceRenderer, 10, true); and: final IModel allConfigurationsModel = new AbstractReadOnlyModel() { private static final long serialVersionUID = 1L; @Override public Object getObject() { final ListConfiguration allConfigs = sageDal.getConfigurations(); allConfigs.remove(rolesCoverage.getMainConfiguration()); return allConfigs; } }; The page uses CompoundPropertModel: super(id, new CompoundPropertyModel(rolesCoverage)); in the constructor. The problem that I encountered is that if I added to the target of the DropDown the palette, it kept remembering my selected values. In order to change that I hacked a bit with our CustomPalette: @Override protected Component newChoicesComponent() { final Component result = super.newChoicesComponent(); externalizedChoiceComponent = result; externalizedChoiceComponent.setOutputMarkupId(true); return result; } public Component getExternalizedChoiceComponent() { return this.externalizedChoiceComponent; } And in the DropDown, instead of adding the palette, I used target.addComponent(customPalette.getExternalizedChoiceComponent()); It works. My question is if this is the correct way? Is there a better way doing that? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Wicket and Google Application Engine (yet another post)
Hi, I've been playing around and tried to put a Wicket application in GAE. There are some good links. The best one is: http://www.xaloon.org/blog/apache-wicket-issues-on-google-app-engine-for-javawhich holds other links. Anyway, I have put in google code my successful attempt. Basically, I saw two options for a Wicket on GAE: 1. Create a GAE application and make it Wicket (one link describes it perfectly). 2. Create a Wicket app (quickstart) and make it GAE enabled. At first I did the 1st option and after making it worked, I managed to make option 2 work as well. In the code you will find option 2. I really hope that will help some of you. http://code.google.com/p/umbria-schaham-2009/ Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: TreeTable with image
Using Fragment maybe? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 1:44 PM, Daniele sdaniel...@tiscalinet.it wrote: I need to show an icon in a cell of a TreeTable. And change color of another cell. There's a way? I don't find response googling... Thanks Daniele - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Copy Form Fields
hhhmm... I'm not a Hibernate expert, but what if your POJO will be detached? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Wed, Jun 3, 2009 at 11:02 PM, hill180 hill...@gmail.com wrote: apparently no. it may just be my understanding. Because the modal is from a compoundproperty that is a hibernate POJO, this will copy what is in the database over, not what is in the field over. I hope I am explaining myself. -jose On Jun 1, 2009, at 8:25 AM, Eyal Golan wrote: I though more something like this: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { this.address2 = this.address1; target.addComponent(myAddress2); } };//end of Link wouldn't that work? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Jun 1, 2009 at 5:31 PM, hill180 hill...@gmail.com wrote: AjaxLink link = new AjaxLink(copyAddress){ @Override public void onClick(AjaxRequestTarget target) { myAddress2.setModelObject(myAddress1.getValue()); target.addComponent(myAddress2); } };//end of Link This kinda works. It does update the MyAddress2 Field, but if I change myAddress1 and click on the click, it will get the original value of myAddress1, not the value inside of the forms textfield. -jose On Jun 1, 2009, at 1:48 AM, Eyal Golan wrote: I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote: I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA public void onClick() { } }; add(link); } }; - 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: TreeTable with image
I haven't worked with TreeTable, but they are exactly as DataTable (so I think). But what you wrote is exactly this. Just create one of your columns with a Fragment. I'll try to send you an example later. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 3:52 PM, Daniele sdaniel...@tiscalinet.it wrote: Eyal Golan ha scritto: Using Fragment maybe? How can I use it? To use TreeTable I only put: div wicket:id=eventi / in html file and in Java i define column: IColumn columns[] = new IColumn[] {...} and treetable: eventi = new TreeTable(eventi, createTreeModel(), columns){...} - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TreeTable with image
Check below: private PropertyColumn createLinkColumn() { PropertyColumn p = new PropertyColumn(new Model(getLinkHeader()), getLinkSortProp(), getLinkHeader()) { private static final long serialVersionUID = 11L; @Override public void populateItem(Item cellItem, String componentId, IModel rowModel) { IdWrapper idWrapper = (IdWrapper) rowModel.getObject(); * Fragment frag = getLinkFragment(componentId, idWrapper);* cellItem.add(frag); } }; return p; } My example creates a Fragment, which is a Link. But you could put there whatever you feel like. You can even add a panel. Or, you can even add the image to the cellItem, but then you'll need to change the tag name: cellItem.add(new ScoreImage(componentId, score)); and in ScoreImage: @Override protected void onComponentTag(ComponentTag tag) { tag.setName(img); super.onComponentTag(tag); } Note: All of the above is use in DataTable. But this creating different types of IColumns Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 3:54 PM, Eyal Golan egola...@gmail.com wrote: I haven't worked with TreeTable, but they are exactly as DataTable (so I think). But what you wrote is exactly this. Just create one of your columns with a Fragment. I'll try to send you an example later. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 3:52 PM, Daniele sdaniel...@tiscalinet.it wrote: Eyal Golan ha scritto: Using Fragment maybe? How can I use it? To use TreeTable I only put: div wicket:id=eventi / in html file and in Java i define column: IColumn columns[] = new IColumn[] {...} and treetable: eventi = new TreeTable(eventi, createTreeModel(), columns){...} - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: checking for required fields
thanks, iIf I want it to run on all children (recursively), should I use somewhere IVisitor.CONTINUE_TRAVERSAL; ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:08 PM, sander v F sandervanfaas...@gmail.comwrote: you could use a visitor: form.visitChildren(new Component.IVisitor() { public Object component(Component component) { if (component instanceof FormComponent) { FormComponent formComponent = (FormComponent) component; if (!formComponent.isRequired()) { // do something } } return component; } }); 2009/6/4 Eyal Golan egola...@gmail.com Hi, What is the best way to check if there are any required fields in a page? I want a page that checks for these fields and do something accordingly. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: checking for required fields
I guess yes ... org.apache.wicket.MarkupContainer#visitChildren(final Class clazz, final IVisitor visitor) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:26 PM, Eyal Golan egola...@gmail.com wrote: thanks, iIf I want it to run on all children (recursively), should I use somewhere IVisitor.CONTINUE_TRAVERSAL; ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:08 PM, sander v F sandervanfaas...@gmail.comwrote: you could use a visitor: form.visitChildren(new Component.IVisitor() { public Object component(Component component) { if (component instanceof FormComponent) { FormComponent formComponent = (FormComponent) component; if (!formComponent.isRequired()) { // do something } } return component; } }); 2009/6/4 Eyal Golan egola...@gmail.com Hi, What is the best way to check if there are any required fields in a page? I want a page that checks for these fields and do something accordingly. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: checking for required fields
OK, I'm not sure, but is it a bug? Looking at MarkupContainer#visitChildren I found something strange. The lines: // If child is a container if ((child instanceof MarkupContainer) (value != IVisitor.CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER)) { ... } Now maybe I'm wrong, but should isInstance or isAssignableFrom be used? In any case, I have a page that holds containers and the visitor did not traverse inside them: visitChildren(FormComponent.class, new Component.IVisitor() { public Object component(Component component) { if (FormComponent.class.isInstance(component)) { FormComponent formComponent = (FormComponent) component; if (formComponent.isRequired()) { required.setVisible(true); return formComponent; } } return Component.IVisitor.CONTINUE_TRAVERSAL; } }); Is it me or Wicket? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:28 PM, Eyal Golan egola...@gmail.com wrote: I guess yes ... org.apache.wicket.MarkupContainer#visitChildren(final Class clazz, final IVisitor visitor) Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:26 PM, Eyal Golan egola...@gmail.com wrote: thanks, iIf I want it to run on all children (recursively), should I use somewhere IVisitor.CONTINUE_TRAVERSAL; ? Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Thu, Jun 4, 2009 at 4:08 PM, sander v F sandervanfaas...@gmail.comwrote: you could use a visitor: form.visitChildren(new Component.IVisitor() { public Object component(Component component) { if (component instanceof FormComponent) { FormComponent formComponent = (FormComponent) component; if (!formComponent.isRequired()) { // do something } } return component; } }); 2009/6/4 Eyal Golan egola...@gmail.com Hi, What is the best way to check if there are any required fields in a page? I want a page that checks for these fields and do something accordingly. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: A button like BookmarkablePageLink
I guess that'll work. I'll let you know. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Jun 2, 2009 at 12:49 AM, James Carman jcar...@carmanconsulting.comwrote: Try attaching your link to a button On Mon, Jun 1, 2009 at 5:39 PM, Eyal Golan egola...@gmail.com wrote: Hi, It may be newbie question. How do I create a button that opens a new web page in a different window / tab? The same as BookmarkablePageLink with PopupSettings etc. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: close button for a page
hanks igor and martin Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Tue, Jun 2, 2009 at 9:53 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: or: button onclick=window.close() / somewhere in your markup. Martijn On Tue, Jun 2, 2009 at 8:34 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: add(new webmarkupcontainer(close) { oncomponenttag(tag) { tag.put(onclick, window.close();); }}); a wicket:id=closeclose/a -igor On Tue, Jun 2, 2009 at 11:18 AM, Eyal Golan egola...@gmail.com wrote: Hello, How do I make a button that will close a page. Not a Modal window, but a page that was opened using BookmarkablePageLink with PopupSettings. I've been searching for the solution without success. Thanks, Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
A bit confused, please suggest
Hi, We have a situation as follows: There's a page that holds (besides other things) two charts that are generated by JFreechart. The chart is in a styled panel. Everything is OK. The chart may take some time to be generated so I put it in AjaxLazyLoadPanel. We also let the user decide if to show the chart when entering the page (it's our portal page). My question is, after this long introduction, about replacing panels. Here's what I did: This is the link: final AjaxLink enableDisableLink = new AjaxLink(enableDisableLink) { private static final long serialVersionUID = 1L; @Override public void onClick(AjaxRequestTarget target) { sageDal.setPreference(PortalSession.get().getPersonId(), ChartSectionPanel, ChartSectionPanel.this.titleKey, new String[] { String.valueOf(!chartEnabled()) }); target.addComponent(enableDisableImage); / Why is that working ? final Panel chartArea = newChartAreaPanel(chartArea); ChartSectionPanel.this.replace(chartArea); target.addComponent(chartArea); replacing and refreshing the same component? } And this is the method for creating the chart: private Panel newChartAreaPanel(String id) { final Panel chartArea; if (chartEnabled()) { chartArea = new AjaxLazyLoadPanel(id) { private static final long serialVersionUID = 1L; @Override public Component getLazyLoadComponent(String markupId) { return (new ChartPanel(markupId, chartCreator, ChartSectionPanel.this.titleKey)); } }; } else { chartArea = new EmptyPanel(id); } chartArea.setOutputMarkupId(true); return chartArea; } Everything works OK. Please take a look at the remarks above I made ./// I just want to be sure that this is the correct / better way. Thanks Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: Copy Form Fields
I'm not sure, but give it a try: In the onClick, set the property address2 to be the same as property address1. Add myAddress2 to the target. If you use compoundpropertymodel, it should work. Eyal Golan egola...@gmail.com Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary On Mon, Jun 1, 2009 at 12:55 AM, hill180 hill...@gmail.com wrote: I have looked through the archives and there were a couple references to this question but no examples and I was hoping for some help. I have a form with Address One and Address Two, I have a link that I just want to copy the data over. I am thinking it should use Javascript, but I am new to wicket and not sure how to implement. The textfields are a compound property model which is hitting a hibernate POJO. private static class AddressPanel extends Panel { public AddressPanel(String id, Form f,final AssociateDB a) { super(id); final TextField myAddress1 = new TextField(Address1); // First Address add(myAddress1); final TextField myAddress2 = new TextField(Address2); // First Address myAddress2.setOutputMarkupId(true); add(myAddress2); Link link = new Link(copyAddress){ @Override //TODO ADD JAVASCRIPT COPY, FAILS TO SAVE BEFORE COPY OF DATA public void onClick() { } }; add(link); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org