Re: [Wicket-user] IMPORTANT: your opinion on the constructor change in 2.0
What's the advantage of the new code (no, I'm not currently using Wicket 2.0)? Is it processing performance? Memory usage? Is the framework code a lot less complex? A little less complex? []s Gus On 3/6/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > Hi, > > We (Wicket's developers) are having some discussion over 1.3 vs 2.0 > and how difficult it is as a nun-funded project to spend so much time > synchronizing the branches. > > A major issue in the discussion is that not everyone is convinced > anymore that the constructor change in 2.0 is for the better. There > are pros and cons for sure, but we want to get your opinion on this. > > Please help us out giving your opinion. We want to know: > > 1) Who uses 2.0 for serious projects? > > 2) What do you think of the constructor change? Do you prefer 1.3's > add style or 2.0's style of passing in the parent construction time. > > 3) If we would ever backtrack on the constructor change (*if*, don't > panic for now) how much trouble would that give you? > > Please don't be shy giving your opinion. This is an important issue in > the future development of Wicket. > > Regards, > > Eelco > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] VOTE: IModel and 'model object' name change
+0 for changing, except not sure it's what Johnathan suggested. My problem is with using the word Model at all for the objects that access model properties (maybe they should be ModelAccessors, ModelExposer, ModelAdaptor, ModelBridge, ModelConnector, or something along the lines... then ReflectionModelAccessor or CompositeModelAccessor, ...). They're not really models in any sense that existing software patterns might agree, except maybe from the framework-only perspective. The methods wouldn't even have to change that much then. []s Gus On 1/23/07, Matthijs Wensveen <[EMAIL PROTECTED]> wrote: > +1 Don't know if my vote counts or not, but anyway. > > I'm one of those users that had trouble with the ambiguity between model > object (as in the IModel instance) and modelObject (the object contained > by the model). Worse, In my project's team all the modelObjects were > classes with the naming convention XXXModel so we had IModels containing > modelObjects that were XXXModels. If that isn't an example of bad > naming, then what is? :D > > In my opinion models containing values that are (of course) objects is > much clearer and would prevent this kind of madness. Luckily Eclipse has > great refactoring features, so XXXModel soon became XXXModelObject. > > Matthijs > > Eelco Hillenius wrote: > > -1. Regardless of whether the change is for the better, it will break > > way too much existing code not to mention the tutorials on the > > internet etc. > > > > Eelco > > > > > > On 1/22/07, Jonathan Locke <[EMAIL PROTECTED]> wrote: > > > >> i'd like us to vote on changing IModel to this in 2.0 (i know it's very > >> late, but please at least read my argument below and think about it for a > >> moment): > >> > >> public interface IModel extends IDetachable > >> { > >> V getValue(); > >> void setValue(V value); > >> } > >> > >> we would also change getModelObject() to getValue() as well as any other > >> related methods like getModelObjectAsString() to getValueAsString() (or > >> valueAsString() if preferred). there might be naming conflicts somewhere > >> or > >> other problems, but i don't know of any offhand. > >> > >> i realize we're about to enter beta, but i feel like this matters since our > >> users have been telling us for some time now that models are hard to > >> understand and it seems likely that the term 'model object' (as derived > >> from > >> the IModel interface naming) is really not helping anyone to understand > >> things. in fact, that term is actually ambiguous since the object > >> implementing IModel might be informally understood to be the model object > >> (which is not what we mean). > >> > >> i realize this change would affect the book and so eelco and martijn may > >> very understandably not want to deal with that so i won't be upset if this > >> change can't happen. but i'd like to see it if it's possible, so at any > >> rate, i'm +1 and i think igor says he's +0. > >> > >> > >> Jonathan Locke wrote: > >> > >>> We did already break the model contract with 1.2/1.3... would > >>> get/setObject->get/setValue be a huge hassle? Or am I spacing something > >>> here? > >>> > >>> > >>> Jonathan Locke wrote: > >>> > Made a few more changes. I think it's getting shorter/better. > > My one regret looking at this documentation is that I wish > IModel.get/setObject were actually IModel.get/setValue. Or was there > some crazy reason we didn't do this? It would be much easier and more > natural to talk about a model's value this way... > > > Jonathan Locke wrote: > > > Nice work. I made a few small changes and rephrased the first paragraph > > to be even more specific. Maybe it could be tweaked a little more, but > > I think this sums it up better now: > > > > "In Wicket, a model holds a value for a component to display and/or > > edit. How exactly this value is held is determined by a given model's > > implementation of the wicket.model.IModel interface. This interface > > decouples a component from the data which forms its value. This in turn > > decouples the whole Wicket framework from any and all details of model > > storage, such as the details of a given persistence technology. As far > > as Wicket itself is concerned, a model is anything that implements the > > IModel interface, no matter how it might do that." > > > > It does feel like this is the best place to show the IModel interface > > since readers will be wondering what it looks like already. It sounds > > scarier than it is, so why delay? > > > > > > Loren Rosen wrote: > > > >> I've saved my rewritten version. (See > >> http://cwiki.apache.org/confluence/display/WICKET/Working+with+Wicket+models) > >> Comments by everyone from experts to complete newbies > >> are most welcome. Doubtless there are things that are confusing or > >> flat-out wrong. > >> > >
Re: [Wicket-user] Patch to compile wicket-portlet-examples-1.3 for wicket 2.0
I'll try to get it to actually run (not only compile), then I'll submit :) On 12/29/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > thanks, could you please attach it to a jira issue - there is the checkbox > you need to check in when making an attachment in jira that specifies the > code is asl compliant > > -igor > > > > On 12/29/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > > > Hi there, > > > > I've noticed that the 2.0 repository didn't have > > wicket-portlet-examples. I'm sending a patch that enables > > wicket-portlet-examples in the 1.x branch to compile under Wicket2.0. > > If anyone feels like adding the code to the branch (I don't have > > commit rights), feel free to use/modify the patch as sees fit. > > > > []s Gus > > > > > > > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys - and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Patch to compile wicket-portlet-examples-1.3 for wicket 2.0
Hi there, I've noticed that the 2.0 repository didn't have wicket-portlet-examples. I'm sending a patch that enables wicket-portlet-examples in the 1.x branch to compile under Wicket2.0. If anyone feels like adding the code to the branch (I don't have commit rights), feel free to use/modify the patch as sees fit. []s Gus Property changes on: . ___ Name: svn:ignore - target + target build dist Index: src/main/java/wicket/examples/portlet/ExamplePortlet.java === --- src/main/java/wicket/examples/portlet/ExamplePortlet.java (revision 491085) +++ src/main/java/wicket/examples/portlet/ExamplePortlet.java (working copy) @@ -1,9 +1,8 @@ package wicket.examples.portlet; import javax.portlet.WindowState; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import wicket.ResourceReference; import wicket.markup.html.basic.Label; import wicket.markup.html.form.Form; @@ -19,7 +18,7 @@ */ public class ExamplePortlet extends PortletPage { - private static final Log log = LogFactory.getLog(ExamplePortlet.class); + private static final Logger log = LoggerFactory.getLogger(ExamplePortlet.class); /** * @@ -31,12 +30,12 @@ PropertyModel messageModel = new PropertyModel(this, "message"); // The label displays the currently set message - add(new Label("msg", messageModel)); + new Label(this, "msg", messageModel); // Add a form to change the message. We don't need to do anything // else with this form as the shared model is automatically updated // on form submits - Form form = new Form("form") + Form form = new Form(this, "form") { protected void onSubmit() @@ -46,29 +45,27 @@ }; - form.add(new TextField("msgInput", messageModel)); + new TextField(form, "msgInput", messageModel); - add(new Link("link") + new Link(this, "link") { public void onClick() { log.info("link clicked"); message = "Link clicked!"; } - }); + }; - add(form); - add(new Link("link2") + new Link(this, "link2") { public void onClick() { setResponsePage(new ExamplePortlet2(ExamplePortlet.this)); } - }); + }; - add(new Image("image",new ResourceReference(ExamplePortlet.class,"wicket-logo.png"))); - + new Image(this, "image",new ResourceReference(ExamplePortlet.class,"wicket-logo.png")); } private String message = "[type your message to the world here]"; Index: src/main/java/wicket/examples/portlet/ExamplePortlet2.java === --- src/main/java/wicket/examples/portlet/ExamplePortlet2.java (revision 491085) +++ src/main/java/wicket/examples/portlet/ExamplePortlet2.java (working copy) @@ -6,10 +6,9 @@ import javax.portlet.PortletMode; import javax.portlet.WindowState; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import wicket.Page; import wicket.ajax.AjaxRequestTarget; import wicket.ajax.markup.html.AjaxLink; @@ -25,7 +24,7 @@ */ public class ExamplePortlet2 extends PortletPage { - private static final Log log = LogFactory.getLog(ExamplePortlet.class); + private static final Logger log = LoggerFactory.getLogger(ExamplePortlet2.class); long counter = 0; @@ -42,16 +41,16 @@ */ public ExamplePortlet2(final Page page) { - add(new Link("link") + new Link(this, "link") { public void onClick() { setResponsePage(page); } - }); - add(new Label("windowState", new PropertyModel(this, "windowState"))); - add(new Label("portletMode", new PropertyModel(this, "portletMode"))); - add(new Image("image", new RenderedDynamicImageResource(100, 100) + }; + new Label(this, "windowState", new PropertyModel(this, "windowState")); + new Label(this, "portletMode", new PropertyModel(this, "portletMode")); + new Image(this, "image", new RenderedDynamicImageResource(100, 100) { protected boolean render(Graphics2D graphics) { @@ -67,20 +66,19 @@ graphics.drawOval(x, y, dx, dy); return true; } - })); + }); - final Label counterValue = new Label("counter", + final Label counterValue = new Label(this, "counter", new PropertyModel(this, "counter")); counterValue.setOutputMarkupId(true); - add(counterValue); - add(new AjaxLink("counterLink") + new AjaxLink(this, "counterLink") { public void onClick(AjaxRequestTarget target) { counter++; target.addComponent(counterValue); } - }); + }; } protected void onSetWindowState(WindowState state) Index: pom.xml === --- pom.xml (revision 491085) +++ pom.xml (working copy) @@ -22,24 +22,20 @@ xsi:schemaLocation="http://maven.apache.org/POM/
[Wicket-user] Suggestions/Questions on the Portlet code
Why is the creation of a PortletApplication done in the WicketPortlet, instead of the WicketPortletServlet? It seems to me that, more likely than not, if the application contains more than one portlet, they'll end up sharing the session (they need to if there's inter-portlet communication). Was this done for a specific reason? On the same lines, why does WicketPortletServlet extend WicketServlet? Do they actually share executable code? I tried putting some breakpoints in WicketServlet but they didn't seem to trigger, while breakpoints on WicketPortlet did. If there's no reason for the current inheritance setup, may I suggest some changes? - WicketPortletServlet could instantiate the PortletApplication (since the app is shared amongst all Portlets) - WicketPortlet could reference the home PortletPage instead of the PortletApplication []s Gus - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Multi-portlet app?
On 11/14/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: Here's an example. I've removed the lib folder to make the size manageable (I was only using commons-logging, log4j and yesterday's snapshot of Wicket Core). It all works as long as you don't submit both forms in the same session, then the second one always fails. []s Gus On 11/14/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Hm, I don't yet fully understand the framework, yet what seems to be > happening is that when the page is generated, each portlet is rendered > once. Same happens when I submit the form in one of the portlets. > However, when I submit a form on one, then after a refresh submit the > other, I get 3 rendering phases, 2 for the portlet that was last > clicked. > > I'm trying to generate a simple test case to illustrate this. > > []s Gus > > > > On 11/14/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > janne is the portlet guy, are you reading with us? > > > > -igor > > > > > > > > On 11/14/06, Gustavo Hexsel <[EMAIL PROTECTED] > wrote: > > > > > > Actually, this doesn't seem to work at all. When I put 2 portlets > > > (just copied & pasted from the Wicket example, and changed the > > > wicket:ids so they wouldn't conflict), the second one is expired > > > whenever I click on anything on it. Any hints on what I should be > > > trying to improve in Wicket or the example for this? > > > > > > []s Gus > > > > > > > > > > > > On 11/13/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > > > Hi folks, > > > > > > > > I was taking a look at Wicket's support for Portlets, and after a > > > > bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and > > > > Tomcat), I got the examples working. > > > > > > > > Then I got curious and tried to set the app to have 2 portlets that > > > > communicate, but I'm a little lost. Is it even possible? The > > > > javadocs seem to indicate that there should be one "application" per > > > > declaration, which seems conceptually wrong to me (should be > > > > one Portlet instead). Each PortletApplication seems to be a factory > > > > for a session. Will they both get called? Any recommended way of > > > > sharing the session for communication purposes? > > > > > > > > Hm... Guess I'll try that and post the results in case someone else > > > > is curious. :) > > > > > > > > []s Gus > > > > > > > > > > > > - > > > 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=lnk&kid=120709&bid=263057&dat=121642 > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > - > > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > > Check out Slashdot's new job board. Browse through tons of technical jobs > > posted by companies looking to hire people just like you. > > http://jobs.slashdot.org/ > > > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > tester.renametozipplz Description: Binary data - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Multi-portlet app?
Hm, I don't yet fully understand the framework, yet what seems to be happening is that when the page is generated, each portlet is rendered once. Same happens when I submit the form in one of the portlets. However, when I submit a form on one, then after a refresh submit the other, I get 3 rendering phases, 2 for the portlet that was last clicked. I'm trying to generate a simple test case to illustrate this. []s Gus On 11/14/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > janne is the portlet guy, are you reading with us? > > -igor > > > > On 11/14/06, Gustavo Hexsel <[EMAIL PROTECTED] > wrote: > > > > Actually, this doesn't seem to work at all. When I put 2 portlets > > (just copied & pasted from the Wicket example, and changed the > > wicket:ids so they wouldn't conflict), the second one is expired > > whenever I click on anything on it. Any hints on what I should be > > trying to improve in Wicket or the example for this? > > > > []s Gus > > > > > > > > On 11/13/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > > Hi folks, > > > > > > I was taking a look at Wicket's support for Portlets, and after a > > > bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and > > > Tomcat), I got the examples working. > > > > > > Then I got curious and tried to set the app to have 2 portlets that > > > communicate, but I'm a little lost. Is it even possible? The > > > javadocs seem to indicate that there should be one "application" per > > > declaration, which seems conceptually wrong to me (should be > > > one Portlet instead). Each PortletApplication seems to be a factory > > > for a session. Will they both get called? Any recommended way of > > > sharing the session for communication purposes? > > > > > > Hm... Guess I'll try that and post the results in case someone else > > > is curious. :) > > > > > > []s Gus > > > > > > > > - > > 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=lnk&kid=120709&bid=263057&dat=121642 > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > - > SF.net email is sponsored by: A Better Job is Waiting for You - Find it Now. > Check out Slashdot's new job board. Browse through tons of technical jobs > posted by companies looking to hire people just like you. > http://jobs.slashdot.org/ > > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Multi-portlet app?
Actually, this doesn't seem to work at all. When I put 2 portlets (just copied & pasted from the Wicket example, and changed the wicket:ids so they wouldn't conflict), the second one is expired whenever I click on anything on it. Any hints on what I should be trying to improve in Wicket or the example for this? []s Gus On 11/13/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Hi folks, > > I was taking a look at Wicket's support for Portlets, and after a > bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and > Tomcat), I got the examples working. > > Then I got curious and tried to set the app to have 2 portlets that > communicate, but I'm a little lost. Is it even possible? The > javadocs seem to indicate that there should be one "application" per > declaration, which seems conceptually wrong to me (should be > one Portlet instead). Each PortletApplication seems to be a factory > for a session. Will they both get called? Any recommended way of > sharing the session for communication purposes? > > Hm... Guess I'll try that and post the results in case someone else > is curious. :) > > []s Gus > - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Multi-portlet app?
Hi folks, I was taking a look at Wicket's support for Portlets, and after a bit of a struggle (mostly caused by Liferay, Ubuntu, MySQL and Tomcat), I got the examples working. Then I got curious and tried to set the app to have 2 portlets that communicate, but I'm a little lost. Is it even possible? The javadocs seem to indicate that there should be one "application" per declaration, which seems conceptually wrong to me (should be one Portlet instead). Each PortletApplication seems to be a factory for a session. Will they both get called? Any recommended way of sharing the session for communication purposes? Hm... Guess I'll try that and post the results in case someone else is curious. :) []s Gus - 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=lnk&kid=120709&bid=263057&dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Null and NullValid
It seems to be only looking for "nullValid" or "{full hierarchy}.nullValid". []s Gus DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load resource from: com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: nullValid DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load resource from: com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid INFO | wicket.resource.PropertiesFactory - Loading properties files from file:/C:/development/projects/Pinpoint-1.5/oberon/Admin/exploded/WEB-INF/classes/com/sagebrush/pinpoint/administration/source/SourceLoginPanel.properties DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load resource from: com.sagebrush.pinpoint.administration.source.SourceLoginPanel:en_US; key: nullValid DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Found resource from: com.sagebrush.pinpoint.administration.source.SourceLoginPanel:en_US; key: nullValid DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load resource from: com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: nullValid DEBUG| wicket.resource.loader.AbstractStringResourceLoader - Try to load resource from: com.sagebrush.pinpoint.administration.source.BaseEditSourcePage:en_US; key: form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.1.site.nullValid ... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Juergen Donnerstag Sent: April 19, 2006 10:16 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Null and NullValid wicket does a whole lot more than that. Add log4j.logger.wicket.resource.loader=DEBUG log4j.logger.wicket.Localizer=DEBUG to your log4j.properties to get information on the resolution process. The javadoc on AbstractStringResourceLoader and an article in the wiki describe the process as well Juergen On 4/19/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Still on the "properties suffixes" saga: > > The process for determining suffixes 'null' and 'nullValid' seems to have > changed. Until 1.2b3, the loader would try to load the component name > (without the hierarchy) followed by 'null'. For instance, for my list > component, named "site", that contains dropdownchoices, the properties name > for the null value was: > > site.null=Please select a site > > On 1.2rc1, the process seems to be using the hierarchy, which causes the > prefix to include the listitem index. I've stepped through the code, and it > seems to be looking for: > > form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid > > which is impossible to use as I have a variable number of entries on the > page. Is there a work-around? > > Also, is there a compelling reason for have 'null' and 'nullValid' suffixes? > It broke a bunch of pages for a corner-case which I can't even imagine (same > component being mandatory sometimes and sometimes not, and needing different > messages on each case???). > > []s Gus > > > --- > 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?cmdlnk&kid0709&bid&3057&dat1642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > --- 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=k&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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=lnk&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Null and NullValid
Still on the "properties suffixes" saga: The process for determining suffixes 'null' and 'nullValid' seems to have changed. Until 1.2b3, the loader would try to load the component name (without the hierarchy) followed by 'null'. For instance, for my list component, named "site", that contains dropdownchoices, the properties name for the null value was: site.null=Please select a site On 1.2rc1, the process seems to be using the hierarchy, which causes the prefix to include the listitem index. I've stepped through the code, and it seems to be looking for: form.authenticationPanel.loginType.passwordSupportedDiv.siteLoginList.0.site.nullValid which is impossible to use as I have a variable number of entries on the page. Is there a work-around? Also, is there a compelling reason for have 'null' and 'nullValid' suffixes? It broke a bunch of pages for a corner-case which I can't even imagine (same component being mandatory sometimes and sometimes not, and needing different messages on each case???). []s Gus --- 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=lnk&kid0709&bid&3057&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Wicket 1.2-rc1 available for download
Actually, the last problem was (base form not being validated) turned out to be a problem with my contribution: - I have a Button in the form, so I should be calling the submit(buttonId) instead of just submit(), else it calls the "Form.submit()" method instead. WicketTester behaves similarly but not exactly like the real WebApplication, in regard to forms. []s Gus -Original Message----- From: Gustavo Hexsel Sent: April 17, 2006 5:03 PM To: 'wicket-user@lists.sourceforge.net' Subject: RE: [Wicket-user] Wicket 1.2-rc1 available for download No problem. For some of them, I'm pretty sure I was misusing the API... that's why I asked what the differences were. Here's a few problems I've found: - WicketTester's init() method (which overrides the WebApplication's) wasn't being called upon creation. Now it seems to be called. I had an AppTester which extended WicketTester and did some init for some -but not all - tests. (my abuse #1) - the property affix "NumberValidator#RangeValidator" became "NumberValidator.range" - "getExceptionSettings().setThrowExceptionOnMissingResource(true)" seems to be ignored on WicketTester, which worsened the problem above - TypeValidator is marked as deprecated, and the method FormComponent.setType(Class) is given as a replacement, but there's not indication on how to build the property affix. Luckily, "TypeValidator" still seems to work for that one. - I have a base form which gets inherited for specific behaviour. The form itself has a method which runs complex validations and calls "error(String)" to set the form's error messages. Those messages don't seem to be registering with the final page. I'll try to create and submit a simpler test for this one. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Eelco Hillenius Sent: April 17, 2006 4:39 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Wicket 1.2-rc1 available for download Hi Gustavo, Sorry for the inconvenience. What kind of test cases are failing? If you use jWebUnit tests, you probably should set HttpUnitOptions.setExceptionsThrownOnScriptError(false); as jWebUnit does not seem not recognize history as a valid javascript property. Could you give more specifics please? Eelco On 4/17/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Argh, my tests don't run anymore. Is there a place where I can find the > detailed changelog between 1.2b3 to 1.2rc1? > > []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Wicket 1.2-rc1 available for download
No problem. For some of them, I'm pretty sure I was misusing the API... that's why I asked what the differences were. Here's a few problems I've found: - WicketTester's init() method (which overrides the WebApplication's) wasn't being called upon creation. Now it seems to be called. I had an AppTester which extended WicketTester and did some init for some -but not all - tests. (my abuse #1) - the property affix "NumberValidator#RangeValidator" became "NumberValidator.range" - "getExceptionSettings().setThrowExceptionOnMissingResource(true)" seems to be ignored on WicketTester, which worsened the problem above - TypeValidator is marked as deprecated, and the method FormComponent.setType(Class) is given as a replacement, but there's not indication on how to build the property affix. Luckily, "TypeValidator" still seems to work for that one. - I have a base form which gets inherited for specific behaviour. The form itself has a method which runs complex validations and calls "error(String)" to set the form's error messages. Those messages don't seem to be registering with the final page. I'll try to create and submit a simpler test for this one. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Eelco Hillenius Sent: April 17, 2006 4:39 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Wicket 1.2-rc1 available for download Hi Gustavo, Sorry for the inconvenience. What kind of test cases are failing? If you use jWebUnit tests, you probably should set HttpUnitOptions.setExceptionsThrownOnScriptError(false); as jWebUnit does not seem not recognize history as a valid javascript property. Could you give more specifics please? Eelco On 4/17/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > Argh, my tests don't run anymore. Is there a place where I can find the > detailed changelog between 1.2b3 to 1.2rc1? > > []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Wicket 1.2-rc1 available for download
Also, a suggestion: the licenses for ognl and echo2 are still being shipped, although the jars were already removed. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martijn Dashorst Sent: April 17, 2006 2:41 PM To: Wicket User Subject: [Wicket-user] Wicket 1.2-rc1 available for download The first release candidate of the 1.2 version of Wicket and its subprojects is available for download. You can download the release here: http://sourceforge.net/project/showfiles.php?group_id=119783 Available in this release are: o wicket o wicket-extensions o wicket-examples o wicket-auth-roles o wicket-auth-roles-examples o wicket-spring o wicket-spring-examples o wicket-spring-annot o wicket-spring-annot-examples o wicket-quickstart This release has several fixes on the beta3 release, so it is highly recommended to update your current development to rc1. With this release we are finally in the end game for 1.2. We hope to move quickly with these releases, so please consider upgrading and help test the final stages. We don't expect major and minor changes in the API's, as such subsequent releases should be a drop in replacement (we do keep the possibility open that a bug might require us to break this promise). Martijn -- Wicket 1.2 is coming! Write Ajax applications without touching JavaScript! -- http://wicketframework.org --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Wicket 1.2-rc1 available for download
Argh, my tests don't run anymore. Is there a place where I can find the detailed changelog between 1.2b3 to 1.2rc1? []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Martijn Dashorst Sent: April 17, 2006 2:41 PM To: Wicket User Subject: [Wicket-user] Wicket 1.2-rc1 available for download The first release candidate of the 1.2 version of Wicket and its subprojects is available for download. You can download the release here: http://sourceforge.net/project/showfiles.php?group_id=119783 Available in this release are: o wicket o wicket-extensions o wicket-examples o wicket-auth-roles o wicket-auth-roles-examples o wicket-spring o wicket-spring-examples o wicket-spring-annot o wicket-spring-annot-examples o wicket-quickstart This release has several fixes on the beta3 release, so it is highly recommended to update your current development to rc1. With this release we are finally in the end game for 1.2. We hope to move quickly with these releases, so please consider upgrading and help test the final stages. We don't expect major and minor changes in the API's, as such subsequent releases should be a drop in replacement (we do keep the possibility open that a bug might require us to break this promise). Martijn -- Wicket 1.2 is coming! Write Ajax applications without touching JavaScript! -- http://wicketframework.org --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] FormTester and multiple submits
I think I've found a bug in FormTester. Or maybe just a limitation. When submitting a form you have no way of specifying the button that was actually clicked. All buttons are marked as pressed, so the form visitor just finds the first one and marks it as the sender. My suggestion is that FormTester shouldn't add a marker string to buttons, and a new submit(buttonName) method should be created. I'd submit a formal patch, but I've never used 'patch' and the long weekend starts in an hour :) Here's the changes I'm proposing: FormTester(final String path, final Form workingForm, final WicketTester wicketTester, boolean fillBlankString) { this.path = path; this.workingForm = workingForm; this.wicketTester = wicketTester; this.wicketTester.setupRequestAndResponse(); if (fillBlankString) { workingForm.visitFormComponents(new FormComponent.IVisitor() { public void formComponent(FormComponent formComponent) { if (formComponent.isEnabled() && !(formComponent instanceof Button)) { // JUST ADDED THE SECOND PART setValue(formComponent.getInputName(), ""); } } }); } } And the new submit method (keep the old one!): public void submit(String submitButtonPath) { checkClosed(); try { wicketTester.getServletRequest().setParameter(submitButtonPath, "marker"); wicketTester.getServletRequest().setRequestToComponent(workingForm); wicketTester.processRequestCycle(); } finally { closed = true; } } Seems to have worked for my test cases. []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Wicket testing page
I've written a small how-to for testing on wicket. I'm not that well-versed in it (and my native language isn't English :). If anyone would like to review/modify/delete it, it's at http://www.wicket-wiki.org.uk/wiki/index.php/Testing Thanks for the great framework! []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Download after post broken in 1.2
Nevermind, I found the answer I was looking for http://sourceforge.net/mailarchive/message.php?msg_id=15192574 Sorry about the repeated questions, lots have changed between 1.1.1 and 1.2 and Sourceforge's mail list search has gotten worse over the last 4 months or so... can't reorder the list by posting date anymore. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gustavo Hexsel Sent: April 12, 2006 11:22 AM To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] Download after post broken in 1.2 Hi there, I used to have a download-after-submit, following an email I saw a while ago. It used a construct like this: final WebResponse response = (WebResponse)getRequestCycle().getResponse(); response.setContentType("text/csv"); response.setHeader("Content-Disposition", "filename=\""+ filename + "\""); response.write(reportData); getRequestCycle().setResponsePage((WebPage)null); This seems to be not possible in 1.2 beta 3 (complains that the argument page cannot be null). Is there a work-around for this? Was this formalized in some other way? I tried looking at the Migration to 1.2 guidelines, but didn't see anything that matched. Thanks, []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Download after post broken in 1.2
Hi there, I used to have a download-after-submit, following an email I saw a while ago. It used a construct like this: final WebResponse response = (WebResponse)getRequestCycle().getResponse(); response.setContentType("text/csv"); response.setHeader("Content-Disposition", "filename=\""+ filename + "\""); response.write(reportData); getRequestCycle().setResponsePage((WebPage)null); This seems to be not possible in 1.2 beta 3 (complains that the argument page cannot be null). Is there a work-around for this? Was this formalized in some other way? I tried looking at the Migration to 1.2 guidelines, but didn't see anything that matched. Thanks, []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Testing attribute modifiers
RequestCycle.get() returns null for me. This is my testing code (the HeaderPanelSource just stores some attributes needed to instantiate my panel): public void testTabImages() { tester.startPanel(new HeaderPanelSource("helpidfortest", AdminTab.NONE)); // TODO check that the right images are active tester.assertComponent("panel:viewReportsLink:image", WebMarkupContainer.class); final Component tabImage = tester.getComponentFromLastRenderedPage("panel:viewReportsLink:image"); final String tabImageString = renderComponent(tabImage); assertTrue(tabImageString.indexOf(".gif") > 0); } private String renderComponent(final Component component) { final Page page = component.getPage(); // save original values final boolean originalVersioned = page.isVersioned(); final RequestCycle requestCycle = RequestCycle.get(); final Response originalResponse = requestCycle.getResponse(); --- NPE at the line above -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 4:47 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers RequestCycle.get().get/setResponse -Igor On 4/11/06, Gustavo Hexsel <[EMAIL PROTECTED] > wrote: That looks quite promising. Is there a way to access the requestCycle, or even better, the response? I'm in a test started by WicketTester.startPanel(TestPanelSource) and all instances of the requestCycle seem to be null. The API states I shouldn't create one myself anyway. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 3:49 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers you can partially render components, ajax does this, have a look at AjaxResponseTarget.respondComponent() -Igor On 4/11/06, Gustavo Hexsel < [EMAIL PROTECTED]> wrote: So there's no way to generate the output of a set of components and compare? Generating the page is overkill for my case, but I suppose I could use a String.indexOf to search for my tag... []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] Sent: April 11, 2006 3:44 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers see our unit tests. Just generate the page output in a WicketUnitTest and compare it what you expect. johan On 4/11/06, Gustavo Hexsel < [EMAIL PROTECTED] > wrote: Is there a way to test the final result of an attribute modifier? I'm using them to set the src attribute of some tags, set parameters on certain javascript functions, etc. But I haven't seen any example of how to validate if it's working correctly. Thanks! []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944
RE: [Wicket-user] Testing attribute modifiers
That looks quite promising. Is there a way to access the requestCycle, or even better, the response? I'm in a test started by WicketTester.startPanel(TestPanelSource) and all instances of the requestCycle seem to be null. The API states I shouldn't create one myself anyway. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 3:49 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers you can partially render components, ajax does this, have a look at AjaxResponseTarget.respondComponent() -Igor On 4/11/06, Gustavo Hexsel < [EMAIL PROTECTED]> wrote: So there's no way to generate the output of a set of components and compare? Generating the page is overkill for my case, but I suppose I could use a String.indexOf to search for my tag... []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] Sent: April 11, 2006 3:44 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers see our unit tests. Just generate the page output in a WicketUnitTest and compare it what you expect. johan On 4/11/06, Gustavo Hexsel < [EMAIL PROTECTED] > wrote: Is there a way to test the final result of an attribute modifier? I'm using them to set the src attribute of some tags, set parameters on certain javascript functions, etc. But I haven't seen any example of how to validate if it's working correctly. Thanks! []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Testing attribute modifiers
So there's no way to generate the output of a set of components and compare? Generating the page is overkill for my case, but I suppose I could use a String.indexOf to search for my tag... []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 3:44 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Testing attribute modifiers see our unit tests. Just generate the page output in a WicketUnitTest and compare it what you expect. johan On 4/11/06, Gustavo Hexsel < [EMAIL PROTECTED]> wrote: Is there a way to test the final result of an attribute modifier? I'm using them to set the src attribute of some tags, set parameters on certain javascript functions, etc. But I haven't seen any example of how to validate if it's working correctly. Thanks! []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Re: zero session state/stateless pages
I'm using Wicket 1.2beta3. Below is an URL from a bookmarkablePageLink: http://localhost:8081/admin?wicket:bookmarkablePage=:com.sagebrush.pinpoint.administration.system.ChangeSystemParametersPage I'm using Firefox 1.5 with Javascript/cookies enabled for localhost. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 3:42 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Re: zero session state/stateless pages No it is because what gili says. Not all urls where encoded in previous versions of wicket. Now they are and no it is up to us to call the right method on the response object so that the url gets encoded. It is not auto handles how can they do that? Analyse the complete generated html and see what a url is?? johan On 4/11/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: Mine is also not adding the session to the URL. Isn't this automatically handled by the servlet engine (tomcat or jetty) without wicket or programmer intervention? That's probably why some of us don't see it... browser brand and version versus servlet engine version. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] Sent: April 11, 2006 3:34 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Re: zero session state/stateless pages Off the top of my head, because you are likely using an older version of Wicket where we did not encode the URL. I believe that was a bug ;) The most current version always encodes the URL. Remember, if you do not encode the URL, you risk losing the session without warning. Gili Michael Day wrote: > Wicket is not adding jsessionid to my URLs. I have a simple page called > Home that contains a BookmarkablePageLink to Page2, but the URL for > Page2 does not get jsessionid appended to the URL on the first hit, even > with cookies disabled. Why is this? > > Michael Day > > On Apr 11, 2006, at 5:11 PM, Johan Compagner wrote: > >> but it is up to wicket. >> We do call response.encodeUrl if we don't do that then jsessionid is >> not inserted into the url. >> >> But if we don't do that then sessions could be lost when a browser has >> cookies disabled.. >> >> johan >> >> >> On 4/11/06, Nathan Hamblen <[EMAIL PROTECTED]> wrote: Michael Day >> wrote: >> > If not, then wicket cannot be used for public web sites (news, >> > online store, etc) that need to be indexed in today's search engines. >> >> Johan Compagner wrote: >> > If you want a really stateless page/site. Then everything must be >> > bookmarkable/mountable links..and you can't use our >> > form components >> [...] >> >> Yes. Ample bookmarkable links are all you need for good indexing. Try >> googling "British Lemon Meringue Pie" and see that the second result is >> in fact a Wicket demo application. >> >> I wouldn't worry about forms too much since Google doesn't follow them >> anyway. As long as you can get to the content through bookmarkable >> links, it will be indexed. The fact that a session always exists is >> irrelevant and entirely normal. (Even ASP 3.0 created a session on the >> "very first hit.") >> >> My only wish is to get rid of that silly ;jsessionid=66kiemewvs53 but I >> don't think that's up to Wicket. >> >> Nathan >> >> >> >> --- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Testing attribute modifiers
Is there a way to test the final result of an attribute modifier? I'm using them to set the src attribute of some tags, set parameters on certain javascript functions, etc. But I haven't seen any example of how to validate if it's working correctly. Thanks! []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Re: zero session state/stateless pages
Mine is also not adding the session to the URL. Isn't this automatically handled by the servlet engine (tomcat or jetty) without wicket or programmer intervention? That's probably why some of us don't see it... browser brand and version versus servlet engine version. []s Gus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 11, 2006 3:34 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Re: zero session state/stateless pages Off the top of my head, because you are likely using an older version of Wicket where we did not encode the URL. I believe that was a bug ;) The most current version always encodes the URL. Remember, if you do not encode the URL, you risk losing the session without warning. Gili Michael Day wrote: > Wicket is not adding jsessionid to my URLs. I have a simple page called > Home that contains a BookmarkablePageLink to Page2, but the URL for > Page2 does not get jsessionid appended to the URL on the first hit, even > with cookies disabled. Why is this? > > Michael Day > > On Apr 11, 2006, at 5:11 PM, Johan Compagner wrote: > >> but it is up to wicket. >> We do call response.encodeUrl if we don't do that then jsessionid is >> not inserted into the url. >> >> But if we don't do that then sessions could be lost when a browser has >> cookies disabled.. >> >> johan >> >> >> On 4/11/06, Nathan Hamblen <[EMAIL PROTECTED]> wrote: Michael Day >> wrote: >> > If not, then wicket cannot be used for public web sites (news, >> > online store, etc) that need to be indexed in today's search engines. >> >> Johan Compagner wrote: >> > If you want a really stateless page/site. Then everything must be >> > bookmarkable/mountable links..and you can't use our >> > form components >> [...] >> >> Yes. Ample bookmarkable links are all you need for good indexing. Try >> googling "British Lemon Meringue Pie" and see that the second result is >> in fact a Wicket demo application. >> >> I wouldn't worry about forms too much since Google doesn't follow them >> anyway. As long as you can get to the content through bookmarkable >> links, it will be indexed. The fact that a session always exists is >> irrelevant and entirely normal. (Even ASP 3.0 created a session on the >> "very first hit.") >> >> My only wish is to get rid of that silly ;jsessionid=66kiemewvs53 but I >> don't think that's up to Wicket. >> >> Nathan >> >> >> >> --- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >> ___ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] RE: WicketTester and checkAccess redirections
Juergen gave me some pointers and I decided to try migrating to 1.2. I have to say things are quite a bit more complicated now... how do I get access to the request from an AuthorizationStrategy? I need to check if the request's IP is within a pre-configured range. Before, I was doing this on checkAccess(): final ServletWebRequest servletWebRequest = (ServletWebRequest) getRequest(); final HttpServletRequest request = servletWebRequest.getHttpServletRequest(); final String clientIP = request.getRemoteAddr(); boolean isOffSiteIP = ConfigurationService.getInstance().isOffSiteIP(clientIP); boolean isOffSiteAllowed = ConfigurationService.getInstance().load().isOffSiteAccessEnabled().booleanValue(); if(isOffSiteIP && !isOffSiteAllowed){ ... redirect to appropriate warning page } []s Gus -Original Message- From: Gustavo Hexsel Sent: April 10, 2006 6:10 PM To: 'wicket-user@lists.sourceforge.net' Subject: WicketTester and checkAccess redirections Hi, I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with the current app. I can't seem to get the redirectToInterceptPage(Page) method to actually redirect to the page. It works fine from Tomcat and Jetty, but the WicketTester seems to ignore the call (though I stepped into it and saw it was actually called). Is this the expected behaviour? If so, how do you test the interceptions? []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] WicketTester and checkAccess redirections
Hi, I'm using Wicket 1.1.1 and trying to get my first WicketTester to work with the current app. I can't seem to get the redirectToInterceptPage(Page) method to actually redirect to the page. It works fine from Tomcat and Jetty, but the WicketTester seems to ignore the call (though I stepped into it and saw it was actually called). Is this the expected behaviour? If so, how do you test the interceptions? []s Gus --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Default button when hitting Enter
Hi Igor, thanks a lot for the suggestions. I've tried creating very simple specialized panels that behaved as the "submit buttons" and a "submit button group". I'm attaching the code for anyone curious or desperate enough. I don't know enough of how to make proper wicket components, so this probably breaks a hundred wicket design rules - but it solves my problem. Feel free to fix, modify, add, or reuse in any manner. Things I know are bad: - you can only have one form (damn JS) - you cannot have a field with an id of "submittedButton" (ditto for JS) - you can only have one SubmitButtonGroup - get/setButtonId shouldn't be public, or some other model type should be used - no docs, no tests (ARGH there goes test first down the drain :) To use it, just include a element for each of the buttons, and one for the button group. In the Java code, add something like this to the form: private void addButtons() { group = new SubmitButtonGroup("buttonGroup"); final SubmitButton searchButton = new SubmitButton("searchButton", "Search", group); add(searchButton); add(new SubmitButton("browseButton", "Browse", group)); group.setDefaultButton(searchButton); add(group); } protected void onSubmit() { if ("searchButton".equals(group.getButtonId())) { search(); } else if ("browseButton".equals(group.getButtonId())) { browse(); } else { logger.error("Unexpected submit"); } } []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Wed, 8 Feb 2006 20:28:31 -0800 Assunto: Re: [Wicket-user] Default button when hitting Enter > i believe this is actually how all browsers/html work. the first button in > the form is always the default one. it sucks, you just have to learn to work > around it. > > a while back i really needed this to work properly. so what i did was use > javascript. > > add a hidden input to the form and initialize it with the name of the > default button. > > then each button becomes type="button" instead of type="submit" and onclick > you do something like onclick="this.form.tracker=this.name; this.form.submit > ;" > > that way your hidden input always contains the name of the button clicked, > or default one if form was submitted using enter. > > another thing to try is to set taborder on the form controls, maybe that way > the button with lowest tab order becomes the default, but i havent tried it > and dont know if its cross browser. > > i suppose we could design a javascript system like above for wicket. if you > are willing to put in the time to do it i would be willing to help. > > -Igor > > > On 2/8/06, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > is there a way of setting which one is the default button when hitting > > Enter on a form? I've tried looking for Wicket or Javascript solutions, I > > can't seem to find something that will post the correct button on the form - > > it's always the first one in the markup. > > > > The closest I've got was: > > -- > > function submitEnter(myfield,e) { > > var keycode; > > if (window.event) { > > keycode = window.event.keyCode; > > } else if (e) { > > keycode = e.which; > > } else { > > return true; > > } > > if (keycode == 13) { > > document.forms['searchForm'].searchButton.click(); > > return false; > > } else { > > return true; > > } > > } > > ... > > Browse > > ... > > > onKeyUp="return submitEnter(this, event);" /> > > ... > > > id="searchButton">Search > > ... > > --- > > > > I've tried both and , both with the same > > result. Wicket still reports the post as being done from the other > > button. Below is the page's code that deals with the buttons: > > add(new Button("searchButton") { > > protected vo
[Wicket-user] Default button when hitting Enter
Hi all, is there a way of setting which one is the default button when hitting Enter on a form? I've tried looking for Wicket or Javascript solutions, I can't seem to find something that will post the correct button on the form - it's always the first one in the markup. The closest I've got was: -- function submitEnter(myfield,e) { var keycode; if (window.event) { keycode = window.event.keyCode; } else if (e) { keycode = e.which; } else { return true; } if (keycode == 13) { document.forms['searchForm'].searchButton.click(); return false; } else { return true; } } ... Browse ... ... Search ... --- I've tried both and , both with the same result. Wicket still reports the post as being done from the other button. Below is the page's code that deals with the buttons: add(new Button("searchButton") { protected void onSubmit() { search(); } }); add(new Button("browseButton") { protected void onSubmit() { browse(); } }); From there, I just have a log that prints info that came from the form (which seems to have been updated correctly). I'm using Firefox 1.5, Wicket 1.1. Are there any obvious mistakes? Is there a way to do this? I could resort to using Javascript to manipulate some hidden input... Thanks! []s Gus --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support preserve form state ?
IMO all components that might cause an automatic roundtrip to the server (all that implement IOnChangeListener) should have a way of keeping form updates. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Fri, 9 Dec 2005 00:19:51 +0100 Assunto: Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support preserve form state ? > please do or else i will forget some component i am affraid. > > Love to have some feedback on all the component things we should have that > now. > > johan > > > On 12/8/05, Ingram Chen <[EMAIL PROTECTED]> wrote: > > > > OK, I tried 1.2 DropDownChoice and it works ! > > But the other components: RadioChoice and CheckBox are still implemented > > with old way. > > > > Should I create a RFE for these ? > > > > > > On 12/8/05, Johan Compagner <[EMAIL PROTECTED]> wrote: > > > > > > In the current 1.2 head stream this is already working. > > > > > > If you use there a DropDown it will preserve youre formstate. > > > > > > johan > > > > > > > > > On 12/8/05, Ingram Chen <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi all, > > > > > > > > Several weeks ago, there are some discussion on perserving form > > > > state via > > > > an internal method registerNewUserInput() of FormComponent. This works > > > > for Form calling onSubmit or using Button. But it seems that > > > > onSelectionChanged() > > > > of IOnChangeListener still does not support this feature. > > > > Is there any plan to support this ? If not, is there any way to > > > > perserve form state when > > > > onSelectionChanged() is called ? > > > > > > > > Thanks in advance. > > > > > > > > -- > > > > Ingram Chen > > > > Java [EMAIL PROTECTED] > > > > Institue of BioMedical Sciences Academia Sinica Taiwan > > > > blog: http://www.javaworld.com.tw/roller/page/ingramchen > > > > > > > > > > > > > > > -- > > Ingram Chen > > Java [EMAIL PROTECTED] > > Institue of BioMedical Sciences Academia Sinica Taiwan > > blog: http://www.javaworld.com.tw/roller/page/ingramchen > > > --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Replacing nested panels in a form
Yes, but thanks to all for your help! One of the problems I had was the panel not being updated on a onSelect event for the dropdown choice, which seems to be fixable with code in CVS HEAD. Igor explained the other issue, about nesting the panels. Though I'll probably keep replacing the panels and adding PropertyModels to the components. Building all panels up-front makes no sense to this particular case, as they could be hitting the database for some options that might never be necessary. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Thu, 8 Dec 2005 23:21:15 +0100 Assunto: Re: [Wicket-user] Replacing nested panels in a form > ok it seems that you found your answer in another thread of this list. > > regards, > > -- > laurent > > On 12/8/05, Laurent PETIT <[EMAIL PROTECTED]> wrote: > > hello, > > > > can you provide code example for this ? > > > > On 12/8/05, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > > Hi folks, > > > > > > I have a nested panel inside of a form that gets replaced based on the > > > selection of a combo box. > > > > > > The problem is that when I change the value on the combobox (by > > > selecting another value on the web form), the values on other form > > > components (that ones not on the nested panel) get erased, and I get > > > validation errors on all submits, as if values were all empty. It looks > > > like the model might be lost somewhere. > > > > > > I'm using a CompoundPropertyModel, and setting it only on the form > > > itself. > > > > > > It seems to work when I set individual PropertyModels for all > > > components in the nested Panel (but not if I set CompoundPropertyModels), > > > which is a good workaround but took me a while to figure out. > > > > > > Is this expected? I was expecting to be able to set a > > > CompoundPropertyModel on the nested panel, or not have to set a model at > > > all (and it would use the parent's - the form's). > > > > > > []s Gus > > > > > > > > > > > > > > > --- > > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > > files > > > for problems? Stop! Download the new AJAX search engine that makes > > > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > > > http://ads.osdn.com/?ad_idv37&alloc_id865&opclick > > > ___ > > > Wicket-user mailing list > > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support preserve form state ?
Ops, nevermind, I found the answer to my question here. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Thu, 8 Dec 2005 09:26:03 +0100 Assunto: Re: [Wicket-user] IOnChangeListener (DropDownChioce... etc) support preserve form state ? > In the current 1.2 head stream this is already working. > > If you use there a DropDown it will preserve youre formstate. > > johan > > > On 12/8/05, Ingram Chen <[EMAIL PROTECTED]> wrote: > > > > Hi all, > > > > Several weeks ago, there are some discussion on perserving form state > > via > > an internal method registerNewUserInput() of FormComponent. This works > > for Form calling onSubmit or using Button. But it seems that > > onSelectionChanged() > > of IOnChangeListener still does not support this feature. > > Is there any plan to support this ? If not, is there any way to perserve > > form state when > > onSelectionChanged() is called ? > > > > Thanks in advance. > > > > -- > > Ingram Chen > > Java [EMAIL PROTECTED] > > Institue of BioMedical Sciences Academia Sinica Taiwan > > blog: http://www.javaworld.com.tw/roller/page/ingramchen > --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Replacing nested panels in a form
Hi folks, I have a nested panel inside of a form that gets replaced based on the selection of a combo box. The problem is that when I change the value on the combobox (by selecting another value on the web form), the values on other form components (that ones not on the nested panel) get erased, and I get validation errors on all submits, as if values were all empty. It looks like the model might be lost somewhere. I'm using a CompoundPropertyModel, and setting it only on the form itself. It seems to work when I set individual PropertyModels for all components in the nested Panel (but not if I set CompoundPropertyModels), which is a good workaround but took me a while to figure out. Is this expected? I was expecting to be able to set a CompoundPropertyModel on the nested panel, or not have to set a model at all (and it would use the parent's - the form's). []s Gus --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Best use of Links
I think factories are useful when you have setup other than in the constructor (using setters or other things). Besides, you can avoid ugly nesting and a little red tape: {public void onClick() { setResponsePage(...); }} Not necessary, but a little less verbose. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Sun, 20 Nov 2005 09:13:37 +0100 Assunto: Re: [Wicket-user] Best use of Links > As Igor mentioned. It is completely fine to use. Nothing wrong with it. > > Juergen > > On 11/20/05, Andrew Lombardi <[EMAIL PROTECTED]> wrote: > > So, I see all this talk of using static factory methods to generate a > > Page, but what would be wrong with just using > > > > add(new Link("myLink") { > > public void onClick() { > > setResponsePage(new MyPage(param1, param2, param3)); > > } > > }; > > > > this looks like it ensures that the page doesn't get created until > > the link is clicked (avoiding the stack overflow problem), and it > > avoids usage of PageParameters (which harken me back to MVC > > frameworks anyway (ick!))... > > > > is that right? > > > > > > On Nov 18, 2005, at 3:19 PM, Eduardo Rocha wrote: > > > > > Yeah, I just forgot IPageLink and PageLink (by the way these names can > > > be quite confusing!), so ignore my classes, but I keep my point :P. > > > > > > 2005/11/18, Igor Vaynberg <[EMAIL PROTECTED]>: > > >> Actually what i meant was a simple static factory method that > > >> translates > > >> strongly typed params into PageParameters. > > >> > > >> ie > > >> > > >> class MyBookmarkablePage extends WebPage { > > >> public MyBookmarkablePage(PageParameters params) { > > >> ... > > >> } > > >> public static MyBookmarkablePage(String p1, int p2, String p3) { > > >> PageParameters params=new PageParameters(); > > >> ...fill in params... > > >> return new MyBookmarkablePage(params); > > >> } > > >> } > > >> > > >> also see IPageLink interface that is used by PageLink class. but i > > >> think > > >> this is more work, a simple Link's onclick() implementation is the > > >> path of > > >> least resistance imho. > > >> > > >> -Igor > > >> > > >> > > >> > > >> On 11/18/05, Eduardo Rocha <[EMAIL PROTECTED]> wrote: > > >>> > > >>> If it's OK to write a little more code, you could use a factory for > > >>> the page with the same signature your constructor uses. In my > > >>> opinion > > >>> this could be more elegant, but what Igor said is simpler. Something > > >>> like (not tested): > > >>> > > >>> // reusable class > > >>> public interface IPageCreator { > > >>> Page newInstance(); > > >>> } > > >>> > > >>> // reusable class > > >>> public class PageCreatorLink extends Link { > > >>> public PageCreatorLink(String id, IPageCreator creator) { > > >>> super(id); > > >>> this.creator = creator; > > >>> } > > >>> public void onClick() { > > >>> setResponsePage(creator.newInstance()); > > >>> } > > >>> } > > >>> > > >>> // your class > > >>> public class MyPageCreator implements IPageCreator { > > >>> public MyPageCreator(Object provided) { > > >>> this.provided = provided; > > >>> } > > >>> public Page newInstance() { > > >>> return new MyPage(provided); > > >>> } > > >>> } > > >>> > > >>> // your class > > >>> add(new PageCreatorLink("cancelLink", new MyPageCreator(provided)); > > >>> > > >>> maybe your page class could also be the IPageCreator, serving like a > > >> prototype: > > >>> > > >>> // your class > > >>> public class MyPage extends WebPage implements IPageCreator { > > >>> > > >>> } > > >>> > > >>> The factory woul
[Wicket-user] Best use of Links
Hi all, I wanted to know what's the best way to use Links (PageLinks, BookmarkablePageLinks). In the beginning, I was using BookmarkablePageLink's and converting everything to and from Strings. That obviously was flawed, as I was using string names and passing them back and forth (lost strong-typing, occasionally forgot one parameter, or mistyped the name of it). It also made me reload objects from the database even though I had them handy on the calling class. Then I tried using PageLink's, passing a "new XXXPage(whateverparameter)" in the constructor. That didn't work either, as pages have links back and forth, leading to stackoverflows. Then I moved one step up in the object hierarchy and started using Link's, but it seems such red tape for each link having to write: add(new Link("cancelLink") { public void onClick() { setResponsePage(new EditProviderPage(provider)); }; }); Any suggestions? []s Gus --- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: Re: [Wicket-user] My take on Spring integration
I don't have an answer for the problem, so I'll just give my Free Rant (sorry, can't charge 2 cents for it :) One of the reasons why Spring (and IoC in general) is so elegant, is because it usually doesn't add a new dependency to your classes. Only a couple of root application classes need to know that Spring is there at all. If for any reason you find out that Spring configuration XML is rotten for projects over 100 configured objects (i.e. for performance or maintainability), you just pull out the root object and redo the configuration in code or using another library. Adding a coupling to spring in each class is much less flexible. It might sound far-fetched, but I've done exactly that... IoC ruled but the spring configuration xml was a royal pain in the butt as it grew. IDEA (or any other IDE AFAIK) can't refactor into it, so all changes to object interfaces have to be done by hand. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 7 Nov 2005 13:56:39 -0200 Assunto: Re: Re: [Wicket-user] My take on Spring integration > PS.: Someone responded this thread in a way that gmail (only gmail?) > could not find it associated with previous messages, I hope people > continue to discuss and keep this, and not open a new thread with (AW: > Re: Re: My take on Spring integration). > > Igor, the class you have implemented is exactly the way I was > thinking. However Sven pointed out correctly that this is not really > IoC, since the component itself is looking for its dependencies > (Alexandru said that even before...). > > But even if it is not IoC, I think this is a nice approach. The client > code it would look exactly like a really IoC implementation (if > getSpringContext() is implemented in another way). And if I can live > with the Page constructor automatically attaching itself to the > Session, I could live with Pages doing serialization as well. > > That said, a really IoC approach seems to be achieved either using AOP > or doing something with onBeginRequest/onBeginResponse, as Sven, > Juergen and Johan said before. > > 2005/11/7, Johan Compagner <[EMAIL PROTECTED]>: > > And there is also a thing like XML Serialization > > Which also doesn't use the java read/write object at all. > > > > > > > > On 11/7/05, Christian Essl <[EMAIL PROTECTED]> wrote: > > > Hi Igor, > > > > > > I looked through your code. Thanks for implementing it. I am not sure > > > wheter readObject() is the right place to do the (re)injection. According > > > to the servlet-spec in SVR 7.7.2 readObject() is not guaranteed to be > > > called on session-attributes. (Instead session attributes which implement > > > HttpSessionActiviationListeners are informed on deserialization). Even if > > > readObject is called I am not sure wheter there is an ApplicationContext > > > to get to the BeanContext. > > > > > > I don't know wheter wicket has a mean to propogate these HttpSessionEvents > > > on deserialization or a similar callback? If so I guess you could do the > > > (re)injection there. > > > > > > Christian > > > > > > On Mon, 7 Nov 2005 01:13:31 -0800, Igor Vaynberg <[EMAIL PROTECTED]> > > > wrote: > > > > > > > here is something i threw together that solves the deserialization and > > > > ability to use the new operator to create pages. atleast i think it > > > > doesits really late here and all i really know so far is that it > > > > compiles :) > > > > > > > > the idea is pretty simple, do the injection in the default constructor, > > > > and > > > > then do it anytime the object is deserialized. you use a @SpringBean > > > > annotation to denote the dependency. it can either be used on a field or > > > > on > > > > a setter. If you specify the bean name it will be used to find the bean, > > > > if > > > > you dont then the field's type or the setters argument type will be used > > > > for > > > > the lookup. > > > > > > > > -Igor > > > > > > > > > > > > On 11/7/05, Igor Vaynberg < [EMAIL PROTECTED]> wrote: > > > >> > > > >> and you have to have the pages defined as beans in the application > > > >> context? with their properties specified? > > > >> > > > >> -Igor > > > >> > > > >> > > > >> On 11/7/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > >> > > > > >> > but how does the above handle deserealization of pages? there is > > > >> nothing > > > >> > to reinject the dependencies. > > > >> > > > > >> > -Igor > > > >> > > > > >> > > > > >> > On 11/7/05, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > > >> > > > > > >> > > IMHO pages are standing on the borderline between a stateful GUI > > and > > > >> > > the rest of the application in form of stateless services. > > > >> > > DI should be done by the IoC container, creating the pages can > > > >> better > > > >> > > be done the standard Wicket way (e.g. with PageParameters). > > > >> > > > > > >> > > As described before I'm using a custom
Re: [Wicket-user] Why no page interface?
Isn't it contradicting that you guys use abstract classes because they are more "evolvable" and then lock everything with "final" so things don't change as easily? []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Sat, 16 Jul 2005 00:06:57 +0200 Assunto: Re: [Wicket-user] Why no page interface? > i agree. > > When you have a IPage object there should be able to have multiply Page > implementations. > But this is not really possible because the internals of page are pretty > importand for wicket to let it work > > If you have a full blown page with all kind of components on it. I don't > think putting an other page implementation beneath it > that does honor the complete interface will really render the page... > So if that isn't possible what is the use? > > johan > > > Eelco Hillenius wrote: > > Hi, > > > > One /very/ important reason not to use interfaces in this case is > > that: interfaces are hard to evolve. Interfaces have to be pretty darn > > stable before even considering throwing them out in the public, as > > there is no way (not without a tough fight at least) you can alter it > > later on - even adding a new method will break all clients. > > > > Another reason not to use interfaces here is that there is so much > > behaviour in here (in the pages and components), that it is very hard > > to extract something usefull out of it. What would the interface of a > > Page be? One of the good practices when making interfaces is that they > > should be small. Having an interface like > > http://jakarta.apache.org/tapestry/tapestry/apidocs/org/apache/tapestry/IPage.html > > doesn't really display that. They can be large, like the collection > > interfaces are, but they have to be really, really stable and consistent. > > > > Just to be sure, and as I didn't make this decision for Wicket I asked > > Jonathan Locke (who is doing movie stuff now, and left the mailing > > lists for some time) why he choose for interfaces. Here's a partial > > transcript of our chat: > > > > [22:31] jonathan: i don't believe in big interfaces > > [22:31] jonathan: no interface should be as large as Page > > [22:32] jonathan: it's too fragile > > [22:35] jonathan: abstract classes are evolvable > > [22:36] jonathan: interfaces should always be a set of methods that > > you cannot ever imagine extending > > [22:36] jonathan: it encapsulates a very specific set of behaviors > > [22:37] jonathan: everyone should feel free to create/extract his own > > IPage interface for use with proxies > > [22:38] jonathan: there's something fundamentally wrong with the way > > that current OO languages try to wire things together with static > > interfaces. > > [22:39] jonathan: unless i'm missing something, this is really not a > > problem with wicket > > [22:40] jonathan: in fact i think it's a feature > > [22:40] jonathan: interfaces are really most useful for things that > > are truly pluggable > > [22:43] jonathan: my ideal number of methods in an interface is 1 > > [22:43] jonathan: ;-) > > [22:44] jonathan: 2 is okay in some cases > > [22:44] jonathan: 3 often should be re-thought > > [22:44] jonathan: the more methods you have, the more likely it is > > that you've got a bad design > > > > So, it is a design decission not to work with interfaces. However, as > > Jonathan stated, you could extract an interface, let your page class > > implement it and off you go. Furthermore, I wonder what it is you want > > to do with a proxy that you can't do by simply subclassing? Or AOP? > > > > As a final statement I'd like to add that a framework like Wicket is > > very different from a business system, which could have tons of > > business methods that must be pluggable. Though even in that case, I > > think too that interfaces are overused/ get too much focus with some > > of the current popular frameworks. Seems to be getting a knee-jerk > > reaction instead of a design decision. But maybe that's just me. > > > > Regards, > > > > Eelco > > > > > > Peter Veentjer - Anchor Men wrote: > > > >> I`m trying to add Spring annotations to the Page, but because there > >> is no page interface and only a Page class (with final methods) it is > >> not possible to create a proxy and therefor it is impossible to > >> enhance objects. This is very inconvenient.. > >> > >> Why are the components not designed from interfaces? Designing from > >> interfaces is common oo practice. > >> > >> > >> > >> --- > >> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > >> from IBM. Find simple to follow Roadmaps, straightforward articles, > >> informative Webcasts and more! Get everything you need to get up to > >> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > >> ___ > >> Wicket-user mailing list > >> Wicket-user@l
Re: [Wicket-user] Spring Integration
I don't want to open a big discussion on service locator vs dependency injection. I know you guys are trying to accomodate as many points of view as possible. I'll check if I can find something to help. The point was that there are situations when dependency injection prevents problems with systems that grow too fast in complexity. It all comes to people making assumptions that no longer hold, or just being plainly lazy. Our problem was that people tended to group many services into the same locator, which created code dependencies throughout the whole system (couldn't compile or move a piece of code to another project without a big refactoring). The interesting is that Martin Fowler makes the same suggestion on his website... it was an assumption that code would never be reused in other projects so the dependency was not a big deal... oh well. Maybe the solution goes on the lines of using Spring to act as a factory for all components, and maybe have a default delegate (the normal Wicket classes) deal with it when Spring didn't know or didn't want to create a specific component. Does this make sense at all? []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring Integration
The best solution, IMHO, would be to have a spring class that would create the pages for you, with all dependencies set. It would have to be a bridge between spring's ApplicationContext and wicket's PageFactory. For instance, instead of having a BookListPage.class that calls Book.listAll(), it would have a reference to ListBooks or BookServices or whatever your nomenclature is, and not to worry about having to find that. The ApplicationContext, or the PageFactory, or some other configurator, would set the dependencies upon page creation. I understand Tomcat would not be able to recover the context from a serializable servlet context, and I don't have any immediate solutions for that. I'm just thinking on how dependency injection works... if you have to "ask" for anything from an application context, you're using a more flexible form of service locator. It works, but it's not what Spring originally intended. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 11 Jul 2005 19:13:16 +0200 Assunto: Re: [Wicket-user] Spring Integration > What would you need to make it pretty? If you have concrete idea's on > how we can improve Wicket for this, please share them. > > Eelco > > Gustavo Hexsel wrote: > > > One possible way would be to have a parent page class that would hold it, > > and customize your page factory to set it in all created pages. It's > > pretty easy. Let me know if you can't picture it and I'll try to write a > > sample code. > > > > I use dependency injection in most of my pages and unfortunately, it > > doesn't look nearly as pretty as I wanted it to. Most Wicket examples > > favour service locator instead... I guess you might find yourself in the > > same boat. > > > > []s Gus > > > > > >-- Início da mensagem original --- > > > > De: [EMAIL PROTECTED] > >Para: wicket-user@lists.sourceforge.net > > Cc: > >Data: Mon, 11 Jul 2005 11:16:47 -0500 > > Assunto: [Wicket-user] Spring Integration > > > > > > > >>Hi, > >> > >>I'm looking into Wicket and would like to know what the preferred > >>method of integrating Wicket with Spring. I'll need access to the > >>bean factory in the page classes. I checked the wiki and didn't see > >>anything. Thanks for the help. > >> > >>-Nick > >> > >> > >>--- > >>This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening > >>July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > >>core and dual graphics technology at this free one hour event hosted by HP, > >>AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > >>___ > >>Wicket-user mailing list > >>Wicket-user@lists.sourceforge.net > >>https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > >> > >> > > > >__ > >UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. > >http://www.uol.com.br/fone > > > > > > > > > >--- > >This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening > >July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > >core and dual graphics technology at this free one hour event hosted by HP, > >AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > >___ > >Wicket-user mailing list > >Wicket-user@lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > --- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Spring Integration
That's not exactly "dependency injection". Ideally, Spring should be the "page factory", so it creates the pages and sets the dependencies for you. I'm sorry Phil, I know this is not perfect from the serialization point of view, but the pages are the controllers for this app, they need to know the services that model the system as well as the interface that displays it. As I said, Wicket works better for service locators than for dep inj. A page that lists all customers should have an instance of a service that list the customers... []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 11 Jul 2005 12:46:31 -0500 Assunto: Re: [Wicket-user] Spring Integration > Here's how I'm approaching it now: > > public class MyApplication extends WebApplication { > > private XmlBeanFactory beans; > > public MyApplication() { > ClassPathResource res = new > ClassPathResource("applicationContext.xml"); > beans = new XmlBeanFactory(res); > } > > public Object getBean(String name) { > return beans.getBean(name); > } > > } > > And I'll just reference it from my Page classes using > getApplication().getBean("..."). > > > > On 7/11/05, Phil Kulak <[EMAIL PROTECTED]> wrote: > > Holding the beans in the pages is not a good idea. I did this for a > > bit, but the pages are serialized and your app-context beans aren't. > > So then you have to make your app-context beans serializable, which > > defeats the point of having an app context. > > > > -Phil > > > > On 7/11/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > What would you need to make it pretty? If you have concrete idea's on > > > how we can improve Wicket for this, please share them. > > > > > > Eelco > > > > > > Gustavo Hexsel wrote: > > > > > > > One possible way would be to have a parent page class that would hold > > > > it, and customize your page factory to set it in all created pages. > > > > It's pretty easy. Let me know if you can't picture it and I'll try to > > > > write a sample code. > > > > > > > > I use dependency injection in most of my pages and unfortunately, it > > > > doesn't look nearly as pretty as I wanted it to. Most Wicket examples > > > > favour service locator instead... I guess you might find yourself in > > > > the same boat. > > > > > > > > []s Gus > > > > > > > > > > > >-- Início da mensagem original --- > > > > > > > > De: [EMAIL PROTECTED] > > > >Para: wicket-user@lists.sourceforge.net > > > > Cc: > > > >Data: Mon, 11 Jul 2005 11:16:47 -0500 > > > > Assunto: [Wicket-user] Spring Integration > > > > > > > > > > > > > > > >>Hi, > > > >> > > > >>I'm looking into Wicket and would like to know what the preferred > > > >>method of integrating Wicket with Spring. I'll need access to the > > > >>bean factory in the page classes. I checked the wiki and didn't see > > > >>anything. Thanks for the help. > > > >> > > > >>-Nick > > > >> > > > >> > > > >>--- > > > >>This SF.Net email is sponsored by the 'Do More With Dual!' webinar > > > >>happening > > > >>July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > > > >>core and dual graphics technology at this free one hour event hosted by > > > >>HP, > > > >>AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > > > >>___ > > > >>Wicket-user mailing list > > > >>Wicket-user@lists.sourceforge.net > > > >>https://lists.sourceforge.net/lists/listinfo/wicket-user > > > >> > > > >> > > > >> > > > > > > > >__ > > > >UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. > > > >http://www.uol.com.br/fone > > > > > > > > > > >
Re:[Wicket-user] Spring Integration
One possible way would be to have a parent page class that would hold it, and customize your page factory to set it in all created pages. It's pretty easy. Let me know if you can't picture it and I'll try to write a sample code. I use dependency injection in most of my pages and unfortunately, it doesn't look nearly as pretty as I wanted it to. Most Wicket examples favour service locator instead... I guess you might find yourself in the same boat. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 11 Jul 2005 11:16:47 -0500 Assunto: [Wicket-user] Spring Integration > Hi, > > I'm looking into Wicket and would like to know what the preferred > method of integrating Wicket with Spring. I'll need access to the > bean factory in the page classes. I checked the wiki and didn't see > anything. Thanks for the help. > > -Nick > > > --- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Adding feedback to a List Item
Hi folks, I'm still playing around with per-field feedback. I have an object that contains another list of objects (think a Company with a list of editable Contacts). In the Company page users can edit all the contacts if they want. Each field in contact (name, email, phone) has a corresponding feedback component associated. The fields from contact are being mapped correctly to and from the model. The feedback fields are not. Let me show the code. I used a CustomValidator to be sure an error message was being added (it is). --- This is the page: Contact Email: sample email error msg ... This is the corresponding form creation: final List contacts = providerModel.getContacts(); final ListView listView = new ListView("contacts", contacts) { public void populateItem(final ListItem listItem) { addContact(listItem, permissions); } }; add(listView); ... /* in the the addContact method */ final TextField field = new TextField("email", new PropertyModel(contact, "email")); field.add(new CustomValidator() { public void onValidate(String s) { logger.debug("Validate: " + s); if (s == null || s.length() == 0) { field.error("Email cannot be empty"); } } }); listItem.add(field); listItem.add(new DisplayOnError("emailFeedback", field)); - The DisplayOnError component is an extension of Label that is visible if there is no error in the managed component (passed in the constructor). The component works for the name of the company. The problem with using it for contacts is that sample email error msg is never visible, even when I set the error flag in the managed field. Is the behaviour different for feedback on managed subfields on a form? []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] database connections, connection pools, and wicket
Suggestion: use Spring's excellent JDBC framework. It's simple (only a handful of classes you need to learn) and very helpful. From what I saw at the JDBC 4.0 preview in JavaOne, it's got quite a bit in common with Spring. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Mon, 04 Jul 2005 20:10:47 +0200 Assunto: Re: [Wicket-user] database connections, connection pools, and wicket > There is no special support for that currently. I don't know whether > many users directly use JDBC at all. My guess is that most people will > use ORMs (JDO, Hibernate, Cyenne, iBatis etc) or EJBs, and that > connections will either be handled through those frameworks, or by using > JNDI datasources, so that they can be configured with your application > server. > > If you want to do it yourself, there are lots of pooling > implementations, like e.g. jakarta commons-dbcp (which you can use > directly). > > Eelco > > > Geertjan Wielenga wrote: > > > > > Does anyone have any experience with making database connections -- > > especially via connection pools -- with Wicket applications? Is there > > some special support for that? > > > > -- Gj > > > > > > --- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > ___ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > --- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content?
Worked beautifully! And it's much simpler than Borders. Thanks a lot. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Fri, 24 Jun 2005 11:17:11 -0700 Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content? > Check out the HEAD version from cvs. You can find some examples in the > wicket\src\test\wicket\markup dir. > > Igor > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel > Sent: Friday, June 24, 2005 11:21 AM > To: wicket-user > Subject: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > Hey, that's exactly what I was looking for! I'd like to try it. Where > can I find an example of what the Java code should look like? Is there a > daily binary snapshot? > > []s Gus > > > -- Início da mensagem original --- > > De: [EMAIL PROTECTED] > Para: wicket-user@lists.sourceforge.net > Cc: > Data: Fri, 24 Jun 2005 10:52:31 -0700 > Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > > Good point. > > I suppose this is the problem with borders in this situation, thats > > why these guys are working hard on markup inheritance. I am using it > > now and it seems to works fine, but its not recommended for prod use yet. > > > > Inheritance is like inverted borders. > > > > For example: > > > > BasePage.html > > > > .. > > > > > > DerivedPage.html (extends BasePage) > > > > ... page content > > .. > > > > In pages that extend your base page everything outside > > gets ignored so you keep previewability. > > > > > > Igor > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo > > Hexsel > > Sent: Friday, June 24, 2005 10:49 AM > > To: wicket-user > > Subject: RE: [Wicket-user] Should Borders isolate the surrounding data > > from the inner content? > > > > Can't use ... , as I'd have to > > include the whole page, even where the wicket namespace is > > defined. Either that or break the XML tree structure by closing tags > > when inner tags are still open. > > > > []s Gus > > > > > > -- Início da mensagem original --- > > > > De: [EMAIL PROTECTED] > > Para: wicket-user@lists.sourceforge.net > > Cc: > > Data: Fri, 24 Jun 2005 10:28:09 -0700 > > Assunto: RE: [Wicket-user] Should Borders isolate the surrounding > > data from the inner content? > > > > > Here is a quick and dirty walkthrough of how the border component > > > works with your example: > > > > > > 1) your page starts rendering: > > > http://wicket.sourceforge.net/";> > > > > > > > > > 2) wicket encounters and resolves it to > > > your border component > > > > > > 3) border renders > > > > > > 3.1) border ouputs its open tag > > > > > > > > > 3.2) border begins rendering its body by processing its template > > > (notice everything before and after > > > is ignored > > > Page Title > > > href="general.css" > > > type="text/css" /> > > > > > > > > > > > > 3.3) wicket encounters tag and renders border's body > > > from the page template ... a couple of > > > fields, tables to align ... > > > > > > > > > > > > 3.4) wicket finishes rendering the border ... closing the > > > tags ... > > > > > > > > > > > > > > > 3.5) border is done rendering, the close tag is rendered > > > > > > > > > 4) page continues its rendering after the border tag > > > > > > So if you do not want doulbe body tags do not include them in your > > > page template, or if you want to be able to preview stuff surround > > > them with ... > > > > > > Hope this helps, > > > Igor > > > > > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of > > > Gustavo Hexsel > > > Sent: Frida
RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content?
Hey, that's exactly what I was looking for! I'd like to try it. Where can I find an example of what the Java code should look like? Is there a daily binary snapshot? []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Fri, 24 Jun 2005 10:52:31 -0700 Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content? > Good point. > I suppose this is the problem with borders in this situation, thats why > these guys are working hard on markup inheritance. I am using it now and it > seems to works fine, but its not recommended for prod use yet. > > Inheritance is like inverted borders. > > For example: > > BasePage.html > > .. > > > DerivedPage.html (extends BasePage) > > ... page content > .. > > In pages that extend your base page everything outside gets > ignored so you keep previewability. > > > Igor > > > -----Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel > Sent: Friday, June 24, 2005 10:49 AM > To: wicket-user > Subject: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > Can't use ... , as I'd have to include the > whole page, even where the wicket namespace is defined. Either that > or break the XML tree structure by closing tags when inner tags are still > open. > > []s Gus > > > -- Início da mensagem original --- > > De: [EMAIL PROTECTED] > Para: wicket-user@lists.sourceforge.net > Cc: > Data: Fri, 24 Jun 2005 10:28:09 -0700 > Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > > Here is a quick and dirty walkthrough of how the border component > > works with your example: > > > > 1) your page starts rendering: > > http://wicket.sourceforge.net/";> > > > > > > 2) wicket encounters and resolves it to your > > border component > > > > 3) border renders > > > > 3.1) border ouputs its open tag > > > > > > 3.2) border begins rendering its body by processing its template > > (notice everything before and after > > is ignored > > Page Title > > > type="text/css" /> > > > > > > > > 3.3) wicket encounters tag and renders border's body > > from the page template ... a couple of > > fields, tables to align ... > > > > > > > > 3.4) wicket finishes rendering the border ... closing the > > tags ... > > > > > > > > > > 3.5) border is done rendering, the close tag is rendered > > > > > > 4) page continues its rendering after the border tag > > > > So if you do not want doulbe body tags do not include them in your > > page template, or if you want to be able to preview stuff surround > > them with ... > > > > Hope this helps, > > Igor > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo > > Hexsel > > Sent: Friday, June 24, 2005 10:17 AM > > To: wicket-user > > Subject: RE: [Wicket-user] Should Borders isolate the surrounding data > > from the inner content? > > > > No, I'm talking about the content around the border, for instance > > I'm getting 2 tags: > > > > > > > > PCD Login > > > wicket:id="urlContextAdder"/> > > > > > > > > As far as I understand the borders, the first should not be > > there, right? What I understood from borders was: the component you > > add will get replaced in your page. That's what the > wicket:id="border"> is there for... the content inside that span will > > be replaced inside the tag, right? Maybe I just > misunderstood it. > > > > But if it is so, how can I add a common to all my pages? I > > disagree with the reasons in the new How-to page for not including > > anything outside the tag. I think that most "web applications" > > (mostly functional, database driven web apps) should have a simple > > functional design, not full of JS or having different CSS files for > > each page. So having a way to mandate the CSS to be the same is > > useful for me. In case of dire need, there are ways of adding > > Javascript other than putti
RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content?
Can't use ... , as I'd have to include the whole page, even where the wicket namespace is defined. Either that or break the XML tree structure by closing tags when inner tags are still open. []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Fri, 24 Jun 2005 10:28:09 -0700 Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content? > Here is a quick and dirty walkthrough of how the border component works with > your example: > > 1) your page starts rendering: > http://wicket.sourceforge.net/";> > > > 2) wicket encounters and resolves it to your > border component > > 3) border renders > > 3.1) border ouputs its open tag > > > 3.2) border begins rendering its body by processing its template (notice > everything before and after is ignored > > Page Title >type="text/css" /> > > > > 3.3) wicket encounters tag and renders border's body from the > page template > > ... a couple of fields, tables to align ... > > > > 3.4) wicket finishes rendering the border > > ... closing the tags ... > > > > > 3.5) border is done rendering, the close tag is rendered > > > 4) page continues its rendering after the border tag > > > > So if you do not want doulbe body tags do not include them in your page > template, or if you want to be able to preview stuff surround them with > ... > > Hope this helps, > Igor > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel > Sent: Friday, June 24, 2005 10:17 AM > To: wicket-user > Subject: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > No, I'm talking about the content around the border, for instance I'm > getting 2 tags: > > > > PCD Login >wicket:id="urlContextAdder"/> > > > > As far as I understand the borders, the first should not be there, > right? What I understood from borders was: the component you add will get > replaced in your page. That's what the is there > for... the content inside that span will be replaced inside the > tag, right? Maybe I just misunderstood it. > > But if it is so, how can I add a common to all my pages? I > disagree with the reasons in the new How-to page for not including anything > outside the tag. I think that most "web applications" (mostly > functional, database driven web apps) should have a simple functional > design, not full of JS or having different CSS files for each page. So > having a way to mandate the CSS to be the same is useful for me. In case of > dire need, there are ways of adding Javascript other than putting it in the > . > > []s Gus > > > -- Início da mensagem original --- > > De: [EMAIL PROTECTED] > Para: wicket-user@lists.sourceforge.net > Cc: > Data: Thu, 23 Jun 2005 18:33:37 -0700 > Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from > the inner content? > > > Are you referring to the and > > type tags? If so, in your application class' > > constructor or init add this > > line: > > > > getSettings().seStripWicketTags( true ); > > > > It will tell wicket to strip wicket specific markup from the produced > html. > > By default this setting is off I think because it aids development. I > > think that will also strip wicket:id variables. > > > > Igor > > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo > > Hexsel > > Sent: Thursday, June 23, 2005 5:40 PM > > To: wicket-user > > Subject: [Wicket-user] Should Borders isolate the surrounding data > > from the inner content? > > > > Hmm. I'm still having some trouble with the borders. I'm trying to > > use borders to set the general layout, however the tags surrounding > > the inner content are also being added. Do I need to create panels? > > If I do, do I need to create 2 classes for each page (a page and a > > panel) that uses the border? > > > > --- > > This is my border: > > --- > > http://wicket.sourceforge.net/";> > > > > > > Page Title > > > type="text/css" /> > > > > > > ... tables, etc ... >
[Wicket-user] Wiggling out of feedback panel
Well, this one is more for the records than to bug you guys asking questions. I was trying to find a way to get out of the FeedbackPanel (I don't like the messages to be grouped, I don't like the messages to be ordered in a semi-random fashion - is it alphabetical? - , I don't like the fields not to have feedback where I want it, I don't like the layout, etc). I've tried the FeedbackXXXBorder, but that only printed a red * and I didn't find how to set a message, or use the one the validators produced. The solution I've used was to extends the Label component to display when there is an error: public class DisplayOnError extends Label { private final Component componentToCheckForError; public DisplayOnError(String s, Component componentToCheckForError) { super(s); this.componentToCheckForError = componentToCheckForError; } @Override protected void onBeginRequest() { if (componentToCheckForError.hasErrorMessage()) { setVisible(true); setModel(new Model(componentToCheckForError.getFeedbackMessage().getMessage())); } else { setVisible(false); } } } On my page's constructor: username = new TextField("username", new PropertyModel(login, "username")); add(username); add(new DisplayOnError("usernameFeedback", username)); I'm doing manual validation for now, but I suppose it would work with the validators. One possible reason to use manual validation is to preempt messages - let's assume, for instance, that having no username is an error so important that I don't want to display that the password is not the same in 2 fields, as the password fields get erased on submit anyway. I have on my page's onSubmit(): if (validate the retrieved model) { username.error("error blahblahblah with the username"); } In the HTML: Sample Username error message []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content?
No, I'm talking about the content around the border, for instance I'm getting 2 tags: PCD Login As far as I understand the borders, the first should not be there, right? What I understood from borders was: the component you add will get replaced in your page. That's what the is there for... the content inside that span will be replaced inside the tag, right? Maybe I just misunderstood it. But if it is so, how can I add a common to all my pages? I disagree with the reasons in the new How-to page for not including anything outside the tag. I think that most "web applications" (mostly functional, database driven web apps) should have a simple functional design, not full of JS or having different CSS files for each page. So having a way to mandate the CSS to be the same is useful for me. In case of dire need, there are ways of adding Javascript other than putting it in the . []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Thu, 23 Jun 2005 18:33:37 -0700 Assunto: RE: [Wicket-user] Should Borders isolate the surrounding data from the inner content? > Are you referring to the and > type tags? If so, in your application class' constructor or init add this > line: > > getSettings().seStripWicketTags( true ); > > It will tell wicket to strip wicket specific markup from the produced html. > By default this setting is off I think because it aids development. I think > that will also strip wicket:id variables. > > Igor > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel > Sent: Thursday, June 23, 2005 5:40 PM > To: wicket-user > Subject: [Wicket-user] Should Borders isolate the surrounding data from the > inner content? > > Hmm. I'm still having some trouble with the borders. I'm trying to use > borders to set the general layout, however the tags surrounding the inner > content are also being added. Do I need to create panels? If I do, do I > need to create 2 classes for each page (a page and a panel) that uses the > border? > > --- > This is my border: > --- > http://wicket.sourceforge.net/";> > > > Page Title > type="text/css" /> > > > ... tables, etc ... > > > > ... closing the tags ... > > > > -- > This is my page: > -- > http://wicket.sourceforge.net/";> > > > > ... a couple of fields, tables to align ... > > > > > > - > This is the result on the browser: > - > http://wicket.sourceforge.net/";> > > > > PCD Login > wicket:id="urlContextAdder"/> > > > ... whole bunch of stuff... > > > > > > > > For the sake of brevity, I've excluded all tables, including the one put > there by the boxborder. > > Thanks! > > []s Gus > > > > __ > UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. > http://www.uol.com.br/fone > > > > > --- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from > IBM. Find simple to follow Roadmaps, straightforward articles, informative > Webcasts and more! Get everything you need to get up to speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > --- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Should Borders isolate the surrounding data from the inner content?
Hmm. I'm still having some trouble with the borders. I'm trying to use borders to set the general layout, however the tags surrounding the inner content are also being added. Do I need to create panels? If I do, do I need to create 2 classes for each page (a page and a panel) that uses the border? --- This is my border: --- http://wicket.sourceforge.net/";> Page Title ... tables, etc ... ... closing the tags ... -- This is my page: -- http://wicket.sourceforge.net/";> ... a couple of fields, tables to align ... - This is the result on the browser: - http://wicket.sourceforge.net/";> PCD Login ... whole bunch of stuff... For the sake of brevity, I've excluded all tables, including the one put there by the boxborder. Thanks! []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
RE: [Wicket-user] Simple link replacement
Many thanks to the people of the list. I got both problems resolved: - the problem with the border not being added was (as I've found out latter) was my checkAccess() method returning false under certain situations. My fault, yet I still don't get why the page was being generated at all, much less without the border. - the simple link replacement was a REAAALLY easy component to build, based on Igor's basetag. If anyone wants to reuse it, alter, fix it, rename it, add to the distribution, feel free. I'm sure other people will have the same problem I did, coming from other frameworks. The javadoc needs some formatting... which I'm not sure how-to :) []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Thu, 23 Jun 2005 15:28:32 -0700 Assunto: RE: [Wicket-user] Simple link replacement > Gustavo, > > Im taking off for home so here is something quick that might help. You can > tweak the attribute modifier by overriding the newValue method and > prepending your path to whatever is alrady there instead of replacing it > completely. > > Hope it helps, > Igor > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gustavo Hexsel > Sent: Thursday, June 23, 2005 3:01 PM > To: wicket-user > Subject: [Wicket-user] Simple link replacement > > Thanks for the help with the border. I just couldn't find what I did > differently from the examples, something was obviously amiss - after a few > hours, I just threw it out and started from a straight copy of one of the > examples and changed a line or two at a time. Things are going well now, > except I couldn't find a way to generate relative URLs yet. I've looked at > all packages and tried to use ResourceLink and AutoLinkResolver, but none of > those seem to do what I want... > > How do you replace "absolute" URLs for resources like CSS's and images? > My border includes the tag to force everyone to use the standard CSS, > however I don't know how to produce > >type="text/css" /> > > Using the relative url (just "general.css") tries to fetch the value from > the root of the application server, which would prevent me from packaging > the app as a .WAR file. > > Any tips? > > []s Gus > > > PS.: sorry for posting question after question! I've been trying the > javadocs and examples, but some things are not answered there... > > > > __ > UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. > http://www.uol.com.br/fone > > > > > --- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from > IBM. Find simple to follow Roadmaps, straightforward articles, informative > Webcasts and more! Get everything you need to get up to speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick > ___ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Simple link replacement
Thanks for the help with the border. I just couldn't find what I did differently from the examples, something was obviously amiss - after a few hours, I just threw it out and started from a straight copy of one of the examples and changed a line or two at a time. Things are going well now, except I couldn't find a way to generate relative URLs yet. I've looked at all packages and tried to use ResourceLink and AutoLinkResolver, but none of those seem to do what I want... How do you replace "absolute" URLs for resources like CSS's and images? My border includes the tag to force everyone to use the standard CSS, however I don't know how to produce Using the relative url (just "general.css") tries to fetch the value from the root of the application server, which would prevent me from packaging the app as a .WAR file. Any tips? []s Gus PS.: sorry for posting question after question! I've been trying the javadocs and examples, but some things are not answered there... __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] How to find out which component is not being rendered correctly and why?
Hi gentlemen, how do I find out which component is not being rendered correctly? I've mostly copied and pasted from different parts of the examples, but I think I missed something and I've found that the messages are quite cryptical. At first there were a few problems with binding and OGNL, but I've solved that yet am still not able to find what's wrong. Here's the log, though I'd like to know more how to interpret the info than to be pointed to the root of this particular error: Unexpected RuntimeException wicket.WicketRuntimeException: The component(s) below failed to render: 1. [EMAIL PROTECTED] id = pageTitle, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.pageTitle.Label, isVisible = true, isVersioned = true], loginForm=[MarkupContainer [Component id = loginForm, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]], boxBorder=[MarkupContainer [Component id = boxBorder, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, isVisible = true, isVersioned = true]], [EMAIL PROTECTED] id = realName, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.menu.realName.Label, isVisible = false, isVersioned = true]},attributeModifiers=,flags=26,id=menu,model=,[EMAIL PROTECTED], feedback=[MarkupContainer [Component id = feedback, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.feedback.FeedbackPanel, isVisible = true, isVersioned = true]]},attributeModifiers=,flags=26,id=border,model=,[EMAIL PROTECTED],[EMAIL PROTECTED] Login Page,autoIndex=0,feedbackMessages=[feedbackMessages = []],pageMapName=,versionManager=,[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED],attributeModifiers=,flags=282,id=3,model=,parent=]] 2. [Component id = pageTitle, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.pageTitle.Label, isVisible = true, isVersioned = true] 3. [MarkupContainer [Component id = loginForm, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]] 4. [MarkupContainer [Component id = passwordFeedback, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.passwordFeedback.FormComponentFeedbackBorder, isVisible = true, isVersioned = true]] 5. [MarkupContainer [Component id = errorIndicator, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.passwordFeedback.errorIndicator.FormComponentFeedbackBorder$ErrorIndicator, isVisible = false, isVersioned = true]] 6. [MarkupContainer [Component id = username, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.passwordFeedback.username.TextField, isVisible = true, isVersioned = false]] 7. [MarkupContainer [Component id = usernameFeedback, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.usernameFeedback.FormComponentFeedbackBorder, isVisible = true, isVersioned = true]] 8. [MarkupContainer [Component id = errorIndicator, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.usernameFeedback.errorIndicator.FormComponentFeedbackBorder$ErrorIndicator, isVisible = false, isVersioned = true]] 9. [MarkupContainer [Component id = username, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.passwordFeedback.username.TextField, isVisible = true, isVersioned = false]] 10. [MarkupContainer [Component id = boxBorder, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, isVisible = true, isVersioned = true]] 11. [EMAIL PROTECTED] id = realName, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.menu.realName.Label, isVisible = false, isVersioned = true]},attributeModifiers=,flags=26,id=menu,model=,[EMAIL PROTECTED] id = pageTitle, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.pageTitle.Label, isVisible = true, isVersioned = true], loginForm=[MarkupContainer [Component id = loginForm, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.loginForm.LoginPage$LoginForm, isVisible = true, isVersioned = true]], boxBorder=[MarkupContainer [Component id = boxBorder, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.boxBorder.BoxBorder, isVisible = true, isVersioned = true]], [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED], feedback=[MarkupContainer [Component id = feedback, page = com.sagebrush.oberon.pcd.page.LoginPage, path = 3.border.feedback.FeedbackPanel, isVisible = true, isVersioned = true]]},attributeModifiers=,flags=26,id=border,model=,[EMAIL PROTECTED],[EMAIL PROTECTED] Login Page,autoIndex=0,feedbackMessages=[feedbackMessages = []],pageMapName=,versionManager=,[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED],attributeModifiers=,flags=282,id=3,model=,parent=]]] 12. [Component id = re
Re: [Wicket-user] Starting in Wicket
Yes, Spring MVC, I also like use some Spring components (though I don't like xml-based dep injection). 1) Borders and panel - yes, that seems to do what 2) ... well, I usually appreciate a webpage to AT LEAST put the problem fields on emphasis, messages on the bottom confuse me, specially if they have more than 5 or 6 fields. But I guess it's a matter of personal opinion. Still, anyone knows the answer for this one? 3) The base class works too. The only drawback is that it does not garantee that a novice programmer won't forget to extend that class and thus break security. Thanks for the answers, I think I can try it out now! []s Gus -- Início da mensagem original --- De: [EMAIL PROTECTED] Para: wicket-user@lists.sourceforge.net Cc: Data: Thu, 16 Jun 2005 15:12:48 -0700 Assunto: Re: [Wicket-user] Starting in Wicket > Well, first off, I assume you mean Spring MVC, since that would be the > only competitor with Wicket. And you're right, Spring MVC is nice, but > it's still a model 2 framework. It was just added to the project as a > kind of default web tier framework. I use Spring with Wicket for the > web tier; they are a great pair that way. > > 1. Check out the border and panel components. They do exactly what > you're looking for. The examples use them extensively. > > 2. This one I don't know about since I hate webpages that do that. If > there is a way to do this, I would like to know about it though. > > 3. Just extend a common Page class that does whatever you need in the > constructor. Alternatively, you could create a custom IPageFactory > implementation that would execute whatever code you wanted before a > page was created. Take a look at Page.checkAccess for your specific > requirement. It makes security a breeze. > > On 6/16/05, Gustavo Hexsel <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > I'm evaluating Wicket as a replacement for some of our web code. I've > > checked out Spring and found out that besides the learning curve being very > > high for anything but trivial tasks, it didn't save as much coding as I > > expected... > > > > So I've realized that some things that frameworks don't show you in > > tutorials are usually the hard ones. I've been trying to find out how to > > do some things in Wicket, but couldn't find anywhere in the docs or > > examples (I wonder if I looked in the right places) > > > > - what's the preferred way of nesting web pages? Like adding a default > > menu, a header, etc. Would you <@page import> it? > > - how do you provide per-field feedback? The feedback-panel component just > > accumulates all fields in a single component. > > - is there a way of forcing a filter before all pages (for instance, to > > check if a login is present in the session) without having to edit all > > pages? Or should I use a filter as in the Servlet API? > > > > Thanks a lot! > > > > []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Starting in Wicket
Hi folks, I'm evaluating Wicket as a replacement for some of our web code. I've checked out Spring and found out that besides the learning curve being very high for anything but trivial tasks, it didn't save as much coding as I expected... So I've realized that some things that frameworks don't show you in tutorials are usually the hard ones. I've been trying to find out how to do some things in Wicket, but couldn't find anywhere in the docs or examples (I wonder if I looked in the right places) - what's the preferred way of nesting web pages? Like adding a default menu, a header, etc. Would you <@page import> it? - how do you provide per-field feedback? The feedback-panel component just accumulates all fields in a single component. - is there a way of forcing a filter before all pages (for instance, to check if a login is present in the session) without having to edit all pages? Or should I use a filter as in the Servlet API? Thanks a lot! []s Gus __ UOL Fone: Fale com o Brasil e o Mundo com até 90% de economia. http://www.uol.com.br/fone --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user