Re: [Wicket-user] Wicket User at sourceforge is moving!
landtuna wrote: Martijn Dashorst wrote: Subscribe now: send a message to [EMAIL PROTECTED] This list will self destruct in 10 minutes. While the subscribe link at http://wicket.apache.org/community.html has been changed to the apache list, the Archives link still points to Nabble. Will Nabble still be hosting the archives? If so, when will that switch happen? I just noticed that Nabble does have an archive for the new list. I guess only the link on the wicket.apache.org page needs to be updated. -- View this message in context: http://www.nabble.com/Wicket-User-at-sourceforge-is-moving%21-tf4154078.html#a11830779 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ IMPORTANT NOTICE: This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: users-subscribe at wicket.apache.org and follow the instructions. ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting up project - images and stylesheets
Thanks. Is that common practice? It seems like it tightly couples the java code with the design of the web page. I thought the Image class was for creating dynamic images - as that's all I've needed to use it for. To be honest, I don't know. If you don't want to put wicket:id attributes in your images, maybe you could instead put some Javascript in a HeaderContributor that rewrites the src attributes of all your images (or all the ones of a particular css class) when the page loads. This could fix their paths while still letting their paths remain original in the raw HTML. (They wouldn't get changed because the script wouldn't get loaded.) -- View this message in context: http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680081 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting up project - images and stylesheets
I added Igor's response to this question to the FAQ in the wiki since it seemed so useful and I hadn't seen it explained elsewhere. -- View this message in context: http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11680815 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Setting up project - images and stylesheets
jonaqua said: ...and I run the application, the image will reference web/images/logo.png. However, if I just quickly view that HTML file, it will reference src/java/package/images/logo.png and the image link will be broken. I'd just use a wicket.markup.html.image.Image for each of the images, and let wicket rewrite the src part of the img tag. Then you can put whatever you want in the src attribute. (How to make a Resource out of an image that is outside your wicket source tree is a different question that you can find the answer to by searching this list.) -- View this message in context: http://www.nabble.com/Setting-up-project---images-and-stylesheets-tf4094209.html#a11656088 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] [GMAP contrib 1.2.6] Howto interpolate markup id into javascript ?
Nino Saturnino Martinez Vazquez Wael wrote: Hi Currently the gmap contrib just have hardcoded ids, I need to interpolate the generated id's og some of the ajax buttons into the javascript on the html side. How do I do this? I'm not sure if I'm understanding you correctly, but I use some of the Wicket Extensions for 1.2.6 and do this in one of my Pages: add(new JavaScriptReference(appliedScript, getClass(), AppliedPage.js)); // The page to which the Applied Page redirects is // configurable, so configure it. final HashMapString, String hm = new HashMapString, String(); hm.put(RANDOM_ACCESS_PAGE, urlFor(RandomAccessPage.class, null).toString()); // Apply the configuration mentioned above to the JavaScript, // and put it in the Page. add(new StringHeaderContributor((new JavaScriptTemplate((new PackagedTextTemplate(getClass(), AppliedPage.js, text/javascript)).interpolate(hm))).asString())); In the Javascript, I have ${RANDOM_ACCESS_PAGE} where I want the variable to be substituted. Instead of the urlFor call, you can use the String for the markup ID. -- View this message in context: http://www.nabble.com/-GMAP-contrib-1.2.6--Howto-interpolate-markup-id-into-javascript---tf4072717.html#a11581556 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] validator.w3.org validation
I've seen some unanswered posts on this before, but I figured I'd try again. :) I haven't had much luck in getting my Wicket pages to pass the test on validator.w3.org. (The live action examples on wicketstuff.org don't work, either, but that's because they don't specify a DOCTYPE.) I'm using the following DOCTYPE. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; Using the one specified at http://cwiki.apache.org/WICKET/best-practices-and-gotchas.html#BestPracticesandGotchas-HtmlTemplateDeclaration doesn't seem to help. (Note that validation does work much better (but still fails) if my web.xml says I'm using a deployment configuration.) The following errors show how the failed validation plays out. 1) Warning Line 17 column 170: cannot generate system identifier for general entity wicket:behaviorId. ...tLoc:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotAc An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in Ampersands in URLs. Entity references start with an ampersand () and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as amp; (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; Aelig; and aelig; are different characters. If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem. Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed. 2) Error Line 17 column 170: general entity wicket:behaviorId not defined and no default entity. ...tLoc:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotAc This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand () in an URL or body text. See the previous message for further details. 3) Error Line 17 column 187: reference to entity wicket:behaviorId for which no system identifier could be generated. ...nedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true', funct This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand () in an URL or body text. See the previous message for further details. 4) Info Line 17 column 169: entity was defined here. ...ntLoc:-1:IUnversionedBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotA Warning Line 17 column 190: cannot generate system identifier for general entity wicket:ignoreIfNotActive. ...BehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true', function 5) Error Line 17 column 190: general entity wicket:ignoreIfNotActive not defined and no default entity. ...BehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true', function 6) Error Line 17 column 214: reference to entity wicket:ignoreIfNotActive for which no system identifier could be generated. ...behaviorId=0wicket:ignoreIfNotActive=true', function() { }, function() { }); 7) Info Line 17 column 189: entity was defined here. ...dBehaviorListenerwicket:behaviorId=0wicket:ignoreIfNotActive=true', functio Error Line 45 column 207: reference to entity wicket:behaviorId for which no system identifier could be generated. ...::IBehaviorListenerwicket:behaviorId=0', function() { }, function() { });ret -- View this message in context: http://www.nabble.com/validator.w3.org-validation-tf4037660.html#a11471156 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Removing IFormValidators
It seems that there is no way to remove an IFormValidator from a Form. Because the fields in my Form are inside Panels (only one of which is present at any given time), the Form fields are not necessarily children of the Form. When one of the Form's IFormValidators receives a getDependentFormComponents call, it (correctly, I believe) returns the form components that it validates. An exception occurs when getParent is called on these components (in attempt to find the Form somewhere up the hierarchy) up the call stack. Since the change in the Panel that's present is made via an Ajax update, the same update would be able to remove the offending IFormValidator when its Panel is removed. (That is, if there was a method in Form to remove an IFormValidator.) For now, I've hacked it so that my IFormValidator checks whether all its Form Components all have parents before any of its methods return non-null values. (I'm not just changing the Panel visibility because then the hidden Panels would still get validated, and I don't want that to happen.) -- View this message in context: http://www.nabble.com/Removing-IFormValidators-tf3995189.html#a11345898 Sent from the Wicket - User mailing list archive at Nabble.com. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice's onSelectionChanged called too late
Thanks for looking into this. Here's my ugly hack to get around the problem: DropDownChoice elevationSelect = new DropDownChoice(elevationSelect) { private float oldElevation = 0.0f; public List getChoices() { return ((HwddcState) parent.getModelObject()).getElevationList(); } protected boolean wantOnSelectionChangedNotifications() { // The following is a hack to be able to record the // change from the old version. Unfortunately, the old // version is not available by the time // onSelectionChanged is called, so it needs to be saved // here. HwddcState hwddcState = (HwddcState) parent.getModelObject(); oldElevation = hwddcState.getPpiImageParams().getElevation(); return true; } protected void onSelectionChanged(final Object newSelection) { HwddcState hwddcState = (HwddcState) parent.getModelObject(); final float oldElevation = this.oldElevation; ((PpiPage) getPage()).recordChange(new Change() { public void undo() { ((HwddcState) parent.getModelObject()).getPpiImageParams().setElevation(oldElevation); } }); hwddcState.getPpiImageParams().setElevation((Float) newSelection); ((PpiPage) getPage()).updateMapImages(); } }; elevationSelect.setChoiceRenderer(new ElevationChoiceRenderer()); boundModel.bind(elevationSelect, ppiImageParams.elevation); add(elevationSelect); -- View this message in context: http://www.nabble.com/DropDownChoice%27s-onSelectionChanged-called-too-late-tf2186138.html#a6058680 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] DropDownChoice's onSelectionChanged called too late
Eelco Hillenius wrote: Could you please add a feature request, so that we can change it when we agree for 2.0 and 1.3? Added as Request ID 1549588. -- Jim Hunziker -- View this message in context: http://www.nabble.com/DropDownChoice%27s-onSelectionChanged-called-too-late-tf2186138.html#a6068418 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] DropDownChoice's onSelectionChanged called too late
Because the onSelectionChanged() method of DropDownChoice isn't called until after updateModel(), I don't believe it is possible to reach the old value of the selection in an overridden onSelectionChanged() handler. Is this right? Any ideas for getting around this besides rewriting DropDownChoice? Would using AJAX help? Thanks! -- View this message in context: http://www.nabble.com/DropDownChoice%27s-onSelectionChanged-called-too-late-tf2186138.html#a6047470 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HeaderContributor on page works for one request only? (1.2.2)
Nathan Hamblen-2 said: Can anyone confirm if header contributors to pages are working properly? This works for me. I'm using a StringHeaderContributor that is added in each constructor of the page. -- Jim Hunziker -- View this message in context: http://www.nabble.com/HeaderContributor-on-page-works-for-one-request-only--%281.2.2%29-tf2186030.html#a6047660 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] HeaderContributor on page works for one request only? (1.2.2)
I said: Nathan Hamblen-2 said: Can anyone confirm if header contributors to pages are working properly? This works for me. I'm using a StringHeaderContributor that is added in each constructor of the page. I take that back. It worked in 1.2.1, but it's broken in 1.2.2. -- Jim Hunziker -- View this message in context: http://www.nabble.com/HeaderContributor-on-page-works-for-one-request-only--%281.2.2%29-tf2186030.html#a6047857 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Versioning a PropertyModel backed by another Model
Eelco Hillenius wrote: Could you please provide us with a little bit of code to look at your case? Here is the most trivial case I could come up with. Click the number 1. Click your browser's back button. Click the number 2. I would expect the page to say 1 200, but it says, 100 200. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html lang=en head meta http-equiv=content-type content=text/html; charset=utf-8 titleTest Page/title /head body p # span wicket:id=atext here/span /p p # span wicket:id=btext also here/span /p /body /html import wicket.markup.html.WebPage; import wicket.markup.html.link.Link; import wicket.markup.html.basic.Label; import wicket.model.CompoundPropertyModel; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; class StatePojo implements java.io.Serializable { private int a; private int b; public StatePojo() { a = 1; b = 2; } public int getA() { return a; } public void setA(int a) { this.a = a; } public int getB() { return b; } public void setB(int b) { this.b = b; } } public class TestPage extends WebPage { private static Log log = LogFactory.getLog(PpiPage.class); public TestPage() { super(new CompoundPropertyModel(new StatePojo())); Link aLink = new Link(aLink) { public void onClick() { getParent().modelChanging(); ((StatePojo) getParent().getModelObject()).setA(100); getParent().modelChanged(); } }; aLink.add(new Label(a)); add(aLink); Link bLink = new Link(bLink) { public void onClick() { getParent().modelChanging(); ((StatePojo) getParent().getModelObject()).setB(200); getParent().modelChanged(); } }; bLink.add(new Label(b)); add(bLink); } } -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a6026125 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Versioning a PropertyModel backed by another Model
I got past my original problem by changing my onClick methods to look like this. Is this the right approach? public void onClick() { final int oldA = ((StatePojo) getPage().getModelObject()).getA(); TestPage.this.addStateChange(new Change() { public void undo() { ((StatePojo) getPage().getModelObject()).setA(oldA); } }); ((StatePojo) getParent().getModelObject()).setA(100); } -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a6028222 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Versioning a PropertyModel backed by another Model
igor.vaynberg wrote: i believe property model should be doing that for you. johan are you reading with us? I think I can see why PropertyModel isn't doing it - There's a block inside ModelChange that skips cloning the model if the model of the component that's changing is the same as the model of the page. In this case, though, the page _is_ the component that's changing, so the page's model can't be cloned. (Calling modelChanging and modelChanged on the Link rather than the Page doesn't seem to have any effect, even if I do a setVersioned(true) on the Link.) -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a6028785 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Versioning a PropertyModel backed by another Model
Removing the if block below the comment If the component is using the same model as the page in ModelChange.java fixes the problem. I suspect this change breaks something else, though, so someone else should look into what the correct fix is. -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a6028907 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Versioning a PropertyModel backed by another Model
Eelco Hillenius wrote: Would you mind creating an issue for this, so we can track it/ won't forget to address it? Thanks, Entered as issue 1548207. -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a6029382 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Versioning a PropertyModel backed by another Model
I have a POJO that is the object for my WebPage's Model (let's call it SystemState). Some components need to interact with this object in a non-trivial way in their onClick handlers. Other components use PropertyModel models to get at a specific part of the SystemState. My whole application was working fine this way, until I started messing with the back button. Then it was clear that the versioning system was serializing, saving, and restoring versions of SystemState, but that the nestedObject fields of the PropertyModel objects that were using SystemState were not being updated with the new SystemState in the version rollback process. I could just make all of those components be versioned, but then each one would have its own serialized copy of SystemState. So my solution was to reset the Model objects of all of my components in the main page's onModelChanged method. This seems to work fine, but it seems goofy. Is there a better way to do this? (Or is it a bug that the nestedObject fields don't get updated automatically during a rollback?) Thanks - and I love Wicket so far! --- Jim -- View this message in context: http://www.nabble.com/Versioning-a-PropertyModel-backed-by-another-Model-tf2166294.html#a5988817 Sent from the Wicket - User forum at Nabble.com. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user