[Wicket-user] FeedbackMessagesModel final
I want to override FeedbackMessagesModel.processMessages() to be able to add special messages. This seems to be one of its intended usages according to the javadoc. Regretfully FeedbackMessagesModel is final, so could this modifier please be removed? Thanks Sven --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Links to images and .css
In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-nameurl-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos, Rui Pacheco --- 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=kkid0709bid3057dat1642 http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642___ Wicket-user mailing list Wicket-user@lists.sourceforge.net mailto:
[Wicket-user] analysing url-pattern in web.xml
Wicket newbies tend to fall into the trap that Wicket requires the url-patter in web.xml to be something like url-pattern/helloworld/*/url-pattern. Important is the /* at the end. There is no easy mean for Wicket during initialization to make sure that this pre-requisite is realy met, is it? Juergen --- 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] FeedbackMessagesModel final
Done. Eelco On 4/28/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to override FeedbackMessagesModel.processMessages() to be able to add special messages. This seems to be one of its intended usages according to the javadoc. Regretfully FeedbackMessagesModel is final, so could this modifier please be removed? Thanks Sven --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user --- 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Links to images and .css
please make the servlet url mapping something like /app/*don't map the wicket servlet on the root.johanOn 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-nameurl-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos, Rui Pacheco --- 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=kkid0709bid3057dat1642
[Wicket-user] conditional component rendering
I searched the lists and found one other question about if/else component rendering. It didn't really provide any examples, only suggestions to use Visibility flagging or a component factory to get swappable panels within a border. Can I see an example of this component factory? What I had initially planned is a panel/border component that will take a component and render it. It would take an instance of an interface like this: public interface IAlternatable { public Component getAlternateComponent(); } and render only the component that is returned from the interface. I tried a few combinitions of visibility flagging/heirarchy modifications, but I can't modify the heirarchy in onBeforeRender() by Wicket design and visibility hacks screwed with my AJAX updates. Are there any examples of selecting which component to render at runtime in an generic way. Case scenarios I can think of that I would like to implement this with would be: A component that can display itself, or a No Items Selected panel based on it's selection model A tab panel or similar that can update it's body content based on the selected tab. I saw a tab panel in the examples, but the tabs where hard-coded panels (panel1, panel2, panel3, etc). I'm looking for a generic, clean method to do something similar... with AJAX too. Sorry if I missed something obvious... Aaron
Re: [Wicket-user] Links to images and .css
I tried this, but it brings me back to the problem of the webapp not loading. IE spins for hours and my index page is not called. The only way for me to do this is to set the redirect on an index.html to / and set the servlet mapping to /*. Maybe some configuration issue I'm missing?On 4/28/06, Johan Compagner [EMAIL PROTECTED] wrote: please make the servlet url mapping something like /app/* don't map the wicket servlet on the root.johan On 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-nameurl-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos, Rui Pacheco --- Using Tomcat but need to do more? Need to
Re: [Wicket-user] Links to images and .css
no look at the quickstart projects or other examplesdefine the mapping as /app/*and do have in the root of youre application an index.html that does meta data refresh to /appjohan On 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: I tried this, but it brings me back to the problem of the webapp not loading. IE spins for hours and my index page is not called. The only way for me to do this is to set the redirect on an index.html to / and set the servlet mapping to /*. Maybe some configuration issue I'm missing?On 4/28/06, Johan Compagner [EMAIL PROTECTED] wrote: please make the servlet url mapping something like /app/* don't map the wicket servlet on the root.johan On 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-nameurl-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application?
Re: [Wicket-user] analysing url-pattern in web.xml
yeah we should check that if possible and then throw a big warning or even an error.also give at least a warning when it is /* (so root) But this all could be fixed when we use a filter in 2.0johan On 4/28/06, Juergen Donnerstag [EMAIL PROTECTED] wrote: Wicket newbies tend to fall into the trap that Wicket requires theurl-patter in web.xml to be something likeurl-pattern/helloworld/*/url-pattern. Important is the /* at theend. There is no easy mean for Wicket during initialization to make sure that this pre-requisite is realy met, is it?Juergen---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 Geronimohttp://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] how to request.getRemoteAddress() in wicket?
There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
[Wicket-user] AjaxSubmitButton causing ClassCastException
I just tried migrating from beta3 to rc2 and now I am getting a ClassCastException from my AjaxSubmitButton subclass. I tried creating a very simple test page to make sure it wasn't something I was doing in my subclass, but I still get the same error: 10:30:22.468 ERROR! [SocketListener0-1] wicket.RequestCycle.step(RequestCycle.java:993) 19 com.varis.smarttag.pages.TestPage$1java.lang.ClassCastException: com.varis.smarttag.pages.TestPage$1 at wicket.ajax.form.AjaxFormSubmitBehavior.getEventHandler(AjaxFormSubmitBehavior.java:70) at wicket.ajax.markup.html.form.AjaxSubmitButton$1.getEventHandler(AjaxSubmitButton.java:64) at wicket.ajax.AjaxEventBehavior.onComponentTag (AjaxEventBehavior.java:106) at wicket.behavior.AbstractAjaxBehavior.onComponentTag(AbstractAjaxBehavior.java:152) at wicket.Component.renderComponentTag(Component.java:2644) at wicket.Component.renderComponent (Component.java:1654) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.markup.html.form.Form.onComponentTagBody(Form.java :661) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.markup.html.form.Form.onRender(Form.java:732) at wicket.Component.render (Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody (MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.Component.render(Component.java:1473) at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) at wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1351) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.Component.render(Component.java :1473) at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) at wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73) at wicket.MarkupContainer.renderNext(MarkupContainer.java :1351) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java :1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderAll (MarkupContainer.java:934) at wicket.Page.onRender(Page.java:863) at wicket.Component.render(Component.java:1507) at wicket.Page.renderPage(Page.java:407) at wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:224) at wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java :66) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:852) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:879) at wicket.RequestCycle.step(RequestCycle.java:960) at wicket.RequestCycle.steps(RequestCycle.java:1034) at wicket.RequestCycle.request(RequestCycle.java:453) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:215) at javax.servlet.http.HttpServlet.service (HttpServlet.java:596) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch (WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle (WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java :816) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java :244) at
Re: [Wicket-user] conditional component rendering
look at the way TabbedPanel works. it gets a list of any number of panels and then swaps them so the right panel i shown for the selected tab.as far as your interface goes you can do something like this:String componentId=altcomp; Component c=getAlternateComponent(componentId);if (c!=null) { add(c);} else { add(new WebMarkupContainer(altcomp).setVisible(false));}and in markupspan wicket:id=altcompalternative component/span since the markup is fixed you should change the interface to return a panel because not all components can be attached to a span tag. public interface IAlternatable { public Panel getAlternateComponent(String componentId); }this should get you started-Igor On 4/28/06, Aaron Hiniker [EMAIL PROTECTED] wrote: I searched the lists and found one other question about if/else component rendering. It didn't really provide any examples, only suggestions to use Visibility flagging or a component factory to get swappable panels within a border. Can I see an example of this component factory? What I had initially planned is a panel/border component that will take a component and render it. It would take an instance of an interface like this: public interface IAlternatable { public Component getAlternateComponent(); } and render only the component that is returned from the interface. I tried a few combinitions of visibility flagging/heirarchy modifications, but I can't modify the heirarchy in onBeforeRender() by Wicket design and visibility hacks screwed with my AJAX updates. Are there any examples of selecting which component to render at runtime in an generic way. Case scenarios I can think of that I would like to implement this with would be: A component that can display itself, or a No Items Selected panel based on it's selection model A tab panel or similar that can update it's body content based on the selected tab. I saw a tab panel in the examples, but the tabs where hard-coded panels (panel1, panel2, panel3, etc). I'm looking for a generic, clean method to do something similar... with AJAX too. Sorry if I missed something obvious... Aaron
Re: [Wicket-user] Links to images and .css
so wait, in your markup you have img src="" but in the browser output you have img src="" ???-IgorOn 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-name url-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos, Rui Pacheco --- 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=kkid0709bid3057dat1642
Re: [Wicket-user] AjaxSubmitButton causing ClassCastException
you are not missing anything. it was a bug in rc2. it is fixed in trunk.-IgorOn 4/28/06, Steve Knight [EMAIL PROTECTED] wrote:I just tried migrating from beta3 to rc2 and now I am getting a ClassCastException from my AjaxSubmitButton subclass. I tried creating a very simple test page to make sure it wasn't something I was doing in my subclass, but I still get the same error: 10:30:22.468 ERROR! [SocketListener0-1] wicket.RequestCycle.step(RequestCycle.java:993) 19 com.varis.smarttag.pages.TestPage$1java.lang.ClassCastException: com.varis.smarttag.pages.TestPage$1 at wicket.ajax.form.AjaxFormSubmitBehavior.getEventHandler(AjaxFormSubmitBehavior.java:70) at wicket.ajax.markup.html.form.AjaxSubmitButton$1.getEventHandler(AjaxSubmitButton.java:64) at wicket.ajax.AjaxEventBehavior.onComponentTag (AjaxEventBehavior.java:106) at wicket.behavior.AbstractAjaxBehavior.onComponentTag(AbstractAjaxBehavior.java:152) at wicket.Component.renderComponentTag(Component.java:2644) at wicket.Component.renderComponent (Component.java:1654) at wicket.markup.html.WebComponent.onRender(WebComponent.java:61) at wicket.Component.render(Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.markup.html.form.Form.onComponentTagBody(Form.java :661) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.markup.html.form.Form.onRender(Form.java:732) at wicket.Component.render (Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody (MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.Component.render(Component.java:1473) at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) at wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1351) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java:1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.Component.render(Component.java :1473) at wicket.MarkupContainer.autoAdd(MarkupContainer.java:196) at wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73) at wicket.MarkupContainer.renderNext( MarkupContainer.java :1351) at wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:972) at wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:907) at wicket.Component.renderComponent(Component.java :1662) at wicket.MarkupContainer.onRender(MarkupContainer.java:917) at wicket.Component.render(Component.java:1507) at wicket.MarkupContainer.renderNext(MarkupContainer.java:1324) at wicket.MarkupContainer.renderAll (MarkupContainer.java:934) at wicket.Page.onRender(Page.java:863) at wicket.Component.render(Component.java:1507) at wicket.Page.renderPage(Page.java:407) at wicket.request.target.component.BookmarkablePageRequestTarget.respond (BookmarkablePageRequestTarget.java:224) at wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond( AbstractCompoundRequestCycleProcessor.java :66) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:852) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:879) at wicket.RequestCycle.step(RequestCycle.java:960) at wicket.RequestCycle.steps(RequestCycle.java:1034) at wicket.RequestCycle.request(RequestCycle.java:453) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:215) at javax.servlet.http.HttpServlet.service (HttpServlet.java:596) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch (WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle (WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java :816) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982) at
Re: [Wicket-user] how to request.getRemoteAddress() in wicket?
well in this case it is okso do ((WebRequest)getRequest()).getHttpServletRequest()..-IgorOn 4/28/06, nato [EMAIL PROTECTED] wrote:There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
Re: [Wicket-user] Links to images and .css
In the markup I have img src="" and in the rendered I have img src="" href="http://myhost/mysite/images/foo.gif">http://myhost/mysite/images/foo.gif/ The path appears to be correct, but even if I call the image directly from the browser it won't show, so I guess its something else and not an Wicket error.On 4/28/06, Igor Vaynberg [EMAIL PROTECTED] wrote: so wait, in your markup you have img src="" but in the browser output you have img src="" ??? -IgorOn 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-name url-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos, Rui Pacheco --- Using Tomcat but need to do
Re: [Wicket-user] how to request.getRemoteAddress() in wicket?
you have to use the WebRequest yes. So you need to cast something.Maybe this is something we can put into ClientInfo Object (but then you still need to cast i believe)johan On 4/28/06, nato [EMAIL PROTECTED] wrote: There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
Re: [Wicket-user] Links to images and .css
yep, i dont see how wicket is at fault here.-IgorOn 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote:In the markup I have img src="" and in the rendered I have img src="" href="http://myhost/mysite/images/foo.gif" target="_blank" >http://myhost/mysite/images/foo.gif/ The path appears to be correct, but even if I call the image directly from the browser it won't show, so I guess its something else and not an Wicket error. On 4/28/06, Igor Vaynberg [EMAIL PROTECTED] wrote: so wait, in your markup you have img src="" but in the browser output you have img src="" ??? -IgorOn 4/28/06, Rui Pacheco [EMAIL PROTECTED] wrote: In the browser I just get the empty placeholder. The context for the application is /. The servlet mapping is servlet-nameUniversal/servlet-name url-pattern/*/url-pattern On my logs I can see the following error:WARNING: the resource requested by request [method = GET, protocol = HTTP/1.1, requestURL = http://websrv02:8080/universal-agc/imagens/logo_universal.gif , contentType = null, contentLength = -1, contextPath = /universal-agc, pathInfo = /imagens/logo_universal.gif, requestURI = /universal-agc/imagens/logo_universal.gif, servletPath = , pathTranslated = /opt/tomcat/webapps/universal-agc/imagens/logo_universal.gif] was not found The pathTranslated is correct, the images are physically there, but the webapp doesn't see them. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:okso you have something like img href="" in the markup of the pagewhat ends up in your browser? what context name is the app running under? waht is your servlet mapping? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] wrote: I know you're dealing with more important things right now, but I could use a hand here.I have my images and css's at the same level as web-inf. My html is next to the classes under web-inf/classes. How do I make my html see my images and my css's? On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Ok.On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: this is not entirely true. sharead resource urls are essentially bookmarkable...so that might be a problem. if we are going to do this in 1.2 we should probably poll the users first. -IgorOn 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote: i dont see how unless a filter, security or something was mapped onto that path-Igor On 4/27/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Would it break any clients if we would do that now? Eelco On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] wrote:call it /wicket-resources instead of /resources or some such -Igor On 4/27/06, cowwoc [EMAIL PROTECTED] wrote: What does it mean to namespace it in the context of Wicket? Gili Igor Vaynberg wrote: there is already a plan to namespace that directory for v2, or so ithought. -IgorOn 4/27/06, *cowwoc* [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Personally, I dislike how Wicket prevents the use of reserved paths such as /resources. There should be a better way, somehow. Why not let users bind whatever resources they want to /resources and if Wicket (or another user-call) tries binding to that same path you throw an exception? It would be up to the user to ensure he doesn't produce conflicts (which I think are extremely rare in the firstplace). Anyway, just food for thought. Gili Eelco Hillenius wrote: I'm afraid /resources/ is a reserved path with Wicket. I guessit's not the best name we choose, as it's kind of an obvious path touse for people. Maybe we should use another path, like '/wicket-shared-resources/'or something. Eelco On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: My problem is, the images and css files can't be found by the html pages. I am calling them as if I was using a static page: link href="" rel=stylesheet type=text/css Images follow a similar pattern. On 4/27/06, Igor Vaynberg [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: how are you referring to those files inside your css? -Igor On 4/27/06, Rui Pacheco [EMAIL PROTECTED] mailto: [EMAIL PROTECTED] wrote: Hi all. My application, as with all applications, uses stylesheets and images. Those files are stored under $TOMCAT_HOME/webapps/my_app/resources, but whenI launch my wicket application I see an error on my logs saying that the file can't be found, even though I can see it on the filesystem. How can I make my files appear on the application? -- Cumprimentos, Rui Pacheco -- Cumprimentos,
Re: [Wicket-user] Image upload
What is this going to do to speed/scalability? This is for a shopping cart and these images will be what the users see on the first (and busiest) page of the app. On 4/27/06, Johan Compagner [EMAIL PROTECTED] wrote: WebDynamicResource is new in the latest 1.2 releases just a rename of DynamicByteArrayResource just make a ResourceState (inner class of DynamicByteArrayResource) and in getDate() you lazy load youre byte array from somewhere johan On 4/27/06, Vincent Jenks [EMAIL PROTECTED] wrote: I definitely don't want to use blobs Where can I find an example of doing what I need using WebDynamicResource? I don't even see this class listed in the 1.2 Javadoc... Where do I start? Thanks! On 4/21/06, Eelco Hillenius [EMAIL PROTECTED] wrote: wicket-contrib-examples of wicket-stuff has the cdapp example that does this. It uses hibernate and stores uploaded images in the database as a blob. Eelco On 4/21/06, Steve Knight [EMAIL PROTECTED] wrote: I am creating a form that will allow users to upload image files that will be displayed on other pages. How should I go about uploading the images so that they can be used in Wicket Image components on the other pages? The upload part is not problem, I just don't know where I should put them. On my view pages, I am using ThumbnailImageResource which takes a WebResource in it's contructor to find the image. Where should I save the images to make this work? Thanks. Steve --- 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?cmdlnkkid0709bid3057dat1642 ___ 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?cmdlnkkid0709bid3057dat1642 ___ 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Image upload
not much. if you used struts you would build it the same way.-IgorOn 4/28/06, Vincent Jenks [EMAIL PROTECTED] wrote:What is this going to do to speed/scalability?This is for a shopping cart and these images will be what the users see on the first (andbusiest) page of the app.On 4/27/06, Johan Compagner [EMAIL PROTECTED] wrote: WebDynamicResource is new in the latest 1.2 releases just a rename of DynamicByteArrayResource just make a ResourceState (inner class of DynamicByteArrayResource) and in getDate() you lazy load youre byte array from somewhere johan On 4/27/06, Vincent Jenks [EMAIL PROTECTED] wrote: I definitely don't want to use blobs Where can I find an example of doing what I need using WebDynamicResource?I don't even see this class listed in the 1.2 Javadoc... Where do I start? Thanks! On 4/21/06, Eelco Hillenius [EMAIL PROTECTED] wrote: wicket-contrib-examples of wicket-stuff has the cdapp example that does this. It uses hibernate and stores uploaded images in the database as a blob. EelcoOn 4/21/06, Steve Knight [EMAIL PROTECTED] wrote: I am creating a form that will allow users to upload image files that will be displayed on other pages.How should I go about uploading the images so that they can be used in Wicket Image components on the other pages? The upload part is not problem, I just don't know where I should put them. On my view pages, I am using ThumbnailImageResource which takes a WebResource in it's contructor to find the image.Where should I save the images to make this work? Thanks. Steve --- 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?cmdlnkkid0709bid3057dat1642 ___ 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?cmdlnkkid0709bid3057dat1642 ___ 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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Re: how to request.getRemoteAddress() in wicket?
does anyone want to answer? is there a wicket way to get the ip address of the client like the ServletRequest.getRemoteAddr() ? On 4/28/06, nato [EMAIL PROTECTED] wrote: There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
Re: [Wicket-user] Re: how to request.getRemoteAddress() in wicket?
Igor already answered:((WebRequest)getRequest()).getHttpServletRequest().getRemoteAddr()On 4/28/06, nato [EMAIL PROTECTED] wrote:does anyone want to answer? is there a wicket way to get the ip address of the client like the ServletRequest.getRemoteAddr() ? On 4/28/06, nato [EMAIL PROTECTED] wrote: There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
[Wicket-user] Re: how to request.getRemoteAddress() in wicket?
thanks guys!On 4/28/06, nato [EMAIL PROTECTED] wrote: does anyone want to answer? is there a wicket way to get the ip address of the client like the ServletRequest.getRemoteAddr () ? On 4/28/06, nato [EMAIL PROTECTED] wrote: There is no example about this in the Wicket Examples. The only thing I found is the Javadoc of WebRequest.getHttpServletRequest() that says this warning: WARNING: it is a bad idea to depend on the http servlet request directly. Please use the classes and methods that are exposed by Wicket (such as Session instead. Send an email to the mailing list in case it is not clear how to do things or you think you miss funcionality which causes you to depend on this directly.
[Wicket-user] drop down
I have a dropdown for my page and I want to display a form only if the drop down is selected. How can I do that with wicket?__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Wicket-user] drop down
what do you mean you want to display a form only if the dropdown is selected? is the dropdown itself not in the form?-IgorOn 4/28/06, Aditya Patel [EMAIL PROTECTED] wrote: I have a dropdown for my page and I want to display a form only if the drop down is selected. How can I do that with wicket?__ Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Wicket-user] drop down
Do you mean you want the form to be hidden until a selection is made on your drop down list or something along those lines?On 4/28/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what do you mean you want to display a form only if the dropdown is selected? is the dropdown itself not in the form?-Igor On 4/28/06, Aditya Patel [EMAIL PROTECTED] wrote: I have a dropdown for my page and I want to display a form only if the drop down is selected. How can I do that with wicket?__ Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: [Wicket-user] drop down
If I guessed right as to what you are asking... Basically, when your drop down has a value, you want to 'un-hide' another part of the page. In your case a form. The most conventional way I know of is to override the 'isVisible' method for the component you want to hide unhide. In the code snippets I included below, I am toggling a section of the entire page. For the drop down: final ListChoice properties = new ListChoice(property, dao.listAll(Property.class)); For the 'div' tag around the rest of the page (I wanted to hide more than just a form): WebMarkupContainer locationArea = new WebMarkupContainer(locationArea) { public boolean isVisible() { return model.getProperty() != null; } }; Does that help you? - Jason B. PS: You could also have a listener on the ListChoice that calls locaitonArea.setVisible(true/false)... or probably many many other ways to accomplish the same thing. Aditya Patel wrote: I have a dropdown for my page and I want to display a form only if the drop down is selected. How can I do that with wicket? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] Re: drop down
The drop down is in the form and the rest of the page is in another form. That form should be hidden until a selection is made on the drop down list. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] mark required fields and labels
Hi I am writing a simple web application and I'd like to - mark the label of required fields (ie. a star before the text) - change the style of the _label_ that belongs to invalid fields I've found a blog entry about how to change a component's style after validation but I don't know how to get its HTML label. Is there any relationship between these Java objects at runtime? Do you know a solution or best practise? Thanks, -- Jozsef Borcsok --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] stalls after expired page
Hi, I have a form on a bookmarkable page. I loaded it in two tabs, then submitted both, which caused the second one to show an expired page error. When I click back and try to submit again, the connection stalls. Any idea what is causing this? I'm using Resin. Michael Day --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Re: drop down
final Form otherform=otherform.setVisible(false);DropDownChoice ddc=new DropDownChoice() { void wantOnSelectionChangedNotifications() { return true; } onSelectionChanged() { boolean showOtherForm=...some condition; otherform.setVisible(showOtherForm); }}-IgorOn 4/28/06, Adit [EMAIL PROTECTED] wrote:The drop down is in the form and the rest of the page is in another form. That form should be hidden until a selection is made on the drop down list.---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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] multi-window support and deadlocks
Hi, There is an issue when automatic multi-window support is turned off. I have a form on a bookmarkable page. I loaded it in two tabs, then submitted both. This caused the second one to show an expired page error. When I click back and try to submit again, the connection stalls. Michael Day --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] mark required fields and labels
here is a quickyclass MyCoolLabel extends SimpleFormComponentLabel) { public MyCoolLabel(String id, FormComponent fc) { super(id, fc); //attribute modifier to add the error css class add(new SimpleAttributeModifier(class, error) { boolean isEnabled() { //only enable if the attached formcomponent is invalid return !fc.isValid(); } } //this is not the cleanest way to do this, it would be better to use true component composition and make this label a panel instead, but i dont want to write all that out - excercise left to the reader onAfterRender() { getResponse().write(span class='required'*/span); }}then the usage should be something like this:TextField tf=new TextField(tf).setRequired(true); add(tf);add(new MyCoolLabel(label, tf));label wicket:id=labellabel/labelinput type=text wicket:id=tf/hope this gets you started -Igor On 4/28/06, Börcsök József [EMAIL PROTECTED] wrote: HiI am writing a simple web application and I'd like to - mark the label of required fields (ie. a star before the text) - change the style of the _label_ that belongs to invalid fieldsI've found a blog entry about how to change a component's style after validation but I don't know how to get its HTML label. Is there anyrelationship between these Java objects at runtime?Do you know a solution or best practise?Thanks,--Jozsef Borcsok ---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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] stalls after expired page
i already entered a bug report for this-IgorOn 4/28/06, Michael Day [EMAIL PROTECTED] wrote:Hi,I have a form on a bookmarkable page.I loaded it in two tabs, then submitted both, which caused the second one to show an expired pageerror.When I click back and try to submit again, the connectionstalls.Any idea what is causing this?I'm using Resin.Michael Day ---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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] multi-window support and deadlocks
i already entered a bug report for this -Igor On 4/28/06, Michael Day [EMAIL PROTECTED] wrote: Hi,There is an issue when automatic multi-window support is turned off.I have a form on a bookmarkable page.I loaded it in two tabs, thensubmitted both.This caused the second one to show an expired page error.When I click back and try to submit again, the connectionstalls.Michael Day---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 easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] RadioGroup questions and possible markupid bug
I have a couple of questions regarding RadioGroup. I have the following code: --- span wicket:id=response input wicket:id=radio1 type=radio / label wicket:id=label1 class=radioChoice 1/label input wicket:id=radio2 type=radio / label wicket:id=label2 class=radioChoice 2/label /span --- RadioGroup group = new RadioGroup(response, new PropertyModel (q, response)); add(group); Radio radio1 = new Radio(radio1, new PropertyModel(q, response)); radio1.setOutputMarkupId(true); group.add(radio1); Label label1 = new Label(label1, I AGREE); label1.add(new SimpleAttributeModifier(for, radio1.getMarkupId())); group.add(label1); Radio radio2 = new Radio(radio2, new PropertyModel(q, response)); radio2.setOutputMarkupId(true); group.add(radio2); Label label2 = new Label(label2, I DISAGREE); label2.add(new SimpleAttributeModifier(for, radio2.getMarkupId())); group.add(label2); --- First, is my use of PropertyModel correct? Why do I need to specify it for RadioGroup *and* each Radio? I think I should be able to specify it for the RadioGroup only, but then I think wicket tries to call q.getResponse().setRadio1() and q.getResponse().setRadio2() instead of q.setResponse(). Second, getMarkupId() is not returning the correct value. Note that the for attribute is not correct in the following output: --- input value=0:form:questions:0:question:response:radio1 type=radio wicket:id=radio1 checked=checked name=questions: 0:question:response id=order- form_questions_0_question_response_radio1/ label wicket:id=label1 class=radio for=response_radio1I AGREE/label input value=0:form:questions:0:question:response:radio2 type=radio wicket:id=radio2 checked=checked name=questions: 0:question:response id=order- form_questions_0_question_response_radio2/ label wicket:id=label2 class=radio for=response_radio2I DISAGREE/label --- Is this a bug or an error on my part? --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] mark required fields and labels
Thanks, it works. 2006. 04. 28, péntek keltezéssel 16.32-kor Igor Vaynberg ezt írta: here is a quicky class MyCoolLabel extends SimpleFormComponentLabel) { public MyCoolLabel(String id, FormComponent fc) { super(id, fc); //attribute modifier to add the error css class add(new SimpleAttributeModifier(class, error) { boolean isEnabled() { //only enable if the attached formcomponent is invalid return !fc.isValid(); } } //this is not the cleanest way to do this, it would be better to use true component composition and make this label a panel instead, but i dont want to write all that out - excercise left to the reader onAfterRender() { getResponse().write(span class='required'*/span); } } then the usage should be something like this: TextField tf=new TextField(tf).setRequired(true); add(tf); add(new MyCoolLabel(label, tf)); label wicket:id=labellabel/labelinput type=text wicket:id=tf/ hope this gets you started -Igor --- 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=lnkkid0709bid3057dat1642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] conditional component rendering
Thanks for the input, I have a couple of quick questions for you regarding this implementation: wicket:panel span wicket:id=currentCurrent Component/span /wicket:panel public class AlternatablePanel extends UserPanel { private static Log log = LogFactory.getLog(AlternatablePanel.class); IAlternatable alternatable; public static final String COMPONENT_ID = current; public AlternatablePanel(String string, IAlternatable alternatable ) { super(string); this.alternatable = alternatable; add( alternatable.getAlternateComponent( COMPONENT_ID ) ); } @Override protected void onBeforeRender() { replace( alternatable.getAlternateComponent( COMPONENT_ID ) ); super.onBeforeRender(); } } That is my initial attempt Panel that will try to render based on the the component returned from the IAlternatable interface: public interface IAlternatable { public Panel getAlternateComponent( String id ); } The problem I'm running into is that because I must pass the id through the interface, I must also construct the components from the interface method? Here's what I have right now: add( seriesEditor = new AlternatablePanel( series.editor, new IAlternatable() { public Panel getAlternateComponent(String id) { if ( blockEditor.getSelectedItem() != null ) { return new SeriesEditPanel( id, new PropertyModel( blockEditor, selectedItem.item ), new PropertyModel( streetEditor, items), EditAddressesPanel.this ); } else { return new EmptyPanel( id, You must select a block on the left ); } } }) ); The reason for this is I need the id upon creation of the sub-panels. I can't specify them from the parent. Now I either have to concrete the IAlternatable with specific accessors for my sub-panels, or.. what I'd *like* to do is implement the interface directly: public Panel getAlternateComponent() { if ( items.size() == 0 ) return EmptyPanel( this.getMarkupId(), There are no items to display ); else return this; } But the problem here is the markupID. How can I get the proper markupID to the component at *construction* time, so that I don't have to construct the object from the interface method (it's actually not possible for me to do since I have a set of 4-5 dependant panels who's models are dependant on each other). What I'm looking to avoid is circumstances where I need to spend 10-15 lines of code to wire up an anonymous class to handle component-swapping while keeping each component accessible to the outside world (if that makes any sense). Aaron On Fri, 2006-04-28 at 08:07 -0700, Igor Vaynberg wrote: look at the way TabbedPanel works. it gets a list of any number of panels and then swaps them so the right panel i shown for the selected tab. as far as your interface goes you can do something like this: String componentId=altcomp; Component c=getAlternateComponent(componentId); if (c!=null) { add(c); } else { add(new WebMarkupContainer(altcomp).setVisible(false)); } and in markup span wicket:id=altcompalternative component/span since the markup is fixed you should change the interface to return a panel because not all components can be attached to a span tag. public interface IAlternatable { public Panel getAlternateComponent(String componentId); } this should get you started -Igor On 4/28/06, Aaron Hiniker [EMAIL PROTECTED] wrote: I searched the lists and found one other question about if/else component rendering. It didn't really provide any examples, only suggestions to use Visibility flagging or a component factory to get swappable panels within a border. Can I see an example of this component factory? What I had initially planned is a panel/border component that will take a component and render it. It would take an instance of an interface like this: public interface IAlternatable { public Component getAlternateComponent(); } and render only the component that is returned from the interface. I tried a few combinitions of visibility flagging/heirarchy modifications, but I can't modify the heirarchy in onBeforeRender() by Wicket design and visibility hacks screwed with my AJAX updates. Are there any examples of selecting which component to render at runtime in an generic way. Case scenarios I can think of that I would like to implement this with would be: A component that can display itself, or a No Items Selected panel based on it's selection model A tab panel or similar that can update it's body content based on the selected tab. I saw a tab panel in the examples, but the tabs where hard-coded panels (panel1, panel2, panel3, etc). I'm looking for a generic, clean method to do something similar... with AJAX too. Sorry if I missed something obvious... Aaron
Re: [Wicket-user] RadioGroup questions and possible markupid bug
First:Read the javadoc again:* The model object of the gorup is set to the model object of* the selected radio component or null if none selected.So the RadioGroup's model is the correct property model. What is incorrect is the model you set on the Radio components. The Radio component's model object is what will be put into the RadioGroup's model. Does that make sense? Second:I think the markupid is incorrect because you are in constructor of some component and the full path is not yet available. You need to defer the call to getMarkupId() until render time because then the component hierarchy is complete. This should be fixed in 1.3 refactor.For now try this:label2.add(new AttributeModifier(for, true, new AbstractRadOnlyModel() { Object getObject(Component c) { return radio2.getMarkupId(); }}));-Igor On 4/28/06, Michael Day [EMAIL PROTECTED] wrote: I have a couple of questions regarding RadioGroup.I have the following code:--- span wicket:id=response input wicket:id=radio1 type=radio / label wicket:id=label1 class=radioChoice 1/label input wicket:id=radio2 type=radio / label wicket:id=label2 class=radioChoice 2/label /span--- RadioGroup group = new RadioGroup(response, new PropertyModel(q, response)); add(group); Radio radio1 = new Radio(radio1, new PropertyModel(q,response)); radio1.setOutputMarkupId(true); group.add(radio1); Label label1 = new Label(label1, I AGREE); label1.add(new SimpleAttributeModifier(for,radio1.getMarkupId())); group.add(label1); Radio radio2 = new Radio(radio2, new PropertyModel(q,response)); radio2.setOutputMarkupId(true); group.add(radio2); Label label2 = new Label(label2, I DISAGREE); label2.add(new SimpleAttributeModifier(for, radio2.getMarkupId())); group.add(label2);---First, is my use of PropertyModel correct?Why do I need to specifyit for RadioGroup *and* each Radio?I think I should be able to specify it for the RadioGroup only, but then I think wicket tries tocall q.getResponse().setRadio1() and q.getResponse().setRadio2()instead of q.setResponse().Second, getMarkupId() is not returning the correct value.Note that the for attribute is not correct in the following output:---input value=0:form:questions:0:question:response:radio1 type=radio wicket:id=radio1 checked=checked name=questions:0:question:response id=order-form_questions_0_question_response_radio1/label wicket:id=label1 class=radio for="" AGREE/labelinput value=0:form:questions:0:question:response:radio2type=radio wicket:id=radio2 checked=checked name=questions:0:question:response id=order- form_questions_0_question_response_radio2/label wicket:id=label2 class=radio for="">DISAGREE/label--- Is this a bug or an error on my part?---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 Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] conditional component rendering
you lost me.But the problem here is the markupID. How can I get the proper markupID to the component at *construction* time, so that I don't have to construct the object from the interface method (it's actually not possible for me to do since I have a set of 4-5 dependant panels who's models are dependant on each other). but you have the markup id. every component has it passed in to its constructor. What I'm looking to avoid is circumstances where I need to spend 10-15 lines of code to wire up an anonymous class to handle component-swapping while keeping each component accessible to the outside world (if that makes any sense). this makes no sense. you want to have two components, only one of them in the component hierarchy and the other one floating somewhere? this doesnt work. components have to be in the hierarchy where they belong. furthermore in wicket1.3 you will not be able to have a component outside of hierarchy because instead of add() you will pass in the parent into constructor.the interface that takes the id in acts as a factory.i guess you can try and better describe the usecase, maybe give a few specific examples because i am totally lost. A component that can display itself, or a No Items Selected panel based on it's selection model Looking at this doesnt really make sense. You are adding a specific component and then all of a sudden that component replaces itself with another one but yet somehow stays connected to the hierachy AND there is only placeholder for one component in the markup? this doesnt work. either the component replaces itself with another and is then out, or you have two placeholders in your markup, add both components all the time, hide one and show the other. another idea you might want to try is a border. the border can have inside it the alternate component, and can wrap the regular component. by default the alternate is not visible. then when some condition occurs the border shows the alternate and callse setBorderBodyVisible(false) on itself that will hide whatever components are inside the border. -Igor