Re: portlet examples?
What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
that would be great. i ran jetspeed once ;-) but i'm more interested in looking at the code (especially any portlet-specific stuff even if it's just configuration). i'll take your word for it that it works. Thijs wrote: What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/portlet-examples--tp17190002p17202022.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
You can in that case also look in the wicket-examples (as there is a portlet-configuration in there). And then from the jetspeed svn check out /trunk/jetspeed-commons/src/main/java/org/apache/wicket/* /trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/* Those should contain the relevent bits... And you can check the http://cwiki.apache.org/WICKET/portal-howto.html on the wiki :) I'll clean up the mess in my portlet and send you a war-file with sources, some time today/ this evening Thijs Jonathan Locke schreef: that would be great. i ran jetspeed once ;-) but i'm more interested in looking at the code (especially any portlet-specific stuff even if it's just configuration). i'll take your word for it that it works. Thijs wrote: What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: portlet examples?
cool. thanks! Thijs wrote: You can in that case also look in the wicket-examples (as there is a portlet-configuration in there). And then from the jetspeed svn check out /trunk/jetspeed-commons/src/main/java/org/apache/wicket/* /trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlet/* Those should contain the relevent bits... And you can check the http://cwiki.apache.org/WICKET/portal-howto.html on the wiki :) I'll clean up the mess in my portlet and send you a war-file with sources, some time today/ this evening Thijs Jonathan Locke schreef: that would be great. i ran jetspeed once ;-) but i'm more interested in looking at the code (especially any portlet-specific stuff even if it's just configuration). i'll take your word for it that it works. Thijs wrote: What specifically are you looking for? I could send you a small portlet, that I use for testing if features like ajax/dynamic images/etc work on the portal we are using. What portal are you using? Because the portlet itself (aside from the web.xml/portlet.xml) is no different then any other wicket application. The fun part is in the implementation of the apache portal bridges ResourceUrlFactory and ServletContextProvider. (And in the case of Liferay also other parts of Wicket) Thijs Jonathan Locke schreef: does anyone out there have any wicket portlet examples i can look at? thanks, jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/portlet-examples--tp17190002p17202276.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why is it illegal to update hierarchy in onAfterRender?
Hi Johan, AutoAdd can be done in the rendering. They are only there just then. And they will be removed by wicket after rendering. Thanks Johan, those 2 lines explain it for me. Could you add them to the javadoc of MarkupContainer? Regards, Erik. Johan Compagner wrote: Hmm i am affraid the source for more info is the source.. AutoAdd can be done in the rendering. They are only there just then. And they will be removed by wicket after rendering. (at least they should) They are or can be normal components -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
an lost in the dark exception question
Hello all, We have a weird exception in our system. My team mates created a non standard DataView: final DataView dataView = new DataView(rows, dataProvider) { protected void populateItem(final Item item) { final ManagedItemDecorator entity = (ManagedItemDecorator)item.getModelObject(); //final Component links = new Label(links,new PropertyModel(entity,links)); *final Component links = new LinksPanel(links,null,isEnabled);* item.add(links); AjaxLink expandButton = GUIUtis.getExpandButton(expandLink,links,entity); WebMarkupContainer expandTD = new WebMarkupContainer(expand); expandTD.add(GUIUtis.createAttributeModifier(rowspan, 2)); expandTD.add(expandButton); item.add(expandTD); More stuff here ... } }; The ExpandButton opens (like a folder in a tree) a Panel that shows more information. In the LinksPanel there is another link that open BookmarkablePage. Scenario: When we open this BookmarkablePage and then press on ANY of the AjaxLink (expand button), we get an exception: 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory java.lang.RuntimeException: Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:406) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.deserializePage(AbstractPageStore.java:228) at org.apache.wicket.protocol.http.pagestore.DiskPageStore.getPage(DiskPageStore.java:702) at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:311) at org.apache.wicket.Session.getPage(Session.java:745) at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:443) at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1316) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at com.eurekify.security.SecurityFilter.doFilterInternal(SecurityFilter.java:38) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) Caused by: java.io.InvalidClassException: com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid constructor at java.io.ObjectStreamClass.init(Unknown Source) at java.io.ObjectStreamClass.lookup(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at java.util.ArrayList.writeObject(Unknown Source) at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at
Re: an lost in the dark exception question
On 5/13/08, Eyal Golan [EMAIL PROTECTED] wrote: We have a weird exception in our system. Not so weird when you read the exception trace. It is a dark art, but worth the effort of learning. My team mates created a non standard DataView: Uh oh... :) So read this part: 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory What does that mean? (Don't read ahead just yet, think about the message) It means that an object, your Item's model object, could not be deserialized. This means that one of your objects that are attached to the page does not honor the serialization contract. Specifically when you go through the stack trace and find the cause: Caused by: java.io.InvalidClassException: com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid constructor It seems that there is something wrong with ManagedItemDecorator - it is missing some valid constructor. Now if you don't know why this is, then look up the InvalidClassException using google. This points to the following JavaDoc [1] and states: Thrown when the Serialization runtime detects one of the following problems with a Class. * The serial version of the class does not match that of the class descriptor read from the stream * The class contains unknown datatypes * The class does not have an accessible no-arg constructor Voila, there is your problem, which you could discover yourself given a bit of brain excercise. Martijn [1] http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an lost in the dark exception question
According to a conversation I had with Johan, only the last shown page is kept in memory. Earlier versions are written to disk. When using ajax, the page does not have to be actually written to disk as you cannot reach the previous state by using the back button. When using a BookmarkableLink, the previous page _can_ be reached by the back button so it has to be written out. Are you using the development mode of Wicket? It always checks whether the page is serializable, if I recall correctly. The problem remains that the ManagedItemDecorator is not serializable. (see java.io.ObjectStreamClass.lookup) cheers, Frank On Tue, 2008-05-13 at 12:01 +0300, Eyal Golan wrote: First of all, thanks. (most of) all the above I found out. I mentioned weird because if that was the problem (Serialization or invalid constructor), then the Expand link would have never worked. Am I correct? BUT, The exception happens only after I go to a BookmarkableLink. It's not we didn't try to discover the problem before :) On Tue, May 13, 2008 at 11:16 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 5/13/08, Eyal Golan [EMAIL PROTECTED] wrote: We have a weird exception in our system. Not so weird when you read the exception trace. It is a dark art, but worth the effort of learning. My team mates created a non standard DataView: Uh oh... :) So read this part: 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory What does that mean? (Don't read ahead just yet, think about the message) It means that an object, your Item's model object, could not be deserialized. This means that one of your objects that are attached to the page does not honor the serialization contract. Specifically when you go through the stack trace and find the cause: Caused by: java.io.InvalidClassException: com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid constructor It seems that there is something wrong with ManagedItemDecorator - it is missing some valid constructor. Now if you don't know why this is, then look up the InvalidClassException using google. This points to the following JavaDoc [1] and states: Thrown when the Serialization runtime detects one of the following problems with a Class. * The serial version of the class does not match that of the class descriptor read from the stream * The class contains unknown datatypes * The class does not have an accessible no-arg constructor Voila, there is your problem, which you could discover yourself given a bit of brain excercise. Martijn [1] http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- - Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: an lost in the dark exception question
First of all, thanks. (most of) all the above I found out. I mentioned weird because if that was the problem (Serialization or invalid constructor), then the Expand link would have never worked. Am I correct? BUT, The exception happens only after I go to a BookmarkableLink. It's not we didn't try to discover the problem before :) On Tue, May 13, 2008 at 11:16 AM, Martijn Dashorst [EMAIL PROTECTED] wrote: On 5/13/08, Eyal Golan [EMAIL PROTECTED] wrote: We have a weird exception in our system. Not so weird when you read the exception trace. It is a dark art, but worth the effort of learning. My team mates created a non standard DataView: Uh oh... :) So read this part: 2008-05-13 10:55:21,885 ERROR [org.apache.wicket.RequestCycle] - Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory What does that mean? (Don't read ahead just yet, think about the message) It means that an object, your Item's model object, could not be deserialized. This means that one of your objects that are attached to the page does not honor the serialization contract. Specifically when you go through the stack trace and find the cause: Caused by: java.io.InvalidClassException: com.eurekify.tms.web.common.campaign.ManagedItemDecorator; no valid constructor It seems that there is something wrong with ManagedItemDecorator - it is missing some valid constructor. Now if you don't know why this is, then look up the InvalidClassException using google. This points to the following JavaDoc [1] and states: Thrown when the Serialization runtime detects one of the following problems with a Class. * The serial version of the class does not match that of the class descriptor read from the stream * The class contains unknown datatypes * The class does not have an accessible no-arg constructor Voila, there is your problem, which you could discover yourself given a bit of brain excercise. Martijn [1] http://java.sun.com/j2se/1.4.2/docs/api/java/io/InvalidClassException.html -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/
Re: persistent sessions in Tomcat
Do you mean tomcat logs? No I don't. Some *.ser files appear in the work\Catalina\localhost\application directory so session is serialized but isn't restored. Do I understand correctly that my assumption is correct and the wicket session must be restored with the tomcat persistent manager? So there must be some error in the configuration of the server or application itself? igor.vaynberg wrote: do you get any serialization errors in your logs, you might be trying to store something non serializable in the wicket component. -igor On Mon, May 12, 2008 at 1:09 AM, ElSe [EMAIL PROTECTED] wrote: Hi, I'm just started experiments with Wicket so I suppose my question is stupid however I haven't found the answer on the forum. The point was to understand how to organize persistent sessions for the wicket application. It seemed to me that such application should work with the standard Tomcat mechanism transparently as any other servlet. So I have written simple wicket application - just two pages that show sessionid, configured Tomcat persistent manager and started session. Then I restarted the server and tried to pass from one page to another waiting to see the same sessionid. But I have seen page has expired. Should I provide some serialization support in my application or there is some error in my logic or there aren't such possibility and I want something strange(c)? BR -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17205069.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Url resolve...
Have you tried surrounding that stylesheet link with a wicket:link? On Tue, May 13, 2008 at 4:25 AM, danielepiras [EMAIL PROTECTED] wrote: Hi, I'm developing an application that run on www.myserver.com/myapplication/ In my Index.html page, I include a css: link rel=stylesheet type=text/css href=css/style.css/ The problem is that wicket transform href url and if I give a look to the page source I find: link rel=stylesheet type=text/css href=../css/style.css/ So the css is not found because is refer to www.myserver.com/css/style.css and not www.myserver.com/myapplication/css/style.css What I have to do? Thank you very much Daniele -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17203548.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Swarm: Authorization for WebMarkupContainer
Hi, I tried to create a SecureWebMarkupContainer (contains a DataView, Label,..), which should be only visible for authorized users. But although the user has the permission APPL_ADMIN, he cannot see the resultHiddenPanel. Within the hive I used the wicket id resultHiddenPanel to identify the component, but within the logfile there's the message, that the component SecureWebMarkupContainer (class name) is not found. Perhaps do I have to create a subclass of SecureWebMarkupContainer for each WebMarkupContainer component and add that classname to the hive ? --- Code: Hive:?xml:namespace prefix = o ns = urn:schemas-microsoft-com:office:office /o:p/o:p o:p /o:p 01 // pages allowed for all userso:p/o:p 02 granto:p/o:p 03 {o:p/o:p 04 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, inherit, render;o:p/o:p 05 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, enable;o:p/o:p 06 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, inherit, render;o:p/o:p 07 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, enable;o:p/o:p 08o:p/o:p 09 };o:p/o:p 10o:p/o:p 11 grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal APPL_ADMINo:p/o:p 12 { o:p/o:p 13 // Menu Administration - Product areaso:p/o:p 14 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, inherit, render;o:p/o:p 15 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, enable;o:p/o:p 16 o:p/o:p 17 // Product area list page - Hidden panelo:p/o:p 18 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, inherit, render, enable;o:p/o:p 19 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, enable;o:p/o:p 20 };o:p/o:p 21o:p/o:p 22o:p/o:p o:p /o:p o:p /o:p Application.logo:p/o:p o:p /o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 1: // pages allowed for all userso:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermissiono:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermissiono:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermissiono:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermissiono:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 8: o:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Login access, inherit, render to everybodyo:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Welcome access, render, enable to everybodyo:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Welcome access, inherit, render to everybodyo:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Login access, render, enable to everybodyo:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 10: o:p/o:p 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 13: // Menu Administration - Product areaso:p/o:p 2008-05-13 12:26:14,581 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to
Re: Url resolve...
That actually looks to be correct behavoir.If your URL is www.myserver.com/myapplication/ , then going to .. takes you to www.mysesrver.com/myapplication (no trailing slash). Then going to /css/styles.css takes you to www.myserver.com/myapplication/css/styles.css Where is your CSS file stored? It should be in webapp/css. If you go to http://www.myserver.com/myapplication/css/style.css in your browser, is the file found? -Doug danielepiras wrote: Hi, I'm developing an application that run on www.myserver.com/myapplication/ In my Index.html page, I include a css: link rel=stylesheet type=text/css href=css/style.css/ The problem is that wicket transform href url and if I give a look to the page source I find: link rel=stylesheet type=text/css href=../css/style.css/ So the css is not found because is refer to www.myserver.com/css/style.css and not www.myserver.com/myapplication/css/style.css What I have to do? Thank you very much Daniele -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17206860.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Processing a form before page components are created
Hi, I was wondering if anyone had any good suggestions or patterns on how to process a form without using Form.onSubmit and model objects? The reason I want to do this is that my pages are stateless, and I want to process the submitted form before all the components on the page are initialised, incase I need to load different data models, or redirect the request to another page, thus saving unnecessary database calls and component initialisation. At the moment what I am doing is processing the form by directly reading the page parameters in the constructor before I add any components to the page, and then redirecting the request or initializing the page as appropriate (bypassing the use of Form.onSubmit). It would strike me that for mainly stateless pages this would be useful, I believe it is something Tapestry 5 supports quite nicely. Rgs, Joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with CheckBox and CheckGroup
Hi everybody, I need really your help. In a form, from the bdd, I create checkgroups with checkgroupselectors. This checkgroup works fine with the Check. But a want to add a Checkbox with thanks to AjaxBehavior can select or unselect all the checkgroup. But I don't succed. This is the part of my code : CheckBox group_all = new CheckBox(select_all, new Model()); group_all.add(new Label(select_all, Selectionner tous les projets)); group_all.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; protected void onUpdate(AjaxRequestTarget target) { for (int i = 0 ; i list_checkgroup.size() ; i++){ CheckGroup check = (CheckGroup)list_checkgroup.get(i); log.info(Test1 : +check.getModelObjectAsString()); - print [] log.info(Test2 : +check.getModel().getObject()); -- print [] check.getModel().setObject(true); -- no working target.addComponent(check); } } }); // parametrage de la listview desfile this.listview_domaine = new ListView(listview_domaine, list_domaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TDomaine domaine = (TDomaine)listItem.getModelObject(); listItem.add(new Label(nom_domaine, domaine.getNom())); list_sousdomaine = CDataFromBDD.getListSousDomaine(domaine.getNom()); listview_sousdomaine = new ListView(listview_sousdomaine, list_sousdomaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TSousDomaine sousdomaine = (TSousDomaine)listItem.getModelObject(); group_sousdomaine = new CheckGroup(group_sousdomaine,new ArrayList()); - create the checkgroup group_sousdomaine.setOutputMarkupId(true); group_sousdomaine.setRenderBodyOnly(false); CheckGroupSelector checkgroup_sousdomaine = new CheckGroupSelector(groupselector_sousdomaine); checkgroup_sousdomaine.add(new Label(nom_sousdomaine, sousdomaine.getNom())); group_sousdomaine.add(checkgroup_sousdomaine); - add the CheckGroupSelector list_projet = CDataFromBDD.getListProjet(sousdomaine.getNom()); listview_projet = new ListView(listview_projet, list_projet) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TProjet projet = (TProjet)listItem.getModelObject(); TInformationsGenerales info_gen = CDataFromBDD.getInfoGen(projet.getIdProjet()); TVersion version = CDataFromBDD.getVersion(info_gen.getIdInformationGen()); listItem.add(new Check(checkbox_projet, new Model())); listItem.add(new Label(name_projet, info_gen.getNom())); listItem.add(new Label(version_projet, version.getNumVersion())); } }; group_sousdomaine.add(listview_projet); list_checkgroup.add(group_sousdomaine); - save the CheckGroup objet in a ArrayList listItem.add(group_sousdomaine); } }; listItem.add(listview_sousdomaine); } }; The first problem is that I can't get back the value of checgroups : for every one, is there selected or unselected ? The second problem Is how can I set the checkgroup to selected or unselected ? Thank you very much for your help :-)
Re: Url resolve...
I've the same behavour describe http://www.nabble.com/is-it-a-bug--(using-beta-4)-td13284326.html#a13321146 here . I've solved my problem using: mountBookmarkablePage(/home, getHomePage()); -- View this message in context: http://www.nabble.com/Url-resolve...-tp17203548p17207838.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swarm: Authorization for WebMarkupContainer
Ah got it, must have been looking with my wrong glasses on earlier :) You are using version 1.3.0 that version of SecureContainerCheck only checks the class of the container, hence the message about missing permissions for SecureWebMarkupContainer. permission ${ComponentPermission} xxx.yyy.zzz.front.SecureWebMarkupContainer, inherit, render, enable; should do the trick, however this will enable every SecurewebMarkupContainer in your application which might not be what you want. There are several other options you can try: -replace the ContainerSecurityCheck with a ComponentSecurityCheck -switch to version 1.3-SNAPHOT, the ContainerSecurityCheck has been modified to deal with this type of situation (i.e. check component id's too) along with some more stuff to improve permission inheritance. -extend ContainersecurityCheck and overwrite isActionAuthorized with the following code: public boolean isActionAuthorized(WaspAction action) { if (enableAuthentication !isAuthenticated()) throw new RestartResponseAtInterceptPageException(getLoginPage()); boolean result = getStrategy().isComponentAuthorized(getComponent(), action) || getStrategy().isClassAuthorized(getComponent().getClass(), action); if (result checkSecureModel() SecureComponentHelper.hasSecureModel(getComponent())) return ((ISecureModel)getComponent().getModel()).isAuthorized(getComponent(), action); return result; } This code comes from 1.3-SNAPSHOT but should be sufficient to work in your case. I recommend either option 1 or 2 depending on how comfortable you are with snapshots Maurice On Tue, May 13, 2008 at 2:46 PM, Andrea Jahn [EMAIL PROTECTED] wrote: Hi, here the code again without the linebreaks: Hive: 01 // pages allowed for all users 02 grant 03 { 04 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, inherit, render; 05 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, enable; 06 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, inherit, render; 07 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, enable; 08 09 }; 10 11 grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal APPL_ADMIN 12 { 13 // Menu Administration - Product areas 14 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, inherit, render; 15 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, enable; 16 17 // Product area list page - Hidden panel 18 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, inherit, render, enable; 19 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, enable; 20 }; 21 22 Application.log 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 1: // pages allowed for all users 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 8: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Login access, inherit, render to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Welcome access, render, enable to everybody 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding
Re: Swarm: Authorization for WebMarkupContainer
Meaning either use the ComponentSecurityCheck or the snapshot version. not that stuff about changing the policy file. Mauirce On Tue, May 13, 2008 at 3:21 PM, Maurice Marrink [EMAIL PROTECTED] wrote: Ah got it, must have been looking with my wrong glasses on earlier :) You are using version 1.3.0 that version of SecureContainerCheck only checks the class of the container, hence the message about missing permissions for SecureWebMarkupContainer. permission ${ComponentPermission} xxx.yyy.zzz.front.SecureWebMarkupContainer, inherit, render, enable; should do the trick, however this will enable every SecurewebMarkupContainer in your application which might not be what you want. There are several other options you can try: -replace the ContainerSecurityCheck with a ComponentSecurityCheck -switch to version 1.3-SNAPHOT, the ContainerSecurityCheck has been modified to deal with this type of situation (i.e. check component id's too) along with some more stuff to improve permission inheritance. -extend ContainersecurityCheck and overwrite isActionAuthorized with the following code: public boolean isActionAuthorized(WaspAction action) { if (enableAuthentication !isAuthenticated()) throw new RestartResponseAtInterceptPageException(getLoginPage()); boolean result = getStrategy().isComponentAuthorized(getComponent(), action) || getStrategy().isClassAuthorized(getComponent().getClass(), action); if (result checkSecureModel() SecureComponentHelper.hasSecureModel(getComponent())) return ((ISecureModel)getComponent().getModel()).isAuthorized(getComponent(), action); return result; } This code comes from 1.3-SNAPSHOT but should be sufficient to work in your case. I recommend either option 1 or 2 depending on how comfortable you are with snapshots Maurice On Tue, May 13, 2008 at 2:46 PM, Andrea Jahn [EMAIL PROTECTED] wrote: Hi, here the code again without the linebreaks: Hive: 01 // pages allowed for all users 02 grant 03 { 04 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, inherit, render; 05 permission ${ComponentPermission} xxx.yyy.zzz.front.Login, enable; 06 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, inherit, render; 07 permission ${ComponentPermission} xxx.yyy.zzz.front.Welcome, enable; 08 09 }; 10 11 grant principal org.apache.wicket.security.hive.authorization.SimplePrincipal APPL_ADMIN 12 { 13 // Menu Administration - Product areas 14 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, inherit, render; 15 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, enable; 16 17 // Product area list page - Hidden panel 18 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, inherit, render, enable; 19 permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel, enable; 20 }; 21 22 Application.log 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 1: // pages allowed for all users 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.resolveAliases(PolicyFileHiveFactory.java:294) - resolved alias: ComponentPermission to org.apache.wicket.security.hive.authorization.permissions.ComponentPermission 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.config.PolicyFileHiveFactory.skipLine(PolicyFileHiveFactory.java:949) - skipping line 8: 2008-05-13 12:26:14,566 DEBUG org.apache.wicket.security.hive.BasicHive.addPrincipal(BasicHive.java:108) - Adding org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.Login access, inherit, render to everybody 2008-05-13
Re: persistent sessions in Tomcat
the default config of tomcat already restarts the wicket example sessions just fine for me I havent changed 1 thing about that On Tue, May 13, 2008 at 11:59 AM, ElSe [EMAIL PROTECTED] wrote: Do you mean tomcat logs? No I don't. Some *.ser files appear in the work\Catalina\localhost\application directory so session is serialized but isn't restored. Do I understand correctly that my assumption is correct and the wicket session must be restored with the tomcat persistent manager? So there must be some error in the configuration of the server or application itself? igor.vaynberg wrote: do you get any serialization errors in your logs, you might be trying to store something non serializable in the wicket component. -igor On Mon, May 12, 2008 at 1:09 AM, ElSe [EMAIL PROTECTED] wrote: Hi, I'm just started experiments with Wicket so I suppose my question is stupid however I haven't found the answer on the forum. The point was to understand how to organize persistent sessions for the wicket application. It seemed to me that such application should work with the standard Tomcat mechanism transparently as any other servlet. So I have written simple wicket application - just two pages that show sessionid, configured Tomcat persistent manager and started session. Then I restarted the server and tried to pass from one page to another waiting to see the same sessionid. But I have seen page has expired. Should I provide some serialization support in my application or there is some error in my logic or there aren't such possibility and I want something strange(c)? BR -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17183181.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/persistent-sessions-in-Tomcat-tp17183181p17205069.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Inmethod Grid patch for Wicket 1.4-m1
i guess Matej wil gladly apply it for you Except that Matej then has to branch... i what does he like that... :) johan On Tue, May 13, 2008 at 11:02 AM, Erik van Oosten [EMAIL PROTECTED] wrote: Hello, Inmethod Grid does not support Wicket 1.4 currently. Apply the attached patch (created by my colleague Job de Noo) to the trunk version to get it running again. Have fun, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using generics with some non-generic classes in Wicket
Hi boys, I would like to ask something about wicket generics. I have a warning, that I don't know, how to solve. For example in such a line: IModelString model = new StringResourceModel( ... ); I have a warning, which I cannot remove: --- Type safety: The expression of type StringResourceModel needs unchecked conversion to conform to IModelString Why is the StringResourceModel (and some other classes) not generified ? Will they be later, or is there any problem with generifying of these classes ? Thx, Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17208928.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Inmethod Grid patch for Wicket 1.4-m1
Hello Matej, all, Ah, that is good to hear. The patch makes grid trunk in sync with wicket-1.4-m1. There might be differences with wicket-1.4 trunk? In any case, we could not build grid trunk with wicket-1.4-m1 when we retrieved it (last Friday). So please Matej, do not apply this patch on your repository :) Regards, Erik. Matej Knopp wrote: Grid trunk is 1.4 of course. But it's kept in sync with 1.4 trunk. Why would Your patch basically reverses that, why would I want to apply it? :) -Matej On Tue, May 13, 2008 at 3:31 PM, Johan Compagner [EMAIL PROTECTED] wrote: i guess Matej wil gladly apply it for you Except that Matej then has to branch... i what does he like that... :) johan On Tue, May 13, 2008 at 11:02 AM, Erik van Oosten [EMAIL PROTECTED] wrote: Hello, Inmethod Grid does not support Wicket 1.4 currently. Apply the attached patch (created by my colleague Job de Noo) to the trunk version to get it running again. Have fun, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
Uuf, great :) It works ! Thx. But, is not String something Serializable ? I cannot understand where was the problem, but I know, this is more about Java Generics, not about Wicket. Johan Compagner wrote: the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211220.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[inmethod-grid] javascript error closing modal window containing grid
I am experiencing a javascript error when closing a ModalWindow that contains an inmethod-grid control. I am having trouble tracking where the error originates. Could anyone offer some advice on how to begin debugging an error with the ModalDialog? This is a quickstart that shows the problem. On the home page, click the link to open the modal dialog. Then simply click the close button of the dialog. When the dialog disappears, the js error message will be available. http://www.nabble.com/file/p17211224/modal-grid.zip modal-grid.zip I am using IE 6 on WinXPProSP2 Chuck -- View this message in context: http://www.nabble.com/-inmethod-grid--javascript-error-closing-modal-window-containing-grid-tp17211224p17211224.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com.
JPA suggestions?
I have a data driver package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA suggestions?
Have you looked into using Spring's JPA support? On Tue, May 13, 2008 at 11:29 AM, David Nedrow [EMAIL PROTECTED] wrote: I have a data driver package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with CheckBox and CheckGroup
There is no such thing as setSelected(true). You'll have work with a model like: new CheckBox(checkbox, new PropertyModel(yourModel, checkboxSelected)); in that case you can lookup your model like yourModel.getCheckboxSelected(); (which you could do in your onUpdate()) You can select your checkbox in the same way by updating your model. Rob Dubois, Fabien wrote: Hi everybody, I need really your help. In a form, from the bdd, I create checkgroups with checkgroupselectors. This checkgroup works fine with the Check. But a want to add a Checkbox with thanks to AjaxBehavior can select or unselect all the checkgroup. But I don't succed. This is the part of my code : CheckBox group_all = new CheckBox(select_all, new Model()); group_all.add(new Label(select_all, Selectionner tous les projets)); group_all.add(new AjaxFormComponentUpdatingBehavior(onchange) { private static final long serialVersionUID = 1L; protected void onUpdate(AjaxRequestTarget target) { for (int i = 0 ; i list_checkgroup.size() ; i++){ CheckGroup check = (CheckGroup)list_checkgroup.get(i); log.info(Test1 : +check.getModelObjectAsString()); - print [] log.info(Test2 : +check.getModel().getObject()); -- print [] check.getModel().setObject(true); -- no working target.addComponent(check); } } }); // parametrage de la listview desfile this.listview_domaine = new ListView(listview_domaine, list_domaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TDomaine domaine = (TDomaine)listItem.getModelObject(); listItem.add(new Label(nom_domaine, domaine.getNom())); list_sousdomaine = CDataFromBDD.getListSousDomaine(domaine.getNom()); listview_sousdomaine = new ListView(listview_sousdomaine, list_sousdomaine) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TSousDomaine sousdomaine = (TSousDomaine)listItem.getModelObject(); group_sousdomaine = new CheckGroup(group_sousdomaine,new ArrayList()); - create the checkgroup group_sousdomaine.setOutputMarkupId(true); group_sousdomaine.setRenderBodyOnly(false); CheckGroupSelector checkgroup_sousdomaine = new CheckGroupSelector(groupselector_sousdomaine); checkgroup_sousdomaine.add(new Label(nom_sousdomaine, sousdomaine.getNom())); group_sousdomaine.add(checkgroup_sousdomaine); - add the CheckGroupSelector list_projet = CDataFromBDD.getListProjet(sousdomaine.getNom()); listview_projet = new ListView(listview_projet, list_projet) { private static final long serialVersionUID = 1L; protected void populateItem(ListItem listItem) { final TProjet projet = (TProjet)listItem.getModelObject(); TInformationsGenerales info_gen = CDataFromBDD.getInfoGen(projet.getIdProjet()); TVersion version = CDataFromBDD.getVersion(info_gen.getIdInformationGen()); listItem.add(new Check(checkbox_projet, new Model())); listItem.add(new Label(name_projet, info_gen.getNom())); listItem.add(new Label(version_projet, version.getNumVersion())); } }; group_sousdomaine.add(listview_projet); list_checkgroup.add(group_sousdomaine); - save the CheckGroup objet in a ArrayList listItem.add(group_sousdomaine); } }; listItem.add(listview_sousdomaine); } }; The first problem is that I can't get back the value of checgroups : for every one, is there selected or unselected ? The second problem Is how can I set the checkgroup to selected or unselected ? Thank you very much for your help :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Re: Using generics with some non-generic classes in Wicket
Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListViewInteger menu = new ListViewInteger(id, numbers){ //populate metods } add(menu);//warning here The warning says: Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainerT should be parameterized I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17211948.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel --- that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer --- that is not parameterized. ? could this be the reason ? Stefan Simik wrote: Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListViewInteger menu = new ListViewInteger(id, numbers){ //populate metods } add(menu);//warning here The warning says: Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainerT should be parameterized I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
well, unless this: public class LabelT extends WebComponentT became: public class Label extends WebComponentString not saying this is the right thing to do as it might break a lot of code, but it would be more precise. Johan Compagner wrote: the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA suggestions?
It really depends on your preferences. Either a databinder (using JPA related classes directly in your UI code) or a DAO/ services based approach will work. Eelco On Tue, May 13, 2008 at 8:29 AM, David Nedrow [EMAIL PROTECTED] wrote: I have a data driver package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Stuff devs - teamcity is open for registration
Hi, may someone please grant me some karma to manage my own build configuration? username: funkattack projects: wicket-contrib-gmap2, wicket-contrib-gmap2-examples mf 2008/5/5 Martijn Dashorst [EMAIL PROTECTED]: We have moved our build server to run on teamcity. Our previous software was not up to par. I have picked Teamcity because it was the quickest to setup securely at 1am in the morning (yes I've looked at hudson), several of the core committers use the product in their companies and we don't have a problem with using commercial software for free :) You can register yourself on our teamcity server: http://wicketstuff.org/teamcity This doesn't give you the ability to add projects/build configurations, but it will make our lives much easier to grant you that ability. Registration is available to all project maintainers on Wicket Stuff and other Wicket related open source projects (Wicket Web Beans comes to mind). Add your account and reply in this thread when you are done. Please provide the projects you are maintaining or want to maintain (this gives me an overview of who does what). One of the teamcity admins will grant you the ability to manage your own build configuration. I'm sorry that all the effort that went into configuring bamboo is now naught, however I am confident that teamcity will help us throughout 2008 and beyond in managing our builds. Martijn -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Swarm: Authorization for WebMarkupContainer
On Tue, May 13, 2008 at 6:48 PM, Andrea Jahn [EMAIL PROTECTED] wrote: Hi, I've changed to the 1.3.1-SNAPSHOT version. Therefore I have only replaced the constructor PolicyFileHiveFactory() by PolicyFileHiveFactory(ActionFactory). The result was the same as with version 1.3.0 (resultHiddenPanel not visible and the same output in the logfile). Are you using the SwarmPolicyFileHiveFactory? see http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security+1.3.1#Wicket-Security1.3.1-migrateto1.3.1 Then I changed the ContainerSecurityCheck with a ComponentSecurityCheck in the class SecureWebMarkupContainer. The resultHiddenPanel now is always visible (also when the user has not the permission). Well like i said earlier permission ${ComponentPermission} xxx.yyy.zzz.front.ProductAreaListPage, inherit, render; is sufficient to allow the entire page to be rendered, does your policy file contain another grant statement with a similar permission? Logfile: 2008-05-13 18:30:30,880 DEBUG org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:214) - Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] implies org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel access, render 2008-05-13 18:30:32,583 DEBUG org.apache.wicket.security.hive.BasicHive.hasPermission(BasicHive.java:188) - Subjects[HashKey: 821489378, sortOrder 0 = [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] has a cached match for org.apache.wicket.security.hive.authorization.permissions.ComponentPermission xxx.yyy.zzz.front.ProductAreaListPage:resultHiddenPanel access, render, result true Perhaps I have made another mistake ? Hmm, the ContainerSecurityCheck should have worked, let me see if i can reproduce that with a test. Maurice, thank you very much for the quick replies ! Should I (or could you) delete my first question from the Getting started with SWARM page, as it was the wrong place to post the question ? Deleted. Maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DateTextField - what am I missing here?
I must be missing something obvious but I can't spot itI'm using a DateTextField (Wicket 1.3.2) in my form like so: Java: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, date), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); HTML: input type=text wicket:id=expiryDate size=10 / My error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) at org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) at org.apache.wicket.Component.renderHead(Component.java:2558) I'm following the example but not sure what this means. Thanks! -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA suggestions?
You could also see http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite , at some point Iolite will evolve into a little more sophisticated solution than now but you should get some of the idea anyhow. http://cwiki.apache.org/WICKET/blog-tutorial.html David Nedrow wrote: I have a data driver package built around JPA and an Entity Manager Factory (javax.persistence.EntityManagerFactory). This is currently used by a couple of standalone applications and works well. What is the best way to leverage this package in the context of a Wicket-based web application? IE., how best to instantiate the factory (if necessary) and/or use the DAOs. Should this happen at the wicket application level, or somehow page/panel-based? Thanks for any pointers, -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
Assuming EditDiscountCode is a wicket component, given the new PropertyModel(this, date) You probably want to either use an object that has a get/setDate (your model object) or add those methods to your component. Maurice On Tue, May 13, 2008 at 9:04 PM, V. Jenks [EMAIL PROTECTED] wrote: I must be missing something obvious but I can't spot itI'm using a DateTextField (Wicket 1.3.2) in my form like so: Java: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, date), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); HTML: input type=text wicket:id=expiryDate size=10 / My error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) at org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) at org.apache.wicket.Component.renderHead(Component.java:2558) I'm following the example but not sure what this means. Thanks! -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
cant i have a Label that has a Date as a object? That is resolved by the converter for display? johan On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke [EMAIL PROTECTED] wrote: well, unless this: public class LabelT extends WebComponentT became: public class Label extends WebComponentString not saying this is the right thing to do as it might break a lot of code, but it would be more precise. Johan Compagner wrote: the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
please, and will be these classes later generified ? Or should I make a RFE, or can I help anyway-for example attach a patch ? I love your work and Wicket, so I do my best, to make it better ;) Stefan Simik Johan Compagner wrote: yes thats the reason you are calling the method add with a generified component but that container itself is not generified i dont like this about generics expecially the onces like this: add(MarkupContainer? container) then suddenly a none generified component cant be added... thats really stupid ? should mean anything.. including none generics johan On Tue, May 13, 2008 at 5:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel --- that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer --- that is not parameterized. ? could this be the reason ? Stefan Simik wrote: Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListViewInteger menu = new ListViewInteger(id, numbers){ //populate metods } add(menu);//warning here The warning says: Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainerT should be parameterized I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
i already did the commit just yet.. i did make them all Object because i think people generally dont want to generify them anyway (use the model object) On Tue, May 13, 2008 at 9:48 PM, Stefan Simik [EMAIL PROTECTED] wrote: please, and will be these classes later generified ? Or should I make a RFE, or can I help anyway-for example attach a patch ? I love your work and Wicket, so I do my best, to make it better ;) Stefan Simik Johan Compagner wrote: yes thats the reason you are calling the method add with a generified component but that container itself is not generified i dont like this about generics expecially the onces like this: add(MarkupContainer? container) then suddenly a none generified component cant be added... thats really stupid ? should mean anything.. including none generics johan On Tue, May 13, 2008 at 5:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel --- that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer --- that is not parameterized. ? could this be the reason ? Stefan Simik wrote: Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListViewInteger menu = new ListViewInteger(id, numbers){ //populate metods } add(menu);//warning here The warning says: Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainerT should be parameterized I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216869.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
have not thought it through. i was just pointing out another option. in some sense a label shows a string like a listview shows a list. that's all. Johan Compagner wrote: cant i have a Label that has a Date as a object? That is resolved by the converter for display? johan On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke [EMAIL PROTECTED] wrote: well, unless this: public class LabelT extends WebComponentT became: public class Label extends WebComponentString not saying this is the right thing to do as it might break a lot of code, but it would be more precise. Johan Compagner wrote: the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216943.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
yeah i know just wanted to give an example But Label == String is not the really the same thing as ListView == List.. Because for a Label getModelObject() doesnt have to be a String (it can be anything) but for ListView.getModelObject() does have to be a List.. This is also because our converters sit between modelobject - string representation. So for a Listview a converter is not really used, as for a label it is used or called for pretty much everytime. johan On Tue, May 13, 2008 at 9:52 PM, Jonathan Locke [EMAIL PROTECTED] wrote: have not thought it through. i was just pointing out another option. in some sense a label shows a string like a listview shows a list. that's all. Johan Compagner wrote: cant i have a Label that has a Date as a object? That is resolved by the converter for display? johan On Tue, May 13, 2008 at 6:09 PM, Jonathan Locke [EMAIL PROTECTED] wrote: well, unless this: public class LabelT extends WebComponentT became: public class Label extends WebComponentString not saying this is the right thing to do as it might break a lot of code, but it would be more precise. Johan Compagner wrote: the only thing i can quickly come up with is this public ExtendLabel(String id, T string) { super(id, new ModelT(string)); } On Tue, May 13, 2008 at 4:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: Thx Maurice, your are right. I was using Wicket 1.4M1. I checked out latest from trunk, and it OK. ;) So another problematic compiler warning. For example simple - subtype of Label, which has model type of anything Serializable. public class ExtendedLabellt;T extends Serializablegt; extends Labellt;Tgt{ private IStringProvider stringProvider = null; public ExtendedLabel(String id, IModel model, IStringProvider stringProvider) { super(id, model); this.stringProvider = stringProvider; } public ExtendedLabel(String id, String text) { this(id, new Model(text), new BasicStringProvider()); //this(id, new Modellt;Tgt;(text), new BasicStringProvider()); //error } } The problematic part, is the second constructor, which calls this. Its second parameter - new Model(text), which I cannot generify. If I write new Model(text), I get an error: The constructor Model(String) is undefined. I can't find out, what I am doing wrong. Thx Stefan Simik -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17210525.html Sent from the Wicket - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17212325.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-1.4M1-tp17208928p17216943.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
When you do new PropertyModel(this, expiryDate), this refers to your page EditDiscountCode which does not have get/setExpiryDate. Instead of this you should use the model you also pass to the form which contains a DiscountCode. Maurice On Tue, May 13, 2008 at 11:13 PM, V. Jenks [EMAIL PROTECTED] wrote: I don't know, would it? That's what I'm trying to figure out, the example is very vague. By that logic, I should name pass in expiryDate even though I've already named the field that? I tried: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, expiryDate), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); ...and it fails: 52560 [httpSSLWorkerThread-80-4] ERROR org.apache.wicket.RequestCycle - No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate This seems rather cumbersome, calendars worked really well in 1.2...I can't make sense of this. Thanks again... Gwyn wrote: From a very quick look, won't your property model value of date will mean it'll be doing a getDate() not getExpiryDate()? /Gwyn On Tue, May 13, 2008 at 8:38 PM, V. Jenks [EMAIL PROTECTED] wrote: Sorry, I'll clarify, was trying to be as condensed as possible. EditDiscountCode is the name of the page, which inherits WebPage. The model object of the form, which is my DiscountCode entity, does have a getter/setter for the expiryDate field, which is what I showed you in my initial post. @Entity @Table(name=tbl_discount_code) public class DiscountCode implements Serializable { . @Temporal(value=TemporalType.DATE) @Column(nullable=false) private Date expiryDate; . public Date getExpiryDate() { return this.expiryDate; } public void setExpiryDate(Date expiryDate) { this.expiryDate = expiryDate; } } So, I suppose I'm not entirely clear on what you're suggesting? Mr Mean wrote: Assuming EditDiscountCode is a wicket component, given the new PropertyModel(this, date) You probably want to either use an object that has a get/setDate (your model object) or add those methods to your component. Maurice On Tue, May 13, 2008 at 9:04 PM, V. Jenks [EMAIL PROTECTED] wrote: I must be missing something obvious but I can't spot itI'm using a DateTextField (Wicket 1.3.2) in my form like so: Java: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, date), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); HTML: input type=text wicket:id=expiryDate size=10 / My error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) at org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) at org.apache.wicket.Component.renderHead(Component.java:2558) I'm following the example but not sure what this means. Thanks! -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using generics with some non-generic classes in Wicket
Johan Compagner wrote: yes thats the reason you are calling the method add with a generified component but that container itself is not generified i dont like this about generics expecially the onces like this: add(MarkupContainer? container) then suddenly a none generified component cant be added... thats really stupid ? should mean anything.. including none generics No, that's not correct. For example, List? is much more restrictive than a raw List (which is a ListObject). To a raw list you can add an instance of any type whatever, i.e., list.add(new Object()). But in List? the ? is a wildcard which says it could be any type there, i.e., it could be a ListInteger. But you can't add a new Object() to a ListInteger! Thus MarkupContainer? means MarkupContainer parameterized by some unknown type, and *not* MarkupContainer parameterized by Object, which is what the raw type means. Regards, Sebastiaan johan On Tue, May 13, 2008 at 5:55 PM, Stefan Simik [EMAIL PROTECTED] wrote: I have one idea, the reason of the warnigs is, that parent of AjaxPagingNavigator is PagingNavigator, which has parent Panel --- that is not parameterized. The same problem is with LoopItem, which extends the WebMarkupContainer --- that is not parameterized. ? could this be the reason ? Stefan Simik wrote: Mhmm, it is meaningful ;) I will know in future, thx One of the last occuring warning is, when working with MarkupContainer#add(...) or #addOrReplace(...) method. Example: I have a simple AjaxPagingNavigator, to which I add a simple ListView --- ListViewInteger menu = new ListViewInteger(id, numbers){ //populate metods } add(menu);//warning here The warning says: Type safety: The method add(Component...) belongs to the raw type MarkupContainer. References to generic type MarkupContainerT should be parameterized I cannot find out, what's the warning reason, because ListView self is parameterized. -- View this message in context: http://www.nabble.com/Using-generics-with-some-non-generic-classes-in-Wicket-tp17208928p17212015.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
Re: Swarm: Authorization for WebMarkupContainer
Ok, so i did some testing (and in the process found another bug, unrelated to your issue :)), but i could not reproduce your permission denied. Here is my simple setup: public class ContainerPage2 extends SecureWebPage { /** * Construct. */ public ContainerPage2() { add(new Label(label, always visible)); SecureMarkupContainer container = new SecureMarkupContainer(secure); container.add(new Label(hidden, hidden label)); add(container); } /** * Simple secure container. * * @author marrink */ private static final class SecureMarkupContainer extends WebMarkupContainer implements ISecureComponent { /** * */ private static final long serialVersionUID = 1L; /** * * Construct. * * @param id */ public SecureMarkupContainer(String id) { super(id); setSecurityCheck(new ContainerSecurityCheck(this)); } /** * * @see org.apache.wicket.security.components.ISecureComponent#getSecurityCheck() */ public ISecurityCheck getSecurityCheck() { return SecureComponentHelper.getSecurityCheck(this); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(java.lang.String) */ public boolean isActionAuthorized(String waspAction) { return SecureComponentHelper.isActionAuthorized(this, waspAction); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isActionAuthorized(org.apache.wicket.security.actions.WaspAction) */ public boolean isActionAuthorized(WaspAction action) { return SecureComponentHelper.isActionAuthorized(this, action); } /** * * @see org.apache.wicket.security.components.ISecureComponent#isAuthenticated() */ public boolean isAuthenticated() { return SecureComponentHelper.isAuthenticated(this); } /** * * @see org.apache.wicket.security.components.ISecureComponent#setSecurityCheck(org.apache.wicket.security.checks.ISecurityCheck) */ public void setSecurityCheck(ISecurityCheck check) { SecureComponentHelper.setSecurityCheck(this, check); } } } and my policy file looks like this: grant principal ${SimplePrincipal} container4 { //this does not permit secure components on a ContainerPage2 to be visible permission ${ComponentPermission} ${myPackage}.ContainerPage2, render; permission ${ComponentPermission} ${myPackage}.ContainerPage2, enable; }; grant principal ${SimplePrincipal} container5 { //this grants the permission to any component with id secure on a ContainerPage2 permission ${ComponentPermission} ${myPackage}.ContainerPage2:secure, inherit, render; permission ${ComponentPermission} ${myPackage}.ContainerPage2, enable; }; grant principal ${SimplePrincipal} container6 { //this grants the permission to any SecureMarkupContainer inside a ContainerPage2 permission ${ComponentPermission} ${myPackage}.ContainerPage2:${myPackage}.ContainerPage2$SecureMarkupContainer, inherit, render; permission ${ComponentPermission} ${myPackage}.ContainerPage2, enable; }; grant principal ${SimplePrincipal} container7 { //this grants the permission to any SecureMarkupContainer, even when placed on other pages (if it wasn't a private class) permission ${ComponentPermission} ${myPackage}.ContainerPage2$SecureMarkupContainer, inherit, render; permission ${ComponentPermission} ${myPackage}.ContainerPage2, enable; }; Argh, i am only just reading you are using 1.3.1-SNAPSHOT. You should be using 1.3-SNAPSHOT. That does it i am deleting those jars. Maurice On Tue, May 13, 2008 at 8:10 PM, Maurice Marrink [EMAIL PROTECTED] wrote: On Tue, May 13, 2008 at 6:48 PM, Andrea Jahn [EMAIL PROTECTED] wrote: Hi, I've changed to the 1.3.1-SNAPSHOT version. Therefore I have only replaced the constructor PolicyFileHiveFactory() by PolicyFileHiveFactory(ActionFactory). The result was the same as with version 1.3.0
Re: How to implement hint text in a TextField?
I have one last small problem with this topic which is that I don't see any particularly elegant place to clear the hint text from this TextField when the form is submitted. I've considered adding JavaScript to the Form to implement the onSubmit handler. I don't like this case because then JavaScript pertaining to this particular Behavior is now in an additional location, on the form. The other idea I've considered is to discard the value in the Handler. This is slightly more elegant, but I still feel like the Behavior has crept out into other classes. Is there a more elegant place that I've overlooked? Thanks, Nate On Fri, May 9, 2008 at 5:22 PM, nate roe [EMAIL PROTECTED] wrote: Oh, yeah I see IBehavior.rendered(Component) that is called when the component has been rendered. Great, thanks a lot! Nate On Fri, May 9, 2008 at 5:04 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: i meant in the behavior. does it have something like rendered() or afterrender() ? somewhere so you can do getcomponent().getresponse().write(script.../script); -igor On Fri, May 9, 2008 at 5:02 PM, nate roe [EMAIL PROTECTED] wrote: In Component, do you mean? I see onRender(MarkupStream) .. do I need to find the after component part by using the MarkupStream? Thank you, Nate On Fri, May 9, 2008 at 4:51 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: 1.2 doesnt have it, so just override onrenderaftercomponent and do it there -igor On Fri, May 9, 2008 at 4:50 PM, nate roe [EMAIL PROTECTED] wrote: Hrm. The IHeaderResponse interface is new in 1.3 but for a little while longer I must use Wicket 1.2. How does one accomplish response.renderOnDomReadyScript() in 1.2? I don't see any method similar to renderOnDomReadyScript on the Response class. Thanks! Nate On Fri, May 9, 2008 at 4:35 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: i havent had to do this but something like this might work: class hint extends abstractbehavior { private final imodelstring hint; onbind(component c) { c.setoutputmarkupid(true); } ondetach() { hint.detach(); super.ondetach(); } renderhead(response) { // init textfield with hint response.renderondomreadyscript(var e=document.getelementbyid('+getcomponent.getmarkupid()+'); e.value='+hint.getobject()+';e.style['color']='gray';); } oncomponenttag(tag) { tag.put(onfocus, if (this.value='+hint.getobject()+') { this.value=''; this.style['color']='black;'}); } } then just textfield.add(new hint(new modelstring(search))); -igor On Fri, May 9, 2008 at 4:25 PM, nate roe [EMAIL PROTECTED] wrote: How would one implement hint text on a text field in Wicket? By hint text I mean an empty TextField has greyed out text in it to indicate its purpose, and gets cleared onFocus?) Thanks, Nate Roe - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTextField - what am I missing here?
this points to current wicket page. So wicket looks for expiryDate in the wicket page. If you declare expiryDate within wicket page, you won't get error message. Otherwise, as suggested by Mr Mean, instead of this you should pass model which has getter/setters for expiryDate. Sanjeev Mr Mean wrote: When you do new PropertyModel(this, expiryDate), this refers to your page EditDiscountCode which does not have get/setExpiryDate. Instead of this you should use the model you also pass to the form which contains a DiscountCode. Maurice On Tue, May 13, 2008 at 11:13 PM, V. Jenks [EMAIL PROTECTED] wrote: I don't know, would it? That's what I'm trying to figure out, the example is very vague. By that logic, I should name pass in expiryDate even though I've already named the field that? I tried: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, expiryDate), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); ...and it fails: 52560 [httpSSLWorkerThread-80-4] ERROR org.apache.wicket.RequestCycle - No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: expiryDate This seems rather cumbersome, calendars worked really well in 1.2...I can't make sense of this. Thanks again... Gwyn wrote: From a very quick look, won't your property model value of date will mean it'll be doing a getDate() not getExpiryDate()? /Gwyn On Tue, May 13, 2008 at 8:38 PM, V. Jenks [EMAIL PROTECTED] wrote: Sorry, I'll clarify, was trying to be as condensed as possible. EditDiscountCode is the name of the page, which inherits WebPage. The model object of the form, which is my DiscountCode entity, does have a getter/setter for the expiryDate field, which is what I showed you in my initial post. @Entity @Table(name=tbl_discount_code) public class DiscountCode implements Serializable { . @Temporal(value=TemporalType.DATE) @Column(nullable=false) private Date expiryDate; . public Date getExpiryDate() { return this.expiryDate; } public void setExpiryDate(Date expiryDate) { this.expiryDate = expiryDate; } } So, I suppose I'm not entirely clear on what you're suggesting? Mr Mean wrote: Assuming EditDiscountCode is a wicket component, given the new PropertyModel(this, date) You probably want to either use an object that has a get/setDate (your model object) or add those methods to your component. Maurice On Tue, May 13, 2008 at 9:04 PM, V. Jenks [EMAIL PROTECTED] wrote: I must be missing something obvious but I can't spot itI'm using a DateTextField (Wicket 1.3.2) in my form like so: Java: DateTextField expiryDate = new DateTextField( expiryDate, new PropertyModel(this, date), new StyleDateConverter(S-, true)); expiryDate.add(new DatePicker()); expiryDate.setRequired(true); codeForm.add(expiryDate); HTML: input type=text wicket:id=expiryDate size=10 / My error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.agribeef.abcommerce.ui.admin.EditDiscountCode expression: date at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:84) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:113) at org.apache.wicket.Component.getModelObject(Component.java:1551) at org.apache.wicket.extensions.yui.calendar.DatePicker.configure(DatePicker.java:367) at org.apache.wicket.extensions.yui.calendar.DatePicker.renderHead(DatePicker.java:208) at org.apache.wicket.Component.renderHead(Component.java:2558) I'm following the example but not sure what this means. Thanks! -- View this message in context: http://www.nabble.com/DateTextField---what-am-I-missing-here--tp17215983p17215983.html Sent from
SSL RequestCodingStrategy question
Hi, Have a question about the reference document on wiki for How to switch to ssl mode (http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html), why do SecureWebRequestCodingStrategy and even the custom RequestProcessors throw away the query string and ?wicket: portion of the URL? Isnt that going to be required when the page is redirected? -- View this message in context: http://www.nabble.com/SSL-RequestCodingStrategy-question-tp17219573p17219573.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
A question about IHeaderContributor
I'm using Wicket 1.2. I have a Form that implements IHeaderContributor. My intent is to use renderHead(Response) to write some JavaScript to the response. The Form is added to the Page. However, renderHead(...) on my Form is never called. Am I using this interface incorrectly? Thanks, Nate
Re: Processing a form before page components are created
The reason I want to do this is that my pages are stateless, and I want to process the submitted form before all the components on the page are initialised, incase I need to load different data models, or redirect the request to another page, thus saving unnecessary database calls and component initialisation. At the moment what I am doing is processing the form by directly reading the page parameters in the constructor before I add any components to the page, and then redirecting the request or initializing the page as appropriate (bypassing the use of Form.onSubmit). If you make sure your models/ components work lazily you can avoid database calls being done until the components are actually rendered. Rendering is a separate phase executing after component construction and form handling. And you can let your form just populate a simple bean to avoid database access. I wouldn't worry about the creation of a few components, and you can break of any time with a RestartResponseException or set the next page (without breaking off current processing) using setResponsePage. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: A question about IHeaderContributor
On Tue, May 13, 2008 at 5:28 PM, nate roe [EMAIL PROTECTED] wrote: I can try that I suppose. The Javadoc for 1.2 seems to mention Component quite a lot though: http://wicket.sourceforge.net/apidocs/wicket/markup/html/IHeaderContributor.html Right. I guess I just lost track of what was implemented when. If the docs say it and it doesn't work it might be a bug or you might be overlooking something. If you think it is a bug, please open a JIRA issue for it. Though I would think someone would have reported it earlier, so pls make sure you check your code well. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to reset the feedback panel
How do I reset the feedback panel from within an event handler? I tried to set the feedback's model to null, but that throws an error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.evite.event.model.Event expression: feedback at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes olver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope rtyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j ava:84)
Re: How to reset the feedback panel
In 1.3 and up (so this won't work for 1.2): You can use Session.get().getFeedbackMessages().clear() (or call clear using a filter to just clear specific ones). Component specific feedback messages are also temporarily stored in the session, so you'll get those as well. Btw, Session#getFeedbackMessages says @return unmodifiable list of feedback messages. This is wrong, as it is mutable (and it is actually not a list anymore). Could you please create a JIRA issue to fix the javadoc for 1.3 and 1.4? Cheers, Eelco On Tue, May 13, 2008 at 6:28 PM, Michael Mehrle [EMAIL PROTECTED] wrote: How do I reset the feedback panel from within an event handler? I tried to set the feedback's model to null, but that throws an error: org.apache.wicket.WicketRuntimeException: No get method defined for class: class com.evite.event.model.Event expression: feedback at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyRes olver.java:433) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(Prope rtyResolver.java:275) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.j ava:84) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Terracotta and PatternValidator
Richard, I have run into the same issue. I solved it with brute force by writing a regexp to capture all the inner classes from the Pattern class and inserting them into my terracotta config's dso section. It is not the most elegant solution but it will get you past this issue. Good luck, Ryan On Mon, May 12, 2008 at 11:44 AM, richardwilko [EMAIL PROTECTED] wrote: Hi, I've come across a problem with the wicket-terracotta intergration. If you have a PatternValidator (like EmailAddressValidator) attached to an input then terracotta throws a non portable exception because java.util.regex.Pattern isnt in the additional-boot-jar-classes bit of the config xml. I tried to add this myself but it turns out that Pattern has loads of internal classes that it uses and so it is a pain. As PatternValidator is a wicket class it would seem that these changes should either go into the wicket-terracotta integration project's xml config or that the Pattern in PatternValidator should be made transient and the code adapted to take care of it. Has anyone else got round this problem? I'm thinking for now I should write my own Validator that does hold the Pattern object. Cheers Richard -- View this message in context: http://www.nabble.com/Terracotta-and-PatternValidator-tp17189868p17189868.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket play nicely with GWT
Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + .token); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: consistent way of getting httpservletresponse?
On Tue, May 13, 2008 at 7:10 PM, Ritz123 [EMAIL PROTECTED] wrote: Hi, Whats the consistent way of getting HttpServletResponse from the RequestCycle? ((WebRequestCycle)RequestCycle.get()).getWebResponse().getHttpServletResponse(); Why doesnt the Response class have abstract or default implementation, that would make life much easier. because the Web or HTTP implementation is only one protocol that wicket supports. i know a few people wrote up apache mina implementation, and you can roll others. response is not meant to represent directly the servlet response, only some abstract thing that wicket is rendering into. -igor -- View this message in context: http://www.nabble.com/consistent-way-of-getting-httpservletresponse--tp17222102p17222102.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket play nicely with GWT
((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest().getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin [EMAIL PROTECTED] wrote: Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + .token); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket play nicely with GWT
Thanks, I'll try that. What I did while waiting to see what others come up with is dump the servlet session and see what the key was. Messy (and error prone as I refactor) but worked in the short term. Here it is from inside the GWT servlet in case anyone is interested: private String getTokenFromWicketSession() { String token = (String) getThreadLocalRequest() .getSession() .getAttribute( wicket:Glasshost.wicket:com.glasshost.model.entity.user.User.token); return token; } I'm thinking what really needs to happen is to rip out the source of the GWT RPC sevlet (apache lic after all) and implement a wicket filter (or some other wicket handler) so the target of a GWT RPC call can be a more *normal* wicket object. I'm too new to Wicket to know if that is a reasonable path to try though. - Brill -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 10:53 PM To: users@wicket.apache.org Subject: Re: Wicket play nicely with GWT ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( ).getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin [EMAIL PROTECTED] wrote: Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + .token); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Wicket play nicely with GWT
laugh I just now saw your post *just* before this one... Looks like we have a magic bullet here :) Thanks for you help! - Brill Pappin -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 10:53 PM To: users@wicket.apache.org Subject: Re: Wicket play nicely with GWT ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( ).getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin [EMAIL PROTECTED] wrote: Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + .token); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Terracotta and PatternValidator
I have run into the same issue. I solved it with brute force by writing a regexp to capture all the inner classes from the Pattern class and inserting them into my terracotta config's dso section. It is not the most elegant solution but it will get you past this issue. Why not just writing a validator that keeps a reference to the regex string rather than the Pattern, and create the pattern object just when you need it? There is some overhead in that, but it shouldn't be too bad considering that you'll only use a few of those objects a request at most? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket play nicely with GWT
you can always generate a callback url using urlfor(interface) and then pass that url to the gwt component. for example of this see how Link generates a url that results in onLinkClicked() being invoked on it. -igor On Tue, May 13, 2008 at 8:51 PM, Brill Pappin [EMAIL PROTECTED] wrote: Thanks, I'll try that. What I did while waiting to see what others come up with is dump the servlet session and see what the key was. Messy (and error prone as I refactor) but worked in the short term. Here it is from inside the GWT servlet in case anyone is interested: private String getTokenFromWicketSession() { String token = (String) getThreadLocalRequest() .getSession() .getAttribute( wicket:Glasshost.wicket:com.glasshost.model.entity.user.User.token); return token; } I'm thinking what really needs to happen is to rip out the source of the GWT RPC sevlet (apache lic after all) and implement a wicket filter (or some other wicket handler) so the target of a GWT RPC call can be a more *normal* wicket object. I'm too new to Wicket to know if that is a reasonable path to try though. - Brill -Original Message- From: Igor Vaynberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 13, 2008 10:53 PM To: users@wicket.apache.org Subject: Re: Wicket play nicely with GWT ((WebRequestCycle)RequestCycle.get()).getWebRequest().getHttpServletRequest( ).getSession() should get you the raw http session. -igor On Tue, May 13, 2008 at 7:23 PM, Brill Pappin [EMAIL PROTECTED] wrote: Ok, I've read over several threads on Wicket+GWT and know that are several people using the two together. I've got a nice clean setup that is working all except for one minor detail. The problem is that Wicket actually does the authentication and I store a token in the sessionStore, however I need to get that token back in the non-wicket GWT service servlet. What I'm currently trying to do is: String token = (String) RequestCycle.get().getApplication() .getSessionStore().getAttribute( RequestCycle.get().getRequest(), User.class.getName() + .token); But I'm getting a NPE as if the RequestCycle is not initialized or something :) So, what patterns are people who integrate GWT and Wicket using? There are many I can think of, some right out of the park, but what I really need is access to the session vars in a wicket context. I should also mention that I'm new to Wicket (read: finally have a reason to go explore it as I've been meaning to do). Comments, suggestions? - Brill Pappin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]