Re: TreeGrid and DataGrid open source
Examples : http://wicketstuff.org/grid-examples/ Source: https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/inmethod-grid On Wed, 2008-07-30 at 18:26 -0700, TahitianGabriel wrote: Hi Matej, The website (http://www.inmethod.com/) seems to be down. I've got a tomcat welcome page instead. Is this project still active? Regards, Gabriel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DropDownChoice default value not found because of equal method
Hi, I created a new database and now it works fine. Must have been an inconsistency in the development/test environment. Thanks Andrea 2008/7/30, Igor Vaynberg [EMAIL PROTECTED]: On Wed, Jul 30, 2008 at 3:02 AM, Andrea Jahn [EMAIL PROTECTED] wrote: Reason is, that the Country class contains an equal() method. Wicket calls this method, but the comparison of the id delivers false (different instances of the Integer object). this doesnt make any sense unless you do int1==int2, which you dont, you use equals which does not care about instance identity. so if your ids do not match you have another problem with your db somewhere. use the debugger and check that the values are actually the same. -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why does Settings.setResourceFinder null out resourceStreamLocator?
I found it strange that my custom resource stream locator was forcibly nullified when running tests. Is this a bug? or by design. -- View this message in context: http://www.nabble.com/Why-does-Settings.setResourceFinder-null-out-resourceStreamLocator--tp18748752p18748752.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: Instruction on running Wicket portlet on Liferay 5
Hi, I have also been trying to get Wicket examples to run in Liferay 5. I think the problem is that Wicket replaces all the -signs with amp;:s in URLs. See my post in Liferay forum http://www.liferay.com/web/guest/community/forums/-/message_boards/message/1131112 for the modifications I did. With those changes at least the Linkomatic and Helloworld examples seem to be working. - Sauli l_y wrote: However after the link is clicked, it seems only the doView() method is invoked, not the processAction() as I would have expected? -- View this message in context: http://www.nabble.com/Instruction-on-running-Wicket-portlet-on-Liferay-5-tp18250931p18748828.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: Guidelines in Wicket
There is Wicket in Action, Pro Wicket, http://cwiki.apache.org/WICKET/newuserguide.html wiki page and other resources... You can use any of them for your guideline. freak182 wrote: My superior ask me to submit a Guidelines in Wicket. He assign it to me because I trained the new employee the wicket framework (we are using wicket as our UI framework along with Hibernate and Spring...actually we already develop two application in wicket and third one is migration from asp to wicket). Is there really a Guidelines or it is just we follow the guidelines in java programming naming convention and etci appreciate any suggestion/s or comment/s. Thanks a lot. Cheers. -- View this message in context: http://www.nabble.com/Guidelines-in-Wicket-tp18745859p18751254.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]
SpringWebApplicationFactory cannot load WA from parent bean factory
I have the same problem described on: https://issues.apache.org/jira/browse/WICKET-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel SpringWebApplicationFactory cannot load WA from parent bean factory I have tried the suggest workaround without result. I'm use jdk 1.6.x, wicket 1.3.4 and spring 2.5.5. I have tried: 1) servlet servlet-nameWicketApplication/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value param-nameapplicationBean/param-name param-valuewicketapp.WicketApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameWicketApplication/servlet-name url-pattern/*/url-pattern /servlet-mapping 2) ... filter filter-nameWicketApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value param-nameapplicationBean/param-name param-valuewicketapp.WicketApplication/param-value /init-param /filter filter-mapping filter-nameWicketApplication/filter-name url-pattern/*/url-pattern /filter-mapping ... But i have always the problem. While if i don't use spring: 3) ... filter filter-nameWicketApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuewicketapp.WicketApplication/param-value /init-param /filter filter-mapping filter-nameWicketApplication/filter-name url-pattern/*/url-pattern /filter-mapping ... It's ok. Please some help? :-(( -- View this message in context: http://www.nabble.com/SpringWebApplicationFactory-cannot-load-WA-from-parent-bean-factory-tp18751687p18751687.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]
Brix interview with Igor, Matej and other brix devs
Read more about Brix from a JCR perspective: http://dev.day.com/microsling/content/blogs/main/brix2.html Martijn -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FusionCharts - How to
I just integrated OpenFlashCharts by using the example for flash in the knowledge base. It wasn't hard although a recent package rename has broken it (have to sort out what went on there). For the data that the chart requests, you simple override the request target. Search the list for raw as there is a recent post where Igor responds to my question about how to do it. - Brill On 31-Jul-08, at 12:19 AM, cresc wrote: Hi, I digged through various dynamic chart options and found fusion charts free good enough for the current requirements. Can someone help me in using FusionCharts with wicket. How to embed flash objects? How do we feed xml data to these objects ? Is JSON the only way ? Any alternative ? - thanks cresc -- View this message in context: http://www.nabble.com/FusionCharts---How-to-tp18747498p18747498.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to open a Modal Window by clicking a button
I won't post the whole thing but here's the parts related to the modal window In my java class : public class Edit extends Panel { private ModalWindow modCall; private AjaxSubmitButton btnNewCall; ... // creating my components ... add(modCall = new ModalWindow(modalNewCall)); modCall.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 1L; public Page createPage() { CalllPOJO call = new CallPOJO(); call.setId(my_mainpage.getId()); call.setIdUser(my_mainpage.getSession().getUser().getIdUser()); return new CallWindow(call, my_mainpage, true); } }); modCall.setPageMapName(modCall-2); modCall.setCookieName(modCall-2); modCall.setTitle(getLocalizer().getString(title.new.call, Edit.this)); modCall.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { private static final long serialVersionUID = 1L; public void onClose(AjaxRequestTarget target) { Request Req = new Request(); MainPage dos = new MainPage(my_mainpage.getClient(), Req.getDataPOJO(my_mainpage.getId()), 0); setResponsePage(dos); } }); modAppel.setWidthUnit(em); modAppel.setHeightUnit(em); modAppel.setInitialHeight(300); modAppel.setInitialWidth(600); ... btnNewCall = new AjaxSubmitButton(btnNewCall, frmEdit) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget arg0, Form arg1) { System.out.println(click in button btnNewCall); modCall.show(arg0); } }; frmEdit.add(btnNewCall); ... frmEdit.add(modCall); } In the corresponding html class: wicket:panel tddiv wicket:id=modalNewCall/divinput class=ActionButton type=submit name=btnNewCall value=New call wicket:id=btnNewCall//td /wicket:panel I hope that's enough information for you ... thank you very much for your help Paul Logasa Bogen II wrote: I believe that you really do need it to be a AjaxLink... but if you can send the code to the list we can see if there are any other issues. plb a_godin wrote: Hey, I'm new to wicket and I'm completing a web app that was left behind by someone else. I have to take a functionality (opening a modal window) that was called by clicking an AjaxLink in a panel and bring it in a button on another panel ... I moved the code, it compiles and all but when I click the AjaxSubmitButton (that calls myModalWindow.show(arg0) ), nothing happens ... Does anybody know what the problem could be / what I forgot ? I looked at the example on www.wicket-library.com on how to open modal windows but that was with AjaxLinks ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-open-a-Modal-Window-by-clicking-a-button-tp18743263p18755631.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: SpringWebApplicationFactory cannot load WA from parent bean factory
sorry, dont really understand where your problem is...wicket-1189 has been fixed a long time ago. are you saying the bug is back or something else is a problem? -igor On Thu, Jul 31, 2008 at 3:28 AM, alex2008 [EMAIL PROTECTED] wrote: I have the same problem described on: https://issues.apache.org/jira/browse/WICKET-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel SpringWebApplicationFactory cannot load WA from parent bean factory I have tried the suggest workaround without result. I'm use jdk 1.6.x, wicket 1.3.4 and spring 2.5.5. I have tried: 1) servlet servlet-nameWicketApplication/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value param-nameapplicationBean/param-name param-valuewicketapp.WicketApplication/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameWicketApplication/servlet-name url-pattern/*/url-pattern /servlet-mapping 2) ... filter filter-nameWicketApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value param-nameapplicationBean/param-name param-valuewicketapp.WicketApplication/param-value /init-param /filter filter-mapping filter-nameWicketApplication/filter-name url-pattern/*/url-pattern /filter-mapping ... But i have always the problem. While if i don't use spring: 3) ... filter filter-nameWicketApplication/filter-name filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class init-param param-nameapplicationClassName/param-name param-valuewicketapp.WicketApplication/param-value /init-param /filter filter-mapping filter-nameWicketApplication/filter-name url-pattern/*/url-pattern /filter-mapping ... It's ok. Please some help? :-(( -- View this message in context: http://www.nabble.com/SpringWebApplicationFactory-cannot-load-WA-from-parent-bean-factory-tp18751687p18751687.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SpringWebApplicationFactory cannot load WA from parent bean factory
sorry, dont really understand where your problem is...wicket-1189 has been fixed a long time ago. are you saying the bug is back or something else is a problem? -igor Now I'm not sure perhaps is only similar. :blush: For the moment i have find a workaround to this problem I used the 3) solution and in the class webApplication on the method init I put: addComponentInstantiationListener (new SpringComponentInjector (this)); In this way the error which I reported above using the first or second solution is gone. I do not understand the problem is my first application. -- View this message in context: http://www.nabble.com/SpringWebApplicationFactory-and-applicationClassName-is-missing-tp18751687p18757915.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: SpringWebApplicationFactory cannot load WA from parent bean factory
what does this addComponentInstantiationListener (new SpringComponentInjector (this)); have to do with whether or not you use a servlet or a filter? you always have to do that for @SpringBean annotation to work... -igor On Thu, Jul 31, 2008 at 9:03 AM, alex2008 [EMAIL PROTECTED] wrote: sorry, dont really understand where your problem is...wicket-1189 has been fixed a long time ago. are you saying the bug is back or something else is a problem? -igor Now I'm not sure perhaps is only similar. :blush: For the moment i have find a workaround to this problem I used the 3) solution and in the class webApplication on the method init I put: addComponentInstantiationListener (new SpringComponentInjector (this)); In this way the error which I reported above using the first or second solution is gone. I do not understand the problem is my first application. -- View this message in context: http://www.nabble.com/SpringWebApplicationFactory-and-applicationClassName-is-missing-tp18751687p18757915.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]
Restricting Javascript entry in TextField/TextArea
Is there a way to restrict either on the front end or some validator on the backend in Wicket to identify if a field has Javascript within the submitted value? We have a requirement for this as the data will be redisplayed in HTML emails and don't want the recipients being open to malicious code. Thanks - Doug -- View this message in context: http://www.nabble.com/Restricting-Javascript-entry-in-TextField-TextArea-tp18758723p18758723.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: Restricting Javascript entry in TextField/TextArea
you can check for script tags using a patternvalidator or a custom validator -igor On Thu, Jul 31, 2008 at 9:44 AM, Doug Leeper [EMAIL PROTECTED] wrote: Is there a way to restrict either on the front end or some validator on the backend in Wicket to identify if a field has Javascript within the submitted value? We have a requirement for this as the data will be redisplayed in HTML emails and don't want the recipients being open to malicious code. Thanks - Doug -- View this message in context: http://www.nabble.com/Restricting-Javascript-entry-in-TextField-TextArea-tp18758723p18758723.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]
Creating a new session if new browser tab is opened
Hi, I'm sure this question has been asked before but I could not solve my problem by going through the suggestions in older posts. My problem is that if one user logs in to my web app and then another user logs in on the same web browser (different tab) then the first user will get PageExpired exception when they try to click on any link within an application. I have set 'setAutomaticMultiWindowSupport(true)' in my WebApplication class but the problem still persists. I debugged the 'newSession' method and see that it's only called once for an instance of a browser and not for an instance of a browser's tab. Looking at the Request object during 'newRequestCycle' method invocation I see that the session ID does not change if a new tab has been opened. Is there a way of creating a new session when a new browser tab has been opened? I am using Wicket 1.3.4 Thanks, Ross -- View this message in context: http://www.nabble.com/Creating-a-new-session-if-new-browser-tab-is-opened-tp18759573p18759573.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: SpringWebApplicationFactory cannot load WA from parent bean factory
I like use @SpringBean but i don't understand why if i'm trying settings as serverlet or as a filter does not work. what does this addComponentInstantiationListener (new SpringComponentInjector (this)); have to do with whether or not you use a servlet or a filter? you always have to do that for @SpringBean annotation to work... -igor -- View this message in context: http://www.nabble.com/SpringWebApplicationFactory-and-applicationClassName-is-missing-tp18751687p18759710.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: Creating a new session if new browser tab is opened
there isnt really a way to do that cleanly because it is the browser that recycles the session, so its not completely in your control what you can do is, and this is hacky, turn off cookie support for session tokens in your application server and when you detect a new tab redirect to some page with jsessionid stripped from the url. that said, supporting multiple users logged into different browser tab is a pretty weird requirement. -igor On Thu, Jul 31, 2008 at 10:31 AM, Ross Shnaper [EMAIL PROTECTED] wrote: Hi, I'm sure this question has been asked before but I could not solve my problem by going through the suggestions in older posts. My problem is that if one user logs in to my web app and then another user logs in on the same web browser (different tab) then the first user will get PageExpired exception when they try to click on any link within an application. I have set 'setAutomaticMultiWindowSupport(true)' in my WebApplication class but the problem still persists. I debugged the 'newSession' method and see that it's only called once for an instance of a browser and not for an instance of a browser's tab. Looking at the Request object during 'newRequestCycle' method invocation I see that the session ID does not change if a new tab has been opened. Is there a way of creating a new session when a new browser tab has been opened? I am using Wicket 1.3.4 Thanks, Ross -- View this message in context: http://www.nabble.com/Creating-a-new-session-if-new-browser-tab-is-opened-tp18759573p18759573.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]
DatePicker Fails in Portlet Environment
I am trying to use DateTextField component that includes DatePicker in my portlet application. The DateTextField component is displayed onSubmit of a AjaxSubmitLink But the Wicket Ajax Debug windows shows the following error when the DateTextField is rendered. ERROR: Exception evaluating javascript: ReferenceError: YAHOO is not defined If I make the DateTextField as an component as the first component to be rendered in the page before adding any Ajax Components, then DateTextField works fine without resulting in any error. Any help on how to fix this issue is greatly appreciated. Thanks Prasanna -- View this message in context: http://www.nabble.com/DatePicker-Fails-in-Portlet-Environment-tp18760300p18760300.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]
Adding child components in constructor? Best practice?
Hi everybody, May sound stupid: is the contructor really the best place for adding children to a component or is there a better one, e.g. onBeforeRender? All examples I see keep doing this in the constructor or in an init method which is called by the constructor, however, I realized that there are some problems e.g. if the component needs a string resource from the page or anything else from a parent element (because it is not attached to the page while still not being fully constructed). Are there any drawbacks when doing this in onBeforeRender? Btw: If you say a component should not need to access to its parent, you are probably right for most cases, but there are scenarious where it does. Thanks for inspiration :) -- View this message in context: http://www.nabble.com/Adding-child-components-in-constructor--Best-practice--tp18760471p18760471.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 take a field to a form so that it can manage within submit on the same form?
How take a field to a form so that it can manage within submit on the same form? Form form=new Form(f); form.add(new RequiredTextField(integerInRangeProperty).add(NumberValidator.range(0, 100))); form.add(new Button(execute) { public void onSubmit() { //int increase = ((PriceIncrease) command).getPercentage(); // I would like keep the value of field integerInRangeProperty int increase = productManager.increasePrice(increase); } }); add(form); -- View this message in context: http://www.nabble.com/How-take-a-field-to-a-form-so-that-it-can-manage-within-submit-on-the-same-form--tp18760796p18760796.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]
HybridURLs
Hi following situation: i have a link to a page, that has to be bookmarkable, say: /foo/document/21 where FooPage is mounted at/foo no problem here, but: coming from page XY i´d like to pass additional data to the foopage, normally done with construction, while i need the url still to be bookmarkable and starting with /foo/document/21 that´s what that hybrid stuff is made for, right? i currently do not see a bookmarkablepagelink taking a page (instead of a class). any other ideas ? thx uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How take a field to a form so that it can manage within submit on the same form?
I'm sorry, but could you please explain better your issue? Bruno Borges blog.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Thu, Jul 31, 2008 at 3:35 PM, alex2008 [EMAIL PROTECTED] wrote: How take a field to a form so that it can manage within submit on the same form? Form form=new Form(f); form.add(new RequiredTextField(integerInRangeProperty).add(NumberValidator.range(0, 100))); form.add(new Button(execute) { public void onSubmit() { //int increase = ((PriceIncrease) command).getPercentage(); // I would like keep the value of field integerInRangeProperty int increase = productManager.increasePrice(increase); } }); add(form); -- View this message in context: http://www.nabble.com/How-take-a-field-to-a-form-so-that-it-can-manage-within-submit-on-the-same-form--tp18760796p18760796.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]
Wrap Headers in DataTable to new line?
Q1: How do I make Header in DataTable to wrap to new line. I am putting a newline character but its not woorking. columns.add(new PropertyColumn(new Model(This is a very very very long header that does not wrap), sortProperty, propertyExpression)); Q2:Is there a way to set the column's width, so that data always wraps if its more that a particular width? -- View this message in context: http://www.nabble.com/Wrap-Headers-in-DataTable-to-new-line--tp18762379p18762379.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: Wrap Headers in DataTable to new line?
nanotech wrote: Q1: How do I make Header in DataTable to wrap to new line. I am putting a newline character but its not woorking. columns.add(new PropertyColumn(new Model(This is a very very very long header that does not wrap), sortProperty, propertyExpression)); How do you display a line break in HTML? Q2:Is there a way to set the column's width, so that data always wraps if its more that a particular width? How do you set the width of an HTML table? plb - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding child components in constructor? Best practice?
you can feel free to do it in onbeforerender. this pattern is used, for example, when you need to have user-overridable factory methods for child components. the constructor works for 90% usecase and does not require extra checks like onbeforerender because you know the constructor only runs once. as for needing access to string resources, you are right unless of course you use a model such as ResourceModel which delays the lookup until it is actually needed. -igor On Thu, Jul 31, 2008 at 11:15 AM, pixologe [EMAIL PROTECTED] wrote: Hi everybody, May sound stupid: is the contructor really the best place for adding children to a component or is there a better one, e.g. onBeforeRender? All examples I see keep doing this in the constructor or in an init method which is called by the constructor, however, I realized that there are some problems e.g. if the component needs a string resource from the page or anything else from a parent element (because it is not attached to the page while still not being fully constructed). Are there any drawbacks when doing this in onBeforeRender? Btw: If you say a component should not need to access to its parent, you are probably right for most cases, but there are scenarious where it does. Thanks for inspiration :) -- View this message in context: http://www.nabble.com/Adding-child-components-in-constructor--Best-practice--tp18760471p18760471.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]
Wicket and Flex integration
Dear all, We want to integrate wicket and Flex. The reason for the integration is that we would like to keep the wicket wizard with individual swf instead of developing all in Flex. I haven't seen any document about this integration. If any, please could you send an example? We also want to know if the integration was using blaze ds or the ayax bridge, etc Thanks in advance. -- Fernando Wermus. www.linkedin.com/in/fernandowermus http://mientretiempo.blogspot.com/
Re: Direclty using parent's compoundpropertymodel not possible ?
hi Sorry for the delay, holidays went in the way ;) Alex Jacoby-2 wrote: More than once I've tried accessing my inherited model from within a constructor, forgetting that since the component hasn't been added yet it can't access its inherited model there. That's not your problem, right? Alex hum, Alex, thanks a lot !! It's something I hadn't figured out by myself and most probably stuck my head against more than once without even realizing it ! Thanks a lot (and shame on me) ! It would be nice for it to be included in the Working with Wicket models wiki page for people like me... I'll definitely makes more tries of it, since I'm not sure I properly get how compound property models are shared among inheritors. And the day I'm sure of it, I'll update the wiki page if noone has done it before me. ++ zedros -- View this message in context: http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18763687.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: Direclty using parent's compoundpropertymodel not possible ?
I think I might be missing something here. I assume you don't create your components in the parent's constructor right? Or you call a different super constructor perhaps? Because java executes the parent constructor before calling a subclass constructor and for what I've seen so far in the examples, the components are usually created and added in the constructor, so you would have created your components and models before getting to the subclass initialization. 2008/7/31 ZedroS [EMAIL PROTECTED] hi Sorry for the delay, holidays went in the way ;) Alex Jacoby-2 wrote: More than once I've tried accessing my inherited model from within a constructor, forgetting that since the component hasn't been added yet it can't access its inherited model there. That's not your problem, right? Alex hum, Alex, thanks a lot !! It's something I hadn't figured out by myself and most probably stuck my head against more than once without even realizing it ! Thanks a lot (and shame on me) ! It would be nice for it to be included in the Working with Wicket models wiki page for people like me... I'll definitely makes more tries of it, since I'm not sure I properly get how compound property models are shared among inheritors. And the day I'm sure of it, I'll update the wiki page if noone has done it before me. ++ zedros -- View this message in context: http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18763687.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]
Component#modelChanging and Component#modelChanged when IModel#setObject
Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component#modelChanging and Component#modelChanged when IModel#setObject
how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Component#modelChanging and Component#modelChanged when IModel#setObject
Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where has DateLabel gone to
I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the chapter about models, the author uses a DateLabel which he says can be found in the extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both wicket and wicket extensions and I just can't find this component. Is it an old feature that got removed or is it a new one present only in .1.4+? Regards, Daniel Freitas
Re: Component#modelChanging and Component#modelChanged when IModel#setObject
well, it notifies if the model is changed through the component. there is no way for us to really intercept a setobject call on an arbitrary model instance, figure out which components it is currently attached to, and call modelchanging methods on them. -igor On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William [EMAIL PROTECTED] wrote: Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where has DateLabel gone to
it is in wicket-datetime project -igor On Thu, Jul 31, 2008 at 3:13 PM, Daniel Freitas [EMAIL PROTECTED] wrote: I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the chapter about models, the author uses a DateLabel which he says can be found in the extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both wicket and wicket extensions and I just can't find this component. Is it an old feature that got removed or is it a new one present only in .1.4+? Regards, Daniel Freitas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Where has DateLabel gone to
Daniel Freitas mailto:[EMAIL PROTECTED] wrote: I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the chapter about models, the author uses a DateLabel which he says can be found in the extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both wicket and wicket extensions and I just can't find this component. You can found it in wicket datetime package. http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.4/wicket- datetime/ Cheers, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Component#modelChanging and Component#modelChanged when IModel#setObject
Yes, it does seem to be a difficult task to accomplish unless the model itself is component aware. Nonetheless, it seems relatively useless to have the onchanging/onchanged methods if they cannot do what they claim they can do- don't you agree? If models were component aware it would simply be a matter of setting the component on the model when Compopnent#setModel is called. Then when IModel#setObject is called it could in turn call Component#modelChanging/modelChanged. This obviously requires a tight coupling relationship between the component and the model, but at least notifications of model object changes can be guaranteed. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:16 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject well, it notifies if the model is changed through the component. there is no way for us to really intercept a setobject call on an arbitrary model instance, figure out which components it is currently attached to, and call modelchanging methods on them. -igor On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William [EMAIL PROTECTED] wrote: Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where has DateLabel gone to
I got it though maven thanks. 2008/7/31 Kai Mütz [EMAIL PROTECTED] Daniel Freitas mailto:[EMAIL PROTECTED] wrote: I'm reading Wicket in Action and I'm using Wicket 1.3.4. On the chapter about models, the author uses a DateLabel which he says can be found in the extensions project. Well, I have tried 1.3.0, 1.3.3 and 1.3.4 for both wicket and wicket extensions and I just can't find this component. You can found it in wicket datetime package. http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.4/wicket- datetime/http://svn.apache.org/repos/asf/wicket/branches/wicket-1.3.x/jdk-1.4/wicket-datetime/ Cheers, Kai - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component#modelChanging and Component#modelChanged when IModel#setObject
What would happen if more than one component uses the same model? Would we keep a list of components to notify? If that's the case why not just implement listeners instead, so then any class could listen to model changes. It's a nice idea except that IModel would have to be turned in to a class instead of an interface and that seems more restrictive than not having those methods being called :(. I'm new to Wicket and never needed to use those methods but I guess that making IModel a class and increasing the coupling between model and component is a price too high to pay for it. 2008/7/31 Hoover, William [EMAIL PROTECTED] Yes, it does seem to be a difficult task to accomplish unless the model itself is component aware. Nonetheless, it seems relatively useless to have the onchanging/onchanged methods if they cannot do what they claim they can do- don't you agree? If models were component aware it would simply be a matter of setting the component on the model when Compopnent#setModel is called. Then when IModel#setObject is called it could in turn call Component#modelChanging/modelChanged. This obviously requires a tight coupling relationship between the component and the model, but at least notifications of model object changes can be guaranteed. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:16 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject well, it notifies if the model is changed through the component. there is no way for us to really intercept a setobject call on an arbitrary model instance, figure out which components it is currently attached to, and call modelchanging methods on them. -igor On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William [EMAIL PROTECTED] wrote: Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stack overflow when extending from page
I typo got me to a stack overflow. Instead of extending WebPage, I extended Page directly and when wicket tried to render the page it threw a StackOverflowError caused by the following code: public class ClockPage extends Page{ //Typo, should be *extends WebPage* } Page extends MarkupContainer public class MarkupContainer ... public String getMarkupType() { return getPage().getMarkupType(); } ... } Get page is inherited from Component: public abstract class Component ... ... public final Page getPage() { // Search for nearest Page final Page page = findPage(); // If no Page was found if (page == null) { // Give up with a nice exception throw new IllegalStateException(No Page found for component + this); } return page; } ... } The problem is that getPage() returns an instance to ClockPage, which then calls getMarkupType() on itself which in turn does a getPage(), returning the ClockPage instance again, and then it calls getMarkupType() which call.. stack overflow. Is this an unforseen, minor bug? Could it be changed to avoid such a situation and throw a more user friendly exception so we know we shouldn't extend Page directly? Just asking out of curiosity. Regards, Daniel Freitas
Dynamically Making changes to Tree Node
http://www.nabble.com/file/p18765641/treeview.jpeg Hi All, As shown in the Image I have a checkbox tree which has nodes that have different components. Each node of the tree has a checkbox, label, a panel which has the 3 TextAreas and another panel which has a listview. In order to get the tree to look like what is shown in the image, I had to set the visibility of these components across different levels of the Tree which means that all these components are present at all the nodes but they are not visible everywhere. Also on top of the tree is another panel(Top Panel) from where values are submitted on pressing the apply button. Now what I wanted to achieve in this interface was to apply the limits entered in the Top Panel to the nodes which are checked (i.e. to the ListView under the checked node). This seems to be a real complex interface to me but there has to be a way to get this to work. The main problem that I am having is that how do I get to the ListView (or ListViews) to which I am trying to make the changes. I might be sounding a little confusing here but I am ready to explain the whole interface in even more detail. Please let me know if anyone has any ideas or even a suggestion to implement this. Also is there a way to add different components to the different nodes in the same Tree?? Kindly let me. Thanks in advance, vishy -- View this message in context: http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18765641.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: Refreshing a form inside a Modal Window
Is there anyone who has any clue about how this has to be done??? vishy_sb wrote: Hi all, I have Modal Window which contains a panel. Inside the panel I am trying to perform a search and the results of the search are populating inside a ListView. There is an apply button which applies the list on the main page and closes the modal window. However when I want to do another search and bring up the Modal window the previous List is still present in it. I think that when the Modal window is closed it just becomes invisible and is not closing actually and thats why this is happening. But I was just wondering if there is a way so as to refresh the (search)form or the panel whenever it is loaded inside the Modal window. Any kind of help will be appreciated. Thanks, vishy -- View this message in context: http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.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: palette problem
I also had the same problem with palette ... Nothing appeas in the Selected list, there was always an empty selected list ... The solution was to provide all the choices , as suggested by severian. What a time waster! Wicket should have better javadoc :( -- View this message in context: http://www.nabble.com/palette-problem-tp12590320p18765754.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: HybridURLs
Hi, mount the page using HybridUrlCodingStrategy. The url for page instance (you can use PageLink for that) will than look like /foo/document/21.5 (where .5 denotes page instance). Note that such url *is* bookmarkable, the page instance number doesn't matter. Unfortunately wicket has to store the page id in url. In the future it will however probably separated by ? ( e.g. /foo/document/21?5 ) -Matej 2008/7/31 Uwe Schäfer [EMAIL PROTECTED]: Hi following situation: i have a link to a page, that has to be bookmarkable, say: /foo/document/21 where FooPage is mounted at/foo no problem here, but: coming from page XY i´d like to pass additional data to the foopage, normally done with construction, while i need the url still to be bookmarkable and starting with /foo/document/21 that´s what that hybrid stuff is made for, right? i currently do not see a bookmarkablepagelink taking a page (instead of a class). any other ideas ? thx uwe -- THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 0 F + 49 761 3 85 59 550 E [EMAIL PROTECTED] www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter http://morningnews.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Component#modelChanging and Component#modelChanged when IModel#setObject
That is true... it would require a proxy service in order to intercept the IModel#setObject calls. -Original Message- From: Daniel Freitas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 7:02 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject What would happen if more than one component uses the same model? Would we keep a list of components to notify? If that's the case why not just implement listeners instead, so then any class could listen to model changes. It's a nice idea except that IModel would have to be turned in to a class instead of an interface and that seems more restrictive than not having those methods being called :(. I'm new to Wicket and never needed to use those methods but I guess that making IModel a class and increasing the coupling between model and component is a price too high to pay for it. 2008/7/31 Hoover, William [EMAIL PROTECTED] Yes, it does seem to be a difficult task to accomplish unless the model itself is component aware. Nonetheless, it seems relatively useless to have the onchanging/onchanged methods if they cannot do what they claim they can do- don't you agree? If models were component aware it would simply be a matter of setting the component on the model when Compopnent#setModel is called. Then when IModel#setObject is called it could in turn call Component#modelChanging/modelChanged. This obviously requires a tight coupling relationship between the component and the model, but at least notifications of model object changes can be guaranteed. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:16 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject well, it notifies if the model is changed through the component. there is no way for us to really intercept a setobject call on an arbitrary model instance, figure out which components it is currently attached to, and call modelchanging methods on them. -igor On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William [EMAIL PROTECTED] wrote: Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 --- -- 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamically Making changes to Tree Node
You have to use different panel for each Tree item (depending on the tree node for that item). If you use BaseTree, implement the #newNodeComponent method accordingly. You can look at LinkTree or LabelTree for an example of how the implementation can look like. Or you can use LinkTree, override newNodeComponent like this @Override protected Component newNodeComponent(String id, IModel model) { return new LinkIconPanel(id, model, LinkTree.this) { private static final long serialVersionUID = 1L; @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { super.onNodeLinkClicked(node, tree, target); LinkTree.this.onNodeLinkClicked(node, tree, target); } @Override protected Component newContentComponent(String componentId, BaseTree tree, IModel model) { /* HERE CREATE YOUR OWN PANEL DEPENDING ON THE TREE NODE. YOU CAN GET THE TREE NODE FOR THIS ROW FROM model.getObject() */ } }; } -Matej On Fri, Aug 1, 2008 at 1:29 AM, vishy_sb [EMAIL PROTECTED] wrote: http://www.nabble.com/file/p18765641/treeview.jpeg Hi All, As shown in the Image I have a checkbox tree which has nodes that have different components. Each node of the tree has a checkbox, label, a panel which has the 3 TextAreas and another panel which has a listview. In order to get the tree to look like what is shown in the image, I had to set the visibility of these components across different levels of the Tree which means that all these components are present at all the nodes but they are not visible everywhere. Also on top of the tree is another panel(Top Panel) from where values are submitted on pressing the apply button. Now what I wanted to achieve in this interface was to apply the limits entered in the Top Panel to the nodes which are checked (i.e. to the ListView under the checked node). This seems to be a real complex interface to me but there has to be a way to get this to work. The main problem that I am having is that how do I get to the ListView (or ListViews) to which I am trying to make the changes. I might be sounding a little confusing here but I am ready to explain the whole interface in even more detail. Please let me know if anyone has any ideas or even a suggestion to implement this. Also is there a way to add different components to the different nodes in the same Tree?? Kindly let me. Thanks in advance, vishy -- View this message in context: http://www.nabble.com/Dynamically-Making-changes-to-Tree-Node-tp18765641p18765641.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Refreshing a form inside a Modal Window
You need to show some code. -Matej On Fri, Aug 1, 2008 at 1:33 AM, vishy_sb [EMAIL PROTECTED] wrote: Is there anyone who has any clue about how this has to be done??? vishy_sb wrote: Hi all, I have Modal Window which contains a panel. Inside the panel I am trying to perform a search and the results of the search are populating inside a ListView. There is an apply button which applies the list on the main page and closes the modal window. However when I want to do another search and bring up the Modal window the previous List is still present in it. I think that when the Modal window is closed it just becomes invisible and is not closing actually and thats why this is happening. But I was just wondering if there is a way so as to refresh the (search)form or the panel whenever it is loaded inside the Modal window. Any kind of help will be appreciated. Thanks, vishy -- View this message in context: http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component#modelChanging and Component#modelChanged when IModel#setObject
Well, I've though aabout proxies, but didn't depicted it in my previous message, but since you touched the subject... It's more more complex to do but maybe that's the best approach. You can do this at a project level, without interfering with the framework directly. You can even componentize your solution to be shared by other projects. One could write a java dynamic proxy handler that binds the components and model together and notify the components when the model is about to be updated. The nice thing about his approach is that it does not affect the involved classes (IModel and Component). Of course, you would have to create your models through some kind of factory to have the proxies returned instead (and be carefull not to call modelChanged() twice when the model is changed from the componnent itself). If you really need this functionality it might be worth implementing it. That sounds like fun... Regards, Daniel 2008/7/31 Hoover, William [EMAIL PROTECTED] That is true... it would require a proxy service in order to intercept the IModel#setObject calls. -Original Message- From: Daniel Freitas [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 7:02 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject What would happen if more than one component uses the same model? Would we keep a list of components to notify? If that's the case why not just implement listeners instead, so then any class could listen to model changes. It's a nice idea except that IModel would have to be turned in to a class instead of an interface and that seems more restrictive than not having those methods being called :(. I'm new to Wicket and never needed to use those methods but I guess that making IModel a class and increasing the coupling between model and component is a price too high to pay for it. 2008/7/31 Hoover, William [EMAIL PROTECTED] Yes, it does seem to be a difficult task to accomplish unless the model itself is component aware. Nonetheless, it seems relatively useless to have the onchanging/onchanged methods if they cannot do what they claim they can do- don't you agree? If models were component aware it would simply be a matter of setting the component on the model when Compopnent#setModel is called. Then when IModel#setObject is called it could in turn call Component#modelChanging/modelChanged. This obviously requires a tight coupling relationship between the component and the model, but at least notifications of model object changes can be guaranteed. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:16 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject well, it notifies if the model is changed through the component. there is no way for us to really intercept a setobject call on an arbitrary model instance, figure out which components it is currently attached to, and call modelchanging methods on them. -igor On Thu, Jul 31, 2008 at 3:08 PM, Hoover, William [EMAIL PROTECTED] wrote: Well, I am still trying to hash that one out- any ideas? I just think that if there is a method that indicates that it will be called anytime that a model is changing that it should follow through with that contract. -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 6:01 PM To: users@wicket.apache.org Subject: Re: Component#modelChanging and Component#modelChanged when IModel#setObject how should we handle that? -igor On Thu, Jul 31, 2008 at 2:43 PM, Hoover, William [EMAIL PROTECTED] wrote: Seems strange that Component#modelChanging and Component#modelChanged are never called when IModel#setObject is called... https://issues.apache.org/jira/browse/WICKET-1764 --- -- 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To
Re: Refreshing a form inside a Modal Window
The Modal Window contains a Panel. The picture shows how the window looks like when I try to search some thing the results are populated in the List as shown. All the rows which are selected will be added to another list on the main page when the apply button is pressed. http://www.nabble.com/file/p18766249/modalwindow.jpeg Now if I want to try to perform another search the Modal window still shows the previous list. /// Java code for onSubmit() for the apply button (AjaxFallBackButton) is shown below applyButton = new AjaxFallbackButton(applyButton, form) { @Override protected void onSubmit(AjaxRequestTarget target, Form fom) { for(int i = 0; iaccountLimitList.size(); i++){ ClearingAccountLimit accLimit = (ClearingAccountLimit)accountLimitList.get(i); if(accLimit.isActive()){ selectedInstruments.add(accLimit); } } onCancel(target); } }; form.add(applyButton); Let me know if you need some more info. Thanks in advance vishy Matej Knopp-2 wrote: You need to show some code. -Matej On Fri, Aug 1, 2008 at 1:33 AM, vishy_sb [EMAIL PROTECTED] wrote: Is there anyone who has any clue about how this has to be done??? vishy_sb wrote: Hi all, I have Modal Window which contains a panel. Inside the panel I am trying to perform a search and the results of the search are populating inside a ListView. There is an apply button which applies the list on the main page and closes the modal window. However when I want to do another search and bring up the Modal window the previous List is still present in it. I think that when the Modal window is closed it just becomes invisible and is not closing actually and thats why this is happening. But I was just wondering if there is a way so as to refresh the (search)form or the panel whenever it is loaded inside the Modal window. Any kind of help will be appreciated. Thanks, vishy -- View this message in context: http://www.nabble.com/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18765669.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/Refreshing-a-form-inside-a-Modal-Window-tp18745307p18766249.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: Stack overflow when extending from page
yeah, we should fix it. please file a jira issue. -igor On Thu, Jul 31, 2008 at 4:22 PM, Daniel Freitas [EMAIL PROTECTED] wrote: I typo got me to a stack overflow. Instead of extending WebPage, I extended Page directly and when wicket tried to render the page it threw a StackOverflowError caused by the following code: public class ClockPage extends Page{ //Typo, should be *extends WebPage* } Page extends MarkupContainer public class MarkupContainer ... public String getMarkupType() { return getPage().getMarkupType(); } ... } Get page is inherited from Component: public abstract class Component ... ... public final Page getPage() { // Search for nearest Page final Page page = findPage(); // If no Page was found if (page == null) { // Give up with a nice exception throw new IllegalStateException(No Page found for component + this); } return page; } ... } The problem is that getPage() returns an instance to ClockPage, which then calls getMarkupType() on itself which in turn does a getPage(), returning the ClockPage instance again, and then it calls getMarkupType() which call.. stack overflow. Is this an unforseen, minor bug? Could it be changed to avoid such a situation and throw a more user friendly exception so we know we shouldn't extend Page directly? Just asking out of curiosity. Regards, Daniel Freitas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Size() is invoked twice
Hi, For this issue I created a Jira issue. Regards, Rik 2008/7/29 Rik van der Kleij [EMAIL PROTECTED] Hi, During performance tuning of a data table I noticed that size() of data provider is invoked twice during one request. This happens when navigating to a next page. Is this normal behavior? During debugging I noticed that the onDetach() of AbstractPageableView is invoked an extra time. Regards, Rik