Hold a reference to a Spring bean in Wicket components
I am confused on this topic. 1. In Wicket In Action, this is a statement in 13.2.3 Using proxies instead of direct references: Be careful never to hold a reference to a Spring bean in your components. 2. However, in 13.2.5 Wicket's Spring bean annotations, a reference to a Spring bean in a Wicket component is used: private DiscountsService service; in a subclass of Panel, which is a Wicket component. If we could hold a reference to a Spring bean in Wicket components, we have to make the Spring bean serializable? Say DiscountsService has to extend from Serializable? -Valentine -- View this message in context: http://www.nabble.com/Hold-a-reference-to-a-Spring-bean-in-Wicket-components-tp22189818p22189818.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
Two vertical scrollbars in ModalWindow with Panel content show
I use a ModalWindow with Panel content as a pop-up input form with feedback panel. When an invalid input was given, the feedback panel will show the error message. However, at this time, the ModalWindow will show one vertical scrollbar and one horizonal scrollbar. And the content panel will show another vertical scrollbar. How can I get rid of the vertical scrollbar of the content panel? Please see the attached Windows doc file for those screenshots. Thanks, Valentine http://www.nabble.com/file/p21634007/ModalWindow.doc ModalWindow.doc -- View this message in context: http://www.nabble.com/Two-vertical-scrollbars-in-ModalWindow-with-Panel-content-show-tp21634007p21634007.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: Two vertical scrollbars in ModalWindow with Panel content show
I tried different values for overflow in the page window, the modal window's appearance is the same. (for example, when I change the page window HTML to contain div wicket:id=updateModalWindow style=overflow: hidden;/div from div wicket:id=updateModalWindow/div) Seems ModalWindow overwrites the style I define. Is there a way to change the overflow property defined by ModalWindow? By the way, what format file can I use to post the screenshots? -valentine Matej Knopp-2 wrote: Hi, this is a styling issue. Problem is in your CSS. Also, please don't post screenshots in word document. -Matej -- View this message in context: http://www.nabble.com/Two-vertical-scrollbars-in-ModalWindow-with-Panel-content-show-tp21634007p21635245.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: Two vertical scrollbars in ModalWindow with Panel content show
I added the screenshots as PNG files. What I have in modal window: just plain HTML text; Whether you have another page in modal window (iframe) or a panel: just one panel. See the source code: -Page window which contains the modal window--- div wicket:id=updateModalWindow/div -Content in modal window: parent and child panels (parent--) html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/; xml:lang=en lang=en wicket:panel p wicket:id=instructionLabel/p table border=0 width=100% tr td align=right style=padding-top:0px * Required /td /tr /table form wicket:id=inputForm table border=0 width=100% wicket:child/wicket:child /table div wicket:id=feedback/div table border=0 width=100% trtd align=left width=50% input type=submit wicket:id=save value=Save/ input type=button wicket:id=cancel value=Cancel/ /td td align=right button type=button value=Help wicket:id=helpButtonHelp/button /td /tr /table /form /wicket:panel /html (child-) html xmlns=http://www.w3.org/1999/xhtml; xmlns:wicket=http://wicket.apache.org/; xml:lang=en lang=en wicket:extend !-- Property/Column 1: firstName, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=firstName//td /tr !-- Property/Column 2: lastName, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=lastName//td /tr !-- Property/Column 3: bemsId, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=bemsId//td /tr !-- Property/Column 4: userCode, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=userCode//td /tr !-- Property/Column 5: phoneNumber, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=phoneNumber//td /tr !-- Property/Column 6: emailAddress, required -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td td align=leftinput type=text wicket:id=emailAddress//td /tr !-- Property/Column 7: jobTitle -- tr td!-- add this line if it is not required -- nbsp; /td td align=left width=30%/td td align=leftinput type=text wicket:id=jobTitle//td /tr !-- Property/Column 8: organization -- tr td!-- add this line if it is not required -- nbsp; /td td align=left width=30%/td td align=leftinput type=text wicket:id=organization//td /tr !-- Property/Column 9: countryOfCitizenship -- tr td!-- add this line if it is not required -- nbsp; /td td align=left width=30%/td td align=leftinput type=text wicket:id=countryOfCitizenship//td /tr !-- Property/Column 10: isActive, drop-down list -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td !-- Here we use drop-down list-- td align=leftselect wicket:id=isActiveChoice //td /tr !-- Property/Column 11: assignedRoles, drop-down list -- tr td!-- add this line if it is required -- * /td td align=left width=30%/td !-- Here we use
Re: generalized way to ignore mouse input during screen refresh?
Yes. It is similar. But I didn't look at the source code of the ModalWindow. The idea I have put in https://issues.apache.org/jira/browse/WICKET-2017. - Valentine Daniele Dellafiore wrote: It seems like the mechanism of blur that happens to background openign the modal window. Anyway, it would be great to share the code using wicket stuff, I think is a better way for some reason: component is immediately available, many people can use it to provide feedback and let the component grow, so eventually it can become a standard wicket component. getting commit accesso for wicket stuff is not complicated, I guess some project in wicket-stuff can host your component. -- Daniele Dellafiore http://blog.ildella.net/ -- View this message in context: http://www.nabble.com/generalized-way-to-ignore-mouse-input-during-screen-refresh--tp21379945p21392474.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How / where can I contribute my source code to the wicket?
I created https://issues.apache.org/jira/browse/WICKET-2017 For this proposed new feature, I think wicket-extensions would be a best place. - Valentine Wu Jeremy Thomerson-5 wrote: Oh, and if you want to add it to wicket stuff, just ask here for commit rights by supplying your SF ID. Read thoroughly: http://wicketstuff.org/confluence/display/STUFFWEB/Home -- Jeremy Thomerson http://www.wickettraining.com -- View this message in context: http://www.nabble.com/How---where-can-I-contribute-my-source-code-to-the-wicket--tp21381608p21392637.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: generalized way to ignore mouse input during screen refresh?
I created a reusable component, PanelWithAjaxBusyIndicatingMask, which extends Panel. The functions it has: It will add a transparent mask layer to the current page to prevent further UI interactivity when there are any busy Ajax activities. The mask layer will have an animation gif and a configurable display text (the default is: Please wait…). Both the display text and the animation gif file are configurable in the constructors. I am proposing it to the Wicket developers. Hope they will incorporate it into the next release. Kirk Israel-2 wrote: So one problem we've seen in a few places occurs when a (somewhat slow) request happens that refreshes the page or component, but then the user clicks on a link on the pre-refresh screen, and ends up getting a nasty exception thrown, since the component clicked on no longer exists Is there a single, easy workaround for this? Obviously you can try to limit the situations where this occurs, like my redrawing as little as possible, or otherwise making things less time consuming, but it still seems like it would be good if there was a general mechanism for ignoring inputs once some kind of Ajaxy-process is started... - 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/generalized-way-to-ignore-mouse-input-during-screen-refresh--tp21379945p21381260.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How / where can I contribute my source code to the wicket?
Hi, I have several reusable components that I want to contribute to the Wicket. Do you know where/how I can contribute? Thanks, Valentine -- View this message in context: http://www.nabble.com/How---where-can-I-contribute-my-source-code-to-the-wicket--tp21381608p21381608.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: Bug of Wicket when iterate the form using iterator()?
It will bring the compilation error when trying to cast arrays in Java. So you mean it is a bug in Wicket? Timo Rantalaiho wrote: On Thu, 27 Nov 2008, Valentine2008 wrote: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache .wicket.Component; at org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478) . The code on line 478 of MarkupContainer.java is: sorted = Arrays.asList((Component[])children); Is it a bug of Wicket? No, I think it's a limitation of Java. You cannnot cast arrays. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Bug-of-Wicket-1.3.4-when-iterate-the-form-using-iterator%28Comparator%29--tp20723903p20738178.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get all the children of a MarkupContainer?
Hi Igor, I find it out! The reason I couldn't get a child using a string component path is because of the outdated JavaDoc sentences in MarkupContainer (Wicket 1.3.4): Children can be added by calling the add() method, and they can be looked up using a dotted path. For example, if a container called a held a nested container b which held a nested component c, then a.get(b.c) would return the Component with id c. . It said about *dotted* path with a clear example. And I used the dotted path. Now I find that the Component.PATH_SEPARATOR is used, which is :. We have to use a.get(b:c) in the example. Can we confirm that the JavaDoc is updated in the next coming release of Wicket? Thanks, Valentine igor.vaynberg wrote: no. why would it do that? visibility is a render-time condition, it has nothing to do with component hierarchy. -igor On Thu, Nov 27, 2008 at 12:01 PM, Valentine2008 [EMAIL PROTECTED] wrote: But Component.get(pathString) will check the visibility and will return null if the child is invisible. Right? Thanks, Valentine igor.vaynberg wrote: iterator() does not check visibility. -igor On Thu, Nov 27, 2008 at 11:24 AM, Valentine2008 [EMAIL PROTECTED] wrote: Can we get even the invisible children? Seems we cannot:-( igor.vaynberg wrote: iterator() -igor On Thu, Nov 27, 2008 at 10:42 AM, Valentine2008 [EMAIL PROTECTED] wrote: Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724656.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20738180.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug of Wicket when iterate the form using iterator()?
Sorry, not the compilation error but the run-time exception. Thanks, Valentine jWeekend wrote: Not quite. String[] bO = (String[])(new Object[]{yes,we,can}); compiles but fails at run time. Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Valentine2008 wrote: It will bring the compilation error when trying to cast arrays in Java. So you mean it is a bug in Wicket? Timo Rantalaiho wrote: On Thu, 27 Nov 2008, Valentine2008 wrote: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache .wicket.Component; at org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478) . The code on line 478 of MarkupContainer.java is: sorted = Arrays.asList((Component[])children); Is it a bug of Wicket? No, I think it's a limitation of Java. You cannnot cast arrays. Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations OyURL: http://www.ri.fi/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Bug-of-Wicket-1.3.4-when-iterate-the-form-using-iterator%28Comparator%29--tp20723903p20738485.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get all the children of a MarkupContainer?
Where to open a jira issue? igor.vaynberg wrote: open a jira issue and that way we can confirm. -igor On Fri, Nov 28, 2008 at 10:32 AM, Valentine2008 [EMAIL PROTECTED] wrote: Hi Igor, I find it out! The reason I couldn't get a child using a string component path is because of the outdated JavaDoc sentences in MarkupContainer (Wicket 1.3.4): Children can be added by calling the add() method, and they can be looked up using a dotted path. For example, if a container called a held a nested container b which held a nested component c, then a.get(b.c) would return the Component with id c. . It said about *dotted* path with a clear example. And I used the dotted path. Now I find that the Component.PATH_SEPARATOR is used, which is :. We have to use a.get(b:c) in the example. Can we confirm that the JavaDoc is updated in the next coming release of Wicket? Thanks, Valentine igor.vaynberg wrote: no. why would it do that? visibility is a render-time condition, it has nothing to do with component hierarchy. -igor On Thu, Nov 27, 2008 at 12:01 PM, Valentine2008 [EMAIL PROTECTED] wrote: But Component.get(pathString) will check the visibility and will return null if the child is invisible. Right? Thanks, Valentine igor.vaynberg wrote: iterator() does not check visibility. -igor On Thu, Nov 27, 2008 at 11:24 AM, Valentine2008 [EMAIL PROTECTED] wrote: Can we get even the invisible children? Seems we cannot:-( igor.vaynberg wrote: iterator() -igor On Thu, Nov 27, 2008 at 10:42 AM, Valentine2008 [EMAIL PROTECTED] wrote: Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724656.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20738180.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20739977.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get all the children of a MarkupContainer?
Created as WICKET-1963. - Valentine Bruno Cesar Borges wrote: https://issues.apache.org/jira/browse/WICKET -Mensagem original- De: Valentine2008 [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 28 de novembro de 2008 18:12 Para: users@wicket.apache.org Assunto: Re: How to get all the children of a MarkupContainer? Where to open a jira issue? igor.vaynberg wrote: open a jira issue and that way we can confirm. -igor On Fri, Nov 28, 2008 at 10:32 AM, Valentine2008 [EMAIL PROTECTED] wrote: Hi Igor, I find it out! The reason I couldn't get a child using a string component path is because of the outdated JavaDoc sentences in MarkupContainer (Wicket 1.3.4): Children can be added by calling the add() method, and they can be looked up using a dotted path. For example, if a container called a held a nested container b which held a nested component c, then a.get(b.c) would return the Component with id c. . It said about *dotted* path with a clear example. And I used the dotted path. Now I find that the Component.PATH_SEPARATOR is used, which is :. We have to use a.get(b:c) in the example. Can we confirm that the JavaDoc is updated in the next coming release of Wicket? Thanks, Valentine igor.vaynberg wrote: no. why would it do that? visibility is a render-time condition, it has nothing to do with component hierarchy. -igor On Thu, Nov 27, 2008 at 12:01 PM, Valentine2008 [EMAIL PROTECTED] wrote: But Component.get(pathString) will check the visibility and will return null if the child is invisible. Right? Thanks, Valentine igor.vaynberg wrote: iterator() does not check visibility. -igor On Thu, Nov 27, 2008 at 11:24 AM, Valentine2008 [EMAIL PROTECTED] wrote: Can we get even the invisible children? Seems we cannot:-( igor.vaynberg wrote: iterator() -igor On Thu, Nov 27, 2008 at 10:42 AM, Valentine2008 [EMAIL PROTECTED] wrote: Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724656.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20738180.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20739977.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** Atenção: Esta mensagem foi enviada para uso exclusivo do(s) destinatários(s) acima identificado(s), podendo conter informações e/ou documentos confidencias/privilegiados e seu sigilo é protegido por lei. Caso você tenha recebido por engano, por favor, informe o remetente e apague-a de seu sistema. Notificamos que
Bug of Wicket when iterate the form using iterator()?
Hi, I wrote the following code to print out all the children of the an input form. --- Iterator iterator = getInputForm().iterator(new Comparator() { public int compare(Object o1, Object o2) { System.out.format(:%s, %s%n, o1, o2); Component component1 = (Component) o1; Component component2 = (Component) o2; return component1.getId().compareTo(component2.getId()); } }); while(iterator.hasNext()) { System.out.format(---Child of input form: id=%s%n, ((Component)iterator.next()).getId()); } - When running, the following error occurs: --- [27 Nov 2008 10:38:15,325] ERROR [http-8080-6] (RequestCycle.java:1432) - org.ap ache.wicket.RequestCycle [Ljava.lang.Object; cannot be cast to [Lorg.apache.wick et.Component; java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache .wicket.Component; at org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478) . The code on line 478 of MarkupContainer.java is: sorted = Arrays.asList((Component[])children); Is it a bug of Wicket? Thanks, Valentine -- View this message in context: http://www.nabble.com/Bug-of-Wicket-when-iterate-the-form-using-iterator%28%29--tp20723903p20723903.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get all the children of a MarkupContainer?
Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get all the children of a MarkupContainer?
Can we get even the invisible children? Seems we cannot:-( igor.vaynberg wrote: iterator() -igor On Thu, Nov 27, 2008 at 10:42 AM, Valentine2008 [EMAIL PROTECTED] wrote: Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug of Wicket when iterate the form using iterator()?
The getInputForm() will return an instance of Form class in Wicket. After creating the form, --- // 3. create, setup, and add the input form inputForm = new Form(inputForm); inputForm.setOutputMarkupId(true); add(inputForm); -- I added the following to the form: 1. a FeedbackPanel component; 2. a AjaxSubmitLink component; 3. a AjaxLink component; 4. A Button component; 5. Several Label components, some are invisible (Which are in a WebMarkupContainer to control its visibility); 6. Several TextField components; 7. Several DropDownList components, some are invisible (Which are in a WebMarkupContainer to control its visibility); 8. Several ListMultipleChoice components, some are invisible (Which are in a WebMarkupContainer to control its visibility). Thanks. Valentine2008 wrote: Hi, I wrote the following code to print out all the children of the an input form. --- Iterator iterator = getInputForm().iterator(new Comparator() { public int compare(Object o1, Object o2) { System.out.format(:%s, %s%n, o1, o2); Component component1 = (Component) o1; Component component2 = (Component) o2; return component1.getId().compareTo(component2.getId()); } }); while(iterator.hasNext()) { System.out.format(---Child of input form: id=%s%n, ((Component)iterator.next()).getId()); } - When running, the following error occurs: --- [27 Nov 2008 10:38:15,325] ERROR [http-8080-6] (RequestCycle.java:1432) - org.ap ache.wicket.RequestCycle [Ljava.lang.Object; cannot be cast to [Lorg.apache.wick et.Component; java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache .wicket.Component; at org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478) . The code on line 478 of MarkupContainer.java is: sorted = Arrays.asList((Component[])children); Is it a bug of Wicket? Thanks, Valentine -- View this message in context: http://www.nabble.com/Bug-of-Wicket-when-iterate-the-form-using-iterator%28%29--tp20723903p20724441.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get all the children of a MarkupContainer?
But Component.get(pathString) will check the visibility and will return null if the child is invisible. Right? Thanks, Valentine igor.vaynberg wrote: iterator() does not check visibility. -igor On Thu, Nov 27, 2008 at 11:24 AM, Valentine2008 [EMAIL PROTECTED] wrote: Can we get even the invisible children? Seems we cannot:-( igor.vaynberg wrote: iterator() -igor On Thu, Nov 27, 2008 at 10:42 AM, Valentine2008 [EMAIL PROTECTED] wrote: Use iterator(Comparator)? Or other ways? Thanks, Valentine -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20723938.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724471.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-get-all-the-children-of-a-MarkupContainer--tp20723938p20724656.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bug of Wicket when iterate the form using iterator()?
Hi Igor, I understand. I cannot dump all my code here. It is too much. I will try to give you a runnable code. Now, I am using iterator() instead of iterator(Comparator) to bypass the problem. Thanks, Valentine igor.vaynberg wrote: i cannot put this into my ide and run it to confirm the error you are getting. -igor On Thu, Nov 27, 2008 at 11:22 AM, Valentine2008 [EMAIL PROTECTED] wrote: The getInputForm() will return an instance of Form class in Wicket. After creating the form, --- // 3. create, setup, and add the input form inputForm = new Form(inputForm); inputForm.setOutputMarkupId(true); add(inputForm); -- I added the following to the form: 1. a FeedbackPanel component; 2. a AjaxSubmitLink component; 3. a AjaxLink component; 4. A Button component; 5. Several Label components, some are invisible (Which are in a WebMarkupContainer to control its visibility); 6. Several TextField components; 7. Several DropDownList components, some are invisible (Which are in a WebMarkupContainer to control its visibility); 8. Several ListMultipleChoice components, some are invisible (Which are in a WebMarkupContainer to control its visibility). Thanks. Valentine2008 wrote: Hi, I wrote the following code to print out all the children of the an input form. --- Iterator iterator = getInputForm().iterator(new Comparator() { public int compare(Object o1, Object o2) { System.out.format(:%s, %s%n, o1, o2); Component component1 = (Component) o1; Component component2 = (Component) o2; return component1.getId().compareTo(component2.getId()); } }); while(iterator.hasNext()) { System.out.format(---Child of input form: id=%s%n, ((Component)iterator.next()).getId()); } - When running, the following error occurs: --- [27 Nov 2008 10:38:15,325] ERROR [http-8080-6] (RequestCycle.java:1432) - org.ap ache.wicket.RequestCycle [Ljava.lang.Object; cannot be cast to [Lorg.apache.wick et.Component; java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache .wicket.Component; at org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478) . The code on line 478 of MarkupContainer.java is: sorted = Arrays.asList((Component[])children); Is it a bug of Wicket? Thanks, Valentine -- View this message in context: http://www.nabble.com/Bug-of-Wicket-when-iterate-the-form-using-iterator%28%29--tp20723903p20724441.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Bug-of-Wicket-when-iterate-the-form-using-iterator%28%29--tp20723903p20724952.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]