wicket panels and parent class
Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel("myInfoPanel")); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve smime.p7s Description: S/MIME cryptographic signature
Re: wicket panels and parent class
I guess I am used to the jsp:include method of including panel type objects since I am originally a JSP developer and then anything in the panel instantly has access to the variables defined in the surrounding parent. I guess I could pass along a HashMap of data to the Panel when its constructed, is this possible/recommended? cheers, Steve On 29 Sep 2008, at 12:58, Thies Edeling wrote: And then have to cast it to the class of the parent.. which kinda kills the independent component based idea of reusable panels. Why not pass along the userid when constructing? Or fetch it from the session. Michael Sparer wrote: getParent() ? Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel("myInfoPanel")); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: wicket panels and parent class
Thanks everyone, I changed my constructor to accept the object I wanted and passed it in from the parent class. It's working now. cheers, Steve --- Steve Swinsburg Portal Systems Developer Centre for e-Science Lancaster University Lancaster LA1 4YT email: [EMAIL PROTECTED] phone: +44 (0) 1524 594870 On 29 Sep 2008, at 13:08, jWeekend wrote: Your Panel is just a Java class, so give it a constructor that takes the required object(s), or provide a setter if that wouldn't be too late (ie if the values are required during the panel's construction). Or, take a look at CompoundPropeprtyModel (maybe together with ComponentPropertyModel too depending on your naming conventions). Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk Steve Swinsburg-2 wrote: Hi all, I'm a new Wicket user and am developing an application making use of Panels. The Panels are working, however I need to access some objects in the panel that are defined in the parent class and am not sure how to do this. e.g. MyProfile.java: String userId = Profile.getCurrentUserId(); add(new MyInfoPanel("myInfoPanel")); and in MyInfoPanel.java I need to be able to access userId for example. This is just a basic example, I need to access certain objects in MyInfoPanel.java that are defined in the parent class MyProfile.java cheers, Steve -- View this message in context: http://www.nabble.com/wicket-panels-and-parent-class-tp19722417p19722687.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] smime.p7s Description: S/MIME cryptographic signature
no title in ExternalLink
Hi all, I've just noticed a deficiency in the ExternalLink component that doesn't allow a 'title' field to be set in its constructor. This is a basic HTML attribute that all links should have (for accessibility and expected behaviour). Currently this is only achieved by using AttributeAppender and setting the title attribute onto the link component. I propose a new construcotr that takes the title attribute as a parameter (or the ExternalLink set a title by default). I have filed a Jira ticket here: https://issues.apache.org/jira/browse/WICKET-1878 cheers, Steve smime.p7s Description: S/MIME cryptographic signature
my component ID is being modified and causing errors
I have a simple piece of code which replaces a component with another one when a link is clicked, however the number '4' is being appended to my component ID's. here is the HTML showing 'replaceAjax' as my component ID: replace ajax: replace via ajax wicket:id="replaceAjax">this will be replaced INFO: INFO: Initiating Ajax GET request on ?wicket:interface=: 2:replaceLink::IBehaviorListener:0:&random=0.15276471804827452 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (193 characters) INFO: id="replaceAjax4" > INFO: Response parsed. Now invoking steps... ERROR: Component with id [[replaceAjax4]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set In the above you can see the component ID has been changed to replaceAjax4! Is this a real issue or is the end of the day playing tricks on me? This was on wicket 1.3.0. I then upgraded to wicket 1.3.5 and the 4 turns into an 'e': INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=: 11:replaceLink::IBehaviorListener:0:&random=0.28145640529692173 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (193 characters) INFO: id="replaceAjaxe" > INFO: Response parsed. Now invoking steps... ERROR: Component with id [[replaceAjaxe]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set What's going on? Thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: my component ID is being modified and causing errors
Actually, its just the end of the day playing tricks on me, Wicket does this so the generated ID's are unique - it was something unrelated. cheers, Steve On 23 Oct 2008, at 17:55, Steve Swinsburg wrote: I have a simple piece of code which replaces a component with another one when a link is clicked, however the number '4' is being appended to my component ID's. here is the HTML showing 'replaceAjax' as my component ID: replace ajax: replace via ajax wicket:id="replaceAjax">this will be replaced INFO: INFO: Initiating Ajax GET request on ?wicket:interface=: 2:replaceLink::IBehaviorListener:0:&random=0.15276471804827452 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (193 characters) INFO: id="replaceAjax4" > INFO: Response parsed. Now invoking steps... ERROR: Component with id [[replaceAjax4]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set In the above you can see the component ID has been changed to replaceAjax4! Is this a real issue or is the end of the day playing tricks on me? This was on wicket 1.3.0. I then upgraded to wicket 1.3.5 and the 4 turns into an 'e': INFO: Using XMLHttpRequest transport INFO: INFO: Initiating Ajax GET request on ?wicket:interface=: 11:replaceLink::IBehaviorListener:0:&random=0.28145640529692173 INFO: Invoking pre-call handler(s)... INFO: Received ajax response (193 characters) INFO: id="replaceAjaxe" > INFO: Response parsed. Now invoking steps... ERROR: Component with id [[replaceAjaxe]] a was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set What's going on? Thanks, Steve smime.p7s Description: S/MIME cryptographic signature
AjaxButton - no label constructor?
Is there a special reason why an AjaxButton doesn't have a constructor that allows a label to be set onto it automatically like a normal form Button? Shouldn't the AjaxButton have a constructor like the Button constructor?: Button(java.lang.String id, IModel model) Constructor taking an model for rendering the 'label' of the button (the value attribute of the input/button tag). I realise you can use setLabel to set the label after it's been declared but it just seems inconsistent. cheers, Steve --- Steve Swinsburg Portal Systems Developer Centre for e-Science Lancaster University Lancaster LA1 4YT email: [EMAIL PROTECTED] phone: +44 (0) 1524 594870 smime.p7s Description: S/MIME cryptographic signature
birthday dropdown with month/leap year variances
Hi all, I am creating a set of dropdown choices for a user to enter their birthday on a profile. One for day of the month, one for month of the year, and one for year. However I want to be able to take into account months that have differing numbers of days, (ie some 30, some 31, some 28, every now and the 29 etc) which is all dependent on the month and if its a leap year or not. Does anyone have a component/fragment of code that handles this already to save reinventing the wheel? cheers, Steve smime.p7s Description: S/MIME cryptographic signature
Re: wicket and 508 compilance
I alluded to this in a feature request for a new constructor of the ExternalLink component in the hope that it would start the ball rolling on getting some accessibility happening in the rest of Wicket, but just about everyone that commented said it should not be implemented. https://issues.apache.org/jira/browse/WICKET-1878 Wont fix?! Its section 13.1 of the accessibility document! Yes you can add it manually, but you can do many things manually. If the constructor is there it allows people to automatically take advantage of it. If you don't manually add it, you won't get a title on your link. Come on, lets get some accessibility happening. Then we can tout Wicket as being a accessible-by-design as well! Steve On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote: Of course you should be aware that some components might not be compliant, but I think that's mostly in wicketstuff.. Nino Saturnino Martinez Vazquez Wael wrote: You mean like WAI triple A? http://www.w3.org/WAI/WCAG1AAA-Conformance No it won't break it but it wont enforce it either.. miro wrote: I am new to wicket and want to build web application using wicket, my application should be 508 compliance , so want to know using wicket for any reason can break 508 compliance ? -- -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] smime.p7s Description: S/MIME cryptographic signature
Re: no title in ExternalLink
Yeah you can do that, you can do it heaps of different ways, but why not have a title field on an ExternalLink component, its such a basic attribute that is being missed. See the thread about Wicket and 508 compliance. Steve On 28 Oct 2008, at 15:03, Erik van Oosten wrote: The following extends Link to have a title model in the constructor. Its easy to do the same for an ExternalLink. public abstract class TitledLink extends Link { public TitledLink(String id, String title) { this(id, new Model(title)); } public TitledLink(String id, IModel titleModel) { super(id); add(new AttributeModifier("title", true, titleModel)); } } Steve Swinsburg-2 wrote: Hi all, I've just noticed a deficiency in the ExternalLink component that doesn't allow a 'title' field to be set in its constructor. This is a basic HTML attribute that all links should have (for accessibility and expected behaviour). Currently this is only achieved by using AttributeAppender and setting the title attribute onto the link component. I propose a new construcotr that takes the title attribute as a parameter (or the ExternalLink set a title by default). I have filed a Jira ticket here: https://issues.apache.org/jira/browse/WICKET-1878 cheers, Steve -- View this message in context: http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20208934.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] smime.p7s Description: S/MIME cryptographic signature
Re: wicket and 508 compilance
What are you referring to when you say DDC? The Dewey Decimal System? Used by pretty much every library around the world making it really easy to find books? I'd call that accessible. So my vision for wanting to enforce a bit of accessibility on the web is narrow(?), but no one wants to move forward with the most simple of modifications to make it easier to implement accessibility. The most basic of things to do would be to update the JavaDocs for the API to say: "NOTE: you should always include an AttributeModifier/Appender (or roll your own implementation) to include the title attribute on every link. here's some examples, etc" Or would that be too much bloat as well? Steve On 28 Oct 2008, at 15:35, Martijn Dashorst wrote: There are lots of ways of making accessibility happening, but throwing more arguments to constructors isn't one of 'm. Ever took a short look at DDC? Instead of taking this narrow vision, perhaps start a discussion of how we can make accessibility easy to implement, while not raping our API? Martijn On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: I alluded to this in a feature request for a new constructor of the ExternalLink component in the hope that it would start the ball rolling on getting some accessibility happening in the rest of Wicket, but just about everyone that commented said it should not be implemented. https://issues.apache.org/jira/browse/WICKET-1878 Wont fix?! Its section 13.1 of the accessibility document! Yes you can add it manually, but you can do many things manually. If the constructor is there it allows people to automatically take advantage of it. If you don't manually add it, you won't get a title on your link. Come on, lets get some accessibility happening. Then we can tout Wicket as being a accessible-by-design as well! Steve On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote: Of course you should be aware that some components might not be compliant, but I think that's mostly in wicketstuff.. Nino Saturnino Martinez Vazquez Wael wrote: You mean like WAI triple A? http://www.w3.org/WAI/WCAG1AAA-Conformance No it won't break it but it wont enforce it either.. miro wrote: I am new to wicket and want to build web application using wicket, my application should be 508 compliance , so want to know using wicket for any reason can break 508 compliance ? -- -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] -- 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] smime.p7s Description: S/MIME cryptographic signature
Re: wicket and 508 compilance
lol ok agreed, DropDownChoice is far over the top, but someone let all those methods get through. Perhaps its time to start rolling some up and deprecating others. And getting some examples happening about how best to use the DropDownChoice component. On 28 Oct 2008, at 15:50, James Carman wrote: DropDownChoice On Tue, Oct 28, 2008 at 11:48 AM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: What are you referring to when you say DDC? The Dewey Decimal System? Used by pretty much every library around the world making it really easy to find books? I'd call that accessible. So my vision for wanting to enforce a bit of accessibility on the web is narrow(?), but no one wants to move forward with the most simple of modifications to make it easier to implement accessibility. The most basic of things to do would be to update the JavaDocs for the API to say: "NOTE: you should always include an AttributeModifier/Appender (or roll your own implementation) to include the title attribute on every link. here's some examples, etc" Or would that be too much bloat as well? Steve On 28 Oct 2008, at 15:35, Martijn Dashorst wrote: There are lots of ways of making accessibility happening, but throwing more arguments to constructors isn't one of 'm. Ever took a short look at DDC? Instead of taking this narrow vision, perhaps start a discussion of how we can make accessibility easy to implement, while not raping our API? Martijn On Tue, Oct 28, 2008 at 4:23 PM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: I alluded to this in a feature request for a new constructor of the ExternalLink component in the hope that it would start the ball rolling on getting some accessibility happening in the rest of Wicket, but just about everyone that commented said it should not be implemented. https://issues.apache.org/jira/browse/WICKET-1878 Wont fix?! Its section 13.1 of the accessibility document! Yes you can add it manually, but you can do many things manually. If the constructor is there it allows people to automatically take advantage of it. If you don't manually add it, you won't get a title on your link. Come on, lets get some accessibility happening. Then we can tout Wicket as being a accessible-by-design as well! Steve On 28 Oct 2008, at 15:07, Nino Saturnino Martinez Vazquez Wael wrote: Of course you should be aware that some components might not be compliant, but I think that's mostly in wicketstuff.. Nino Saturnino Martinez Vazquez Wael wrote: You mean like WAI triple A? http://www.w3.org/WAI/WCAG1AAA-Conformance No it won't break it but it wont enforce it either.. miro wrote: I am new to wicket and want to build web application using wicket, my application should be 508 compliance , so want to know using wicket for any reason can break 508 compliance ? -- -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] -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: wicket and 508 compilance
For the Javadoc? (please stop being so vague!) No worries, I'll do this up and submit it into a general accessibility Javadoc improvement Jira ticket. Steve On 28 Oct 2008, at 15:57, Martijn Dashorst wrote: On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: So my vision for wanting to enforce a bit of accessibility on the web is narrow(?), but no one wants to move forward with the most simple of modifications to make it easier to implement accessibility. The most basic of things to do would be to update the JavaDocs for the API to say: "NOTE: you should always include an AttributeModifier/Appender (or roll your own implementation) to include the title attribute on every link. here's some examples, etc" Where's your patch then? Martijn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: wicket and 508 compilance
Well the last post was unclear about which patch he was referring to (Javadoc or codebase). From the previous discussions, it's clear that a patch for a new constructor won't be considered. I will, however, get some information to extend the Javadocs and submit that. Javadco improvement Jira here: https://issues.apache.org/jira/browse/WICKET-1899 Interestingly enough, a ticket was created last year to get the ball rolling with accessibility: https://issues.apache.org/jira/browse/WICKET-982 Steve On 28 Oct 2008, at 16:06, James Carman wrote: I don't think Martijn is intentionally being vague. DDC is a common abbreviation for DropDownChoice among folks within the Wicket community. As for the request for a patch, that's the best way to get your code suggestions merged into the codebase, providing a patch. Please make sure you include test cases with your patch that exercise the new code. On Tue, Oct 28, 2008 at 12:02 PM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: For the Javadoc? (please stop being so vague!) No worries, I'll do this up and submit it into a general accessibility Javadoc improvement Jira ticket. Steve On 28 Oct 2008, at 15:57, Martijn Dashorst wrote: On Tue, Oct 28, 2008 at 4:48 PM, Steve Swinsburg <[EMAIL PROTECTED]> wrote: So my vision for wanting to enforce a bit of accessibility on the web is narrow(?), but no one wants to move forward with the most simple of modifications to make it easier to implement accessibility. The most basic of things to do would be to update the JavaDocs for the API to say: "NOTE: you should always include an AttributeModifier/Appender (or roll your own implementation) to include the title attribute on every link. here's some examples, etc" Where's your patch then? Martijn - 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] smime.p7s Description: S/MIME cryptographic signature
Re: no title in ExternalLink
I have submitted small patches for both Link and ExternalLink to show users how to add in the title attribute themselves, in an attempt to improve the Javadocs for the HTML components and hence accessibility. More components will follow. I will close the ticket regarding the additional constructor. The Javadoc improvement regarding accessibility instruxtions is here: https://issues.apache.org/jira/browse/WICKET-1899 cheers, Steve On 28 Oct 2008, at 16:48, Michael Sparer wrote: I always go for accessibility and each of my links do have a title and I'd be the last one to say that accessibility (and usability) isn't important. But I think the footprint of the components should be kept as small as possible. It isn't hard to extend them anyway. If you only use titled externallinks (like I do) just subclass externallink and add an abstract method to return the title. This way you're forced to come up with a decent title - which in turn improves accessibility/usability. then you're not tempted to use a default constructor ... well just my two cents - if the JIRA goes through, I'll be fine with it too :-) Michael Steve Swinsburg-2 wrote: Hi all, I've just noticed a deficiency in the ExternalLink component that doesn't allow a 'title' field to be set in its constructor. This is a basic HTML attribute that all links should have (for accessibility and expected behaviour). Currently this is only achieved by using AttributeAppender and setting the title attribute onto the link component. I propose a new construcotr that takes the title attribute as a parameter (or the ExternalLink set a title by default). I have filed a Jira ticket here: https://issues.apache.org/jira/browse/WICKET-1878 cheers, Steve - Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/no-title-in-ExternalLink-tp20030239p20211164.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] smime.p7s Description: S/MIME cryptographic signature
How to get this URL pattern working in newer versions of Wicket?
Hi all, I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6 I've found an inconsistency in the way URLs are handled, specifically in the inmethod data grid but also the editable data grid. I have a particular context path that I need to maintain as the webapp rendering is inside a portal type framework. I have taken the example webapps from both 1.4 and 6 and customised them so they run in the framework. In Wicket 1.4, the page is mounted like: mount(new HybridUrlCodingStrategy("/data-grid/editable", EditableDataGridPage.class)); and works fine. The URL is: http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 In Wicket 6, the page is mounted as: mount("/data-grid/editable", EditableDataGridPage.class); ... getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, pageClass)); and it does not work. It strips my leading context bits (/portal/tool/UUID). I tried to mount it myself: mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f", EditableDataGridPage.class); But that goes into an infinite redirect loop if I mount it to the webapp I want. If I mount it to a non wicket webapp, then that mount works fine. I am not sure how to restore the old URL mapping strategy. Can anyone help? thanks, Steve
Re: How to get this URL pattern working in newer versions of Wicket?
Hi Paul, Yeah the UUID will change in different placements of the app, I was just trying to get this particular instance working :) Just wondering why it didn't work, given that UUID? The UUID is correct for this placement and the URL it generated was correct though it kept redirecting until the browser stopped it. cheers, Steve On Tue, Oct 7, 2014 at 3:49 AM, Paul Bors wrote: > Hey Steve, > > You should not mount it yourself given the long session ID of > 'a79c7348-6c8b- > 4912-8cc7-3b4419344f7f' since that will change anyhow. > > To understand how Wicket handles the URL mapping see the user guide's > Chapter 10 "Wicket Links and URL generation" at: > http://wicket.apache.org/guide/guide/single.html#urls > > I guess you want to provide your own IMapperContext? > > > On Mon, Oct 6, 2014 at 12:31 AM, Steve Swinsburg < > steve.swinsb...@gmail.com> > wrote: > > > Hi all, > > > > I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6 > > I've found an inconsistency in the way URLs are handled, specifically in > > the inmethod data grid but also the editable data grid. > > > > I have a particular context path that I need to maintain as the webapp > > rendering is inside a portal type framework. > > > > I have taken the example webapps from both 1.4 and 6 and customised them > so > > they run in the framework. > > > > In Wicket 1.4, the page is mounted like: > > > > mount(new HybridUrlCodingStrategy("/data-grid/editable", > > EditableDataGridPage.class)); > > > > and works fine. The URL is: > > > > > http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 > > > > In Wicket 6, the page is mounted as: > > > > mount("/data-grid/editable", EditableDataGridPage.class); > > ... > > getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, > > pageClass)); > > > > and it does not work. It strips my leading context bits > > (/portal/tool/UUID). > > > > I tried to mount it myself: > > mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f", > > EditableDataGridPage.class); > > > > But that goes into an infinite redirect loop if I mount it to the webapp > I > > want. If I mount it to a non wicket webapp, then that mount works fine. > > > > I am not sure how to restore the old URL mapping strategy. > > > > Can anyone help? > > > > thanks, > > Steve > > >
Re: How to get this URL pattern working in newer versions of Wicket?
Hi Martin, The context bits of /portal/tool/UUID are added by the framework that I am using. All webapps are addressable in this way since the webapps are all registered with the framework. You then add placements of the webapps onto pages and they get the UUID. This used to work fine in Wicket 1.4 but with the changes in 1.5 and up it no longer works, for some components. The servlet context path of this particular webapp is /inmethod-grid-examples, and we need to use the WicketServlet, not the WicketFilter. You can't get to a webapp directly, it all goes through the portal framework as there are filters that inject things like authorisation etc. cheers, Steve On Tue, Oct 7, 2014 at 8:06 PM, Martin Grigorov wrote: > Hi, > > On Mon, Oct 6, 2014 at 6:31 AM, Steve Swinsburg > > wrote: > > > Hi all, > > > > I've been working on Wicket 1.4 for a while and in upgrading to Wicket 6 > > I've found an inconsistency in the way URLs are handled, specifically in > > the inmethod data grid but also the editable data grid. > > > > I have a particular context path that I need to maintain as the webapp > > rendering is inside a portal type framework. > > > > I have taken the example webapps from both 1.4 and 6 and customised them > so > > they run in the framework. > > > > In Wicket 1.4, the page is mounted like: > > > > mount(new HybridUrlCodingStrategy("/data-grid/editable", > > EditableDataGridPage.class)); > > > > and works fine. The URL is: > > > > > http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 > > > > In Wicket 6, the page is mounted as: > > > > mount("/data-grid/editable", EditableDataGridPage.class); > > > > The line above will not compile! > > > > ... > > getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, > > pageClass)); > > > > This is equivalent to: mountPage(mountPath, pageClass) > > > > > > and it does not work. It strips my leading context bits > > (/portal/tool/UUID). > > > > How do you set these context bits ? > > > > > > I tried to mount it myself: > > mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f", > > EditableDataGridPage.class); > > > > But that goes into an infinite redirect loop if I mount it to the webapp > I > > want. If I mount it to a non wicket webapp, then that mount works fine. > > > > I am not sure how to restore the old URL mapping strategy. > > > > Give us more information about your setup to be able to help you. > Especially what is the value of ServletContext#getContextPath() and what is > the value of WicketFilter#getFilterPath(). > These two "bits" are used as prefixes for the mount paths you use for your > pages. > > > > > > Can anyone help? > > > > thanks, > > Steve > > >
Re: How to get this URL pattern working in newer versions of Wicket?
I just wanted to circle back on this as I have an update. I haven't created any special mappers for the URLs and they are now working within my framework with the inmethod grid component. I built an app from the ground up rather than modifying the quickstart. I am not currently mounting any pages since I don't expose the pages directly and I feel that was the issue. I may need to fix this eventually if I start mounting pages and will post an update if I need to fix anything. Thanks for the pointers. cheers, Steve On Wed, Oct 8, 2014 at 4:32 PM, Martin Grigorov wrote: > Hi, > > On Tue, Oct 7, 2014 at 10:14 PM, Steve Swinsburg < > steve.swinsb...@gmail.com> > wrote: > > > Hi Martin, > > > > The context bits of /portal/tool/UUID are added by the framework that I > am > > using. All webapps are addressable in this way since the webapps are all > > registered with the framework. > > > > You then add placements of the webapps onto pages and they get the UUID. > > This used to work fine in Wicket 1.4 but with the changes in 1.5 and up > it > > no longer works, for some components. > > > > The servlet context path of this particular webapp is > > /inmethod-grid-examples, and we need to use the WicketServlet, not the > > WicketFilter. You can't get to a webapp directly, it all goes through the > > portal framework as there are filters that inject things like > authorisation > > etc. > > > > I'm afraid you are on your own here. > We don't know how your framework works and what exactly breaks. > Fire the debugger and let us know when you have more information. > > > > > > cheers, > > Steve > > > > On Tue, Oct 7, 2014 at 8:06 PM, Martin Grigorov > > wrote: > > > > > Hi, > > > > > > On Mon, Oct 6, 2014 at 6:31 AM, Steve Swinsburg < > > steve.swinsb...@gmail.com > > > > > > > wrote: > > > > > > > Hi all, > > > > > > > > I've been working on Wicket 1.4 for a while and in upgrading to > Wicket > > 6 > > > > I've found an inconsistency in the way URLs are handled, specifically > > in > > > > the inmethod data grid but also the editable data grid. > > > > > > > > I have a particular context path that I need to maintain as the > webapp > > > > rendering is inside a portal type framework. > > > > > > > > I have taken the example webapps from both 1.4 and 6 and customised > > them > > > so > > > > they run in the framework. > > > > > > > > In Wicket 1.4, the page is mounted like: > > > > > > > > mount(new HybridUrlCodingStrategy("/data-grid/editable", > > > > EditableDataGridPage.class)); > > > > > > > > and works fine. The URL is: > > > > > > > > > > > > > > http://localhost:8080/portal/tool/a79c7348-6c8b-4912-8cc7-3b4419344f7f/data-grid/editable.3 > > > > > > > > In Wicket 6, the page is mounted as: > > > > > > > > mount("/data-grid/editable", EditableDataGridPage.class); > > > > > > > > > > The line above will not compile! > > > > > > > > > > ... > > > > getRootRequestMapperAsCompound().add(new MountedMapper(mountPath, > > > > pageClass)); > > > > > > > > > > This is equivalent to: mountPage(mountPath, pageClass) > > > > > > > > > > > > > > and it does not work. It strips my leading context bits > > > > (/portal/tool/UUID). > > > > > > > > > > How do you set these context bits ? > > > > > > > > > > > > > > I tried to mount it myself: > > > > mountPage("/a79c7348-6c8b-4912-8cc7-3b4419344f7f", > > > > EditableDataGridPage.class); > > > > > > > > But that goes into an infinite redirect loop if I mount it to the > > webapp > > > I > > > > want. If I mount it to a non wicket webapp, then that mount works > fine. > > > > > > > > I am not sure how to restore the old URL mapping strategy. > > > > > > > > > > Give us more information about your setup to be able to help you. > > > Especially what is the value of ServletContext#getContextPath() and > what > > is > > > the value of WicketFilter#getFilterPath(). > > > These two "bits" are used as prefixes for the mount paths you use for > > your > > > pages. > > > > > > > > > > > > > > Can anyone help? > > > > > > > > thanks, > > > > Steve > > > > > > > > > >
EditablePropertyColumn and a callback to save
I am using the inmethodgrid EditablePropertyColumn to allow inline edits of a datatable. What I want to do is have some sort of callback method registered on a cell so that when a user edits it then tabs or clicks away, the method is fired, so that I can immediately do something with the contents of the cell. Is there a way to do this? Thanks, Steve
Re: EditablePropertyColumn and a callback to save
Perfect, thanks guys. cheers, Steve On Thu, Oct 23, 2014 at 10:27 PM, Martin Grigorov wrote: > Right! > > You have to override > > https://github.com/wicketstuff/core/blob/master/jdk-1.7-parent/inmethod-grid-parent/inmethod-grid/src/main/java/com/inmethod/grid/column/editable/EditablePropertyColumn.java#L107 > and attach such ajax behavior to the textfield on 'change' > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Thu, Oct 23, 2014 at 2:22 PM, lucast wrote: > > > Hi Steve, > > If I understand correctly, you would like to catch an ajax event fired > from > > the cell when you click away. > > > > There are two ways you can do this, you can add an OnChangeAjaxBehavior() > > class to the file: > > > > > > Alternatively, you can add an AjaxEventBehavior to your object: > > > > > > > > I hope that helps, > > Lucas > > > > -- > > View this message in context: > > > http://apache-wicket.1842946.n4.nabble.com/EditablePropertyColumn-and-a-callback-to-save-tp4668048p4668049.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > >
Making a datatable more accessible
Hi all, I have a datatable and need to make it more accessible for screenreaders. I am using an AbstractColumn and setting the getHeader and populateItem methods with the contents. In a particular row I want to change the markup of the cells from TD to TH, as they are header type content. Is this possible in Wicket, to change the HTML tag? This is generated markup within the DataTable component so I'm wondering if we can influence the HTML tag that is output. The second issue is that when using getHeader to set the header cell contents, it outputs this into a span within the TH, not directly within the TH itself. I need to add the 'scope="col"' ARIA attribute to the TH but cannot access it (even via getParent()). Again, generated markup. Thanks for any assistance. regards, Steve
Re: Making a datatable more accessible
Thanks very much, I'll give it a try. sent from my mobile device On 19 Jun 2015 4:34 am, "Sven Meier" wrote: > Hi, > > it's a little bit finicky, but it can be done: > > DataTable dataTable = new DefaultDataTable String>("table", columns, new SortableContactDataProvider(), 8) { > protected Item> newCellItem(final > String id, final int index, final IModel> model) > { > return new Item>(id, index, > model) { > @Override > protected void onComponentTag(ComponentTag tag) { > super.onComponentTag(tag); > > // parent is the repeater for the cells, its > parent is the row > Contact contact = (Contact) > getParent().getParent().getDefaultModelObject(); > if (contact.isSpecĂal()) { > tag.setName("th"); > } > } > }; > } > }; > > In a future version we might want to change #newCellItem() to get a > reference to the row's model - that would remove the need to lookup the row > object from the grandparent. > > Have fun > Sven > > > On 18.06.2015 14:15, Steve Swinsburg wrote: > >> Hi all, >> >> I have a datatable and need to make it more accessible for screenreaders. >> >> I am using an AbstractColumn and setting the getHeader and populateItem >> methods with the contents. >> >> In a particular row I want to change the markup of the cells from TD to >> TH, >> as they are header type content. Is this possible in Wicket, to change the >> HTML tag? This is generated markup within the DataTable component so I'm >> wondering if we can influence the HTML tag that is output. >> >> The second issue is that when using getHeader to set the header cell >> contents, it outputs this into a span within the TH, not directly within >> the TH itself. I need to add the 'scope="col"' ARIA attribute to the TH >> but >> cannot access it (even via getParent()). Again, generated markup. >> >> Thanks for any assistance. >> >> regards, >> Steve >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
cryptomapper uses the same wicket-crypt params for each user
Hi all, I am using the cryptomapper to encrypt some URLs and am finding that every logged in user is getting the same encrypted URL for the same pages. ie to go to x page is http://url?wicket-crypt=Uqcgp... for both user A and user B. Is there any way to make this unique for each user? In my Application class I have: IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(), this); setRootRequestMapper(cryptoMapper); Wicket 6.18.0 Thanks, Steve
Re: cryptomapper uses the same wicket-crypt params for each user
OK solved: getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory()); //diff key per user final IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(), this); setRootRequestMapper(cryptoMapper); On Fri, Jul 3, 2015 at 9:58 PM, Steve Swinsburg wrote: > Hi all, > > I am using the cryptomapper to encrypt some URLs and am finding that every > logged in user is getting the same encrypted URL for the same pages. > ie to go to x page is http://url?wicket-crypt=Uqcgp... for both user A > and user B. > > Is there any way to make this unique for each user? > > In my Application class I have: > > IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(), > this); > setRootRequestMapper(cryptoMapper); > > Wicket 6.18.0 > > Thanks, > Steve >
Re: cryptomapper uses the same wicket-crypt params for each user
Thanks for the confirmation, Martin. Regards. On Sat, Jul 4, 2015 at 4:32 PM, Martin Grigorov wrote: > Hi, > > Yes. This is the correct way. > It is the default in 6.19.0 > On Jul 4, 2015 2:51 AM, "Steve Swinsburg" > wrote: > > > OK solved: > > > > getSecuritySettings().setCryptFactory(new > > KeyInSessionSunJceCryptFactory()); //diff key per user > > final IRequestMapper cryptoMapper = new > > CryptoMapper(getRootRequestMapper(), this); > > setRootRequestMapper(cryptoMapper); > > > > On Fri, Jul 3, 2015 at 9:58 PM, Steve Swinsburg < > steve.swinsb...@gmail.com > > > > > wrote: > > > > > Hi all, > > > > > > I am using the cryptomapper to encrypt some URLs and am finding that > > every > > > logged in user is getting the same encrypted URL for the same pages. > > > ie to go to x page is http://url?wicket-crypt=Uqcgp... for both user A > > > and user B. > > > > > > Is there any way to make this unique for each user? > > > > > > In my Application class I have: > > > > > > IRequestMapper cryptoMapper = new CryptoMapper(getRootRequestMapper(), > > > this); > > > setRootRequestMapper(cryptoMapper); > > > > > > Wicket 6.18.0 > > > > > > Thanks, > > > Steve > > > > > >
building a wicket app with maven 1
Hi all, I have a need to backport my wicket app that builds perfectly in Maven2 to Maven1. I think I've adjusted all the pom.xml to project.xml correctly as all the classes and dependent jars looks like they are where they need to be, but on startup I get this: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Although in my WEB-INF/lib I have (amongst the others) the required jars: slf4j-log4j12-1.4.2.jar log4j-1.2.14.jar Any idea what's missing? Does anyone else build under Maven1? thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: building a wicket app with maven 1
Yes I do, but the particular framework they are building this app into requires Maven1 unfortunately. Recent iterations of it are now on M2 its just a legacy version they are running and can't upgrade due to various factors. cheers, Steve On 13 Mar 2009, at 08:55, Martijn Dashorst wrote: You (and presumably your client) do know that maven 1 is a technological, and evolutional dead end just like the dodo, right? Martijn On Fri, Mar 13, 2009 at 9:35 AM, Stephen Swinsburg wrote: Spot on, it's been a while since I've done Maven1 work and this has caught me out previously I just didn't think of it this time! I'll double check the jars that are in my Maven2 webapp and presume I will find that jar missing from the Maven1 build. Thanks Linda and Adriano! On 13/03/2009, at 8:05 AM, Linda van der Pal wrote: Maven2 handles transitive dependencies, meaning that if a project you are dependent on is dependent on other projects, Maven will add them to the classpath. So that's why you didn't have to add that jar manually, Maven did it for you. I don't think Maven1 had this functionality. Linda Stephen Swinsburg wrote: Thanks Adriano. I don't seem to need that for my Maven2 build though, is there a reason for that? I'll try that though. cheers, Steve On 12/03/2009, at 8:02 PM, Adriano dos Santos Fernandes wrote: Steve Swinsburg escreveu: Hi all, I have a need to backport my wicket app that builds perfectly in Maven2 to Maven1. I think I've adjusted all the pom.xml to project.xml correctly as all the classes and dependent jars looks like they are where they need to be, but on startup I get this: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory Although in my WEB-INF/lib I have (amongst the others) the required jars: slf4j-log4j12-1.4.2.jar log4j-1.2.14.jar Any idea what's missing? Does anyone else build under Maven1? You also need slf4j-api-*.jar. Adriano - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.278 / Virus Database: 270.11.10/1996 - Release Date: 03/11/09 20:42:00 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: optional link
If you still need the link text to appear, but not be linked, then you can do: link.isEnabled(false); This will surround the link with an tag instead of the tag. If you don't want any tag to be substituted, have this in your Application class: getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); or where null can be another type of tag. cheers, Steve On 18 Mar 2009, at 04:46, Martin Makundi wrote: And you can use the following to optionally hide any surrounding html markup: XXX 2009/3/18 Jeremy Thomerson : For any component, simply override isVisible. Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: gaoxm Sent: Tuesday, March 17, 2009 8:19 PM To: users@wicket.apache.org Subject: optional link Hello everyone, I am working on a page which needs a feature of optional link. for example, I have a html file as shown blew: What I want is: if a user's profile has a valid residence city field, I will show the city link and label. Otherwise, I don't show anything here. I don't know if there is any better method to implement the optional link. So far I am checking the field and add an invisible link if the residence city is not saved. if (profile.getResidenceCity() == null) { PageLink cityLink = new PageLink("residenceCityLink", DummyPage.class); cityLink.setVisible(false); add(cityLink); ... ... } else { PageLink cityLink = getCityPage(profile.getResidenceCity()); add(cityLink); ... ... } There are many such kinds of links in my page. Please advise me if you know any better way to do this. Thanks. --Simon - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Constructor not being called when Back button clicked
Hi all, I have a Page and on that page a Form which submits via Ajax. In this page's constructor I added a debug statement that prints a message when the constructor is called (for testing). I then submit the form, click away, then click Back and in Safari 4 for Mac, the page is reconstructed and I see my message again (good). Everything works ok (also good). However, in Firefox for Mac (and for PC and all IE flavours), clicking Back has the original search text in the box, and the page is NOT reconstructed. Clicking search again throws NPE's because certain elements are not initialised properly. Is there some way to force the page to be reconstructed? Is this some caching issue that is causing it to be not reconstructed and hence just reused? thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: Constructor not being called when Back button clicked
Yup, got that in but the problem still exists, the constructor is not being called when the browser goes back to that page. It *could* be because my Wicket app is running in an iframe (sucks, but unavoidable) so the request params are being screwed up and Wicket is not initialising the page properly. Still all works fine in Safari4 though. Odd. Thanks for the replies. On 1 Apr 2009, at 17:03, Mathias P.W Nilsson wrote: Like matej says @Override protected void setHeaders(WebResponse response) { response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache, max-age=0, must-revalidate, no-store"); } -- View this message in context: http://www.nabble.com/Constructor-not-being-called-when-Back-button-clicked-tp22827398p22829529.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
back button, deserialisation and readObject()
All, I have some questions regarding deserialization. On a page in my application, I click a link which takes me to a different page, then click 'back', and try to do something on the original page, but get NPE's whenever any of my transient fields are called. A simple example: private transient Logger log = Logger.getLogger(BasePage.class); Later in my code I use my log object in the onSubmit of a button: log.debug("MySearch() search.getSearchInterest(): " + searchText); Which works fine in the normal workings of the page. If I click away from the page then use the 'back' button to come back to this page, then click the button that will call this same log.debug statement, thats when the NPE occurs. So, am I correct in my understanding that the page is serialized when I click away, de-serialized when I come back, and, since no transient objects are serialized along with it, that my 'log' will be null and this NPE is then correct? If so, this leads me to thinking that, in order for my page to set itself up again correctly, I need to override readObject() and re- setup all of my transient objects that would not be restored in this method? Is this a good or bad practice? It is working correctly I am just after any tips or caveats. ie this works: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // our "pseudo-constructor" in.defaultReadObject(); // now we are a "live" object again, so let's rebuild log = Logger.getLogger(BasePage.class); } thanks a lot, Steve p.s. Of interest, when I click 'back' in Safari 4, the whole page is reconstructed again (ie the constructor is called again) and readObject is not called, but in other browsers, the state is preserved and readObject() is called. Not sure what the go is with that. ref: http://java.sun.com/developer/technicalArticles/Programming/serialization/ smime.p7s Description: S/MIME cryptographic signature
Re: back button, deserialisation and readObject()
Thanks Martijn, Understand re logger and making it a static instance, but what about other transient fields, is it ok to override getObject on each page an re setup my transient fields or is this going to cause issues down the track? cheers, Steve On 2 Apr 2009, at 12:22, Martijn Dashorst wrote: magic word for loggers: static and your assumption is correct: if you don't do anything, you'll get NPE's when you reference a transient field on an object that has been deserialized. Martijn On Thu, Apr 2, 2009 at 1:17 PM, Steve Swinsburg wrote: All, I have some questions regarding deserialization. On a page in my application, I click a link which takes me to a different page, then click 'back', and try to do something on the original page, but get NPE's whenever any of my transient fields are called. A simple example: private transient Logger log = Logger.getLogger(BasePage.class); Later in my code I use my log object in the onSubmit of a button: log.debug("MySearch() search.getSearchInterest(): " + searchText); Which works fine in the normal workings of the page. If I click away from the page then use the 'back' button to come back to this page, then click the button that will call this same log.debug statement, thats when the NPE occurs. So, am I correct in my understanding that the page is serialized when I click away, de-serialized when I come back, and, since no transient objects are serialized along with it, that my 'log' will be null and this NPE is then correct? If so, this leads me to thinking that, in order for my page to set itself up again correctly, I need to override readObject() and re-setup all of my transient objects that would not be restored in this method? Is this a good or bad practice? It is working correctly I am just after any tips or caveats. ie this works: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // our "pseudo-constructor" in.defaultReadObject(); // now we are a "live" object again, so let's rebuild log = Logger.getLogger(BasePage.class); } thanks a lot, Steve p.s. Of interest, when I click 'back' in Safari 4, the whole page is reconstructed again (ie the constructor is called again) and readObject is not called, but in other browsers, the state is preserved and readObject() is called. Not sure what the go is with that. ref: http://java.sun.com/developer/technicalArticles/Programming/serialization/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: ModalWindow Position
Hi, I use a javascript function to move it and then a target.appendJavascript() to call it. This is for an iframe but should work for you. Every now and then I notice a very tiny delay in the appearance of the ModalWindow and the movement of it to its final location. if you can fix that let me know ;) final AjaxLink link = new AjaxLink("modal-link") { public void onClick(AjaxRequestTarget target) { window.show(target); target.appendJavascript("fixWindowVertical();"); } }; /* fix vertical issue with Wicket Modal window in an iframe. puts it 50px below top of viewport rather than vertically centered. */ function fixWindowVertical() { var myWindow=Wicket.Window.get(); if(myWindow) { var top = getScroll() + 50; myWindow.window.style.top = top + "px"; } return false; } cheers, Steve On 21 Apr 2009, at 14:53, MatĂas Tito wrote: Hi, I have the following problem. I add a ModalWindow in a Page. I want to change the initial top- position of that. I try adding an AtributteModifier but it doesn't work. Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: https://issues.apache.org/jira/browse/WICKET-847
The fix version for that issue says 1.3.5 so unless people use Jira incorrectly, it's in 1.3.5. Likewise for the previous issue that people want to hold up the 1.3.6 release for, it has a fix version of 1.3.6 so should be in 1.3.6 already. --Steve On 28/04/2009, at 6:48 AM, Douglas Ferguson wrote: So, is this fixed in 1.3.6? https://issues.apache.org/jira/browse/WICKET-847 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: https://issues.apache.org/jira/browse/WICKET-847
Comparing the commits attached to the Jira to what is in the 1.3.5 tag in svn shows it's not. I'm a little confused by that, does the committers not fix in trunk, merge back to the appropriate branches (1.3.x) then cut tags from the branches (1.3.5, 1.3.6)? Steve On 28/04/2009, at 8:36 AM, Martijn Dashorst wrote: The commit was before 1.3.5 was cut, so IMO it should be already in 1.3.5. Martijn On Tue, Apr 28, 2009 at 9:31 AM, Jeremy Thomerson wrote: There's a comment that says that it's actually NOT in 1.3.5 - implying that the fix version is incorrect. But Igor's comment seems to indicate that it WAS fixed. I don't know which is true, but whoever really wants to know should just try it and see - and then comment on the jira to make it clear. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Apr 28, 2009 at 2:26 AM, Steve Swinsburg wrote: The fix version for that issue says 1.3.5 so unless people use Jira incorrectly, it's in 1.3.5. Likewise for the previous issue that people want to hold up the 1.3.6 release for, it has a fix version of 1.3.6 so should be in 1.3.6 already. --Steve On 28/04/2009, at 6:48 AM, Douglas Ferguson wrote: So, is this fixed in 1.3.6? https://issues.apache.org/jira/browse/WICKET-847 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Redirect to a static pdf in popup/new tab
Could you use PopupSettings to specify it should be a new window and just process whatever you need in the onClick() of the link? cheers, Steve On 28 Apr 2009, at 17:11, Warren Bell wrote: I have a situation where a user needs to click on many links on one page and display many static pdfs each in a new tab or popup. The problem is that I need to do some processing on the original page in the Link#onClick before I open up the pdf in a new tab or popup. I do not want the pdfs added to any existing or new pageMaps either. Something like this: new AjaxLink(...) { public void onClick(AjaxRequestTarget target) { // do some processing // add component to target // open up new window or tab with static pdf } I have tried different combinations of ExternalLink with setPopupSettings(popupSettings). A modal window that uses an AbstractAjaxTimerBehavior while processing is being done and then allows user to click on an ExternalLink that displays pdf in popup. And other combinations. Each has little quirks or added steps required by the user. Is there a better way of getting this to work? Thanks, Warren - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Putting HTML files in src/main/webapp
On 05/05/2009, at 1:28 AM, Alan Garfield wrote: The hack I have with maven at the moment properly constructs the war by copying all the .html files into the classes folder for Wicket to find... What 'hack' do you need for Maven to include the HTML in the classes directory? Presumably, since most other Wicket developers have their HTML alongside their classes, they need this hack as well right? It's just standard maven building: Add this to your POM to add everything except the Java source, as is. It's even in the Maven quickstart: false ${basedir}/src/java ** **/*.java Nonetheless, the first result from a search for wicket html location (Safari even autofilled the last word for me) I found this: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html Steve smime.p7s Description: S/MIME cryptographic signature
Re: Putting HTML files in src/main/webapp
Alan, The fragment of XML from the pom that I posted IS in the Wicket Quickstart generated via "mvn archetype:generate". It's also in the pom when you use the helper code available here: http://wicket.apache.org/quickstart.html Hence why it's not a hack, it's standard Maven stuff. You don't need the maven war plugin to generate the default war either. However, since you are doing it in a non standard way then you'll need the maven war plugin to assemble your war in the way you want. You said this: Thanks for that, but that's not really my issue. How do I make Wicket find the .html files in the root of the war? So I gave you a link to do that. Since your HTML files will now be in a non standard location (ie not next to the classes) you will need to configure your app to look in the location you desire, and that information is available in the wiki link I posted: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html All of this information is readily available; first search item for the configuration, quickstart for pom. Steve On 5 May 2009, at 10:11, Alan Garfield wrote: On Tue, 2009-05-05 at 08:32 +0100, Steve Swinsburg wrote: On 05/05/2009, at 1:28 AM, Alan Garfield wrote: The hack I have with maven at the moment properly constructs the war by copying all the .html files into the classes folder for Wicket to find... What 'hack' do you need for Maven to include the HTML in the classes directory? Presumably, since most other Wicket developers have their HTML alongside their classes, they need this hack as well right? It's just standard maven building: I didn't want to start a religious argument. I don't want to ruffle anyone's feathers. I didn't mean "hack" as a bad thing, I meant that I added a resource directive to Maven (ala below) to include the HTML from the webapp directory and it helpfully copied it twice as part of the war plugin. Without this "change" to the default wicket-quickstart POM Wicket still wouldn't find them. That was all I meant, hack was probably the wrong word and I apologies if I upset anyone. At the same time, why attack me when all I asked was a simple question I couldn't find the answer to elsewhere. Add this to your POM to add everything except the Java source, as is. It's even in the Maven quickstart: false ${basedir}/src/java ** **/*.java Nonetheless, the first result from a search for wicket html location (Safari even autofilled the last word for me) I found this: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html Thanks Steve for the added condescending tone there, but above isn't shown in the wiki you just posted (I also looked at that before posting, I even attempted to use the non-maven partitioning method but without much documentation on the PathStripperLocator and a working example I got lost). I posted here as a last resort to my question and wasn't looking to be verbally beaten up because I asked a question that might be outside the norm. Thanks anyway, Alan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Putting HTML files in src/main/webapp
Ok glad you got it sorted. For reference, you can adjust the excludes/includes in the build section of the POM to exclude the HTML files from being added. Then use the maven-war-plugin to take control of what goes where. cheers, Steve On 5 May 2009, at 13:52, Alan Garfield wrote: On Tue, 2009-05-05 at 12:33 +0100, Steve Swinsburg wrote: Alan, The fragment of XML from the pom that I posted IS in the Wicket Quickstart generated via "mvn archetype:generate". It's also in the pom when you use the helper code available here: http://wicket.apache.org/quickstart.html Hence why it's not a hack, it's standard Maven stuff. You don't need the maven war plugin to generate the default war either. Indeed, but if you read my original post fully I wasn't asking about the resources folder or the standard way, I was wanting them in the webapp folder which with the default quickstart wicket pom doesn't work. And I quote myself "Thanks for that, but that's not really my issue. How do I make Wicket find the .html files in the __root of the war__? The hack I have with maven at the moment properly constructs the war by copying all the .html files into the classes folder for Wicket to find, but maven also helpfully copies them into __the war's root__ as well creating duplicates in the war." As you can see my "hack" comment wasn't talking about a standard structure hence my use of the word. My changed directory structure was the "hack". You read "hack" and completely missed my question for something else. However, since you are doing it in a non standard way then you'll need the maven war plugin to assemble your war in the way you want. Indeed! Which was the reason for my original question. The war-plugin helpfully copies the contents of the webapp directory into the war, BUT if you also declare the resources as per the XML fragment to point at the webapp dir, then maven will copy the html files twice. Once into the classes directory structure as needed by Wicket and once into the webroot of the war as per the defaults of the war-plugin. That was my question, how do I stop maven (further the war-plugin) or how do you change the way Wicket loads the HTML so that I don't end up with two copies of the same files in the war. I may not have structure my question properly because I'm not fully versed with maven or wicket so you must excuse my inexperience. You said this: Thanks for that, but that's not really my issue. How do I make Wicket find the .html files in the root of the war? So I gave you a link to do that. Since your HTML files will now be in a non standard location (ie not next to the classes) you will need to configure your app to look in the location you desire, and that information is available in the wiki link I posted: http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html Again, I even posted that exact same link you quoted in the email you responded to! All of this information is readily available; first search item for the configuration, quickstart for pom. Well I must be not looking right, because it wasn't really apparent to me. I'm going to go with Luther's suggestion and use the default resources folder to make what I need to happen happen. That way there is no messing about with modifications to Wicket and no clumsy fiddling with maven to move files into and out of weird directory structures. Thanks anyway, Alan. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Maven setup
Hi, The dependency is wrong. It should be: org.apache.wicket wicket 1.3.5 cheers, Steve On 6 May 2009, at 11:47, Frank Tegtmeyer wrote: Hi, does anybody have a Wicket quickstart project updated to the latest versions? I am new to Java, to Maven and to Wicket of course too. I have a background in web developing with Zope and Django (all implemented in Python) but am forced to use Java now. I know that the learning curve will be steep and I got some showstoppers already :) After reading much about many Java frameworks and some frustrating tests with JSF I've chosen Wicket because it fits my requirements best. I've done some tests with databinder which promoted Maven heavily, so I want to use Maven too. I'm still struggling with the whole setup - the following issues are still not clear to me: - Maven setup - Wicket dependency doesn't work for 1.3.5 nor for 1.3.6 although the website says so (data at the end of this message) Possibly another repository required? - integration with Eclipse - Maven goal or Eclipse plugin or both? - I want to use embedded Jetty also for production (running the application behind lighttpd). How to do deployment in an elegant way? There is only SSH access to my server. - Hibernate integration - does databinder help much or is it better to learn Hibernate directly? I saw that databinder always is somewhat behind the current versions, so that may be an issue. I hope these are not too stupid questions and someone will find the time to answer them. With kind regards, Frank The Maven dependency for wicket: wicket wicket 1.3.5 The error: [INFO]task-segment: [compile] [INFO] [INFO] [resources:resources] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource Downloading: http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository central (http://repo1.maven.org/maven2) [INFO] artifact wicket:wicket-extensions: checking for updates from central [INFO] artifact mysql:mysql-connector-java: checking for updates from central [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central Downloading: http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository central (http://repo1.maven.org/maven2) [INFO] [ERROR] BUILD ERROR [INFO] [INFO] Failed to resolve artifact. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: DropDownChoice with ChoiceRender problem
What a legend! On 6 May 2009, at 19:46, James Carman wrote: Darn it, "Steve on Sakai"! ;) Glad to help! On Wed, May 6, 2009 at 2:38 PM, Phillip Rhodes wrote: Thanks for the solution. I found this post here (so the reader is getting off easy:) http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html -Original Message- From: "James Carman" Sent: Tuesday, May 5, 2009 12:55pm To: users@wicket.apache.org Subject: Re: DropDownChoice with ChoiceRender problem On Tue, May 5, 2009 at 9:37 AM, Phillip Rhodes wrote: I want to display "Yes" to the user in the dropdown. If the user selects "Yes", I want address.handicapAccess string property to be set to "Y" Do you still think a map-based rendererer is the way to go? Yes, I would do it that way. That seems easiest to me. I do that stuff sometimes and I declare my map to be static: private static Map CHOICES_MAP = new HashMap(); static { CHOICES_MAP.put("Y", "Yes"); CHOICES_MAP.put("N", "No"); CHOICES_MAP.put("U", "Unknown"); } Then, just use your map in your renderer (I'll leave that exercise up to the reader). You could even use resource keys instead of hard-coded labels. That way, the "Yes" stuff would be in properties files. Enjoy! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Nested form bug?
I think Igor meant for you to post some code. cheers, Steve On 13 May 2009, at 17:27, Martin Makundi wrote: Ok, I was hoping someone has experienced the same stacktrace. I will try to reproduce the bug still, maybe I find something. ** Martin 2009/5/13 Igor Vaynberg : hard to say without having something to play against. -igor On Wed, May 13, 2009 at 8:19 AM, Martin Makundi wrote: Hi! I have a data object Dummy whose attribute "value" has a setMethod (setValue) that does not allow the given value to be an empty string or null. This model object is attached to a property model new PropertyModel(dummy, "value") and the propertymodel is passed to a TextField component whose "setRequired=true".. Normally, when I access the page, the form works perfectly. It requires the field and does not allow submitting the form without the required value. However, on the log I find following errors and I do not understand how they occur because the field is required. Is it possible that there is a bug in wicket (rc4) processing invisible forms or something? It is difficult to repeat the error because it occurs randomly in production: 2009-05-13 15:31:00,225 2816867 [btpool0-27] ERROR RequestCycle - Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e org.apache.wicket.WicketRuntimeException: Error calling method: public void com.myapp.dto.Dummy.setValue(java.lang.String) on object: com.myapp.dto.du...@3140994e at org.apache.wicket.util.lang.PropertyResolver $MethodGetAndSet.setValue(PropertyResolver.java:1119) at org.apache.wicket.util.lang.PropertyResolver $ObjectAndGetSetter.setValue(PropertyResolver.java:582) at org .apache .wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java: 136) at org .apache .wicket .model.AbstractPropertyModel.setObject(AbstractPropertyModel.java: 169) at org.apache.wicket.Component.setDefaultModelObject(Component.java: 3061) at org .apache .wicket .markup.html.form.FormComponent.updateModel(FormComponent.java:1141) at org.apache.wicket.markup.html.form.Form $FormModelUpdateVisitor.component(Form.java:224) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 488) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form .FormComponent.visitComponentsPostOrderHelper(FormComponent.java: 467) at org .apache .wicket .markup .html .form.FormComponent.visitComponentsPostOrder(FormComponent.java:439) at org .apache .wicket .markup.html.form.Form.internalUpdateFormComponentModels(Form.java: 2022) at org.apache.wicket.markup.html.form.Form.access $300(Form.java:140) at org.apache.wicket.markup.html.form.Form $20.component(Form.java:2007) at org.apache.wicket.markup.html.form.Form $20.component(Form.java:2003) at org .apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java: 871) at org .apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java: 886) at org .apache .wicket .markup.html.form.Form.updateNestedFormComponentModels(Form.java: 2001) at org .apache .wicket.markup.html.form.Form.updateFormComponentModels(Form.java: 1991) at org.apache.wicket.markup.html.form.Form.process(Form.java: 959) at org.apache.wicket.markup.html.form.Form.process(Form.java: 907) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java: 875) at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source) at sun .reflect .DelegatingMethodAccessorImpl .invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org .apache .wicket .RequestListenerInterface.invoke(RequestListenerInterface.java:182) at org .apache .wicket .request .target .component .listener .ListenerInterfaceRequestTarget .processEvents(ListenerInterfaceRequestTarget.java:73) at org .apache .wicket .request .AbstractRequestCycleProcessor .processEvents(AbstractRequestCycleProcessor.java:92) at wicket.quickstart.TakpApplication $2.processEvents(TakpApplication.java:842) at org .apache .wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1240) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1319) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418) at org.apache.wicket.RequestCycle.request(RequestCycle.java: 544) at org .apache.wicket.protocol.http.WicketFilter.doGet(
Re: Bug in RequestUtils.toAbsolutePath?
It's available in HttpServletRequest as well. cheers, Steve On 18 May 2009, at 10:37, Martin Makundi wrote: Ah.. so it is even worse... I need the "http://www.mycompany.com"; - part. ** Martin 2009/5/18 Marat Radchenko : http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServletRequest.html#getContextPath() 2009/5/18 Martin Makundi : Just use getServletContextPath on ServletRequest. I do not want the installation path, I want the request path. The installation path is localhost:xxx and the request path is mydomain.com ** Martin 2009/5/17, Martin Makundi : That is my question.. whether I am stupid or someone baptized "toAbsoluteUrl" wrong ;) I had to devise this: public static String getRootURL() { StringBuffer requestURL = ((Request) ((WebRequest) RequestCycle .get().getRequest()).getHttpServletRequest()).getRequestURL(); int cutIndex = requestURL.indexOf("/", requestURL.indexOf("//")+2); if (0 < cutIndex) { return requestURL.substring(0, cutIndex); } return requestURL.toString(); } ** Martin 2009/5/17 Marat Radchenko : Hmm... are you sure you want to use that method at all? It uses given path as relative to _current reqest path_. 2009/5/17, Martin Makundi : No, there is no code in RequestUtils that would care about a leading slash ... it will just result in "http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2//images/Image.png " Note a typo in my previous email, normally it returns: "http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/images/Image.png " without the double-slash. ** Martin 2009/5/17 Marat Radchenko : Maybe RequestUtils.toAbsolutePath("/images/Image.png") (note leading slash)? 2009/5/17 Martin Makundi : Hi! I have a dynamic image which resides in "http://www.mydomain.com/images/Image.png"; (the filename itself might vary). In order for the image to be visible in downloaded documents, the path must be absolute. RequestUtils.toAbsolutePath("images/Imange.png"); works most of the time, except in situations where the user is on a bookmarkable page that has parameters: http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Value2 In such situations the RequestUtils.toAbsolutePath("images/Imange.png") returns: "http://www.mydomain.com/BookmarkablePage/Parameter1/Value1/Parameter2/Image.png " So it assumes the last parameter value was a page... is this a stupid user bug or a real bug? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Tools for Managing a Wicket Project
You can get Eclipse to auto refresh if you modify files externally. Check preferences. cheers, Steve On 19/05/2009, at 1:15 AM, John Armstrong wrote: I always have to do a 'Refresh' when changing the HTML. Its quite painful.. I tend to author the bulk of my html in an external editor that is more suitable to the purpose and fast ( the eclipse validators are painfully slow, particularly in Javascript intensive pages). Then I tweak it in Eclipse and hit F5. A Lot. John- On Mon, May 18, 2009 at 5:03 PM, pete swulius wrote: It appears that using external html editors causes sync issues. Apparently eclipse doesn't monitor changes to the file system, except to warn you that it's out of sync. I would love the know the truth of it as I could very well be missing something obvious. In fact, I would bet that I am, considering that eclispe is so cool. I am currently using the Amateras plugin: http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor . I have no problems with it, but I use it only for the syntax coloring and the occasional content assist. --pete - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: What is the correct way to include the Wicket DTD?
So how do you include a DOCTYPE definition as well, since that has a DTD associated with it. I just did some experimenting as I had my pages as the wicket.sourceforge.net one previously: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> Which the browser interpreted to the same. But updating to: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd " xml:lang="en" lang="en"> The browser rightly so strips out the extra DTD and renders it to: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml";> What is the full DTD and HTML namespace that needs to be at the top of pages? cheers, Steve On 20 May 2009, at 15:52, Igor Vaynberg wrote: Since you can only have one dtd we had to use the full HTML one a a base. -igor On Tuesday, May 19, 2009, Erik van Oosten wrote: Hi, I recently updated the page http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html for the new DTDs. However, now that I see that the DTD actually includes the whole xhtml spec I am doubting whether I wrote the correct text. So my question for the xhtml guru's here is: what is the correct way to include the DTD? Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: What is the correct way to include the Wicket DTD?
Or are you suggesting we replace the w3 dtd with the wicket one that incorporates it? cheers, Steve On 20 May 2009, at 16:17, Steve Swinsburg wrote: So how do you include a DOCTYPE definition as well, since that has a DTD associated with it. I just did some experimenting as I had my pages as the wicket.sourceforge.net one previously: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.sourceforge.net/"; xml:lang="en" lang="en"> Which the browser interpreted to the same. But updating to: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml"; xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd " xml:lang="en" lang="en"> The browser rightly so strips out the extra DTD and renders it to: http://www.w3.org/TR/html4/strict.dtd";> http://www.w3.org/1999/xhtml";> What is the full DTD and HTML namespace that needs to be at the top of pages? cheers, Steve On 20 May 2009, at 15:52, Igor Vaynberg wrote: Since you can only have one dtd we had to use the full HTML one a a base. -igor On Tuesday, May 19, 2009, Erik van Oosten wrote: Hi, I recently updated the page http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html for the new DTDs. However, now that I see that the DTD actually includes the whole xhtml spec I am doubting whether I wrote the correct text. So my question for the xhtml guru's here is: what is the correct way to include the DTD? Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Wicket in Php
Only if you call it Picket! Sound cool, massive job. On 21 May 2009, at 11:43, Martin Sachs wrote: Hi, wicket in php is a very cool idea. It occurred to me that we can start a port the wicket to a php Framework. I dont know a php-Framework with features like wicket have. Many frameworks works more like struts IMHO. Maybe someone can help me, estimated the work of such porting of Wicket. - Model Concept - plain HTML and plain PHP - Server-side state This could be very useful because you can run php on a little vserver or you can handle much more Users on one server. This safes a lot of money at the end. Understand me correctly, i like JAVA and Wicket on Java- plattform, but php is very interesting to push little apps on small servers. Any opinion to that ? By the way, you can use the wicket include component to add php- pages to wicket and from PHP you can use an iFrame or mount another page to the php or write ajax-code which requests php-sites without statechange in wicket. Martin Ajayi Yinka wrote: Thanks May I get the description on how to do the integration. I may not mind the integration, provided it can handle my session for me (As in if a user log in through a wicket page, we can use this same log in instance to manage the wicket page). regards, yinka On Wed, May 20, 2009 at 4:45 PM, Jeremy Thomerson wrote: Wicket is written in Java. You would need to build an application in Java, running in a servlet container. Perhaps you could do an integration and have some pages running in PHP and some in Java, but you are looking at a complex project. -- Jeremy Thomerson http://www.wickettraining.com On Wed, May 20, 2009 at 10:39 AM, Ajayi Yinka wrote: Hi, Can anyone give me an insight on how I can integrate wicket into php project. I already have an application that is written in php. I will like to upgrade the application with some new features in which I prefer to use wicket. I am afraid if this is possible? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Wicket-in-Php-tp23638080p23651082.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: DownloadLink (Javadoc)
Hi David, You can get the Javadoc either by building it yourself from source via 'mvn javadoc:javadoc' or by issuing 'mvn eclipse:eclipse - DdownloadJavadocs=true' which will get the Javadoc and adjust your Eclipse classpath to link it up. cheers, Steve On 25/05/2009, at 10:54 PM, David Brown wrote: Hello, it just so happens I have been looking for Wicket Javadoc. the Wicket jar I have contains no javadoc. Please reply with the source of the Wicket javadoc you are referencing. Please advise, David. There are 10 kinds of people in this world: those who understand binary and those who don’t (Valid only for 2's complement). - Original Message - From: "Douglas Ferguson" To: users@wicket.apache.org Sent: Monday, May 25, 2009 12:11:06 PM GMT -06:00 US/Canada Central Subject: DownloadLink I was just reading the javadoc for DownloadLink and it says that it locks the PageMap, does this mean that the page becomes unresponsive during the download? It mentions using a "shared resource" as an alternative. Is there example of this online somewhere? Douglas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: closing a ModalWindow from a forms onSubmit?
Brill this is what I do for a window of mine, it has a few buttons and the parent page needs to know what one was clicked. Doing it in the button's onSubmit works. I pass an object into the ModalWindow's constructor, which was initialised in the parent page, then I set a property into an object in the AjaxButton onSubmit, then close it via window.close(target). The parent can then see the property in the WindowClosedCallback method which fires when it closed. cheers, Steve On 26/05/2009, at 7:37 AM, Brill Pappin wrote: Tried that :) and it always seems to be null. I switched to AjaxButtons, but the problem is that the are fired *after* the form submits, not before as a normal Button is. I'm essentially trying to set a value on the form's model depending on which button was pressed, and then close the ModalWindow on successful submit. There needs to be an easier way to do this... at the moment I'm starting to think I'm going to have to try and attache some javascript that will trigger pre-submit to set some sort of flag... but its getting very dirty. - Brill On 25-May-09, at 10:48 AM, Jeremy Thomerson wrote: If all you're saying is that you need to do it from your form's onsubmit, do this: AjaxRequestTarget art = AjaxRequestTarget.get(); if (art != null) { modal.close(art); } Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: Brill Pappin Sent: Sunday, May 24, 2009 5:36 PM To: users@wicket.apache.org Subject: Re: closing a ModalWindow from a forms onSubmit? I likely could but am trying to avoid that, because then I have to call it for every button in the form (there are 4 now, all set a state and allow the event to propagate to the forms onSubmit(). Is there no way to know the current context from the component itself? - Brill On 24-May-09, at 5:55 PM, James Carman wrote: Can you submit the form via ajax? On May 24, 2009 2:08 PM, "Brill Pappin" wrote: I have a form in a model window How do I close the ModalWindow in the form's onSubmit() method without the AjaxRequestTarget? - Brill - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Storing css and image files
I don't see the issue that you all seem to be experiencing but I can offer some advice: CSS, Javascript, images etc should be stored in the webapp directory NOT mixed in with the rest of the classes and HTML. Your CSS can then get at them easily if you are using any background images etc. Martijn mentioned this and its a valid point, you can then unmount the directories and let the web server serve them statically rather than Tomcat serve them which takes up threads. You can use an IHeaderContributor to add any CSS or Javascript references into the HTML header: public class BasePage extends WebPage implements IHeaderContributor { public void renderHead(IHeaderResponse response) { response.renderCSSReference("css/jquery.cluetip.css"); response.renderJavascriptReference("javascript/jquery.dimensions.js"); response.renderJavascriptReference("javascript/jquery.hoverIntent.js"); response.renderJavascriptReference("javascript/jquery.cluetip.js"); } If you need to add any images in your page, use a ContextImage which is relative to the context always. I tend to use a BasePage which setups the header and have my other pages extend BasePage you might find it useful as well. cheers, Steve On 27 May 2009, at 06:40, Luther Baker wrote: On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan wrote: @Luther: Yes - I'm using the ImageButton it to submit a form. Thanks for the suggestion to use the modifier. I will try that. Great. I think it should work for you. On a side note, I thought that having the images/css/js etc served from webserver is pretty common and would be supported by wicket without having to add the names within java code. If I had to guess ... it is probably just a matter of time. There are probably a lot of design and "Wicket Way" considerations the team iterates through and prioritizes. I think cases like yours bring some of these usage points into clearer focus after-which, maybe they'll get some traction. My guess is that these folks are pretty busy and that there are probably 10s of 100s of similar requests in the queue - so just need some time ... or bodies :) I understand the reasoning behind using new ResourceReference as it makes loading locale specific images very simple. But why should wicket prepend classpath etc. -- i'm not clear on that. Can't wicket simply ignore the "src" attribute if ResourceReference is not present and use whatever was already in the html template? That way I do not have to specify the image name within the java code and the separation between java and html is clean. It sounds reasonable to me - but I'm not knee deep in the code either/yet. -Luther smime.p7s Description: S/MIME cryptographic signature
Re: Storing css and image files
CSS could still take care of this if your CSS could handle all the images, included via the IHeaderContributor and then you don't need to mix the display with the code. Or setup some constants that take the main prefix to the common repository so at least you only need to change it in one spot, not everywhere the images etc are being used. cheers, Steve On 27 May 2009, at 14:21, Vasu Srinivasan wrote: @Steve NOT mixed in with the rest of the classes and HTML. i totally agree with that. CSS, Javascript, images etc should be stored in the webapp directory my point is this may not be the case for all. in a big company i worked before, the css and continue/reset/submit/go buttons etc are stored in a central repository and had to be src-ed from there. Noway i could copy and put them into webapp. Now referencing them in my java code would mean that any change (say new image version) would have to be done within java instead of just having to change the template. thanks! vasya On Wed, May 27, 2009 at 7:20 AM, Steve Swinsburg < s.swinsb...@lancaster.ac.uk> wrote: I don't see the issue that you all seem to be experiencing but I can offer some advice: CSS, Javascript, images etc should be stored in the webapp directory NOT mixed in with the rest of the classes and HTML. Your CSS can then get at them easily if you are using any background images etc. Martijn mentioned this and its a valid point, you can then unmount the directories and let the web server serve them statically rather than Tomcat serve them which takes up threads. You can use an IHeaderContributor to add any CSS or Javascript references into the HTML header: public class BasePage extends WebPage implements IHeaderContributor { public void renderHead(IHeaderResponse response) { response.renderCSSReference("css/jquery.cluetip.css"); response.renderJavascriptReference("javascript/ jquery.dimensions.js"); response.renderJavascriptReference("javascript/ jquery.hoverIntent.js"); response.renderJavascriptReference("javascript/jquery.cluetip.js"); } If you need to add any images in your page, use a ContextImage which is relative to the context always. I tend to use a BasePage which setups the header and have my other pages extend BasePage you might find it useful as well. cheers, Steve On 27 May 2009, at 06:40, Luther Baker wrote: On Tue, May 26, 2009 at 11:43 PM, Vasu Srinivasan wrote: @Luther: Yes - I'm using the ImageButton it to submit a form. Thanks for the suggestion to use the modifier. I will try that. Great. I think it should work for you. On a side note, I thought that having the images/css/js etc served from webserver is pretty common and would be supported by wicket without having to add the names within java code. If I had to guess ... it is probably just a matter of time. There are probably a lot of design and "Wicket Way" considerations the team iterates through and prioritizes. I think cases like yours bring some of these usage points into clearer focus after-which, maybe they'll get some traction. My guess is that these folks are pretty busy and that there are probably 10s of 100s of similar requests in the queue - so just need some time ... or bodies :) I understand the reasoning behind using new ResourceReference as it makes loading locale specific images very simple. But why should wicket prepend classpath etc. -- i'm not clear on that. Can't wicket simply ignore the "src" attribute if ResourceReference is not present and use whatever was already in the html template? That way I do not have to specify the image name within the java code and the separation between java and html is clean. It sounds reasonable to me - but I'm not knee deep in the code either/yet. -Luther -- Regards, Vasu Srinivasan smime.p7s Description: S/MIME cryptographic signature
Re: Open a Modal Window within a Panel from a FileUpload form
You can't submit files with an AjaxButton as AJAX doesn't do multipart (yet). There are solutions with iframes. You could try that. cheers, Steve On 27/05/2009, at 7:46 PM, Douglas Ferguson wrote: You could use AjaxButton. This would give you an onSubmit with AjaxRequestTarget in the signature. D/ Lina Thomas wrote: Hi Hi I have a page that has a FileUpload form. Once the file is uploaded successfully onSubmit of the form I need to open a panel in ModalWindow. There is no Ajax event to fire which leaves me searching for ways to open the ModalWindow. I need to open the ModalWindow only on successful upload of the file. W hen I say success page, I mean within the onSubmit method on the same page. Something like this Form Form = new Form(FORM_NAME, model) { private static final long serialVersionUID = 1L; @Override protected void onSubmit() { FileUpload upload = uploadField.getFileUpload(); //open ModalWindow } } Thanks -Lina - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
Re: Disabling component again with AjaxCheckBox
Call doUpdateConfirmButton() when the page first loads so you can set it up initially, then again when the checkbox is clicked as you already do. cheers, Steve On 31/05/2009, at 7:40 AM, Rick Gruber-Riemer wrote: Hi I have a checkbox which must be checked for the user to be able to submit (accept terms). I want the related submit button to be enabled only, when the checkbox is checked. This works fine when the button initially is disabled, then the checkbox is checked by the user (I followed http://www.nabble.com/Disabling-and-enabling-components-using-AjaxCheckBox-td20911338.html#a20911338) . However, when the user then unchecks the checkbox again, the button does not get disabled again :-( Any suggestions? wicket:id="acceptCB" id="acceptCB" /> [Accept delete] == /** Whether or not the conditions for deletion are accepted. Acts as IModel for the checkbox */ private boolean accepted = false; /** The confirm button */ Button confirmBTN = null; /** The accept check box */ CheckBox acceptCB = null; public AccountDeletePage() { add(new FeedbackPanel("feedback")); Form form = new Form("form"); add(form); confirmBTN = new Button("confirmBtn") { @Override public void onSubmit() { doDelete(); } }; confirmBTN.setEnabled(false); confirmBTN.setOutputMarkupId(true); //not sure why this is needed form.add(confirmBTN); //CheckBox acceptCB = new CheckBox("acceptCB", new PropertyModel(this, "accepted")); acceptCB = new AjaxCheckBox("acceptCB",new PropertyModel(this, "accepted")) { @Override protected void onUpdate(AjaxRequestTarget arg0) { doUpdateConfirmButton(); if(arg0 != null) { arg0.addComponent(confirmBTN); } } }; acceptCB.setRequired(true); form.add(new FormComponentFeedbackBorder("border").add(acceptCB)); } /** * Updates the enabled state of the delete button depending on acceptance */ private final void doUpdateConfirmButton() { boolean enabled = acceptCB.isEnabled(); confirmBTN.setEnabled(enabled); } smime.p7s Description: S/MIME cryptographic signature
page load timer
Hi all, I vaguely remember seeing a component or setting that times how long it takes to completely render a page then outputs the result in a Label, can someone point me in the right direction? Or is it as simple as just setting the start time in my BasePage, then checking again at the end of the page in question? (I wouldn't think that would be exact though as other Wickety things might occur after the components on my page have been constructed.) thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: page load timer
Thats the one I was after. A question though, what units are the measurements displayed in? time/totaltime in milliseconds, session size in bytes? thanks, Steve On 12 Jun 2009, at 16:54, Igor Vaynberg wrote: getRequestLoggerSettings().setRequestLoggerEnabled(true); -igor On Fri, Jun 12, 2009 at 3:04 AM, Steve Swinsburg wrote: Hi all, I vaguely remember seeing a component or setting that times how long it takes to completely render a page then outputs the result in a Label, can someone point me in the right direction? Or is it as simple as just setting the start time in my BasePage, then checking again at the end of the page in question? (I wouldn't think that would be exact though as other Wickety things might occur after the components on my page have been constructed.) thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org smime.p7s Description: S/MIME cryptographic signature
what's too big for a session size?
Hi all, I'm monitoring my Wicket app via the RequestLogger and going through making improvements where needed. I am wondering what the size of a session would be before it is considered too large? Is the value given in the 'sessionsize' attribute of the logging output a reasonable way to judge what's good and what's not? For example, on a particularly large page, rendering a list of data from the DB: - 4000 items all at once, no paging = 5071985 bytes, 22854 ms - add paging, limit to 15 items per page: 35684 bytes, 2213 ms Obviously the latter is better, but the question is is 35k for a session ok? What would be the value that it becomes too large? For reference and for anyone wondering about how to turn on the RequestLogger, in your Application class: getRequestLoggerSettings().setRequestLoggerEnabled(true); cheers, Steve smime.p7s Description: S/MIME cryptographic signature
getting child items of a ListView ListItem
Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting child items of a ListView ListItem
Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting child items of a ListView ListItem
I'm opening a ModalWindow from an AjaxLink inside the ListItem. When that closes, in the close handler I need to update a couple of text items in the ListItem then repaint them so they refresh. I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? It currently has a ResourceModel on it as it's an internationalised string. I'm just updating that model currently. Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting child items of a ListView ListItem
Yeah but I'm asking what is the best way to get a handle on a child component of a ListItem. I understand I can update multiple components or repaint the whole lot, but I have many ListItems in my ListView with the same child components in each, and I need to update one at a time, hence need to know which one I am working with at any given time. So I am using: -in ListItem and the Link onClick, get the parent Item. Keep a reference to this. -Do the processing -In window closed callback, drill into child components via item.get("path.to.child.elements"), update their models -Repaint them. Is this ok? On 11 Jul 2009, at 11:36, Martin Makundi wrote: I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? No. You can update multiple components with ajaxRequestTarget.addChildren or you can differentiate with component class if absolutely necessary. Or you can repaint the whole listView. ** Martin Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting child items of a ListView ListItem
Ok so I was doing that before but had an instance of a ModalWindow per ListItem, and the associated callback for each. Because it was all inside, it was self contained so I could do all the updating easily. But this mean many MW and callbacks per page. What I have done now is moved the MW outside so there is one per ListView, and the content of the MW is set when the link is clicked. This also means the callback is outside so it doesn't know about the object that was clicked. I did this so it reduces the total number of objects on the page. To plumb it all together I am setting the models on the items that need to be updated when the link is clicked, ie when I have the references already like you said, then keeping a reference to the container for the items that needs to be repainted (not the Item now), and then repainting the container in the callback if it was successful or not. Seems to be working well so far. cheers. On 11 Jul 2009, at 12:00, Martin Makundi wrote: So I am using: -in ListItem and the Link onClick, get the parent Item. Keep a reference to this. Why don't you already add all the necessary children to the ajaxRequestTarget here where you have the references? ** Martin On 11 Jul 2009, at 11:36, Martin Makundi wrote: I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? No. You can update multiple components with ajaxRequestTarget.addChildren or you can differentiate with component class if absolutely necessary. Or you can repaint the whole listView. ** Martin Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting child items of a ListView ListItem
So you setup a callback when you set the content on the modalWindow? That could work nicely as well. Here's the new structure for your perusal: some display stuff from the Item in here add as a friend view friends The connectionLink sets the content for the MW based on the current Item, opens the window, does some stuff, it closes, then the callback fires which updates components in connectionContainer. On 11 Jul 2009, at 12:17, Martin Makundi wrote: Ok so I was doing that before but had an instance of a ModalWindow per ListItem, and the associated callback for each. Because it was all inside, it was self contained so I could do all the updating easily. But this mean many MW and callbacks per page. Sounds wild.. This also means the callback is outside so it doesn't know about the object that was clicked. I did this so it reduces the total number of objects on the page. Why not put the callback inside too.. I do that. ** Martin cheers. On 11 Jul 2009, at 12:00, Martin Makundi wrote: So I am using: -in ListItem and the Link onClick, get the parent Item. Keep a reference to this. Why don't you already add all the necessary children to the ajaxRequestTarget here where you have the references? ** Martin On 11 Jul 2009, at 11:36, Martin Makundi wrote: I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? No. You can update multiple components with ajaxRequestTarget.addChildren or you can differentiate with component class if absolutely necessary. Or you can repaint the whole listView. ** Martin Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --
Re: getting child items of a ListView ListItem
Ok, except remember this is in a ListView so for each ListItem that I set the callback for, the single instance of the modal window is being updated to the latest callback. So when it fires, it will operate on the last item in the list. ie with your method - create a modal window for the entire list (thats what I need) - iterate over 5 items - setup a callback for each item to update the text bits I need -setup an AjaxLink for each item to open the window - in onClick for this link, set the content for the window - ModalWindow takes over and does some processing - ModalWindow closes, callback updates a label. Having one MW and one callback per list is working, I set the models for the things that need to be updated and actually refresh them to pickup the changes if it was successful, all in one go. WDYT? cheers On 11 Jul 2009, at 13:43, Martin Makundi wrote: So you setup a callback when you set the content on the modalWindow? That could work nicely as well. Yes: modalWindow.setTitle(xx); modalWindow.setContent(yy); final AjaxButton ajaxButton = this; modalWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { // Do your magic here ... target.addComponent(form); target .addComponent(AbstractInnerPanel.getFeedbackPanel(WizardPanel.this)); } }); modalWindow.show(target); MarkupUtils.resizeModalWindow(target, 850, 400); Here's the new structure for your perusal: Your java was the curious part, but try the example above, position the close callback together with showing it. ** Martin On 11 Jul 2009, at 12:17, Martin Makundi wrote: Ok so I was doing that before but had an instance of a ModalWindow per ListItem, and the associated callback for each. Because it was all inside, it was self contained so I could do all the updating easily. But this mean many MW and callbacks per page. Sounds wild.. This also means the callback is outside so it doesn't know about the object that was clicked. I did this so it reduces the total number of objects on the page. Why not put the callback inside too.. I do that. ** Martin cheers. On 11 Jul 2009, at 12:00, Martin Makundi wrote: So I am using: -in ListItem and the Link onClick, get the parent Item. Keep a reference to this. Why don't you already add all the necessary children to the ajaxRequestTarget here where you have the references? ** Martin On 11 Jul 2009, at 11:36, Martin Makundi wrote: I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? No. You can update multiple components with ajaxRequestTarget.addChildren or you can differentiate with component class if absolutely necessary. Or you can repaint the whole listView. ** Martin Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users- h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additio
Re: getting child items of a ListView ListItem
Ah so you attach the callback to the modal in the Link onClick, not in the item itself? pseudocode: init modalwindow(); listview { populate item { link { onClick { get item set content for modalwindow show modalwindow SETUP CALLBACK HERE? } } //I thought you meant here } } So if you mean where its in CAPS then ok, I thought you meant in the Item section. Will give it a go. Steve On 11 Jul 2009, at 21:02, Martin Makundi wrote: Ok, except remember this is in a ListView so for each ListItem that I set the callback for, the single instance of the modal window is being updated to the latest callback. So when it fires, it will operate on the last item in the list. No. The callback is issued when you click the button. ** Martin On 11 Jul 2009, at 13:43, Martin Makundi wrote: So you setup a callback when you set the content on the modalWindow? That could work nicely as well. Yes: modalWindow.setTitle(xx); modalWindow.setContent(yy); final AjaxButton ajaxButton = this; modalWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { // Do your magic here ... target.addComponent(form); target .addComponent (AbstractInnerPanel.getFeedbackPanel(WizardPanel.this)); } }); modalWindow.show(target); MarkupUtils.resizeModalWindow(target, 850, 400); Here's the new structure for your perusal: Your java was the curious part, but try the example above, position the close callback together with showing it. ** Martin On 11 Jul 2009, at 12:17, Martin Makundi wrote: Ok so I was doing that before but had an instance of a ModalWindow per ListItem, and the associated callback for each. Because it was all inside, it was self contained so I could do all the updating easily. But this mean many MW and callbacks per page. Sounds wild.. This also means the callback is outside so it doesn't know about the object that was clicked. I did this so it reduces the total number of objects on the page. Why not put the callback inside too.. I do that. ** Martin cheers. On 11 Jul 2009, at 12:00, Martin Makundi wrote: So I am using: -in ListItem and the Link onClick, get the parent Item. Keep a reference to this. Why don't you already add all the necessary children to the ajaxRequestTarget here where you have the references? ** Martin On 11 Jul 2009, at 11:36, Martin Makundi wrote: I've got one Modal/handler per ListView so it needs to know what item it was clicked from so i still need to get a handle on the component itself to update it, even if it gets its text from that model yes? No. You can update multiple components with ajaxRequestTarget.addChildren or you can differentiate with component class if absolutely necessary. Or you can repaint the whole listView. ** Martin Thanks. On 11 Jul 2009, at 10:43, Martin Makundi wrote: It would be better design to make the span update itself using an abstract readnly model: new Label("automatic", new AbstractReadOnlyModel() { public String getObject() { return "whatever value you need" + getSession().getCurrentValueOrState(); } });. ** Martin 2009/7/11 Steve Swinsburg : Yeah that sounds like what I need. I need to update some text in a span thats inside my ListItem once I do some processing. Thanks, Steve On 11 Jul 2009, at 10:16, Martin Makundi wrote: ListView returns an iterator of ListItems Each ListItem is a component so you can just do listItem.get("component_id"); Does this sound like what you were looking for? ** Martin 2009/7/11 Steve Swinsburg : Hi all, I have a ListView and need to be able to get some child items of a particular ListItem, ie some spans, so that I can update their Models. How can I target some markup elements inside the ListItem container (ie TR tag)? Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users- unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --
Re: getting child items of a ListView ListItem
Ok thats working nicely, the ModalWindow callback is inside the onClick of the Link in the Item and using one instance of a MW per list instead of one per item. Thanks for your help Martin :) Regards. On 12 Jul 2009, at 18:45, Martin Makundi wrote: BTW::: SHOW AFTER initializing callback. ** Martin 2009/7/12 Martin Makundi : Yes. Why make it more complex :)? ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
wicketstuff tinymce for Wicket 1.3.5/6
Hi all, What's the version of TinyMCE from wicketstuff thats recommended for 1.3.5 or 1.3.6? I only see 1.3-SNAPSHOT in the Maven repo but am not too keen on putting a SNAPSHOT jar into production. org.wicketstuff wicket-contrib-tinymce 1.3-SNAPSHOT Thanks, Steve
Re: wicketstuff tinymce for Wicket 1.3.5/6
Ok so I was including the 1.3-SNAPSHOT version in testing, added the TinyMCEBehaviour to my textarea, everything built fine, but it did nothing. No markup was rendered either, nor anything in the logs. Is it broken right now? Tending towards making my own component if this one doesn't work. Steve On 17/07/2009, at 4:15 PM, Jeremy Thomerson wrote: You have to build yourself. Most of the wicketstuff projects were not built with release numbers prior to 1.4 / the wicketstuff-core work. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Jul 17, 2009 at 4:53 AM, Steve Swinsburg wrote: Hi all, What's the version of TinyMCE from wicketstuff thats recommended for 1.3.5 or 1.3.6? I only see 1.3-SNAPSHOT in the Maven repo but am not too keen on putting a SNAPSHOT jar into production. org.wicketstuff wicket-contrib-tinymce 1.3-SNAPSHOT Thanks, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket portlet in uPortal 3.1.1
Hi all, I'm trying to get a portlet happening for uPortal 3.1.1 which is based on the Portlet API 1.0 spec (Pluto). Does anyone have any sample code they can point me at? thanks, Steve
Re: Wicket portlet in uPortal 3.1.1
Yep I've seen that page. uPortal is Portlet 1.0 based (Pluto). Do you mean add the same filters/listeners as a Wicket based application would normally use to the normal uPortal descriptors? Because a uPortal portlet can have an empty web.xml (it gets re-written by the Pluto assembly) and a pretty standard portlet.xml. That page suggests providing an implementation of the two bridge classes (which it won't startup without) and additional filters. Can I see an eXo portlet? Is that portlet spec 1 or 2? thanks, Steve On 24/11/2009, at 8:00 PM, Pierre Goupil wrote: > Assuming that you know this page: > > http://cwiki.apache.org/WICKET/portal-howto.html > > You should just copy the web.xml & portlet.xml of an already working uPortal > porlet (even if it's not Wicket based) and use the same filters / > listeners... Theses are portal-dependent plumbery, and I use eXo, so I can't > help without knowing the specificities of uPortal. > > Are you using portlet 1.0 or 2.0? > > HTH, > > Pierre > > > On Tue, Nov 24, 2009 at 6:16 AM, Steve Swinsburg > wrote: > >> Hi all, >> >> I'm trying to get a portlet happening for uPortal 3.1.1 which is based on >> the Portlet API 1.0 spec (Pluto). Does anyone have any sample code they can >> point me at? >> >> thanks, >> Steve >> > > > > -- > Rien de grand ne s'est accompli dans le monde sans passion. > > (G.W.F. Hegel, philosophe allemand) smime.p7s Description: S/MIME cryptographic signature
Re: Wicket portlet in uPortal 3.1.1
Thanks Pierre. Ok so a basic uPortal portlet doesn't need anything in web.xml. When you deploy, as part of the spec it must be run through the Pluto Assembly which writes the necessary config (also available as a Maven plugin which is what I use). So you can just leave it empty and then it's automatically setup. You can also hardcode it but it may change between specs so best to let it do its thing. I'll run through it again with a simple portlet that I know works. The main issue is providing the implementation of PortletResourceURLFactory and ServletContextProvider. Portlet 1.0/uPortal doesn't seem to provide this implementation so I need to provide it. Perhaps I'll backport it from Portlet 2.0 but I was sure someone had alredy accomplished this. BTW, is Portlet 1.0 support still in Wicket 1.4 or only 1.3.x? I read that only Portlet 2.0 was being supported for 1.4. I'd still like to see the web.xml and portlet.xml for eXo if you can send? Thanks, Steve On 24/11/2009, at 9:01 PM, Pierre Goupil wrote: > eXo is currently portlet 2.0 so I know nothing regarding portlet 1.0 Wicket > integration. You'll find working portlets for eXo in the standard eXo > distribution. Just copy their filters & listeners into your own > Wicket-portlet. > > What I mean regarding this copy: depending upon your portal, your web.xml > may be required to provide a set of non-standard listeners and / or filters. > So the best way is to get inspired by what a portlet which is known to work > provides. > > If you wish to give eXo a try, I can prodive you with a (eXo) standard > web.xml & portlet.xml which works for Wicket. But, as I said, I'm afraid I > can't provide it for uPortal. I'll give uPortal a try this day, and maybe > I'll come again. > > Regards, > > Pierre > > > > On Tue, Nov 24, 2009 at 10:39 AM, Steve Swinsburg > wrote: > >> Yep I've seen that page. uPortal is Portlet 1.0 based (Pluto). >> >> Do you mean add the same filters/listeners as a Wicket based application >> would normally use to the normal uPortal descriptors? Because a uPortal >> portlet can have an empty web.xml (it gets re-written by the Pluto assembly) >> and a pretty standard portlet.xml. >> >> That page suggests providing an implementation of the two bridge classes >> (which it won't startup without) and additional filters. Can I see an eXo >> portlet? Is that portlet spec 1 or 2? >> >> thanks, >> Steve >> >> >> On 24/11/2009, at 8:00 PM, Pierre Goupil wrote: >> >>> Assuming that you know this page: >>> >>> http://cwiki.apache.org/WICKET/portal-howto.html >>> >>> You should just copy the web.xml & portlet.xml of an already working >> uPortal >>> porlet (even if it's not Wicket based) and use the same filters / >>> listeners... Theses are portal-dependent plumbery, and I use eXo, so I >> can't >>> help without knowing the specificities of uPortal. >>> >>> Are you using portlet 1.0 or 2.0? >>> >>> HTH, >>> >>> Pierre >>> >>> >>> On Tue, Nov 24, 2009 at 6:16 AM, Steve Swinsburg >>> wrote: >>> >>>> Hi all, >>>> >>>> I'm trying to get a portlet happening for uPortal 3.1.1 which is based >> on >>>> the Portlet API 1.0 spec (Pluto). Does anyone have any sample code they >> can >>>> point me at? >>>> >>>> thanks, >>>> Steve >>>> >>> >>> >>> >>> -- >>> Rien de grand ne s'est accompli dans le monde sans passion. >>> >>> (G.W.F. Hegel, philosophe allemand) >> >> > > > -- > Rien de grand ne s'est accompli dans le monde sans passion. > > (G.W.F. Hegel, philosophe allemand) smime.p7s Description: S/MIME cryptographic signature
Re: Wicket portlet in uPortal 3.1.1
I've got a simple Wicket based portlet working in uPortal 3.1.1 now. However, my implementation of ServletContextProvider is just a stub so have a feeling it's going to eventually explode again. I'm really interested in seeing a working implementation of ServletContextProvider if anyone has come across one and it's generic enough to be ported. Thanks, Steve On Wed, Nov 25, 2009 at 10:42 AM, Pierre Goupil wrote: > Steve, > > Unfortunately, I ran out of time, so I could not test in uPortal. Anyway, > just mail me and I'll send you my (eXo) standard web.xml and portlet.xml. > I'd like not to pollute the list with two annotated, big files. > > Moreover, here's a useful link: http://portals.apache.org/bridges/ > > I used to find once a ServletContextProvider implementation here. > > And regarding Wicket 1.4, I think that it only supports portlet 2.0, > althought I can't remember where I heard that. But Wicket 1.4 support for > portlet is indeed far more advanced than in 1.3 (it doesn't need > theServletContextProvider implementation > anymore, right?), so if you can use any portal that you like, I'd recommand > to use a more "up-to-date" one. My 2 cents. > > Regards, > > Pierre > > > On Tue, Nov 24, 2009 at 11:21 AM, Steve Swinsburg < > steve.swinsb...@gmail.com > > wrote: > > > Thanks Pierre. > > > > Ok so a basic uPortal portlet doesn't need anything in web.xml. When you > > deploy, as part of the spec it must be run through the Pluto Assembly > which > > writes the necessary config (also available as a Maven plugin which is > what > > I use). So you can just leave it empty and then it's automatically setup. > > You can also hardcode it but it may change between specs so best to let > it > > do its thing. > > > > I'll run through it again with a simple portlet that I know works. The > main > > issue is providing the implementation of PortletResourceURLFactory > > and ServletContextProvider. Portlet 1.0/uPortal doesn't seem to provide > this > > implementation so I need to provide it. Perhaps I'll backport it from > > Portlet 2.0 but I was sure someone had alredy accomplished this. > > > > BTW, is Portlet 1.0 support still in Wicket 1.4 or only 1.3.x? I read > that > > only Portlet 2.0 was being supported for 1.4. > > > > I'd still like to see the web.xml and portlet.xml for eXo if you can > send? > > > > Thanks, > > Steve > > > > > > On 24/11/2009, at 9:01 PM, Pierre Goupil wrote: > > > > eXo is currently portlet 2.0 so I know nothing regarding portlet 1.0 > Wicket > > integration. You'll find working portlets for eXo in the standard eXo > > distribution. Just copy their filters & listeners into your own > > Wicket-portlet. > > > > What I mean regarding this copy: depending upon your portal, your web.xml > > may be required to provide a set of non-standard listeners and / or > > filters. > > So the best way is to get inspired by what a portlet which is known to > work > > provides. > > > > If you wish to give eXo a try, I can prodive you with a (eXo) standard > > web.xml & portlet.xml which works for Wicket. But, as I said, I'm afraid > I > > can't provide it for uPortal. I'll give uPortal a try this day, and maybe > > I'll come again. > > > > Regards, > > > > Pierre > > > > > > > > On Tue, Nov 24, 2009 at 10:39 AM, Steve Swinsburg < > > steve.swinsb...@gmail.com > > > > wrote: > > > > > > Yep I've seen that page. uPortal is Portlet 1.0 based (Pluto). > > > > > > Do you mean add the same filters/listeners as a Wicket based application > > > > would normally use to the normal uPortal descriptors? Because a uPortal > > > > portlet can have an empty web.xml (it gets re-written by the Pluto > > assembly) > > > > and a pretty standard portlet.xml. > > > > > > That page suggests providing an implementation of the two bridge classes > > > > (which it won't startup without) and additional filters. Can I see an eXo > > > > portlet? Is that portlet spec 1 or 2? > > > > > > thanks, > > > > Steve > > > > > > > > On 24/11/2009, at 8:00 PM, Pierre Goupil wrote: > > > > > > Assuming that you know this page: > > > > > > http://cwiki.apache.org/WICKET/portal-howto.html > > > > > > You should just copy the web.xml & portlet.xml of an already
Wicket portlet ClassCastException
Hi all, I have a Wicket portlet running in uPortal, and normal things like labels and images work, but for anything that submits data, ie a Link or Button, it throws a ClassCastException: org.apache.pluto.internal.impl.ActionResponseImpl cannot be cast to javax.portlet.RenderResponse It may be do do with the implementation of the two classes I need to provide from here: http://cwiki.apache.org/WICKET/portal-howto.html Does that sound familiar? How are others handling links/forms? Does anyone have a portlet (for any portal) that I can take a look at? thanks, Steve
Re: Ajax Panels Direction
Hi, Yes you can do the processing for the form in the onSubmit of the ajax submit button, then just replace the current panel with the new one. - outside your onSubmit hold a reference to your current panel: final Component thisPanel = this; - inside your onSubmit after processing the data: Component newPanel = new SomeOtherPanel(id, someParam); newPanel.setOutputMarkupId(true); thisPanel.replaceWith(newPanel); target.addComponent(newPanel); Thats what I do. cheers, Steve On 06/12/2009, at 2:27 PM, bassglider wrote: > Ok, I think I'm getting somewhere after a few hours, I have two > textfields, when the user hits the ajax submit button, the panel > should be replaced with a new panel. I'm thinking that > onSubmit(AjaxRequestTarget target, Form form) > should be able to take the input of the textfields and call the method > to update the image panel with a new image panel based on the new > values in the textfields. > > Any ideas? > > > > Form form = new Form("Chart"); > >TextField dateBegin = >new TextField("beginningDate", new > PropertyModel(session, "beginningDate")); >dateBegin.add(new DatePicker()); >dateBegin.setRequired(true); >form.add(dateBegin); > >TextField endingDate = >new TextField("endingDate", new > PropertyModel(session, "endingDate")); >endingDate.add(new DatePicker()); >endingDate.setRequired(true); >form.add(endingDate); > >CreateChart(this); >AjaxFormValidatingBehavior.addToAllFormComponents(form, > "onchange", Duration.ONE_SECOND); > >form.add(new AjaxButton("ajax-button", form) { > > private static final long serialVersionUID = 1L; > > @Override > protected void onSubmit(AjaxRequestTarget target, Form form) { >// repaint the feedback panel so that it is hidden >target.addComponent(feedback); >System.out.println("Ajax Submitted!" + feedback.toString()); > > } > > > > > private Panel CreateChart(Panel pan) { >pan.add(new AjaxLazyLoadPanel("image") { > /** > * Makes object serializable. > */ > private static final long serialVersionUID = 1L; > > @Override > public Component getLazyLoadComponent(String id) { >return (new ChartPanel(id)); > } >}); >return pan; > } > > > > On Sat, Dec 5, 2009 at 2:51 PM, bassglider wrote: >> Hi Everyone, >> >> I was wondering if someone could point to the right direction >> (examples, classes) for the following scenario: >> >> I have a few text fields inside a panel, when one of the text fields >> is changed, I'd like to call a method with updates a panel within the >> current panel. >> >> Currently I have the two text fields in the panel with the other panel >> that displays the image, I just need to figure out how to call that >> method when these forms are changed and I'm sure I can figure out the >> rest from there. >> >> Any direction is helpful >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >
Re: Location of html files
Jar? I don't know about you but my webapps build to a WAR and the compiled classes are in WEB-INF/classes/ *This* is the Maven default. If the idea is to create truly reusable components, then don't do it in the same project, create a supporting components project that *will* package as a JAR and create them there, then you can use them however and whenever you wish. In your model you'd be including a whole heap of unnecessary dependencies. Perhaps the original poster has a designer that wants to edit them without being muddled by other files. IMO you should be able to put them anywhere and for any reason. And you can, easily. http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html See the Wicket 1.3 section. To the original poster, it is very simple to move the HTML resources elsewhere (see above). You can also keep the CSS and images in your webapp's context, there is no special setup needed for that. In your page you can use an IHeaderContributor to load in the css/js etc: response.renderCSSReference("css/somefile.css"); response.renderJavascriptReference("javascript/somefile.js"); both of which live in the css and javascript directories in my webapp directory. cheers, Steve On 07/12/2009, at 2:24 AM, McIlwee, Craig wrote: > I agree that you should have a strong reason to change the default, and IMO > 'I don't like it' isn't good enough. What happens if you want to reuse > components that live in that jar elsewhere? Putting the jar that contains > the component on the classpath won't be sufficient because you'll only get > the .class file and not the HTML/CSS/JS. This probably means that you'd have > to check in those resources in multiple locations or have them copied from > one location to another during your build process - both of which are more > error prone and/or maintenance hassle than just putting them in the package > with the class. > > Craig > _ > > From: Johan den Boer [mailto:johanj.denb...@gmail.com] > To: users@wicket.apache.org > Sent: Sun, 06 Dec 2009 02:17:04 -0500 > Subject: Re: Location of html files > > > Hi, > > I not like my html files / css files / images are all locates in the same > package but seperated in directories i.e. > > html files goto ../html > css files go to ../css > images go to ../images > > why is this not possible > > johan > > > Marat Radchenko-2 wrote: >> >> With custom IResourceFinder, you can put them wherever you want. But >> why? You should have a strong reason to not follow defaults. >> >> 2009/12/6, Johan den Boer : >>> Hi, >>> >>> I place my html files in the same package where my java classes resides. >>> Is >>> it possible to change this. I want to place my html files in the >>> WEB-INF/page directory >>> >>> -- >>> thanks a lot, >>> >>> >>> Johan den Boer >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/Location-of-html-files-tp26662782p26662799.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >
ObjectAutoCompleteField and specifying the fields from the object to use
Hi, I am using ObjectAutoCompleteField from WicketStuff and it looks like what I need for my scenario: I have an object list with a bunch of fields and when the user searches, it needs to match on a certain field and display the list of matches. The examples do this with a Car object with an Integer field for the ID and a String for the car name. However, there seems to be no way to tell it *what* fields to use in the supplied object. You can only give the component the Type of fields to look up, and it gets the field to use by reflection. This assumes only one field in that object will be of that Type. ie How could I make it would with a list of these objects: class Person { String userId; String displayName; ... } Giving the ObjectAutoCompleteField the types won't work, it won't know what field to use. List persons = getPersons(); ObjectAutoCompleteBuilder builder = new ObjectAutoCompleteBuilder( new AutoCompletionChoicesProvider() { public Iterator getChoices(String input) { List subSet = getPersonSubSet(persons, input); return subSet.iterator(); } } ); ObjectAutoCompleteField toField = builder.build("toField", new Model()); form.add(toField); Any ideas? thanks, Steve
Re: ObjectAutoCompleteField and specifying the fields from the object to use
Nevermind. I ended up going with this approach where I could separate the values: http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html I will add my code snippet to the page. cheers, Steve On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: > Hi, > > I am using ObjectAutoCompleteField from WicketStuff and it looks like what I > need for my scenario: > > I have an object list with a bunch of fields and when the user searches, it > needs to match on a certain field and display the list of matches. The > examples do this with a Car object with an Integer field for the ID and a > String for the car name. > > However, there seems to be no way to tell it *what* fields to use in the > supplied object. You can only give the component the Type of fields to look > up, and it gets the field to use by reflection. This assumes only one field > in that object will be of that Type. > > ie > > How could I make it would with a list of these objects: > > class Person { > > String userId; > String displayName; > ... > > } > > Giving the ObjectAutoCompleteField the types won't work, it > won't know what field to use. > > > List persons = getPersons(); > > ObjectAutoCompleteBuilder builder = new > ObjectAutoCompleteBuilder( > new AutoCompletionChoicesProvider() { > public Iterator getChoices(String input) { > List subSet = getPersonSubSet(persons, > input); > return subSet.iterator(); > } > } > ); > ObjectAutoCompleteField toField = builder.build("toField", new > Model()); > form.add(toField); > > > Any ideas? > > thanks, > Steve
Re: Location of css and js files
None of these solutions are going to do what the OP really needs since they all assume an app server is serving the pages. Presumably he wants the designer to be able to run up the static HTML in the browser, without running in a web application. You have a few options: 1. link the files as siggested before, ie the HTML knows where the CSS lives and references it normally. If you don't want to have to adjust it later, put it in the same directory as the classes and HTML. You won't need to start the webapp to modify it. 2. Do it in a normal webapp structure as you suggested with the javascript and css directories, and use the Wicket provided HeaderContributor to load it. You'll need to deploy the webapp, but your designer can edit the HTML live if he edits the deployed structure. This approach isn't the greatest since if the webapp is redeployed it will be overwritten. I dont think there is a neat way to do it offline but still in the Wicket way, without having it all with the classes. cheers, Steve On 21/12/2009, at 8:19 PM, Alex Objelean wrote: > > > Hi! > You can use wro4j to load css & js resources from anywhere (even from > classpath, servlet context relative location or disc location). Another > advantage is that the resources are merged and minified, thus greatly > improving the response time: > http://code.google.com/p/wro4j/wiki/GettingStarted > > Alex Objelean > > > dale77 wrote: >> >> >> Hi Alex, >> >> I'm after best practice for css/img and js locations. >> >> I know there are many ways to do something, I'm after a recommendation >> as to what is the best way to do this in wicket. >> >> The way that allows the html markup to be opened by the web designer >> showing the same page view that appears at runtime. >> >> Thanks >> >> Dale >> >> >> -Original Message- >> From: Alex Rass [mailto:a...@itbsllc.com] >> Sent: Monday, 21 December 2009 5:03 p.m. >> To: users@wicket.apache.org >> Subject: RE: Location of css and js files >> >> Global resources you can reference "globally". Use can use the >> non-wicket links. Container hosts folders you can use. >> >> Idea behind this is to use components which are fully contained. Hence >> (all in one place). If this doesn't suit you - there are bunch of >> tutorials on how to load resources from elsewhere. >> >> - Alex >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/-announce--wicket-1.4.5-released-tp26868988p26871530.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > smime.p7s Description: S/MIME cryptographic signature
Re: ObjectAutoCompleteField and specifying the fields from the object to use
On further investigation, the values aren't being separated after all. What is added to the textfield is what is submitted in the form. Is it possible to submit a different value than just the display text? thanks, Steve On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: > Nevermind. I ended up going with this approach where I could separate the > values: > > http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html > > I will add my code snippet to the page. > > cheers, > Steve > > On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: > >> Hi, >> >> I am using ObjectAutoCompleteField from WicketStuff and it looks like what I >> need for my scenario: >> >> I have an object list with a bunch of fields and when the user searches, it >> needs to match on a certain field and display the list of matches. The >> examples do this with a Car object with an Integer field for the ID and a >> String for the car name. >> >> However, there seems to be no way to tell it *what* fields to use in the >> supplied object. You can only give the component the Type of fields to look >> up, and it gets the field to use by reflection. This assumes only one field >> in that object will be of that Type. >> >> ie >> >> How could I make it would with a list of these objects: >> >> class Person { >> >> String userId; >> String displayName; >> ... >> >> } >> >> Giving the ObjectAutoCompleteField the types won't work, it >> won't know what field to use. >> >> >> List persons = getPersons(); >> >> ObjectAutoCompleteBuilder builder = new >> ObjectAutoCompleteBuilder( >> new AutoCompletionChoicesProvider() { >> public Iterator getChoices(String input) { >> List subSet = getPersonSubSet(persons, >> input); >> return subSet.iterator(); >> } >> } >> ); >> ObjectAutoCompleteField toField = builder.build("toField", new >> Model()); >> form.add(toField); >> >> >> Any ideas? >> >> thanks, >> Steve > smime.p7s Description: S/MIME cryptographic signature
opening modelwindow freezes IE8
Hi everyone, I've had a report from a user of a Wicket app, that when the AjaxLink to open a ModalWindow is clicked, the ModalWindow opens and the browser freezes. This is on IE8 and in Windows 7 or XP. However, running it in Compatibility Mode it seemed to work. Works ok in other browsers. Has anyone experienced this? The code is nothing out of the ordinary I don't think: Unless its the getParent() calls to get the ModelObject for this list item? Could I do that another way? final AjaxLink connectionLink = new AjaxLink("connectionLink") { public void onClick(AjaxRequestTarget target) { //get this item, reinit some values and set content for modal SearchResult this_searchResult = (SearchResult)getParent().getParent().getDefaultModelObject(); final String userUuid = this_searchResult.getUserUuid(); connectionWindow.setContent(new AddFriend(connectionWindow.getContentId(), userUuid, some more params…)); // connection modal window handler connectionWindow.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target){ //update some labels } }); connectionWindow.show(target); } }; thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: opening modelwindow freezes IE8
Forgot to mention, this was Wicket 1.3.6. I upgraded the app to 1.4.5 yesterday, but this user has an older version. thanks, Steve On 22/12/2009, at 8:58 AM, Steve Swinsburg wrote: > Hi everyone, > > I've had a report from a user of a Wicket app, that when the AjaxLink to open > a ModalWindow is clicked, the ModalWindow opens and the browser freezes. This > is on IE8 and in Windows 7 or XP. However, running it in Compatibility Mode > it seemed to work. Works ok in other browsers. > > Has anyone experienced this? The code is nothing out of the ordinary I don't > think: > > Unless its the getParent() calls to get the ModelObject for this list item? > Could I do that another way? > > > final AjaxLink connectionLink = new AjaxLink("connectionLink") { > > public void onClick(AjaxRequestTarget target) { > > //get this item, reinit some values and set content for modal > SearchResult this_searchResult = > (SearchResult)getParent().getParent().getDefaultModelObject(); > final String userUuid = this_searchResult.getUserUuid(); > connectionWindow.setContent(new > AddFriend(connectionWindow.getContentId(), userUuid, some more params…)); > > // connection modal window handler > connectionWindow.setWindowClosedCallback(new > ModalWindow.WindowClosedCallback() { > public void onClose(AjaxRequestTarget target){ > //update some labels >} >}); > > connectionWindow.show(target); > > } > }; > > > thanks, > Steve smime.p7s Description: S/MIME cryptographic signature
Re: ObjectAutoCompleteField and specifying the fields from the object to use
I decided against using the ObjectAutoCompleteTextField because it was too restrictive in the Object you supply. I went with the component on the wiki and ended up adding another getter/setter to my page to separate the value from the display when it gets the object selected. However, I revisited the Wicketstuff component with your suggestion, and adding: builder.idProperty("userId"); works to set the value for the field that is submitted. However, there is no way to tell it the value to use for the display! It's just serializing the Object I give it as the display (ie my.package.model.per...@77aa0759]) What I need is to give it a list of objects and to be able to specify what properties to use for the display value and the submit value. It needs something like: builder.displayProperty("displayName"); thanks, Steve On 22/12/2009, at 10:00 AM, Albert Romanius wrote: > I am not sure, but you could try to set idProperty in > ObjectAutoCompleteBuilder > > > On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg > wrote: >> On further investigation, the values aren't being separated after all. What >> is added to the textfield is what is submitted in the form. >> Is it possible to submit a different value than just the display text? >> thanks, >> Steve >> >> On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: >> >> Nevermind. I ended up going with this approach where I could separate the >> values: >> http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html >> I will add my code snippet to the page. >> cheers, >> Steve >> On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: >> >> Hi, >> I am using ObjectAutoCompleteField from WicketStuff and it looks like what I >> need for my scenario: >> I have an object list with a bunch of fields and when the user searches, it >> needs to match on a certain field and display the list of matches. The >> examples do this with a Car object with an Integer field for the ID and a >> String for the car name. >> However, there seems to be no way to tell it *what* fields to use in the >> supplied object. You can only give the component the Type of fields to look >> up, and it gets the field to use by reflection. This assumes only one field >> in that object will be of that Type. >> ie >> How could I make it would with a list of these objects: >> class Person { >> String userId; >> String displayName; >> ... >> } >> Giving the ObjectAutoCompleteField the types won't work, it >> won't know what field to use. >> >> List persons = getPersons(); >> ObjectAutoCompleteBuilder builder = new >> ObjectAutoCompleteBuilder( >> new AutoCompletionChoicesProvider() { >> public Iterator getChoices(String input) { >> List subSet = getPersonSubSet(persons, input); >> return subSet.iterator(); >> } >> } >> ); >> ObjectAutoCompleteField toField = builder.build("toField", new >> Model()); >> form.add(toField); >> >> Any ideas? >> thanks, >> Steve >> >> > > > > -- > Albert > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > smime.p7s Description: S/MIME cryptographic signature
Re: ObjectAutoCompleteField and specifying the fields from the object to use
Actually I have just found in the javadocs the AbstractObjectAutoCompleteRenderer which does the separation. I'll give that a go. cheers, Steve On 22/12/2009, at 10:54 AM, Steve Swinsburg wrote: > I decided against using the ObjectAutoCompleteTextField because it was too > restrictive in the Object you supply. I went with the component on the wiki > and ended up adding another getter/setter to my page to separate the value > from the display when it gets the object selected. > > However, I revisited the Wicketstuff component with your suggestion, and > adding: > builder.idProperty("userId"); > > works to set the value for the field that is submitted. > > However, there is no way to tell it the value to use for the display! It's > just serializing the Object I give it as the display (ie > my.package.model.per...@77aa0759]) > > What I need is to give it a list of objects and to be able to specify what > properties to use for the display value and the submit value. It needs > something like: > builder.displayProperty("displayName"); > > thanks, > Steve > > On 22/12/2009, at 10:00 AM, Albert Romanius wrote: > >> I am not sure, but you could try to set idProperty in >> ObjectAutoCompleteBuilder >> >> >> On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg >> wrote: >>> On further investigation, the values aren't being separated after all. What >>> is added to the textfield is what is submitted in the form. >>> Is it possible to submit a different value than just the display text? >>> thanks, >>> Steve >>> >>> On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: >>> >>> Nevermind. I ended up going with this approach where I could separate the >>> values: >>> http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html >>> I will add my code snippet to the page. >>> cheers, >>> Steve >>> On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: >>> >>> Hi, >>> I am using ObjectAutoCompleteField from WicketStuff and it looks like what I >>> need for my scenario: >>> I have an object list with a bunch of fields and when the user searches, it >>> needs to match on a certain field and display the list of matches. The >>> examples do this with a Car object with an Integer field for the ID and a >>> String for the car name. >>> However, there seems to be no way to tell it *what* fields to use in the >>> supplied object. You can only give the component the Type of fields to look >>> up, and it gets the field to use by reflection. This assumes only one field >>> in that object will be of that Type. >>> ie >>> How could I make it would with a list of these objects: >>> class Person { >>> String userId; >>> String displayName; >>> ... >>> } >>> Giving the ObjectAutoCompleteField the types won't work, it >>> won't know what field to use. >>> >>> List persons = getPersons(); >>> ObjectAutoCompleteBuilder builder = new >>> ObjectAutoCompleteBuilder( >>> new AutoCompletionChoicesProvider() { >>> public Iterator getChoices(String input) { >>> List subSet = getPersonSubSet(persons, input); >>> return subSet.iterator(); >>> } >>> } >>> ); >>> ObjectAutoCompleteField toField = builder.build("toField", new >>> Model()); >>> form.add(toField); >>> >>> Any ideas? >>> thanks, >>> Steve >>> >>> >> >> >> >> -- >> Albert >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > smime.p7s Description: S/MIME cryptographic signature
Re: ObjectAutoCompleteField and specifying the fields from the object to use
For reference, adding this: ObjectAutoCompleteRenderer renderer = new ObjectAutoCompleteRenderer(){ protected String getIdValue(Person p) { return p.getUuid(); } protected String getTextValue(Person p) { return p.getDisplayName(); } }; and then: builder.autoCompleteRenderer(renderer); Does what I want. Thanks for the tip! cheers, Steve On 22/12/2009, at 10:57 AM, Steve Swinsburg wrote: > Actually I have just found in the javadocs the > AbstractObjectAutoCompleteRenderer which does the separation. > > I'll give that a go. > > cheers, > Steve > > On 22/12/2009, at 10:54 AM, Steve Swinsburg wrote: > >> I decided against using the ObjectAutoCompleteTextField because it was too >> restrictive in the Object you supply. I went with the component on the wiki >> and ended up adding another getter/setter to my page to separate the value >> from the display when it gets the object selected. >> >> However, I revisited the Wicketstuff component with your suggestion, and >> adding: >> builder.idProperty("userId"); >> >> works to set the value for the field that is submitted. >> >> However, there is no way to tell it the value to use for the display! It's >> just serializing the Object I give it as the display (ie >> my.package.model.per...@77aa0759]) >> >> What I need is to give it a list of objects and to be able to specify what >> properties to use for the display value and the submit value. It needs >> something like: >> builder.displayProperty("displayName"); >> >> thanks, >> Steve >> >> On 22/12/2009, at 10:00 AM, Albert Romanius wrote: >> >>> I am not sure, but you could try to set idProperty in >>> ObjectAutoCompleteBuilder >>> >>> >>> On Mon, Dec 21, 2009 at 10:54 AM, Steve Swinsburg >>> wrote: >>>> On further investigation, the values aren't being separated after all. What >>>> is added to the textfield is what is submitted in the form. >>>> Is it possible to submit a different value than just the display text? >>>> thanks, >>>> Steve >>>> >>>> On 21/12/2009, at 1:54 PM, Steve Swinsburg wrote: >>>> >>>> Nevermind. I ended up going with this approach where I could separate the >>>> values: >>>> http://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html >>>> I will add my code snippet to the page. >>>> cheers, >>>> Steve >>>> On 21/12/2009, at 11:57 AM, Steve Swinsburg wrote: >>>> >>>> Hi, >>>> I am using ObjectAutoCompleteField from WicketStuff and it looks like what >>>> I >>>> need for my scenario: >>>> I have an object list with a bunch of fields and when the user searches, it >>>> needs to match on a certain field and display the list of matches. The >>>> examples do this with a Car object with an Integer field for the ID and a >>>> String for the car name. >>>> However, there seems to be no way to tell it *what* fields to use in the >>>> supplied object. You can only give the component the Type of fields to look >>>> up, and it gets the field to use by reflection. This assumes only one field >>>> in that object will be of that Type. >>>> ie >>>> How could I make it would with a list of these objects: >>>> class Person { >>>> String userId; >>>> String displayName; >>>> ... >>>> } >>>> Giving the ObjectAutoCompleteField the types won't work, it >>>> won't know what field to use. >>>> >>>> List persons = getPersons(); >>>> ObjectAutoCompleteBuilder builder = new >>>> ObjectAutoCompleteBuilder( >>>> new AutoCompletionChoicesProvider() { >>>> public Iterator getChoices(String input) { >>>> List subSet = getPersonSubSet(persons, input); >>>> return subSet.iterator(); >>>> } >>>> } >>>> ); >>>> ObjectAutoCompleteField toField = builder.build("toField", new >>>> Model()); >>>> form.add(toField); >>>> >>>> Any ideas? >>>> thanks, >>>> Steve >>>> >>>> >>> >>> >>> >>> -- >>> Albert >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> > smime.p7s Description: S/MIME cryptographic signature
wicketstuff portlets - where did it go?
Hi all, The link from this page: http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-portlets references this spot in SVN: http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-13/wicket-portlets which doesn't exist. Anyone know where it went or have a copy of it? It's not here: http://wicketstuff.org/maven/repository/ thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: wicketstuff portlets - where did it go?
Ah looks like I may have found it: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/attic/wicket-portlets/ On 31/12/2009, at 5:18 PM, Steve Swinsburg wrote: > Hi all, > > The link from this page: > http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-portlets > > references this spot in SVN: > http://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/branches/wicket-13/wicket-portlets > > which doesn't exist. Anyone know where it went or have a copy of it? It's not > here: http://wicketstuff.org/maven/repository/ > > thanks, > Steve smime.p7s Description: S/MIME cryptographic signature
Re: SV: wicketstuff portlets - where did it go?
Right I thought as much once I found the source. Unfortunately it doesn't provide the actual JSR168 implementations from Apache Portals Bridges Common which I was hoping for. Cheers ~ steve (sent from my ipod) On 31/12/2009, at 7:48 PM, Wilhelmsen Tor Iver wrote: Ah looks like I may have found it: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket- stuff/attic/wicket-portlets/ probably put in the attic because Wicket has supported portlets "natively" since 1.4-m3 or thereabouts. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Hi Mansour, Thats just the Tomcat log, you should have a portal log that has the actual exception or error that occurred? cheers, Steve On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: > Sorry, Forgot to include the error message: > > Found web.xml > Found WEB-INF/portlet.xml > Attempting to add portlet_2_0.tld to war... > Adding portlet_2_0.tld to war... > Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war ... > War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created > Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig checkResources > INFO: Undeploying context [/reports-0.5.4] > Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR > INFO: Deploying web application archive reports-0.5.4.war > Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start > SEVERE: Error filterStart > Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start > SEVERE: Context [/reports-0.5.4] startup failed due to previous errors > > > > > On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel > wrote: >> Thank you Tor: >> >> Here's what I have. this is copied from the web.xml from the wicket >> maven project : >> >> http://java.sun.com/xml/ns/j2ee"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >>version="2.4"> >>Reports >> >>wicket.report >> >> org.apache.wicket.protocol.http.WicketFilter >> >>applicationClassName >> >> com.example.automotive.Application >> >> >>detectPortletContext >>true >> >> >> >>wicket.report >>/report/* >> >> >> >> >> Here's my portlet.xml : >> http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"; >>version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> >> xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd >> >> http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";> >> >>My Wicket portlet examples >>WicketExamplesMenuApplication >>wicket examples >> >> com.example.automotive.BirtPortlet >> >>wicketFilterPath >>/report >> >> >>viewPage >>/report/view >> >> >>editPage >>/report/edit >> >> >>*/* >>VIEW >>EDIT >> >>en >> >>Wicket Birt Portlet Examples >>Wicket >> >> >> >> >> And my WebApplication class: >> >> import javax.servlet.ServletContext; >> import org.apache.wicket.Page; >> import org.apache.wicket.protocol.http.WebApplication; >> >> public class Application extends WebApplication { >>@Override >>public Class getHomePage() >>{ >>return ViewReport.class; >>} >>@Override >>protected void init() >>{ >>mountBookmarkablePage("/view", ViewReport.class); >>mountBookmarkablePage("/edit", EditReport.class); >>servletContext = getWicketFilter().getFilterConfig() >>.getServletContext(); >>} >>private static ServletContext servletContext; >> } >> >> Now, when I deploy to Jetspeed I get this error in catalina.out, and I >> was not able to find any relevant exception in the logs. >> I will change the log level and dig further. but I don't know, if >> there's something wrong with the web.xml or portlet.xml ? >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hello World Portlet
Absolutely that would be great. BTW I assume this is Jetspeed 2 since its JSR286? On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: > I checked jetspeed.log it but no luck. I was going to change the log > level to see what's going on. > However, I decided to run my wicket pages as a web application, and > found that I was missing the binding for slf4j. > I added this to the pom and it worked: > > >org.slf4j >slf4j-log4j12 >1.5.8 > > > I am not sure if that's what fixed the issue, or something else when I > was trying to run it as a web app. > It's working anyway. > > Would it be a good idea to provide a maven archetype for wicket portlets ? > > > On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg > wrote: >> Hi Mansour, >> >> Thats just the Tomcat log, you should have a portal log that has the actual >> exception or error that occurred? >> >> cheers, >> Steve >> >> >> On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: >> >>> Sorry, Forgot to include the error message: >>> >>> Found web.xml >>> Found WEB-INF/portlet.xml >>> Attempting to add portlet_2_0.tld to war... >>> Adding portlet_2_0.tld to war... >>> Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war >>> ... >>> War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created >>> Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig >>> checkResources >>> INFO: Undeploying context [/reports-0.5.4] >>> Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR >>> INFO: Deploying web application archive reports-0.5.4.war >>> Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start >>> SEVERE: Error filterStart >>> Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start >>> SEVERE: Context [/reports-0.5.4] startup failed due to previous errors >>> >>> >>> >>> >>> On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel >>> wrote: >>>> Thank you Tor: >>>> >>>> Here's what I have. this is copied from the web.xml from the wicket >>>> maven project : >>>> >>>> http://java.sun.com/xml/ns/j2ee"; >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>>>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >>>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >>>>version="2.4"> >>>>Reports >>>> >>>>wicket.report >>>> >>>> org.apache.wicket.protocol.http.WicketFilter >>>> >>>>applicationClassName >>>> >>>> com.example.automotive.Application >>>> >>>> >>>>detectPortletContext >>>>true >>>> >>>> >>>> >>>>wicket.report >>>>/report/* >>>> >>>> >>>> >>>> >>>> Here's my portlet.xml : >>>> http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"; >>>>version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>>> >>>> xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd >>>> >>>> http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";> >>>> >>>>My Wicket portlet examples >>>>WicketExamplesMenuApplication >>>>wicket examples >>>> >>>> com.example.automotive.BirtPortlet >>>> >>>>wicketFilterPath >>>>/report >>>> >>>> >>>>viewPage >>>>/report/view >>>> >>>> >>>>editPage >>>>/report/edit >>>> >>>> >>>>
Re: Hello World Portlet
You said in your first post it was JSR286 and Jetspeed 2 implements that spec, whereas Jetspeed 1 is JSR-168. I am glad you have Wicket based portlets working in a JSR-286 container, shame the same can't be said for a JSR-168 container, ie Pluto :( cheers, Steve On 04/01/2010, at 5:17 PM, Mansour Al Akeel wrote: > Yes, this is JS2.2, but how where you able to tell it it's JSR286 ? > In fact this was going to be my next step, to do interportlet > communication. > > If you work with JS, I have to tell you that wicket with JS is amazingly > col. You have all the pages you need where they sould be. I am still > new to wicket, but enjoying it already :) > > > > > On Mon Jan 04,2010 04:52 pm, Steve Swinsburg wrote: >> Absolutely that would be great. BTW I assume this is Jetspeed 2 since its >> JSR286? >> >> >> >> On 04/01/2010, at 4:48 PM, Mansour Al Akeel wrote: >> >>> I checked jetspeed.log it but no luck. I was going to change the log >>> level to see what's going on. >>> However, I decided to run my wicket pages as a web application, and >>> found that I was missing the binding for slf4j. >>> I added this to the pom and it worked: >>> >>> >>> org.slf4j >>> slf4j-log4j12 >>> 1.5.8 >>> >>> >>> I am not sure if that's what fixed the issue, or something else when I >>> was trying to run it as a web app. >>> It's working anyway. >>> >>> Would it be a good idea to provide a maven archetype for wicket portlets ? >>> >>> >>> On Mon, Jan 4, 2010 at 1:42 AM, Steve Swinsburg >>> wrote: >>>> Hi Mansour, >>>> >>>> Thats just the Tomcat log, you should have a portal log that has the >>>> actual exception or error that occurred? >>>> >>>> cheers, >>>> Steve >>>> >>>> >>>> On 04/01/2010, at 3:32 PM, Mansour Al Akeel wrote: >>>> >>>>> Sorry, Forgot to include the error message: >>>>> >>>>> Found web.xml >>>>> Found WEB-INF/portlet.xml >>>>> Attempting to add portlet_2_0.tld to war... >>>>> Adding portlet_2_0.tld to war... >>>>> Creating war /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war >>>>> ... >>>>> War /opt/Programs/apache-tomcat-6.0.14/webapps/reports-0.5.4.war created >>>>> Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig >>>>> checkResources >>>>> INFO: Undeploying context [/reports-0.5.4] >>>>> Jan 4, 2010 12:03:47 AM org.apache.catalina.startup.HostConfig deployWAR >>>>> INFO: Deploying web application archive reports-0.5.4.war >>>>> Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start >>>>> SEVERE: Error filterStart >>>>> Jan 4, 2010 12:03:47 AM org.apache.catalina.core.StandardContext start >>>>> SEVERE: Context [/reports-0.5.4] startup failed due to previous errors >>>>> >>>>> >>>>> >>>>> >>>>> On Mon, Jan 4, 2010 at 12:27 AM, Mansour Al Akeel >>>>> wrote: >>>>>> Thank you Tor: >>>>>> >>>>>> Here's what I have. this is copied from the web.xml from the wicket >>>>>> maven project : >>>>>> >>>>>> http://java.sun.com/xml/ns/j2ee"; >>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >>>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee >>>>>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >>>>>> version="2.4"> >>>>>> Reports >>>>>> >>>>>> wicket.report >>>>>> >>>>>> org.apache.wicket.protocol.http.WicketFilter >>>>>> >>>>>> applicationClassName >>>>>> >>>>>> com.example.automotive.Application >>>>>> >>>>>> >>>>>> detectPortletContext >>>>>> true >>>>>> >>>>>> >>>>>> >>&g
Re: Detecting an external change to the ModelObject of a Form
Good stuff, can you put this up on in Confluence with some code samples? http://cwiki.apache.org/WICKET/reference-library.html cheers, Steve On 05/01/2010, at 10:31 PM, Stijn Maller wrote: > Oooops, in case some of you are baffled that this code would work, let me > put your mind at ease, it doesn't. :o) > > I overlooked the fact that a plain Model does not have the ability to chain > another Model. (ie a constructor accepting another Model) > So the code sample I gave wouldn't work, in my real code I actually used a > CompoundPropertyModel, which does have this ability, so it worked for me. > > If you don't want to use CompoundPropertyModel you can still use the code > below, but you'll have to use an implementation of IChainingModel instead of > a plain Model. > > Kind regards, > Stijn > > > 2010/1/5 Stijn Maller > >> Hi Janning, >> >> That's definately better then exposing the form, but it still makes me have >> to insert an extra methodcall everywhere I update the modelobject. Here's >> what I implemented a couple of seconds ago and it seems to be doing what I >> wanted just fine, and no listener needed either. >> >> Instead of: >> >> Form detailForm = new Form("detailForm", model); >> >> I do: >> Form detailForm = new Form("detailForm"); >> IModel wrappingModel = new Model(model) { >>private Object previousModelObject = null; >> >>@Override >>public Object getObject() { >>if (previousModelObject != super.getObject()) { >>detailForm.modelChanged(); >>previousModelObject = super.getObject(); >>} >>return super.getObject(); >>} >>}; >> } >> detailForm.setModel(wrappingModel); >> >> >> 2010/1/5 Janning Vygen >> >> >>> your "master" knows about your "detail" panel. so why don't you call >>> detail.modelChanged(); >>> >>> and in your DetailPanel: >>> >>> onModelChanged() { >>> form.modelChanged(); // or whatever is needed... >>> form.clearInput(); >>> super.onModelChanged() >>> } >>> >>> Your form is still managed by your detail panel only. >>> >>> kind regards >>> Janning >>> >>> On Tuesday 05 January 2010 11:03:59 Stijn Maller wrote: Thanks Martin, You're right, a Model that calls ModelObjectChangedListener is basically what I am looking for, but I don't think it exists. I'll write one >>> myself, but I just wanted to check first to make sure I wasn't reinventing the wheel or missing something obvious. Kind regards, Stijn 2010/1/4 Martin Makundi > Hi! > > clearinput is right. don't know if there is a IModel that has change > listener, but sure you can make your own that detects when the master changes. You need to repaint the components anyways > (target.addComponents), so why not clear input at the same time? > > ** > Martin >>> >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> smime.p7s Description: S/MIME cryptographic signature
Re: RadioGroup with radio objects with same values
Hi, If its the first item in the list, set it to be selected one. A simple boolean could work here. cheers, Steve On 07/01/2010, at 2:04 AM, Kogel, Jonck-van-der wrote: > Hi, > I have a radiogroup that is built up dynamically, so I don't know ahead > of time what the choices are going to be. Now I noticed that if I have 3 > radio buttons in a RadioGroup and let's say they all have the same value > (are all empty for example), the selected radio button will be the last > one in the group. Let me give an example: > > RadioGroup > * value1 = "foo" > * value2 = "foo" > * value3 = "foo" > > So all 3 radio choices have the value "foo". The persisted value is also > "foo", so all are "valid" so to speak and therefore the one that gets > selected is the 3d one. However, I would like it to be the first. Could > someone point me in the right direction how I should go about overriding > this behavior so it takes the first value it encounters instead of the > last? > > Thanks, Jonck - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
On the wiki there are some pages to help your cause: http://cwiki.apache.org/WICKET/websites-based-on-wicket.html http://cwiki.apache.org/WICKET/products-based-on-wicket.html as well as blogs talking about Wicket, and lots more useful PR info: http://cwiki.apache.org/WICKET/index.html All the best! cheers, Steve On 08/01/2010, at 11:43 AM, Lester Chua wrote: > Hi, > > I am facing a hurdle that need crossing in my final attempt to push Wicket > for use in an organization. > I have: > > 1) Prototyped a small size module > 2) Did 2-3 presentations on the key features and advantages of wicket > > No one is disputing my claims about productivity and good OO code that was > the result. > > BUT, the technology evaluation committee is NOT recommending Wicket because > of. of all things. > - Wicket's Low Adoption Rate > Can I find any numbers to blow this away? > > My alternative is to accept the finding and work with Struts 2. Which will > mean the stack will need to expand to DWR > (for security). I REALLY don't want to go there, and am even considering not > taking part in this project due to the high risk involved, only 9 months to > introduce huge changes to a system that has lots of legacy problems (took > about 3 years to build). I think a lot of those years were spent wrestling > with the monster that is EJB 1.1. The only way I thought the project can even > be on time is to scrap the entire presentation layer (aka Struts) and redo it > in Wicket with 1 dedicated developer while the rest of the team work on > killing the beast that is EJB 1.1 by refactoring the biz code. > > Sigh, my choices are stark. It's either to keep the job and plough ahead and > probably fail spectacularly 9 months later or go hungry and explain to my > wife why we need to spend less on the kid.. > > It's easy to blame the tech committee but they did help me find wicket by > rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) > framework, which can be very productive as well, if not as "clean" as Wicket. > > Sorry for rambling so much. Is there any way I can demolish the silly low > adoption rate argument (omg I still don't believe it can be so lame)? > > Lester > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket session not threadsafe?
The first thing to do would be to reproduce the issue in a dev environment, then try upgrading that environment to 1.3.7 and see if that solves the problem. There shouldn't be any API breaks in the 1.3 series so this should be a simple POM dependency version update. It might also be your Hibernate implementation caching and returning the wrong object as well. Steve On 08/01/2010, at 11:21 PM, allgo wrote: > > 1.3.0-beta3 actually. Copied it from the Manifest file > > Martijn Dashorst wrote: >> >> 1.3.0? >> >> Martijn >> >> On Fri, Jan 8, 2010 at 1:12 PM, allgo wrote: >>> >>> Hi, >>> The wicket version is 1.3. Sorry should have mentioned that. >>> >>> As such the User A, after he logs on is getting assigned the Account >>> object >>> of User B. And after soem logs we can see that User B had logged on a >>> while >>> before. Hence that Accoutn object was definitely fetched a whiel before. >>> I >>> did see a few threads which say Hibernate may eb a culprit but am not >>> sure >>> thats the case here. >>> >>> Please do let me know if you need any more info. >>> Thanks, >>> SSP >>> >>> Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya wrote: > Hi all, > I am fairly a newbie in wicket and would appreciate your help! > > I > have a wicket application which are used on Live by more than 500 > users. Now the problem which has arisen is - say User A logs on - he is > able to view details of User B. It has happened for different users and > I am trying to dig the real reason. > > Here is my code details - > 1) I use Hibernate to fetch 'Account' objects from backend passing on > the > username/password. > > 2) I use > MyAppSession extends WebSession > { > private Account account; > >public InboundSession(Request request) >{ >super(request); >} > >public void setAccount(Account account) >{ >this.account = account; >} > > >public Account getAccount() >{ >return account; >} > > public boolean isUserLoggedIn() >{ > return account !=null; > } > > } > > So > effectively I check if the Account object in session is null or not and > accordingly decide whether a user is logged in or not. > > 2) In Login class I pass on the username/password to > HibernateAccountDao > and fetch the Account object. > Account account = accountDao.getAccount(username, password) > MyAppSession session = (MyAppSession )getSession(); > session.setAccount(account); > setResponsePage(Home.class); > > So effectively I fetch the accout object using hibernate and store it > in > wicket session. > But I am not sure how these account objects are getting mixed up > between > users. > > Please can someone lead me to the route cause of the issue? > > > Thanks in advance! > SSP > > > The INTERNET now has a personality. YOURS! See your Yahoo! > Homepage. > http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> >> >> -- >> Become a Wicket expert, learn from the best: http://wicketinaction.com >> Apache Wicket 1.4 increases type safety for web applications >> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > smime.p7s Desc
Re: Wicket session not threadsafe?
Are there any issues reported in the Wicket JIRA [1] that affect the 1.3 series in this way? Can you just upgrade Wicket version to 1.3.7 to see if that resolves your issue? Then you can keep digging. [1] http://issues.apache.org/jira/browse/WICKET On 08/01/2010, at 11:40 PM, allgo wrote: > > unfortunately it is extremely difficult to reproduce in dev. Have tried it a > lot. but the issue seems to happen vaer rare in a multi-user env. Thing is > though ti happens rarely... it is a client facing issue and data integrity > as promised is challenged. > > > Steve Swinsburg-3 wrote: >> >> The first thing to do would be to reproduce the issue in a dev >> environment, then try upgrading that environment to 1.3.7 and see if that >> solves the problem. There shouldn't be any API breaks in the 1.3 series so >> this should be a simple POM dependency version update. >> >> It might also be your Hibernate implementation caching and returning the >> wrong object as well. >> >> Steve >> >> >> >> On 08/01/2010, at 11:21 PM, allgo wrote: >> >>> >>> 1.3.0-beta3 actually. Copied it from the Manifest file >>> >>> Martijn Dashorst wrote: >>>> >>>> 1.3.0? >>>> >>>> Martijn >>>> >>>> On Fri, Jan 8, 2010 at 1:12 PM, allgo wrote: >>>>> >>>>> Hi, >>>>> The wicket version is 1.3. Sorry should have mentioned that. >>>>> >>>>> As such the User A, after he logs on is getting assigned the Account >>>>> object >>>>> of User B. And after soem logs we can see that User B had logged on a >>>>> while >>>>> before. Hence that Accoutn object was definitely fetched a whiel >>>>> before. >>>>> I >>>>> did see a few threads which say Hibernate may eb a culprit but am not >>>>> sure >>>>> thats the case here. >>>>> >>>>> Please do let me know if you need any more info. >>>>> Thanks, >>>>> SSP >>>>> >>>>> Martijn Dashorst wrote: >>>>>> >>>>>> A wicket version number would be helpful... >>>>>> >>>>>> Martijn >>>>>> >>>>>> On Fri, Jan 8, 2010 at 12:17 PM, Soumya >>>>>> wrote: >>>>>>> Hi all, >>>>>>> I am fairly a newbie in wicket and would appreciate your help! >>>>>>> >>>>>>> I >>>>>>> have a wicket application which are used on Live by more than 500 >>>>>>> users. Now the problem which has arisen is - say User A logs on - he >>>>>>> is >>>>>>> able to view details of User B. It has happened for different users >>>>>>> and >>>>>>> I am trying to dig the real reason. >>>>>>> >>>>>>> Here is my code details - >>>>>>> 1) I use Hibernate to fetch 'Account' objects from backend passing on >>>>>>> the >>>>>>> username/password. >>>>>>> >>>>>>> 2) I use >>>>>>> MyAppSession extends WebSession >>>>>>> { >>>>>>> private Account account; >>>>>>> >>>>>>> public InboundSession(Request request) >>>>>>> { >>>>>>> super(request); >>>>>>> } >>>>>>> >>>>>>> public void setAccount(Account account) >>>>>>> { >>>>>>> this.account = account; >>>>>>> } >>>>>>> >>>>>>> >>>>>>> public Account getAccount() >>>>>>> { >>>>>>> return account; >>>>>>> } >>>>>>> >>>>>>> public boolean isUserLoggedIn() >>>>>>> { >>>>>>> return account !=null; >>>>>>> } >>>>>>> >>>>>>> } >>>>>>> >>>>>>> So >>>>>>> effectively I check if the Account object in session is null or not >>>>>>> and >>>>>>> accordingly decide whether a user is logged in or not. >>>>>>>
JVM crash, Wicket class mentioned
Hi, This came up on another list I am part of, and being a member of this list, thought I'd ask here to see if this is a known fixed issue. This is with an app written using Wicket 1.3.0. Essentially, the JVM crashed with this error under Java 1.6, the same app runs fine under Java 1.5: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x2b5fa7fb, pid=21669, tid=1218128192 # # JRE version: 6.0_17-b04 # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode linux-amd64 ) # Problematic frame: # J org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V Some relevant parts from the log: Stack: [0x488b2000,0x489b3000], sp=0x489af470, free space=1013k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) J org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V 2aac13c5d000-2aac13c81000 r-xs 0017e000 fd:01 1204727 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-1.3.0.jar 2aac13c81000-2aac13c83000 r-xs 0002d000 fd:01 1204728 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-datetime-1.3.0.jar 2aac13c83000-2aac13c8e000 r-xs 0004e000 fd:01 1204719 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-extensions-1.3.0.jar 2aac13c8e000-2aac13c9 r-xs 4000 fd:01 1204722 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-ioc-1.3.0.jar 2aac13c9-2aac13c92000 r-xs 3000 fd:01 1204729 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-1.3.0.jar 2aac13c92000-2aac13c93000 r-xs 3000 fd:01 1204724 /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-annot-1.3.0.jar I can send the log to interest parties, but there is only this reference to the Wicket class, as well as a few Wicket jars on the classpath, unless there is more you need to see. So, any known issues? An upgrade is required of course, but we'd like to resolve what the problem was to start with. thanks, Steve smime.p7s Description: S/MIME cryptographic signature
Re: JVM crash, Wicket class mentioned
Hi Martin, I'll pass that on, but the JRE version is 1.6.0_17-b04 unless you mean the 14.3-b01 VM version? Heres the system info from the log: OS:SUSE Linux Enterprise Server 10 (x86_64) VERSION = 10 PATCHLEVEL = 2 uname:Linux 2.6.16.60-0.42.5-smp #1 SMP Mon Aug 24 09:41:41 UTC 2009 x86_64 libc:glibc 2.4 NPTL 2.4 rlimit: STACK 8192k, CORE 0k, NPROC 69119, NOFILE 10, AS infinity load average:0.32 1.14 0.74 CPU:total 4 (1 cores per cpu, 2 threads per core) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht Memory: 4k page, physical 8118936k(50388k free), swap 5242872k(5179744k free) vm_info: Java HotSpot(TM) 64-Bit Server VM (14.3-b01) for linux-amd64 JRE (1.6.0_17-b04), built on Oct 11 2009 01:08:48 by "java_re" with gcc 3.2.2 (SuSE Linux) time: Sat Jan 9 18:54:46 2010 elapsed time: 536 seconds cheers, Steve On 11/01/2010, at 11:54 PM, Martin Makundi wrote: > Hi! > > Did you try newer jvm build? > > ** > Martin > > 2010/1/11 Steve Swinsburg : >> Hi, >> >> This came up on another list I am part of, and being a member of this list, >> thought I'd ask here to see if this is a known fixed issue. This is with an >> app written using Wicket 1.3.0. Essentially, the JVM crashed with this error >> under Java 1.6, the same app runs fine under Java 1.5: >> >> # >> # A fatal error has been detected by the Java Runtime Environment: >> # >> # SIGSEGV (0xb) at pc=0x2b5fa7fb, pid=21669, tid=1218128192 >> # >> # JRE version: 6.0_17-b04 >> # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode >> linux-amd64 ) >> # Problematic frame: >> # J >> org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V >> >> Some relevant parts from the log: >> >> Stack: [0x488b2000,0x489b3000], sp=0x489af470, >> free space=1013k >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >> code) >> J >> org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V >> >> 2aac13c5d000-2aac13c81000 r-xs 0017e000 fd:01 1204727 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-1.3.0.jar >> 2aac13c81000-2aac13c83000 r-xs 0002d000 fd:01 1204728 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-datetime-1.3.0.jar >> 2aac13c83000-2aac13c8e000 r-xs 0004e000 fd:01 1204719 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-extensions-1.3.0.jar >> 2aac13c8e000-2aac13c9 r-xs 4000 fd:01 1204722 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-ioc-1.3.0.jar >> 2aac13c9-2aac13c92000 r-xs 3000 fd:01 1204729 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-1.3.0.jar >> 2aac13c92000-2aac13c93000 r-xs 3000 fd:01 1204724 >> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-annot-1.3.0.jar >> >> >> I can send the log to interest parties, but there is only this reference to >> the Wicket class, as well as a few Wicket jars on the classpath, unless >> there is more you need to see. >> >> So, any known issues? An upgrade is required of course, but we'd like to >> resolve what the problem was to start with. >> >> thanks, >> Steve >> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > smime.p7s Description: S/MIME cryptographic signature
Re: JVM crash, Wicket class mentioned
For the rare JVM crash in the past this is what I've done also, however _17 is the latest so there is no upgrade. Still, we would really like to know what caused this. A Wicket class is referenced in the error. thanks, Steve On 12/01/2010, at 12:07 AM, Martin Makundi wrote: > Hi! > > No, I remember having similar problems before and they were fixed by > upgarding jvm (1.6.0_17 -> 1.6.0_18 for example). > > ** > Martin > > 2010/1/11 Steve Swinsburg : >> Hi Martin, >> >> I'll pass that on, but the JRE version is 1.6.0_17-b04 unless you mean the >> 14.3-b01 VM version? >> >> Heres the system info from the log: >> >> >> OS:SUSE Linux Enterprise Server 10 (x86_64) >> VERSION = 10 >> PATCHLEVEL = 2 >> >> uname:Linux 2.6.16.60-0.42.5-smp #1 SMP Mon Aug 24 09:41:41 UTC 2009 x86_64 >> libc:glibc 2.4 NPTL 2.4 >> rlimit: STACK 8192k, CORE 0k, NPROC 69119, NOFILE 10, AS infinity >> load average:0.32 1.14 0.74 >> >> CPU:total 4 (1 cores per cpu, 2 threads per core) family 15 model 4 stepping >> 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht >> >> Memory: 4k page, physical 8118936k(50388k free), swap 5242872k(5179744k free) >> >> vm_info: Java HotSpot(TM) 64-Bit Server VM (14.3-b01) for linux-amd64 JRE >> (1.6.0_17-b04), built on Oct 11 2009 01:08:48 by "java_re" with gcc 3.2.2 >> (SuSE Linux) >> >> time: Sat Jan 9 18:54:46 2010 >> elapsed time: 536 seconds >> >> >> cheers, >> Steve >> >> On 11/01/2010, at 11:54 PM, Martin Makundi wrote: >> >>> Hi! >>> >>> Did you try newer jvm build? >>> >>> ** >>> Martin >>> >>> 2010/1/11 Steve Swinsburg : >>>> Hi, >>>> >>>> This came up on another list I am part of, and being a member of this >>>> list, thought I'd ask here to see if this is a known fixed issue. This is >>>> with an app written using Wicket 1.3.0. Essentially, the JVM crashed with >>>> this error under Java 1.6, the same app runs fine under Java 1.5: >>>> >>>> # >>>> # A fatal error has been detected by the Java Runtime Environment: >>>> # >>>> # SIGSEGV (0xb) at pc=0x2b5fa7fb, pid=21669, tid=1218128192 >>>> # >>>> # JRE version: 6.0_17-b04 >>>> # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.3-b01 mixed mode >>>> linux-amd64 ) >>>> # Problematic frame: >>>> # J >>>> org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V >>>> >>>> Some relevant parts from the log: >>>> >>>> Stack: [0x488b2000,0x489b3000], sp=0x489af470, >>>> free space=1013k >>>> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native >>>> code) >>>> J >>>> org.apache.wicket.util.io.WicketObjectOutputStream.writeObjectOverride(Ljava/lang/Object;)V >>>> >>>> 2aac13c5d000-2aac13c81000 r-xs 0017e000 fd:01 1204727 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-1.3.0.jar >>>> 2aac13c81000-2aac13c83000 r-xs 0002d000 fd:01 1204728 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-datetime-1.3.0.jar >>>> 2aac13c83000-2aac13c8e000 r-xs 0004e000 fd:01 1204719 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-extensions-1.3.0.jar >>>> 2aac13c8e000-2aac13c9 r-xs 4000 fd:01 1204722 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-ioc-1.3.0.jar >>>> 2aac13c9-2aac13c92000 r-xs 3000 fd:01 1204729 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-1.3.0.jar >>>> 2aac13c92000-2aac13c93000 r-xs 3000 fd:01 1204724 >>>> /usr/local/xxx/webapps/the-app/WEB-INF/lib/wicket-spring-annot-1.3.0.jar >>>> >>>> >>>> I can send the log to interest parties, but there is only this reference >>>> to the Wicket class, as well as a few Wicket jars on the classpath, unless >>>> there is more you need to see. >>>> >>>> So, any known issues? An upgrade is required of course, but we'd like to >>>> resolve what the problem was to start with. >>>> >>>> thanks, >>>> Steve >>>> >>>> >>>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: making tinyMce TextArea readonly
Here's a class I created which extends the default TinyMCESettings class. I use this as my configuration and can customise it to my hearts content, adding and removing buttons: /** * A configuration class for the TinyMCE Wicket component, used by textareas. * If more are required for different purposes, create a new class. */ public class TextareaTinyMceSettings extends TinyMCESettings { private static final long serialVersionUID = 1L; public TextareaTinyMceSettings () { super(TinyMCESettings.Theme.advanced); /* add(Button.bullist, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after); add(Button.numlist, TinyMCESettings.Toolbar.first, TinyMCESettings.Position.after); disableButton(Button.styleselect); disableButton(Button.sub); disableButton(Button.sup); disableButton(Button.charmap); disableButton(Button.image); disableButton(Button.anchor); disableButton(Button.help); disableButton(Button.code); disableButton(Button.link); disableButton(Button.unlink); disableButton(Button.formatselect); disableButton(Button.indent); disableButton(Button.outdent); disableButton(Button.undo); disableButton(Button.redo); disableButton(Button.cleanup); disableButton(Button.hr); disableButton(Button.visualaid); disableButton(Button.separator); disableButton(Button.formatselect); disableButton(Button.removeformat); */ List firstRowButtons = new ArrayList(); firstRowButtons.add(Button.bold); firstRowButtons.add(Button.italic); firstRowButtons.add(Button.underline); firstRowButtons.add(Button.strikethrough); firstRowButtons.add(Button.separator); firstRowButtons.add(Button.sub); firstRowButtons.add(Button.sup); firstRowButtons.add(Button.separator); firstRowButtons.add(Button.link); firstRowButtons.add(Button.unlink); firstRowButtons.add(Button.separator); firstRowButtons.add(Button.bullist); firstRowButtons.add(Button.numlist); firstRowButtons.add(Button.separator); firstRowButtons.add(Button.code); //set first toolbar setToolbarButtons(TinyMCESettings.Toolbar.first, firstRowButtons); //remove the second and third toolbars setToolbarButtons(TinyMCESettings.Toolbar.second, new ArrayList()); setToolbarButtons(TinyMCESettings.Toolbar.third, new ArrayList()); setToolbarButtons(TinyMCESettings.Toolbar.fourth, new ArrayList()); setToolbarAlign(TinyMCESettings.Align.center); setToolbarLocation(TinyMCESettings.Location.top); setStatusbarLocation(null); setResizing(true); setHorizontalResizing(true); } } It's then used like so: TextArea otherInformation = new TextArea("otherInformation", new PropertyModel(userProfile, "otherInformation")); //add TinyMCE control otherInformation.add(new TinyMceBehavior(new TextareaTinyMceSettings())); You might be able to play with the settings above to find what you need. Check out the settings available in the base class. cheers, Steve On 13/01/2010, at 9:43 AM, fachhoch wrote: > > I did as you said , recreated , the jar using latest js files . Please > tell me what setting I should add to add spell checker and to make copy from > word and paste to tinymce ? > > Linkan wrote: >> >> You have to download the source and repack it with new javascripts to >> make it work. >> http://old.nabble.com/making-tinymce-textarea-read-only-td23160313.html#a23170821 >> >> //Swanthe >> >> tubin gen wrote: >>> I ma trying to make TextArea with TinyMce behaviour readonly , I added >>> the following custom settings but it did not work >>> tinyMCESettings.addCustomSetting("readonly : true"); >>> tinyMCESettings.addCustomSetting("mode : textareas"); >>> >>> please suggest me how to make it readonly ? >>> >>> >> >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> > > -- > View this message in context: > http://old.nabble.com/making-tinyMce-TextArea-readonly-tp26611935p27136175.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --
clearing a TextField
Hello all, I have a list of items and an ajax form at the bottom so you can add items to the list, containing a single textfield and a submit button. On successful submit, the item is saved and the list is redrawn. Great! I want to clear the textfield though so new items can be added, since the textfield and form stays on page at all times. I tried: textField.clearInput(); target.addComponent(textField); and form.clearInput(); target.addComponent(form); and a few combinations of the above (!) but to no avail. Are these methods meant to clear the raw input from either the FormComponent or the Form itself? I would have thought so. The only way I could get it cleared was: textField.setModelObject(null); Is this how its meant to be or a bug? Just double checking. cheers, Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org