Re: Branding a PageLink target Page
Hi greeklinux Yes. The branding of links means that I want to dynamicaly configure the PageLink Target for a customer? -- View this message in context: http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18397492.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]
wicket new application starts help
i want to add a form with two textfield AND checkbox in my wicket application. plz help me. thank u -- View this message in context: http://www.nabble.com/wicket-new-application-starts-help-tp18397852p18397852.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: disabling error validation
Hi Thanks for the link. But my form doesnt have static components like in the example. All the form components are dynamic and generated using ListViews and are nested inside panels. Is there a way to traverse the component hierarchy with a loop and call validate() on each component. Please provide an example. Thanks Serkan Camurcuoglu-2 wrote: this link may help you a bit.. http://cwiki.apache.org/WICKET/conditional-validation.html tbt wrote: Hi But I need the component models to be updated. Thats why i'm using a SubmitLink instead of using a Link. I was hoping there was a simple method to disable form validation with the SubmitLink such as 'link2.setFormValidation(false)' or something like that. Is there a way to disable validations for some links and enable validations for others, yet at the same time update the form components when the links are clicked. Please provide a simple example. Thanks ZedroS wrote: Hi If you don't want our form to be validated, why do you use a SubmitLink ? A simple Link wouldn't trigger the validation. Isn't that what you're looking for ? ++ zedros - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/disabling-error-validation-tp18375841p18397964.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: wicket new application starts help
Have a look here: http://www.wicket-library.com/wicket-examples/, and especially http://www.wicket-library.com/wicket-examples/forminput/ But it may look like this: HTML form wicket:id=form input wicket:id=f1 type=text /br/ input wicket:id=f2 type=text /br/ input wicket:id=chk type=checkbox / /form JAVA String _f1, _f2; Object _chk; ... Form form = new Form(form); add(form); TextField f1 = new TextField(f1, new PropertyModel(this, _f1)); form.add(f1); TextField f2 = new TextField(f2, new PropertyModel(this, _f2)); form.add(f2); CheckBox chk = new CheckBox(chk, new PropertyModel(this, _chk)); form.add(chk); ... Thilo a écrit : i want to add a form with two textfield AND checkbox in my wicket application. plz help me. thank u - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Direclty using parent's compoundpropertymodel not possible ?
Newgro wrote: Did you check http://cwiki.apache.org/WICKET/working-with-wicket-models.html already? It's explained realy well. I did already. My issue is more about model sharing with sub components and especially how to access it easily in a sub component (like for example in a panel whose representation depends on the data in the model attached to some form way above in the hierarchy). Thanks nonetheless for your help ++ zedros -- View this message in context: http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18398127.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 ?
and that sub component must have the complete object? or does the panel only have to have a property of that object? If it has to have the complete object you can always make your own model give the panel this kind of model: public class SuperObjectModel implements IModel, IComponentAssignedModel { public Object getObject() { return null; } public void setObject(Object object) { } public void detach() { } public IWrapModel wrapOnAssignment(final Component component) { return new IWrapModel() { public void detach(){ } public void setObject(Object object){ } public Object getObject() { MarkupContainer parent = component.getParent(); while (parent != null !(parent.getModel() instanceof IComponentInheritedModel)) { return parent.getModelObject(); } return null; } public IModel getWrappedModel() { return SuperObjectModel.this; } }; } } On Fri, Jul 11, 2008 at 9:17 AM, Joseph P. [EMAIL PROTECTED] wrote: Newgro wrote: Did you check http://cwiki.apache.org/WICKET/working-with-wicket-models.html already? It's explained realy well. I did already. My issue is more about model sharing with sub components and especially how to access it easily in a sub component (like for example in a panel whose representation depends on the data in the model attached to some form way above in the hierarchy). Thanks nonetheless for your help ++ zedros -- View this message in context: http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18398127.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 ?
oeps loop has to be something like this ofcourse Component parent = component; while ( (parent = parent.getParent()) != null !(parent.getModel() instanceof IComponentInheritedModel)) { return parent.getModelObject(); } return null; On Fri, Jul 11, 2008 at 9:28 AM, Johan Compagner [EMAIL PROTECTED] wrote: and that sub component must have the complete object? or does the panel only have to have a property of that object? If it has to have the complete object you can always make your own model give the panel this kind of model: public class SuperObjectModel implements IModel, IComponentAssignedModel { public Object getObject() { return null; } public void setObject(Object object) { } public void detach() { } public IWrapModel wrapOnAssignment(final Component component) { return new IWrapModel() { public void detach(){ } public void setObject(Object object){ } public Object getObject() { MarkupContainer parent = component.getParent(); while (parent != null !(parent.getModel() instanceof IComponentInheritedModel)) { return parent.getModelObject(); } return null; } public IModel getWrappedModel() { return SuperObjectModel.this; } }; } } On Fri, Jul 11, 2008 at 9:17 AM, Joseph P. [EMAIL PROTECTED] wrote: Newgro wrote: Did you check http://cwiki.apache.org/WICKET/working-with-wicket-models.html already? It's explained realy well. I did already. My issue is more about model sharing with sub components and especially how to access it easily in a sub component (like for example in a panel whose representation depends on the data in the model attached to some form way above in the hierarchy). Thanks nonetheless for your help ++ zedros -- View this message in context: http://www.nabble.com/Direclty-using-parent%27s-compoundpropertymodel-not-possible---tp18356056p18398127.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]
?xml tag, japanese and ie6
Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18400121.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: Best way to debug big session size?
On Thu, 10 Jul 2008, Johan Compagner wrote: try it with yourkit? I've got JProfiler and at least with that it's been a bit difficult to pinpoint which exactly are the components hanging onto the biggest objects. But I did a kludge in our own DiskPageStore extension where I visit all the components of the page to be stored and print out the component path and Objects.sizeof(component.getModel()) for each component. It seems to produce pretty informative output. I'm a bit unsure of whether it's entirely safe to call getModel() as late as saving the page after detach (getModelObject() definitely not :)) so maybe I'll remove this when I'm done with debugging / adding missing detaching. This also revealed that for example the page instance I'm currently looking at has more than 2000 components in total :) Maybe we should look at replacing some stuff that is not displayed with dummy WebMarkupContainers instead of relying on visibility control. 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]
Re: ?xml tag, japanese and ie6
What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18400483.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]
addResourceFolder in unit tests
Hello, i'm trying to use a custom ResourceStreamLocator to place the markup files in another directory. It is based on this wiki entry: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3 The deployed application works fine, but my test cases don't work. With enabled debug messages for org.apache.wicket.util.resource i can see that the webapppaths are empty although the addResourceFolder method should be called. Is there a trick or did i miss anything? I'm using Netbeans 6.1 and Wicket 1.3.4. Thanks in advance. Witold - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml tag, japanese and ie6
Hello, Thank you for your answer. In every case, the encoding in the browser is utf-8. It doesn't work with the metatag you send to me, it is already added in all the pages. It only works if I add the ?xml tag. Even more, I have one page with three different panels. Two of them have the ?xml line in the markup and the Japanese shows correctly, the third one has not and the japanese is corrupted. So in the same page we have correct and incorrect japanese, because the ?xml is not there. Has to be something related with Wicket... Thank you again, Oskar richardwilko wrote: What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18400964.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: ?xml tag, japanese and ie6
Ok, but what os are you using? on windows the default character encoding is not utf-8 and java uses the system default character encoding. Also check that the html files are saved in utf-8 tbh i think that meta tag only works for really old browsers, but doesn't hurt anything if it is there. Toscano wrote: Hello, Thank you for your answer. In every case, the encoding in the browser is utf-8. It doesn't work with the metatag you send to me, it is already added in all the pages. It only works if I add the ?xml tag. Even more, I have one page with three different panels. Two of them have the ?xml line in the markup and the Japanese shows correctly, the third one has not and the japanese is corrupted. So in the same page we have correct and incorrect japanese, because the ?xml is not there. Has to be something related with Wicket... Thank you again, Oskar richardwilko wrote: What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18401085.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: ?xml tag, japanese and ie6
Do you include static japanese text within the markup? I believe the only time when the ?xml declaration is important is when the template is initially parsed from file by wicket using an xml parser. I don't think dynamically included japanese text (such as text that's defined by the model of a label object) has anything to do with the ?xml declaration (so in my opinion converting static japanese text directly included in the markup to wicket:message tags should solve the problem but it's only my guess).. Toscano wrote: Hello, Thank you for your answer. In every case, the encoding in the browser is utf-8. It doesn't work with the metatag you send to me, it is already added in all the pages. It only works if I add the ?xml tag. Even more, I have one page with three different panels. Two of them have the ?xml line in the markup and the Japanese shows correctly, the third one has not and the japanese is corrupted. So in the same page we have correct and incorrect japanese, because the ?xml is not there. Has to be something related with Wicket... Thank you again, Oskar richardwilko wrote: What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ?xml tag, japanese and ie6
Hi, Is Red Hat and the webserver is configured to serve in UTF-8. The point is that IE6 has problems to proccess HTML with the ?XML, so I need Wicket to not output that tag without affecting to the encoding of the content which has to be utf-8. Trust me, the layout results really hurt in IE6 with that tag. I have more experience working with Japanese websites, and I already checked all the encodings: file, webserver... richardwilko wrote: Ok, but what os are you using? on windows the default character encoding is not utf-8 and java uses the system default character encoding. Also check that the html files are saved in utf-8 tbh i think that meta tag only works for really old browsers, but doesn't hurt anything if it is there. Toscano wrote: Hello, Thank you for your answer. In every case, the encoding in the browser is utf-8. It doesn't work with the metatag you send to me, it is already added in all the pages. It only works if I add the ?xml tag. Even more, I have one page with three different panels. Two of them have the ?xml line in the markup and the Japanese shows correctly, the third one has not and the japanese is corrupted. So in the same page we have correct and incorrect japanese, because the ?xml is not there. Has to be something related with Wicket... Thank you again, Oskar richardwilko wrote: What is the encoding of your outputted pages (in firefox right click, view page info)? This will depend on what platform you are running on (os and webserver). if it is not utf-8 then you will need to change your setup so that it is. then it *should* work. its also possible that the page encoding is being forced to something else by the browser. you could also try adding this line to your html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / btw, I dont think this isnt really a wicket problem, more a server setup problem. Toscano wrote: Hello, We are developing a multilanguage application, so our standard is utf-8. We are making intensive use of Wicket's localization features, but recently we found a problem and we can't find a good solution for it. Basically is this: for not getting corrupted Japanese, we have to include the following line in the html file: ?xml version=1.0 encoding=UTF-8? But if we include that file, then all the layout in http://lists.xml.org/archives/xml-dev/200109/msg00182.html IE6 is a mess . We tried to change the ?XML declaration with metatags inside the head of the file, but it doesn't work, the Japanese only shows correctly if the tag is there. So if we leave the tag, we get Japanese but the layout is a mess in IE6. If we removed it, we get good layout but corrupted Japanese. Is there any tag or something to configure in Wicket for making the Japanese show correctly without the ?XML tag? As always, thank you for your time, Oskar -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18401237.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: ?xml tag, japanese and ie6
Ok, but first rule of debugging is check the simple stuff first so I did :) In my application I have added the ?xml to my page and panel markup and have added some non-ascii chars to my markup (not sure if they are Japanese but look like it) as a test. There is no xml declaration in the source of the page in the browser (wicket removes it) and the non-ascii chars show up correctly in both ie6 and firefox. I'm not sure what you are doing differently. Which version of wicket are you using? We are using wicket 1.3.4, linux, sun java 5 and tomcat 6. -- View this message in context: http://www.nabble.com/%3C-xml-tag%2C-japanese-and-ie6-tp18400121p18401656.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: addResourceFolder in unit tests
Witold Czaplewski wrote: i'm trying to use a custom ResourceStreamLocator to place the markup files in another directory. It is based on this wiki entry: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3 The deployed application works fine, but my test cases don't work. With enabled debug messages for org.apache.wicket.util.resource i can see that the webapppaths are empty although the addResourceFolder method should be called. My guess would be you are not setting an application with the added resource folder against the WicketTester Try passing in your application to the tester. eg, WicketTester tester = new WicketTester(myAppWithResourceFolder); thats my guess :) -- View this message in context: http://www.nabble.com/addResourceFolder-in-unit-tests-tp18400757p18401762.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: Branding a PageLink target Page
Hello Jens, I dont find such a fuctionality, too. But it is a interresting one. If you want something simple, then I would suggest your first solution. Implement a PageLink/Link that takes some key and read this key from a properties file. I used such a link route configuration with a php framework. And I think this would be an interresting feature for wicket. greetings jensiator wrote: Hi greeklinux Yes. The branding of links means that I want to dynamicaly configure the PageLink Target for a customer? -- View this message in context: http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18401826.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: Resource/SharedResource - Display an image
Hello, no I am not using any AJAX with this form. I only get the resource and set it in an Image component. Maybe the uploaded picture is not persistet fast enough to be available on the response... Ok, I thank you for your help. greetings Roland Huss wrote: Hi, greeklinux wrote: your solution works. But the problem is that I am already registering the resource in an Initializer. But ok... When you bind a resource reference to an application, it's not about registering the resource itself but looking it up. My fault. greeklinux wrote: Now I am uploading the picture and after the reload, I see the standard pic. After a site refresh I am seeing the uploaded pic. Do I have to set any headers? Though I don't know your setup, but you need to refresh your image component (i.e. if it is done via an Ajax request). No headers needs to be set here. ... roland -- View this message in context: http://www.nabble.com/Resource-SharedResource---Display-an-image-tp18348115p18401931.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: Fallback support for ModalWindow
I agree with hbf. Of course, modal window is a JS component, but a fallback would really make sense (why shouldn't there be one when there's one for AjaxLink?). Is there any component like this around by now or planned in near future? Basically it should be possible to have a placeholder (MarkupContainer) for the dialog on every page (which might yield one), hidden until displayed by an AjaxFallbackLink... this would lead to the whole page reloading + the dialog MarkupContainer when JS is turned off. Same for closing the window and returning the dialog result to the underlying component... But of course, I would prefer an out-of-the-box solution or a ready-made component. :) hbf wrote: On 15.03.2008, at 17:22, Martijn Dashorst wrote: According to me, when javascript is turned off, onclick is not fired. I agree. I'll try to be more precise: For instance, the link to open the modal window: if it were made a link with both href and an onClick then the href-link will be taken if JS is off. This href-link would be such that a page is shown that contains the modal window as a div on top of the other page content (no JS involved). On the other hand, if JS is on, the onClick is triggered and the div gets fetched and shown using JS. Wouldn't this work? I am just trying to give a constructive feedback on the current ModalWindow implementation where I feel that at least conceptually the modal window can be shown even without JavaScript. But obviously you know much more about the internal workings so apologies if my comments do not hit the mark. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Fallback-support-for-ModalWindow-tp15985980p18402137.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: Branding a PageLink target Page
Thank you for the feedback. Okey, I have a NavLink.class that extends PageLink. The keys in the property file is the full class name. If the property file don't contain the class name key, NavLink will just call the PageLink constuctor with the the class name as usual. If the property file contains the classname key it will call the super constructor (PageLink) with the value set in the propertyfile. And the value can be another page target class. The drawback is that its hard for other developers to understand which page the NavLink is realy targeting! I wonder if its possible to do something like MyTargetClass_BRAND.class? Have to think about that! Jens -- View this message in context: http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18403071.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]
sort of off topic ehcache's SimplePageCachingFilter or ?
I need to cache some of my applications pages, I saw the note on seo page on the simplepagecachingfilter. However it seems as this project was last updated in 2006 are there anything equal to this which are more alive? Also how can I say cache /myparameterpage/ and then it will cache /myparameterpage/id/1,/myparameterpage/id/2 etc? Hoping for some answers... -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Branding a PageLink target Page
Hello, for me it would be important to know where to look if I see the Navlink code. When I know where to find the property file with the navigation roules then it is ok. Cant you use the wicket:link tag? then you have to change only the html instead of the java part. greetings jensiator wrote: Thank you for the feedback. Okey, I have a NavLink.class that extends PageLink. The keys in the property file is the full class name. If the property file don't contain the class name key, NavLink will just call the PageLink constuctor with the the class name as usual. If the property file contains the classname key it will call the super constructor (PageLink) with the value set in the propertyfile. And the value can be another page target class. The drawback is that its hard for other developers to understand which page the NavLink is realy targeting! I wonder if its possible to do something like MyTargetClass_BRAND.class? Have to think about that! Jens -- View this message in context: http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18404637.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]
PopupSettings IE6 Permission Denied
When using PopupSettings to throw up a popup with a PDF (from a link), IE6 is sporadically throwing a Permission Denied error. I believe this because of the w.focus() firing prior to the PDF/popup being loaded. Below is the code used to display a help link. When clicked, it throws up a popup with a PDF. Here is my markup: ... wicket:message key=menu-help[help]/wicket:message ... Inside my Application extension: ... getSharedResources().add(help, new ContextRelativeResource(/pdf/help.pdf)); ... Inside my panel: ... final ResourceLink help = new ResourceLink(link-help, new ResourceReference(help)); final PopupSettings popUpSettings = new PopupSettings(PopupSettings.RESIZABLE | PopupSettings.SCROLLBARS).setHeight(800).setWidth(800); help.setPopupSettings(popUpSettings); add(help); ... The following markup is generated: ... if(w.blur) w.focus(); return false; href=../resources/org.apache.wicket.Application/helpHelp ... I found that removing if(w.blur) w.focus(); from the onclick event removes the sporadic JS error and still gives me the desired effect (meaning after the PDF is done loading within the popup, the popup is on top and has focus) I did this with the following: @Override public String getPopupJavaScript() { return super.getPopupJavaScript().replace(if(w.blur) w.focus();, ); } I wasn't able find an open JIRA issue for this. Has anyone else experienced this problem? Also, is this a good example of implementing a ResourceLink? -- View this message in context: http://www.nabble.com/PopupSettings-IE6-%22Permission-Denied%22-tp18405095p18405095.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]
ByteArrayResource's getCacheDuration( )
Hi, I want to be able to generate the byteArray (for MS - Excel report being passed to a byteArrayResource every time the resource link is clicked. I was trying to use getCacheDuration( ) for the same to allow for it to create ByteArray every time the resource link is clicked on the page. I have something like : final ByteArrayResource modelReportByteArrayResource = new ByteArrayResource(CONTENT_TYPE, createByteArray() ,FILE_NAME) { // java docs removed for clarity protected final int getCacheDuration() { return -1; // -1 or 0 doesn't work. =( } }; // add the resource. add(new ResourceLink(modelReportResource )); I tried to override : // java docs removed for clarity protected final void setHeaders(final WebResponse response) { response.setHeader(Cache-Control, no-cache, must-revalidate); } But I still get the same excel report over and over no matter how many times i click the link, despite me changing some data or the stream. Any suggestions / thoughts??? Regards Vyas, Anirudh
Re: Reading files
On Jul 9, 2008, at 6:52 AM, greeklinux wrote: Hello, I do not know if it helps: Can you read the CSV file as Resource, get the IResourceStream, then getInputStream() on IResourceStream and put this inputStream in a java.io.InputStreamReader? Yeah, that's basically where I am. I thought maybe there was a way to simplify the process. Here's what I've have... IResourceStream resStream = new PackageResourceStream(WicketApplication.class, protocols.csv); InputStream inStream = resStream.getInputStream(); InputStreamReader isr = new InputStreamReader(inStream); ListString[] protocolList = new CSVReader(isr).readAll(); inStream.close(); I could collapse this a bit, but I need to keep hold of IResourceStream so that I can close it after the CSVReader.readAll() call. -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Does Session.getClientInfo() Always Return An Instance?
Hi, Does Session.getClientInfo() always return a client info instance? Is it possible that this method will return null? If so, what is the cause to it? Thanks. -- View this message in context: http://www.nabble.com/Does-Session.getClientInfo%28%29-Always-Return-An-Instance--tp18407471p18407471.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: Best way to debug big session size?
This also revealed that for example the page instance I'm currently looking at has more than 2000 components in total :) Maybe we should look at replacing some stuff that is not displayed with dummy WebMarkupContainers instead of relying on visibility control. Maurice and Martijn have a similar war story they might share... something about a component with excel like functionality :-) Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Switch tab only if user doesn't want to save changes.
Hi all, thanks in advance for your precious support. I have an AjaxTabbedPanel with two tabs. In the first tab there is a panel with a form, some input fields and a save button; the content of the second tab is irrelevant. Use-case: 1 - user selects first tab; 2 - user makes some changes in the input fields but doesn't click the save button; 3 - user selects second tab. On step 3, users loses all his updates without being warned. I would like to add a javascript confirm dialog to be triggered only when some changes have been performed but not saved (no ModalWindow, just javascript). I mean something like: There are some unsaved changes that will be lost, do you really want to switch tab? OK Cancel. OK brings the user to the second tab, Cancel makes him stay in the first tab. The panel inside the first tab has a handy boolean hasUnsavedChanges() method, but I don't know where I could call it and how to inject an if (!confirm('...')) return false;. Maybe in the onClick(AjaxRequestTarget target) method of the AjaxFallbackLink returned by AjaxTabbedPanel's newLink() method? What's the best way to do it? Thank you very much, Fabio Fioretti - WindoM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: London Wicket Event, August 6 at Google, London
I'm in! You can't keep me away... To anyone who is undecided over whether or not to attend, I heartily recommend it. I think everyone comes away at least with some fresh ideas or an understanding of some aspect of Wicket they've not yet used, or they just benefit from talking to people tackling the same or similar problems as them. (And hey, there's always pizza as well.) Some of the previous presentations are available at the London Wicket site: http://www.londonwicket.org/ Charlie. 2008/7/10 jWeekend [EMAIL PROTECTED]: Al and I would like to invite those of you that can get to London on August 6 to our next London Wicket Event at Google's London office - thanks to all involved at Google (especially Al) for kindly hosting us and for the great support. We'll be posting details soon (we have some impressive presentations lined-up again). This post confirms the date and location. The http://jweekend.com/dev/LWUGReg/ registration/event details page should be updated by the time you click on this link ... you know the drill. Regards - Cemal http://jWeekend.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: disabling error validation
On Fri, 11 Jul 2008, tbt wrote: Thanks for the link. But my form doesnt have static components like in the example. All the form components are dynamic and generated using ListViews and are nested inside panels. Is there a way to traverse the component hierarchy with a loop and call validate() on each component. Please provide an example. getPage().visitChildren(FormComponent.class, new IVisitor() {}); ... 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]
Re: ?xml tag, japanese and ie6
On Fri, 11 Jul 2008, Toscano wrote: Is Red Hat and the webserver is configured to serve in UTF-8. The point is What is the locale of the session running the JVM? With what file.encoding is the application built, and with what file.encoding (Java system property) is it running? 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]
Re: Does Session.getClientInfo() Always Return An Instance?
Yes, it should always return an instance. On Fri, Jul 11, 2008 at 12:34 PM, TH Lim [EMAIL PROTECTED] wrote: Hi, Does Session.getClientInfo() always return a client info instance? Is it possible that this method will return null? If so, what is the cause to it? Thanks. -- View this message in context: http://www.nabble.com/Does-Session.getClientInfo%28%29-Always-Return-An-Instance--tp18407471p18407471.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] -- Ryan Gravener http://twitter.com/ryangravener
CheckGroup with custom Model problem
Hey guys, I'm back to using Wicket after a 3 year break! Anyway, if any of you can help with this delightful pain I'd return the favor (eventually!). Background: - I have a DTO/VO that has a property that is a list of strings (e.g. String[] propertyA) - The lookup items (choices) for this property is a list of name/value pairs (e.g. EnumerationValue class) and the values will be the ones that need to be passed onto the DTO/VO property. public class EnumerationValue implements Serializable { private String code; private String description; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } } I had setup a custom model to handle the translation between the collection of EnumerationValues coming from the UI and into the DTO/VO object: private IModel createFundInstrumentTypeCodeModel(final ListEnumerationValue choices) { return new IModelListEnumerationValue() { // this gets the value from the model object backing the form public ListEnumerationValue getObject() { final ListString codes= wizard.getFundingInstrumentCodes (); // loop through the 'choices' and compare the code of each choice with the string list // pick out all the matching items from the choices return CollectionHelper.get(choices, codes); } // this sets the value from the form into the model object backing the form public void setObject(ListEnumerationValue object) { // convert the list into a string list and set the DTO/VO wizard.setFundingInstrumentCodes(CollectionHelper.convertToStringList(object)); } public void detach() { } }; } This custom model was working fine when I was using CheckBoxMultipleChoice but I changed to CheckGroup since I wanted more control over the HTML being produced. CheckGroup doesn't call the setObject() everytime the form is submitted; accoridng to the updateModel() method, it only gets called when the backing model object is null. public void updateModel() { Collection collection = getModelObject(); if (collection == null) { collection = getConvertedInput(); setModelObject(collection); } else { modelChanging(); collection.clear(); collection.addAll(getConvertedInput()); setModelObject(collection); // TODO: Added this to allow conversion of list of enumerated values into list of strings modelChanged(); } } I've added the TODO line in there so that correct trnslation between list of strings and list of EnumerartionValue can occur. Am I doing this correctly or am I on the wrong ttrack. Thanks! Aye
Search and Display Results on same page[Ajax or No Ajax]
Hi Guys, I need help regarding a simple use case. I have a BasePage that has Two Panels : Top Panel and Bottom Panel User Can enter search criteria in top Panel and Results need to be displayed in Bottom Panel. Results displayed in ListView/DataView #html looks like this... div wicket:id=topPanel[Top panel]/div div wicket:id=BottomPanel[Bottom panel]/div #TopPanel form wicket:id=searchForm // Lots of Search Fields // Submit Button /form #BottomPanel divwicket:id=table[ListView]/div How do I pass the search Criteria(a POJO) of Top Panel when user Submits the Form to Bottom Panel? Or, If I use a webmarkup container for the search resultsand use only one panel(i.e the top panel) for search AND display...then how do i update the Model for ListView? I tried all possible combinations...but failed...am I missing something. I was trying the use case that When user loads up the form first time the fields of Search form are empty so ListView/dataview has no results. When user enters some search criteria and clicks Search the web markup container below updates its Model and displays the results according to updated modelif there are no results then nothing gets displayed. final WebMarkupContainer contactsWrapper = new WebMarkupContainer( contactsWrap); form.add(new AjaxButton(searchContacts) { protected void onSubmit(AjaxRequestTarget target, Form f) { final ContactInfoPOJO c = (ContactInfoPOJO) getForm().getModelObject(); IModel newModel = new LoadableDetachableModel() { protected Object load() { return WicketApplication.get().getContactInfoDao().getContactsBySearch(c); } }; // If javascript is enabled on user's browser. if (target != null) { // refresh the component. target.addComponent(contactsWrapper); } } }); Here the problem is that Model cannot be updated?? final ListView contacts = new ListView(viewContacts, contactInfoModel) { protected void populateItem(final ListItem item) { item.add(new Label(fName, new PropertyModel(item.getModel(), firstName))); item.add(new Label(lName, new PropertyModel(item.getModel(), lastName))); } } contactsWrapper.add(contacts); I have also attached the sample source files. Please help me . Thanks http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.html SaveAndDisplayAjax.html http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.java SaveAndDisplayAjax.java -- View this message in context: http://www.nabble.com/Search-and-Display-Results-on-same-page-Ajax-or-No-Ajax--tp18413133p18413133.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: Search and Display Results on same page[Ajax or No Ajax]
Hello, I think your problem is in how you define the search criteria pojo model: final IModel addContactInfoModel = new LoadableDetachableModel() { protected Object load() { ContactInfoPOJO modelObject = new ContactInfoPOJO(); return modelObject; } }; The problem is that load() is going to be called during each request response sequence and by its definition resetting the backing object to a newly instantiated instance each time the page is loaded. Using final Model addContactInfoModel = new Model (new ContactInfoPOJO()); should solve your problems. You should also consider using a DataTable for showing the results as it is backed by a repeater and has built in support for paging, sorting, etc. Mike I need help regarding a simple use case. I have a BasePage that has Two Panels : Top Panel and Bottom Panel User Can enter search criteria in top Panel and Results need to be displayed in Bottom Panel. Results displayed in ListView/DataView #html looks like this... div wicket:id=topPanel[Top panel]/div div wicket:id=BottomPanel[Bottom panel]/div #TopPanel form wicket:id=searchForm // Lots of Search Fields // Submit Button /form #BottomPanel divwicket:id=table[ListView]/div How do I pass the search Criteria(a POJO) of Top Panel when user Submits the Form to Bottom Panel? Or, If I use a webmarkup container for the search resultsand use only one panel(i.e the top panel) for search AND display...then how do i update the Model for ListView? I tried all possible combinations...but failed...am I missing something. I was trying the use case that When user loads up the form first time the fields of Search form are empty so ListView/dataview has no results. When user enters some search criteria and clicks Search the web markup container below updates its Model and displays the results according to updated modelif there are no results then nothing gets displayed. final WebMarkupContainer contactsWrapper = new WebMarkupContainer( contactsWrap); form.add(new AjaxButton(searchContacts) { protected void onSubmit(AjaxRequestTarget target, Form f) { final ContactInfoPOJO c = (ContactInfoPOJO) getForm().getModelObject(); IModel newModel = new LoadableDetachableModel() { protected Object load() { return WicketApplication.get().getContactInfoDao().getContactsBySearch(c); } }; // If javascript is enabled on user's browser. if (target != null) { // refresh the component. target.addComponent(contactsWrapper); } } }); Here the problem is that Model cannot be updated?? final ListView contacts = new ListView(viewContacts, contactInfoModel) { protected void populateItem(final ListItem item) { item.add(new Label(fName, new PropertyModel(item.getModel(), firstName))); item.add(new Label(lName, new PropertyModel(item.getModel(), lastName))); } } contactsWrapper.add(contacts); I have also attached the sample source files. Please help me . Thanks http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.html SaveAndDisplayAjax.html http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.java SaveAndDisplayAjax.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Search and Display Results on same page[Ajax or No Ajax]
Hi Michael, Thanks for your reply. For the Ajax solution...In the files that I attached. What I am tring to do is loading the model when the page loads up first time. At this time the Pojo is empty so model has no values ,which means there is nothing to iterate so list appears empty. Now, my challenge is when user click the search button and tries to search...then I have to get the Pojo and call DAO to get the results and wrap the results in the same model(that I used while loading up the page)...so that same model gets new values and then update the ListView/DataView without the whole page refresh. But, I am unable to assign the newly returned values by DAO to old model because it says final variable cannot be referred from inside Do you think my approach is correct towards the problem? Any suggestions? Thanks, RG Michael O'Cleirigh wrote: Hello, I think your problem is in how you define the search criteria pojo model: final IModel addContactInfoModel = new LoadableDetachableModel() { protected Object load() { ContactInfoPOJO modelObject = new ContactInfoPOJO(); return modelObject; } }; The problem is that load() is going to be called during each request response sequence and by its definition resetting the backing object to a newly instantiated instance each time the page is loaded. Using final Model addContactInfoModel = new Model (new ContactInfoPOJO()); should solve your problems. You should also consider using a DataTable for showing the results as it is backed by a repeater and has built in support for paging, sorting, etc. Mike I need help regarding a simple use case. I have a BasePage that has Two Panels : Top Panel and Bottom Panel User Can enter search criteria in top Panel and Results need to be displayed in Bottom Panel. Results displayed in ListView/DataView #html looks like this... div wicket:id=topPanel[Top panel]/div div wicket:id=BottomPanel[Bottom panel]/div #TopPanel form wicket:id=searchForm // Lots of Search Fields // Submit Button /form #BottomPanel divwicket:id=table[ListView]/div How do I pass the search Criteria(a POJO) of Top Panel when user Submits the Form to Bottom Panel? Or, If I use a webmarkup container for the search resultsand use only one panel(i.e the top panel) for search AND display...then how do i update the Model for ListView? I tried all possible combinations...but failed...am I missing something. I was trying the use case that When user loads up the form first time the fields of Search form are empty so ListView/dataview has no results. When user enters some search criteria and clicks Search the web markup container below updates its Model and displays the results according to updated modelif there are no results then nothing gets displayed. final WebMarkupContainer contactsWrapper = new WebMarkupContainer( contactsWrap); form.add(new AjaxButton(searchContacts) { protected void onSubmit(AjaxRequestTarget target, Form f) { final ContactInfoPOJO c = (ContactInfoPOJO) getForm().getModelObject(); IModel newModel = new LoadableDetachableModel() { protected Object load() { return WicketApplication.get().getContactInfoDao().getContactsBySearch(c); } }; // If javascript is enabled on user's browser. if (target != null) { // refresh the component. target.addComponent(contactsWrapper); } } }); Here the problem is that Model cannot be updated?? final ListView contacts = new ListView(viewContacts, contactInfoModel) { protected void populateItem(final ListItem item) { item.add(new Label(fName, new PropertyModel(item.getModel(), firstName))); item.add(new Label(lName, new PropertyModel(item.getModel(), lastName))); } } contactsWrapper.add(contacts); I have also attached the sample source files. Please help me . Thanks http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.html SaveAndDisplayAjax.html http://www.nabble.com/file/p18413133/SaveAndDisplayAjax.java SaveAndDisplayAjax.java - To unsubscribe, e-mail: [EMAIL
Hiding table columns in DataViews?
I build a table like this: table width=100% cellpadding=0 cellspacing=0 border=0 tr td class=pad5 bldwicket:message key=dateTitle//td tdwicket:message key=timeTitle//td tdwicket:message key=statusTitle//td tdnbsp;/td /tr tr wicket:id=recurringEvents td wicket:id=date class=grytop pad5[Date]/td td wicket:id=time class=grytop[Time]/td td wicket:id=status class=grytop[Status]/td td a wicket:id=replyNow class=guestlinkspan wicket:id=reply //anbsp;/td /tr /table Now, there are certain columns I need to hide in certain circumstances. I have no problem hiding the 'content' of certain columns by setting the particular value to empty in my dataprovider. However, I would like to hide the entire column including the header - how can that be done? Thanks! Michael
Regarding getting html checkbox values?
i am displaying html checkbox values in one page. checkbox looks in the same page, i have wicket AjaxLink delete Button. during the delete button clicking, i want to get the checked checkbox values in the same page? is it possible? if yes, please advise. thanks and regards, edi -- View this message in context: http://www.nabble.com/Regarding-getting-html-checkbox-values--tp18416248p18416248.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]