Re: Inheritance inside a Container
ok...here is the error message (very long) summary : abstrac class AbstractPullDownPanel (the Parent Panel , abstract , containing a title bar and a content WebMarkupContainer) , the full code is shown in the previous post. class SelectPlanetsPanel extends AbstractPullDownPanel : containing a CheckGroup , can be expanded / collapsed by AbstractPullDownPanel org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = checkGroup, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup.CheckGroup, isVisible = true, isVersioned = false]] 2. [MarkupContainer [Component id = list, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list.SelectStarsPanel2$1, isVisible = true, isVersioned = false]] 3. [MarkupContainer [Component id = 0, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:0.ListItem, isVisible = true, isVersioned = false]] 4. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:0:check.PointShownCheckBox, isVisible = true, isVersioned = false]] 5. [Component id = name, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:0:name.Label, isVisible = true, isVersioned = false] 6. [Component id = starIcon, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:0:starIcon.Image, isVisible = true, isVersioned = false] 7. [MarkupContainer [Component id = 1, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:1.ListItem, isVisible = true, isVersioned = false]] 8. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:1:check.PointShownCheckBox, isVisible = true, isVersioned = false]] 9. [Component id = name, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:1:name.Label, isVisible = true, isVersioned = false] 10. [Component id = starIcon, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:1:starIcon.Image, isVisible = true, isVersioned = false] 11. [MarkupContainer [Component id = 2, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:2.ListItem, isVisible = true, isVersioned = false]] 12. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:2:check.PointShownCheckBox, isVisible = true, isVersioned = false]] 13. [Component id = name, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:2:name.Label, isVisible = true, isVersioned = false] 14. [Component id = starIcon, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:2:starIcon.Image, isVisible = true, isVersioned = false] 15. [MarkupContainer [Component id = 3, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:3.ListItem, isVisible = true, isVersioned = false]] 16. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:3:check.PointShownCheckBox, isVisible = true, isVersioned = false]] 17. [Component id = name, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:3:name.Label, isVisible = true, isVersioned = false] 18. [Component id = starIcon, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:3:starIcon.Image, isVisible = true, isVersioned = false] 19. [MarkupContainer [Component id = 4, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:4.ListItem, isVisible = true, isVersioned = false]] 20. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:4:check.PointShownCheckBox, isVisible = true, isVersioned = false]] 21. [Component id = name, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:4:name.Label, isVisible = true, isVersioned = false] 22. [Component id = starIcon, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:4:starIcon.Image, isVisible = true, isVersioned = false] 23. [MarkupContainer [Component id = 5, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:5.ListItem, isVisible = true, isVersioned = false]] 24. [MarkupContainer [Component id = check, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup:list:5:check.PointShownCheckBox, isVisible =
Re: idea: automatic component repo
well, i have thought about this for about 90 seconds, but we need to start somewhere: http://cwiki.apache.org/confluence/display/WICKET/Wicket+Component+JAR+Metadata if people could pitch in and add ideas to the list, we can pare it down later brian.diekelman wrote: Jonathan Locke wrote: - (only signed) jars could be automatically picked up by some naming pattern from maven repos and deployed as live demos Once a signed jar is identified, what about something like OSGi to deploy it? - metadata would define an application name - load the component(s) bundle into the OSGi framework, have a listener for new bundle registrations (http://felix.apache.org/site/apache-felix-tutorial-example-1.html) - deploy the application to http://sitename/appName/ (have a dispatcher servlet filter that reads the app name, trims it, and forwards to the appropriation WebApplication within a bundle) - when a new version of the module is released just de-activate the old bundle and activate the new one (versions based on maven artifact/group ids) I have only been playing with OSGi for jar deployments in a very narrow scope, but it seems like a good option. It should allow you to avoid restarting anything for app deployments. -- View this message in context: http://www.nabble.com/idea%3A-automatic-component-repo-tp17979177p18024576.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: idea: automatic component repo
Looking good, I just added metadata about javascript libraries (versions etc)... Jonathan Locke wrote: well, i have thought about this for about 90 seconds, but we need to start somewhere: http://cwiki.apache.org/confluence/display/WICKET/Wicket+Component+JAR+Metadata if people could pitch in and add ideas to the list, we can pare it down later brian.diekelman wrote: Jonathan Locke wrote: - (only signed) jars could be automatically picked up by some naming pattern from maven repos and deployed as live demos Once a signed jar is identified, what about something like OSGi to deploy it? - metadata would define an application name - load the component(s) bundle into the OSGi framework, have a listener for new bundle registrations (http://felix.apache.org/site/apache-felix-tutorial-example-1.html) - deploy the application to http://sitename/appName/ (have a dispatcher servlet filter that reads the app name, trims it, and forwards to the appropriation WebApplication within a bundle) - when a new version of the module is released just de-activate the old bundle and activate the new one (versions based on maven artifact/group ids) I have only been playing with OSGi for jar deployments in a very narrow scope, but it seems like a good option. It should allow you to avoid restarting anything for app deployments. -- -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: Junit Wicket tests in Wasp/Swarm environment
Hi, Thank you very much for the Java solution :) ! I have also corrected the place to return a new custom session :). Now the first test case runs without problems, but in the second and third test case I get the following exception: java.lang.IllegalArgumentException: Another ActionFactory is already registered with the following key: test.front.MyWicketTester$1:MyAppl-login at org.apache.wicket.security.actions.Actions.registerActionFactory(Actions.java:80) at org.apache.wicket.security.swarm.actions.SwarmActionFactory.init(SwarmActionFactory.java:86) at xxx.yyy.zzz.front.security.MyActionFactory.init(MyActionFactory.java:28) at xxx.yyy.zzz.front.MyApplication.setupActionFactory(MyApplication.java:177) at org.apache.wicket.security.swarm.SwarmWebApplication.init(SwarmWebApplication.java:96) at xxx.yyy.zzz.front.MyApplication.init(MyApplication.java:38) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:526) at org.apache.wicket.protocol.http.MockWebApplication.init(MockWebApplication.java:151) at org.apache.wicket.util.tester.BaseWicketTester.init(BaseWicketTester.java:205) at org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:308) at org.apache.wicket.util.tester.WicketTester.init(WicketTester.java:291) at test.front.MyWicketTester.init(MyWicketTester.java:27) at test.front.LoginTest.setUp(LoginTest.java:50) at junit.framework.TestCase.runBare(TestCase.java:132) I tried to unregister the hive, but anyway the exception is thrown. How can I remove the ActionFactory ? Or can I avoid, that it is registered again ? Thanks again Andrea public class MyWicketTester extends WicketTester { public MyWicketTester(final ApplicationContextMock appctx) { super(new MyApplication() { @Override protected void initSpring() { addComponentInstantiationListener(new SpringComponentInjector(this, appctx)); InjectorHolder.getInjector().inject(this); }; @Override public Session newSession(final Request request, Response response) { ... } }); } } public class LoginTest extends TestCase { private WicketTester tester; private FormTester form; private PersonService personServiceMock; private LocationService locationServiceMock; @Before public void setUp() throws Exception { personServiceMock = EasyMock.createStrictMock(PersonService.class); locationServiceMock = EasyMock.createStrictMock(LocationService.class); ApplicationContextMock appctx = new ApplicationContextMock(); appctx.putBean(personService, personServiceMock); appctx.putBean(locationService, locationServiceMock); tester = new MyWicketTester(appctx); } @After public void tearDown() { // unregister factory HiveMind.unregisterHive(((MyApplication)tester.getApplication()).getHiveKey()); } @Test public void testLoginPageRender(){ ... } @Test public void testInvalidLogin(){ ... } @Test public void testValidLogin(){ ... } 2008/6/19, Maurice Marrink [EMAIL PROTECTED]: Sorry never done much with spring, but according to this http://cwiki.apache.org/WICKET/spring.html#Spring-UnitTestingtheProxyApproach you were on the right track. So if you do your spring config in a protected method which is called by your application.init. you can override that method in your junit tests to use the mock springcontext. Maurice On Thu, Jun 19, 2008 at 11:44 AM, Andrea Jahn [EMAIL PROTECTED] wrote: My initial problem was, that I have different application contexts in the test environment and in the Web application and therefore different calls of addComponentInstantiationListener. In my test environment I have a ApplicationContextMock, which I have to add as second parameter: addComponentInstantiationListener(*new* SpringComponentInjector(*this*, appctx)); In the Web application the application context for the Spring beans is configured in application-context.xml. So when I call MyApplication.init() from the test environment I get the exception No WebApplicationContext found: noContextLoaderListener registered?, when addComponentInstantiationListener(new SpringComponentInjector(this)) is called. Perhaps is there another possibility to add the appctx in the test environment or another place to call addComponentInstantiationListener(new SpringComponentInjector(this)) in the Web application ?? Thanks Andrea
Session Creation Problem
Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DefaultAbstractTree or BaseTree?
I've read at http://markmail.org/message/3247g6jj2kvclmaw?q=list:org.apache.wicket.users+DefaultAbstractTree that DefaultAbstractTree will be deprecated in the future. Is this still the plan? I am using it to get a tree with folder icons, which none of the core subclasses of BaseTree does directly. Thanks, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is it safe to share static components across multiple page instances and request threads?
Hi, Is it threadsafe and wicket safe to share static Components across multiple instances of a Page (as well as across request threads) in wicket? Say for example I have a BookmarkablePageLink that takes no dynamic PageParameter arguments, can I create this as a static class member and share it across all instances of the Page on which it is used? (instead if creating a new instance for each new page). Rgs, Joel
Re: Is it safe to share static components across multiple page instances and request threads?
(BTW I am assuming that since each component has a parent that sharing is NOT allowed) -- From: Joel Halbert [EMAIL PROTECTED] Sent: Friday, June 20, 2008 9:29 AM To: users@wicket.apache.org Subject: Is it safe to share static components across multiple page instances and request threads? Hi, Is it threadsafe and wicket safe to share static Components across multiple instances of a Page (as well as across request threads) in wicket? Say for example I have a BookmarkablePageLink that takes no dynamic PageParameter arguments, can I create this as a static class member and share it across all instances of the Page on which it is used? (instead if creating a new instance for each new page). Rgs, Joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket-rad wish list
andriy and i and wille are working on a new wicket-rad property editor. we are making it more general and more pluggable now (more than bean forms) and wanted to ask for your use cases. please post your wishes here. -- View this message in context: http://www.nabble.com/wicket-rad-wish-list-tp18025063p18025063.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: [Newbie]Session lost in an AjaxFallbackLink onClick()
Hi A little up... Any help welcome :$ Thanks in advance Nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18025072.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: [Newbie]Session lost in an AjaxFallbackLink onClick()
which part is null? On Thu, Jun 19, 2008 at 9:37 PM, A nono life [EMAIL PROTECTED] wrote: Hi, When in an AjaxFallbackLink's onClick(), the object I retrieve from my session is null, even if in my form constructor the object was properly retrieved : public CreatureForm(String id, HibernateObjectModel object ) { super(id, object); Creature sessionCreature = ((DemoUser) ((DemoSession) getSession()).getUser()).getCreature() ; System.out.println(Creature name in the form : + sessionCreature.getName()); System.out.println(Creature location : + sessionCreature.getCurrentXP()); add(new AjaxFallbackLink(aLink){ @Override public void onClick(AjaxRequestTarget target) { Creature sessionCreature = ((DemoUser) ((DemoSession) getSession()).getUser()).getCreature() ; System.out.println(Creature name in the form : + sessionCreature.getName()); System.out.println(Creature location : + sessionCreature.getCurrentXP()); } } In the onClick, I get a java.lang.NullPointerException... What do I do wrong ? Thanks in advance ++ Nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18016504.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: [Newbie]Session lost in an AjaxFallbackLink onClick()
where is your NullPointerException? Creature sessionCreature = ((DemoUser) ((DemoSession) getSession()).getUser()).getCreature() ; The Session or the user? On Fri, Jun 20, 2008 at 11:49 AM, A nono life [EMAIL PROTECTED] wrote: Hi A little up... Any help welcome :$ Thanks in advance Nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18025072.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] -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74
Re: Two gmap2 applications
smallufo wrote: About the applications, do they work for you from were you can see em? The Lucky Maps works to the extend that it draws the Polygons/Lines on the map but it stays fixed on Berlin for me. The Sunrise Sunset Moonrise Moonset Calculation only works for me if I select English, then it stays fixed on New York. I observed some problems on some PCs On some computer , the map is un-clickable And on some computers , firefox 2/3 will not draw some line . I am sure the coordinates are output (via wicket's AJAX debugger) I don't know why. ok, I start to understand. I can confirm that the maps are clickable on my computer. Also that sometimes some lines are not drawn. On my computer I get the impression, that it is sometimes the lines going north, that are now drawn. I have not gone into deep calculation, but could it be that the lines extend the shown map very far? Maybe restricting the endpoints somewhere close to the border of the map might help. wicket.contrib.gmap.event.LoadListener might help figuring out the coordinates of the border of the shown map. happy coding, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Newbie]Session lost in an AjaxFallbackLink onClick()
Hi Johan Compagner wrote: which part is null? It's the sessionCreature which is null, I get NullErrorException when trying to do something with it. My getSession().getUser() went without any hurdle. Thanks again ++ Nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18025932.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: Is it safe to share static components across multiple page instances and request threads?
no On Fri, Jun 20, 2008 at 10:29 AM, Joel Halbert [EMAIL PROTECTED] wrote: Hi, Is it threadsafe and wicket safe to share static Components across multiple instances of a Page (as well as across request threads) in wicket? Say for example I have a BookmarkablePageLink that takes no dynamic PageParameter arguments, can I create this as a static class member and share it across all instances of the Page on which it is used? (instead if creating a new instance for each new page). Rgs, Joel -- Become a Wicket expert, learn from the best: http://wicketinaction.com 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]
Combine custom component with Button
Hi, I am still a newbie in Wicket. After having read a lot of examples and blogs, I still did not achieve to create a custom component. I want to create a wrapper for the GoogleVisualization API. The diagrams shall be redrawn when someone clicks on a button. I wrote a class, that creates the JavaScript for the Google Visualization Diagram by a header contribution. After that I created a sample page, that contains the button. As I understood I have to attach a behavior (e.g. subclass of AbstractDefaultAjaxBehavior) to the button, in order to make complex responses to the click. How can I add the behavior? Just button.add(new MyBehavior()) did not work. The code in MyBehavior's respond method is not executed. Secondly, if I succeed to call the callback function, the diagram should be redrawn by executin a JavaScript function. Can I append any JavaScript statement to the AjaxRequestTarget object of the respond() method, and it will be executed automatically? Best regards, and thanks a lot! -- View this message in context: http://www.nabble.com/Combine-custom-component-with-Button-tp18026191p18026191.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: Two gmap2 applications
I start to understand. I can confirm that the maps are clickable on my computer. Also that sometimes some lines are not drawn. On my computer I get the impression, that it is sometimes the lines going north, that are now drawn. I have not gone into deep calculation, but could it be that the lines extend the shown map very far? Yes , because I don't know the map border. I always draw the line to 10 degrees. It will go very far if zoomlevel is large... Maybe restricting the endpoints somewhere close to the border of the map might help. wicket.contrib.gmap.event.LoadListener might help figuring out the coordinates of the border of the shown map. Thank you I'll look into it.
iterate every tag
Hi everybody! I want iterate every tags on page and change attribute for some tags. How can i do it? When i move wicket filter (from /* to /app/* ) I see that attributes(src, href) changed from some path to ../some path so i feel that my problem may be solved in such way. -- View this message in context: http://www.nabble.com/iterate-every-tag-tp18027745p18027745.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: wicket servlet mapping to subdirectory
Hi again ! I've tried to solve my issue, but had no luck so far. Here is the web.xml snippet I use: servlet servlet-nameACSWebapp/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param init-param param-namefilterPath/param-name param-valueapp/*/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-valueapp/*/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameACSWebapp/servlet-name url-pattern/app/*/url-pattern /servlet-mapping I am not sure if I need the filterPath and filterMappingUrlPattern init parameters, but I left them in. My application is deployed with an application.xml containing module web web-uriACS.war/web-uri context-rootACS/context-root /web /module When I call http://ip:port/ACS/app/ I am redirected to http://ip:port/ACS/;jsessionid=d5a0c3193157101e4c749c214a05985eb6afb0ce6bc9.e34RaxuNah4Rai0LahqTaNuRa34Te6fznA5Pp7ftolbGmkTy?wicket:bookmarkablePage=%3Aat.schnirkel.acs.MySignInPage which of course does not work. Mapping the servlet to /* works, but then my Acegi filter is not invoked, because OC4J seems to ignore urls without a page in front of the ?, although I've configured the filter with a /* Any ideas on this ? Thanks a lot, Tom My environment is OC4J, java 4 and wicket 1.3.3. Mattom schrieb: Hi ! No, sorry, maybe i was not precise enough, when i have the /app/* mapping, i can access my HomePage directly, but all links from the HomePage as well as the style sheet link and some image links (all within wicket:link) don't work, as the /app/ part is missing. The only images working are the one from the tree I use as menu. Basically I don't need the /app/ subdirectory, but servlet filters in oc4j seem to be rather buggy, and they are not called, if you don't have either a page or a directory, just ip:port/context/?... does not work, as the filters are not called. So I tried to trick the filter (acegi) by adding a subdirectory... I guess I have to add some filterPath or filterMappingPath flag to the init-params of the servlet, but so far nothing worked. I'll dig into the sources deeper tomorrow. Thanks ! Tom Original-Nachricht Datum: Thu, 19 Jun 2008 21:42:45 +0100 Von: Gwyn Evans [EMAIL PROTECTED] An: users@wicket.apache.org Betreff: Re: wicket servlet mapping to subdirectory When you say I always get redirected to the root of the webapp, do you mean when first trying to access your app, you have to go via a redirect or some such that takes you to http://www.mysite.com/; or similar? The 'traditional' trick was to have an index.html that redirected to app/ as below - any uise? html head meta http-equiv=Refresh content=0; url=app /head /html /Gwyn On Thu, Jun 19, 2008 at 5:30 PM, Thomas Lutz [EMAIL PROTECTED] wrote: Hi list ! I am forced to use the wicket servlet (1.3.3) instead of the filter because of oc4j. I mapped the servlet to servlet-mapping servlet-nameWicket Webapp/servlet-name url-pattern/app/*/url-pattern /servlet-mapping This does not work, I always get redirected to the root of the webapp, and therefore none of my pages shows up. If I map to /*, everything works fine, but then my acegi filters to not work... Is there any parameter I need to set to tell wicket about the different location ? Or, is it possible to configure some fake name in front of the request strings ? ? Thanks a lot, Tom - 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: [Newbie]Session lost in an AjaxFallbackLink onClick()
and that is your own object. So you clear it somewhere On Fri, Jun 20, 2008 at 11:16 AM, A nono life [EMAIL PROTECTED] wrote: Hi Johan Compagner wrote: which part is null? It's the sessionCreature which is null, I get NullErrorException when trying to do something with it. My getSession().getUser() went without any hurdle. Thanks again ++ Nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18025932.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: ModalWindow with internal ModalWindow problem
Hi Marieke Could you confirm that your problem are solved? Nino Saturnino Martinez Vazquez Wael wrote: Marieke Vandamme wrote: That's nice. Our company's surfing control blocks the site :-) I'll try to download it at home. I don't think the problems happen because it's the homepage. Could just be a problem in what I've done then... In my original project, the page wasn't the homepage and the problem was the same. I debugged the project a couple of times and also couldn't get a grip of why things go wrong.. I also think it's strange nobody else noticed this, as the example of a modal window opening from another modal window is in the wicket-examples. Are you going to post it as a bug? https://issues.apache.org/jira/browse/WICKET-1710 you can get the workaround there too. BTW your it department doesnt like zip files either... Thanks for the help ! Nino.Martinez wrote: Got it working, I believe there are an issue. Somehow the model on the modal window invoking page are not being updated. If I create a final page and pass that into the PageCreator it seems to work. But im still a little curious about why it seems that the main page's model aren't updated, could it be because it's the homepage maybe?... Heres the edited source (please remember the full url including dots or you will get spammed with ads): http://www15.flyupload.com/dl?fid=175617x=cCFDALnJB9T2ETL9UDILeA.. BTW if you know a better place to share files without too much hassle please say so.. Nino Saturnino Martinez Vazquez Wael wrote: Hmm seems to be something very wierd. I've debugged it(changed your source a bit so that the main page now gives the arraylist as a model to the headmodal), and it does not seem to maintain state somehow. So head modal gets an empty list on click 1 and then at click 3 it's suddenly there again wierd, filled. I'll poke at it some more.. Do you want the edited source? Nino Saturnino Martinez Vazquez Wael wrote: Ahh, I did steps 1,2,3,2,3,2,4 Problem appears as you write. Somethings seem to get out of synch. And it does seem that there are something that are inconsistant, 10 mins and i'll see if I can hack something up that works. Or if it's a true bug. Marieke Vandamme wrote: Are you sure? The version I'm using is 1.4m2, so I don't think so much has changed. Did you do the following steps and have the list filled the second time? : 1- click 'Open Head Modal Window' 2- click 'Open Inner Modal Window' 3- close the modalwindow with 'When closing this window a date will be added to the list..' on it 4- close the head modal window 5- redo steps 1 to 3 Can you please test above for me again? Thanks. Nino.Martinez wrote: Hmm, okay I went ahead and created a maven project with a pom. For minimal setup. Using wicket 1.4-snapshot. And it are working, which browser are you using, im using FF2 and safari3.. However this are using wicket 1.4-snapshot(from wicketstuff repo) can you try to use that and see it the problem are solved? Just to be sure? Marieke Vandamme wrote: Hello, Okay, second try.. I made my war again and tested it myself in tomcat 6. It seems to work, so I put it on the server again and hope it works for you too.. I also created a zip with my sources and libraries that you can use in eclipse : http://www.driespannenkoeken.be/src.zip If that's still not enough , please let me know. Thanks for the help. Nino.Martinez wrote: Hi Marieke Your war file does not deploy/startup, atleast on tomcat, could you do the same using the quickstart archetype, it should take you 2 mins doing that(and give me something that I can look at in eclipse without too much hassle)? I know Im being lazy but, thats the benefit of being the helper... Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3722 ms Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous errors Marieke Vandamme wrote: Hey, I found a place where I can place my war for a while : http://www.driespannenkoeken.be/ModalWindowTestcase2.war I can change my application without modalwindows, but I first want to find out what the problem is.. Would find it easier if I don't have to change it :-) Hope you guys find the time to download my war and test it. Thanks again ! Nino.Martinez wrote: Hi Marieke First of all upload your quickstart project somewhere and share the link here. Please be sure theres not too many commercials when downloading, people tend to bully you with it:) So I have two suggestions. 1. I think that we should try to sort out if it's a bug causing your problem or it's wrong usage. 2. I
Re: ModalWindow with internal ModalWindow problem
Hey, I tried your example and seems to be working indeed. I haven't found the time to update my original project, but I'm sure it'll work using the same implementation. I just hope that someone will fix the bug, because the other bug I reported, also concerning ModalWindow, hasn't been fixed to (https://issues.apache.org/jira/browse/WICKET-1576). So I'll have to implement your workaround, if I want my project to go in production. Thanks again for the help / time. Nino.Martinez wrote: Hi Marieke Could you confirm that your problem are solved? Nino Saturnino Martinez Vazquez Wael wrote: Marieke Vandamme wrote: That's nice. Our company's surfing control blocks the site :-) I'll try to download it at home. I don't think the problems happen because it's the homepage. Could just be a problem in what I've done then... In my original project, the page wasn't the homepage and the problem was the same. I debugged the project a couple of times and also couldn't get a grip of why things go wrong.. I also think it's strange nobody else noticed this, as the example of a modal window opening from another modal window is in the wicket-examples. Are you going to post it as a bug? https://issues.apache.org/jira/browse/WICKET-1710 you can get the workaround there too. BTW your it department doesnt like zip files either... Thanks for the help ! Nino.Martinez wrote: Got it working, I believe there are an issue. Somehow the model on the modal window invoking page are not being updated. If I create a final page and pass that into the PageCreator it seems to work. But im still a little curious about why it seems that the main page's model aren't updated, could it be because it's the homepage maybe?... Heres the edited source (please remember the full url including dots or you will get spammed with ads): http://www15.flyupload.com/dl?fid=175617x=cCFDALnJB9T2ETL9UDILeA.. BTW if you know a better place to share files without too much hassle please say so.. Nino Saturnino Martinez Vazquez Wael wrote: Hmm seems to be something very wierd. I've debugged it(changed your source a bit so that the main page now gives the arraylist as a model to the headmodal), and it does not seem to maintain state somehow. So head modal gets an empty list on click 1 and then at click 3 it's suddenly there again wierd, filled. I'll poke at it some more.. Do you want the edited source? Nino Saturnino Martinez Vazquez Wael wrote: Ahh, I did steps 1,2,3,2,3,2,4 Problem appears as you write. Somethings seem to get out of synch. And it does seem that there are something that are inconsistant, 10 mins and i'll see if I can hack something up that works. Or if it's a true bug. Marieke Vandamme wrote: Are you sure? The version I'm using is 1.4m2, so I don't think so much has changed. Did you do the following steps and have the list filled the second time? : 1- click 'Open Head Modal Window' 2- click 'Open Inner Modal Window' 3- close the modalwindow with 'When closing this window a date will be added to the list..' on it 4- close the head modal window 5- redo steps 1 to 3 Can you please test above for me again? Thanks. Nino.Martinez wrote: Hmm, okay I went ahead and created a maven project with a pom. For minimal setup. Using wicket 1.4-snapshot. And it are working, which browser are you using, im using FF2 and safari3.. However this are using wicket 1.4-snapshot(from wicketstuff repo) can you try to use that and see it the problem are solved? Just to be sure? Marieke Vandamme wrote: Hello, Okay, second try.. I made my war again and tested it myself in tomcat 6. It seems to work, so I put it on the server again and hope it works for you too.. I also created a zip with my sources and libraries that you can use in eclipse : http://www.driespannenkoeken.be/src.zip If that's still not enough , please let me know. Thanks for the help. Nino.Martinez wrote: Hi Marieke Your war file does not deploy/startup, atleast on tomcat, could you do the same using the quickstart archetype, it should take you 2 mins doing that(and give me something that I can look at in eclipse without too much hassle)? I know Im being lazy but, thats the benefit of being the helper... Jun 19, 2008 11:37:53 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3722 ms Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jun 19, 2008 11:41:58 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/ModalWindowTestcase2] startup failed due to previous errors Marieke Vandamme wrote: Hey, I found a place where I can place my war for a while : http://www.driespannenkoeken.be/ModalWindowTestcase2.war I can change my application without
Re: Page Expired with ModalWindow
Why would you want to open a new ModalWindow? Can't you just open your WebPage in the first ModalWindow? Daniel Wu wrote: Hi, the application I've been developing have to open modal dialogs in sequence. I have a dialog A, which is a panel with an AjaxLink, and when this AjaxLink is pressed, the dialog A should close and dialog B, which content is a WebPage, should be opened. In order to close dialog A before opening dialog B, the only way I found to do that is simulating the click of an AjaxSubmitLink of the page that contains all these modal dialogs, appending some javascript on the AjaxRequestTarget, which calls the onClick() of the AjaxSubmitLink. This is done when I click the AjaxLink of the panel of dialog A. After that, dialog B is being correctly opened. This dialog B also has an AjaxLink, which should close dialog B. This AjaxLink just call ModalWindow.closeCurrent(target); The problem is that when I click this AjaxLink, I'm getting a PageExpired error. Am I doing something wrong? Does anyone have any idea of why I'm getting this PageExpired? Is there an easier way to open modal dialogs in sequence, opening a new one only the previous one is closed? Daniel -- View this message in context: http://www.nabble.com/Page-Expired-with-ModalWindow-tp17993206p18029428.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]
MarkupResourceStream and classloading
We're using Wicket within an OSGi evironment (Equinox 3.3.0), and have run into an issue with MarkupResourceStream. It is given a class the markup is associated with, but it stores that class using only its name. When accessed, it then tries to instantiate that class through Classes.resolveClass. Unfortunately, despite having our own IClassResolver, without giving in to some bad OSGi practice, it is not permissible for the required class to be visible, only the interfaces. This occurs because of the (helpful) classpath segregation that OSGi encourages, such that a bundle only imports the packages it actually needs, and is not allowed access to anything else. I have logged this as a bug (https://issues.apache.org/jira/browse/WICKET-1681), but the conclusion there was that there should be a workaround. Without either importing specific implementation packages into the affected bundle (fragile, poor practice) or allowing dynamic imports (evil hack to get around not knowing what classes you'll load, effectively drops the benefits of OSGi's classloader separation), I can't see a solution. Does anyone have any suggested solutions, or opinions on whether this should be handled by Wicket or our client code? Thanks, Nick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Callback URL raises JavaScript syntax error
Hi folks, I want to use a Yahoo UI API button and to add a Wicket Listener to one of its event. The Yahoo UI API button has a method for this which mus be called as button.addListener(click, functionname); I am not a JavaScript expert, so I assume, methodname is something like a function pointer. So in my Wicket Java file, I add a header contribution with this and set the CallbackUrl of my Behavior class as functionname. Unfortunately, the callback URLs start with a ? and have some other symbols in their name. This raises a JavaScript error, Firebug says syntax error. There is no error, if I put the callback URL in quotation marks, but then the callback is not triggered. Any hint? Thanks a lot! Best regards -- View this message in context: http://www.nabble.com/Callback-URL-raises-JavaScript-syntax-error-tp18029898p18029898.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 and DatePicker are not using the same date pattern
Yes it is doing the same thing to me. The formats are off unless I use S- for my date style which is not really what I want to use. Have you found a fix for this? Thanks T Eric Rotick wrote: Further to this I've now checked the source and the DatePicker does correctly pick up the date format from the DateTextField or, alternatively, an overridden getDatePattern also works. It seems to be going wrong when the date is sent from the DatePicker back to the DateTextField via the onchange Javascript event handler. I've not yet figured out how this works yet. Has anyone used the DatePicker in this way to confirm that it does or does not work as expected? On Fri, Mar 28, 2008 at 1:18 PM, Eric Rotick [EMAIL PROTECTED] wrote: I have a situation where the DateTextField and DatePicker are not using the same date pattern although I set them to the same value. If I have an existing date in the model then it is formatted correctly and that date is also inherited correctly when the DatePicker opens. When I then select a different date in the DatePicker the correct date value is returned to the DateTextField but the format it wrong. Then if I submit the form I get an error on the DateTextField. For example, if I select a date of 28/Mar/2008 in the DatePicker it gets returned to the DateTextField as 28/3/2008. Any ideas? import org.apache.wicket.datetime.markup.html.form.DateTextField; import org.apache.wicket.datetime.PatternDateConverter; import org.apache.wicket.extensions.yui.calendar.DatePicker; ... public class DateField extends Panel { public DateField( String id, boolean readonly, IField field, IModel model ) { super( id ); final String dateFormat = dd/MMM/; PatternDateConverter pdc = new PatternDateConverter( dateFormat, true ); DateTextField dtf = new DateTextField( textValue, new NamedAccessorModel( model, field.getModelName( ) ), pdc ); add( dtf ); DatePicker dp = new DatePicker( ) { protected boolean enableMonthYearSelection( ) { return true; } protected String getDatePattern( ) { return dateFormat; } }; dtf.add( dp ); } } -- View this message in context: http://www.nabble.com/DateTextField-and-DatePicker-are-not-using-the-same-date-pattern-tp16351493p18030470.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: Session Creation Problem
use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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: Callback URL raises JavaScript syntax error
you have to give it the name of javascript function which will invoke the url, not just the url itself. eg addeventlistener(this, function() { window.location='url'; }) or addeventlistener(this, myfunc); function myfunc() { window.location='url'; } -igor On Fri, Jun 20, 2008 at 6:44 AM, burnt99 [EMAIL PROTECTED] wrote: Hi folks, I want to use a Yahoo UI API button and to add a Wicket Listener to one of its event. The Yahoo UI API button has a method for this which mus be called as button.addListener(click, functionname); I am not a JavaScript expert, so I assume, methodname is something like a function pointer. So in my Wicket Java file, I add a header contribution with this and set the CallbackUrl of my Behavior class as functionname. Unfortunately, the callback URLs start with a ? and have some other symbols in their name. This raises a JavaScript error, Firebug says syntax error. There is no error, if I put the callback URL in quotation marks, but then the callback is not triggered. Any hint? Thanks a lot! Best regards -- View this message in context: http://www.nabble.com/Callback-URL-raises-JavaScript-syntax-error-tp18029898p18029898.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 servlet mapping to subdirectory
interesting 1) you can remove filter init params, when wicket servlet is used the path can be determined from servletrequest 2) can you try with wicket-1.3.x branch to see if we have already fixed it 3) if its still broken file a jira issue -igor On Fri, Jun 20, 2008 at 5:19 AM, Thomas Lutz [EMAIL PROTECTED] wrote: Hi again ! I've tried to solve my issue, but had no luck so far. Here is the web.xml snippet I use: servlet servlet-nameACSWebapp/servlet-name servlet-classorg.apache.wicket.protocol.http.WicketServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valueorg.apache.wicket.spring.SpringWebApplicationFactory/param-value /init-param init-param param-namefilterPath/param-name param-valueapp/*/param-value /init-param init-param param-namefilterMappingUrlPattern/param-name param-valueapp/*/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameACSWebapp/servlet-name url-pattern/app/*/url-pattern /servlet-mapping I am not sure if I need the filterPath and filterMappingUrlPattern init parameters, but I left them in. My application is deployed with an application.xml containing module web web-uriACS.war/web-uri context-rootACS/context-root /web /module When I call http://ip:port/ACS/app/ I am redirected to http://ip:port/ACS/;jsessionid=d5a0c3193157101e4c749c214a05985eb6afb0ce6bc9.e34RaxuNah4Rai0LahqTaNuRa34Te6fznA5Pp7ftolbGmkTy?wicket:bookmarkablePage=%3Aat.schnirkel.acs.MySignInPage which of course does not work. Mapping the servlet to /* works, but then my Acegi filter is not invoked, because OC4J seems to ignore urls without a page in front of the ?, although I've configured the filter with a /* Any ideas on this ? Thanks a lot, Tom My environment is OC4J, java 4 and wicket 1.3.3. Mattom schrieb: Hi ! No, sorry, maybe i was not precise enough, when i have the /app/* mapping, i can access my HomePage directly, but all links from the HomePage as well as the style sheet link and some image links (all within wicket:link) don't work, as the /app/ part is missing. The only images working are the one from the tree I use as menu. Basically I don't need the /app/ subdirectory, but servlet filters in oc4j seem to be rather buggy, and they are not called, if you don't have either a page or a directory, just ip:port/context/?... does not work, as the filters are not called. So I tried to trick the filter (acegi) by adding a subdirectory... I guess I have to add some filterPath or filterMappingPath flag to the init-params of the servlet, but so far nothing worked. I'll dig into the sources deeper tomorrow. Thanks ! Tom Original-Nachricht Datum: Thu, 19 Jun 2008 21:42:45 +0100 Von: Gwyn Evans [EMAIL PROTECTED] An: users@wicket.apache.org Betreff: Re: wicket servlet mapping to subdirectory When you say I always get redirected to the root of the webapp, do you mean when first trying to access your app, you have to go via a redirect or some such that takes you to http://www.mysite.com/; or similar? The 'traditional' trick was to have an index.html that redirected to app/ as below - any uise? html head meta http-equiv=Refresh content=0; url=app /head /html /Gwyn On Thu, Jun 19, 2008 at 5:30 PM, Thomas Lutz [EMAIL PROTECTED] wrote: Hi list ! I am forced to use the wicket servlet (1.3.3) instead of the filter because of oc4j. I mapped the servlet to servlet-mapping servlet-nameWicket Webapp/servlet-name url-pattern/app/*/url-pattern /servlet-mapping This does not work, I always get redirected to the root of the webapp, and therefore none of my pages shows up. If I map to /*, everything works fine, but then my acegi filters to not work... Is there any parameter I need to set to tell wicket about the different location ? Or, is it possible to configure some fake name in front of the request strings ? ? Thanks a lot, Tom - 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: Combine custom component with Button
dont use button since you are not submitting the form, instead use a webmarkupcontainer and attach it to the html button tag of type=button; then wmc.add(new ajaxeventbehavior(onclick) { onevent(ajaxrequesttarget t) { t.appendJavascript(alert('hi');); }}); if you dont need a roundtrip to the server then you can simply do add(new webmarkupcontainer(button) { oncomponenttag(tag) { tag.put(onclick, alert('hi');); } } -igor On Fri, Jun 20, 2008 at 2:35 AM, burnt99 [EMAIL PROTECTED] wrote: Hi, I am still a newbie in Wicket. After having read a lot of examples and blogs, I still did not achieve to create a custom component. I want to create a wrapper for the GoogleVisualization API. The diagrams shall be redrawn when someone clicks on a button. I wrote a class, that creates the JavaScript for the Google Visualization Diagram by a header contribution. After that I created a sample page, that contains the button. As I understood I have to attach a behavior (e.g. subclass of AbstractDefaultAjaxBehavior) to the button, in order to make complex responses to the click. How can I add the behavior? Just button.add(new MyBehavior()) did not work. The code in MyBehavior's respond method is not executed. Secondly, if I succeed to call the callback function, the diagram should be redrawn by executin a JavaScript function. Can I append any JavaScript statement to the AjaxRequestTarget object of the respond() method, and it will be executed automatically? Best regards, and thanks a lot! -- View this message in context: http://www.nabble.com/Combine-custom-component-with-Button-tp18026191p18026191.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: Session Creation Problem
Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Creation Problem
wicket will create session instances for every request if there is no session stored in httpsession. the session is stored into httpsession only when the user encounters a stateful page. i am guessing that since you changed the form to stateless the page itself is no longer stateful and so wicket will not save it into session, thus it creates an interim session for the duration of the request. if you want to manually bind the session then call bind() on it. -igor On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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: Session Creation Problem
Hi Igor, thanks for your support. Still I am a bit confused about the two types of sessions we are dealing with: as far as I understood, there is a wicket session that is stored within the http session of the container. Now, which session is responsible for the Page Expired situations? The Wicket session or the http session? If it would be the http session then it should not matter whether a wicket session is created or not as long as the wicket session is not bound to a http session, right? BTW: for not wasting your time, any links to documentation on the matter would be great as well. I looked through the wicket docs but did not find anything relevant. Cheers, J. Igor Vaynberg wrote: wicket will create session instances for every request if there is no session stored in httpsession. the session is stored into httpsession only when the user encounters a stateful page. i am guessing that since you changed the form to stateless the page itself is no longer stateful and so wicket will not save it into session, thus it creates an interim session for the duration of the request. if you want to manually bind the session then call bind() on it. -igor On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Creation Problem
once the wicket sesson object is bound (stored in httpsesson) their lifecycles are the same. it is httpsession timing out that causes page expired errors. -igor On Fri, Jun 20, 2008 at 9:08 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi Igor, thanks for your support. Still I am a bit confused about the two types of sessions we are dealing with: as far as I understood, there is a wicket session that is stored within the http session of the container. Now, which session is responsible for the Page Expired situations? The Wicket session or the http session? If it would be the http session then it should not matter whether a wicket session is created or not as long as the wicket session is not bound to a http session, right? BTW: for not wasting your time, any links to documentation on the matter would be great as well. I looked through the wicket docs but did not find anything relevant. Cheers, J. Igor Vaynberg wrote: wicket will create session instances for every request if there is no session stored in httpsession. the session is stored into httpsession only when the user encounters a stateful page. i am guessing that since you changed the form to stateless the page itself is no longer stateful and so wicket will not save it into session, thus it creates an interim session for the duration of the request. if you want to manually bind the session then call bind() on it. -igor On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Rare Style disabling and Ajax Panel Replacement Question
Hi again, I have come to the following conclusion so far: -Use detailed CSS specifications is the way to avoid #id clashing. -We will also keep some automatic disabling of CSSs that are no longer in use... we will try not to rely on this mechanism though, and still use what i said in the line above. The disabling of not used CSS will not hurt anyway, and perhaps avoid some unexpected clashing, so why not keeping it too, as a backup mechanism. We could discard it later too... we will see, the main solution is the full detailed css as said above. Thanks all for the help, German 2008/6/18 Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED]: German Morales wrote: Hi, I'm here with Francisco, discussing this subject. The main difference between the approach is the amount of stuff to write in CSS: With the detailed naming of styles (.DetailPanel-A fieldPersonName) you have to write a lot more in the CSS. That is, for each field in DetailPanelA, you have to go with .DetailPanelA #fieldWhatever1, .DetailPanelA #fieldWhatever2, .DetailPanelA #fieldWhateverN instead of the shorter versions #fieldWhatever1, #fieldWhatever2, #fieldWhateverN. Therefore, the shorter versions should be, in theory, easier to write and maintain. Yeah I see the point. But could'nt at least try to hit the fields by selectors: .DetailPanelA fieldsettextarea {color:black}. But on the otherhand you can have one stylesheet that fits all, that could be handy if you ever want todo skinning, by css only(which actually can do alot see css zen garden). On the other hand, producing this #fieldWhatever1 allows the conflict between fieldWhatever1 in DetailPanelA and DetailPanelB, which means that we must introduce some trick to avoid it. Yup popular called clashing. Someone here has found this disabling of CSSs. I think this approach are okay doing simple static pages. But once you mixin ajax trouble begin to rise, and what happens if you have two of the panels clashing in the same page who should win? It is nice because it could be handled in a somehow generic way (allowing producers of DetailPanelN to be un-aware of all this complication), but also we must consider that it adds some extra complexity. Yes it does, but on the other hand, it lessen the burden on the css designer, so it's a tradoff. I'm not completely in favor of one or another approach. The detailed style version is in fact our current solution, and it has the benefit of being simple. But we are trying also the CSS disabling because it has some not-that-bad benefits (CSS simplification, and perhaps the possibility of forget about the CSS conflicts altogether). That's why we would like to hear opinions, and perhaps even more importantly, hear about different approaches, or about hidden traps in our current attempts. Understandable.. I too are looking forward to hear different opinions:) Thanks in advance, German 2008/6/18 Francisco Diaz Trepat - gmail [EMAIL PROTECTED]: That was my approach exactly but I lack the arguments to convince them. I managed to send this mail and see if I'll get better ones :-), or at least community consensus. Maybe if I started a thread I could get some other experiences and opinions on the matter. Thanks Nino. f(t) On Wed, Jun 18, 2008 at 1:49 PM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Francisco I'd much rather go with more detailed naming of your styles, instead of doing complex stuff with dom? Like .DetailPanel-A-fieldPersonName{ position:absolute; left:50px; top: 50px; } Or maybe the problem are more complex than this..? Francisco Diaz Trepat - gmail wrote: Hi all, its been a while. Finally we started migrating other applications from swing to wicket thanks to all your help provided last year. Having said that, I have some colleagues that are looking to develop a way to disable style sheets that are loaded as part of panel replacement. Here is the Scenario: we have a classic web structure: left menu, top header, and center to right Detail area. The detail area is replaced by wicket-ajax functions and each panel usually has an overriden renderHead with code similar to this one: cHtmlHeaderContainer.getHeaderResponse().renderCSSReference(new ResourceReference( this.getClass(), this.getClass().getSimpleName() + .css, getLocale(), getStyle())); Because on more than one detail panel they use a same field but with different position (lets say person.name) they are experiencing some style collision. Lets say that DetailPanel-A and DetailPanel-B show a text-field with the person.name and displays them in different locations. Surely now we have the same style name (by class (.) or by id (#) in some versions). So we have two .css files. *DetailPanel-A.css* with: .fieldPersonName{ position:
RE: Session end method
Assuming this is backed by an HttpSession, wouldn't you also have to register an implementation of HttpSessionListener via web.xml to handle the situation where the HttpSession times out? Correct me if I'm wrong, but in that instance, onUnbind will not be called and the Thread would never be stopped. -Original Message- From: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2008 3:03 AM To: users@wicket.apache.org Subject: Re: Session end method Theres also an unsecure way of doing it, namely this(from applicationclass): @Override protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new DiskPageStore()) { @Override protected void onBind(Request request, Session newSession) { sessionMap.put(newSession.getId(), (ZeuzSession) newSession); super.onBind(request, newSession); } @Override protected void onUnbind(String sessionId) { ZeuzSession session = (ZeuzSession) sessionMap.get(sessionId); session.onBeforeDestroy(); sessionMap.remove(sessionId); super.onUnbind(sessionId); } }; } Eyal Golan wrote: Hello, Is there a method in Session that is called when the Session is ended? Ended = user logs out (invalidate) or time-out (or anything else that can do that) My goal is to keep some information in the session and persist it when the session terminates. Is it legal to create a Thread (as a member in the Session / Application) that every X minutes will get information from the Session and do something with it? -- -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] __ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is it safe to share static components across multiple page instances and request threads?
My guess would be no, since the object hierarchy of a page is a fundamental aspect of Wicket. I don't think that instances of Wicket Component objects are meant to be thread-safe and shared between different Component trees. There is all kinds of mutable data in Component that is not meant to be shared across threads. Creating a new instance of the link for every page would be the correct approach. -Original Message- From: Joel Halbert [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2008 4:31 AM To: users@wicket.apache.org Subject: Re: Is it safe to share static components across multiple page instances and request threads? (BTW I am assuming that since each component has a parent that sharing is NOT allowed) -- From: Joel Halbert [EMAIL PROTECTED] Sent: Friday, June 20, 2008 9:29 AM To: users@wicket.apache.org Subject: Is it safe to share static components across multiple page instances and request threads? Hi, Is it threadsafe and wicket safe to share static Components across multiple instances of a Page (as well as across request threads) in wicket? Say for example I have a BookmarkablePageLink that takes no dynamic PageParameter arguments, can I create this as a static class member and share it across all instances of the Page on which it is used? (instead if creating a new instance for each new page). Rgs, Joel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. _ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help with RadioGroup in Table
Hi All, I have a requirement for a radio button column in a data table. When a row is selected data from one of the columns needs to be placed in a text box on the form. The problem is how to get the selected row to update the text box. I've searched the forums and googled and haven't found a solution that I can get to work. The radio buttons themselves work fine until I try to use an event such as onSelectionChanged which then causes the selection to be lost which has been discussed in other posts. I've read in another similar post that using an ajax behavior is a way to deal with the issue but I haven't been able to figure out how to do that. I'm also struggling to get my head around the correct way to use models for the radio's. The class in the model passed in when creating the RadioPanel containing the Radio has a selected property that I've been trying to use for the value of the radio. I can get a solution to work using checkboxes but the requirement is specifically for radio buttons in order to be compatible with the existing JSP pages in the application. BTW, if I can pull this off there is a good chance future application features will be implemented in Wicket with the idea of eventually migrating the entire application to wicket. If anyone has got something like this working I'd really appreciate some direction. Code snippets: The following code is in addComponents() called from constructor: final RadioGroup selected = new RadioGroup( selected ) // { // @Override // protected void onSelectionChanged( Object newSelection ) // { // super.onSelectionChanged( newSelection ); // newSelection is always null // } // @Override // protected boolean wantOnSelectionChangedNotifications() // { // return true; // } // } ; columns.add( new AbstractColumn( new Model( )) { public void populateItem( final Item cellItem, final String componentId, final IModel rowModel ) { cellItem.add( new RadioPanel( componentId, rowModel )); } }); AjaxFallbackDefaultDataTable table = new AjaxFallbackDefaultDataTable( table, columns, provider, 15 ); selected.add( table ); this.add( selected ); The panel with the Radio: private class RadioPanel extends Panel { public RadioPanel( String id, IModel model ) { super( id, model ); add( new Radio( select, new PropertyModel( model, selected ))); } } The html for the panel: wicket:panel input wicket:id=select type=radio/ /wicket:panel The html for the radio group and table: div wicket:id=selected table wicket:id=table/table /div Thanks in advance, Jim -- View this message in context: http://www.nabble.com/help-with-RadioGroup-in-Table-tp18036005p18036005.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: Session Creation Problem
Hi, thanks again for your help, replacing the form by the stateless form has done the job as I could verify by lowering the http session timeout. What I still do not fully understand is why the error has now disappeared because still a full http session is created as I can see from the Tomcat Management Console. Anyway, perhaps I will take me some time to figure it out by looking into the source... Thanks, J. Igor Vaynberg wrote: once the wicket sesson object is bound (stored in httpsesson) their lifecycles are the same. it is httpsession timing out that causes page expired errors. -igor On Fri, Jun 20, 2008 at 9:08 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi Igor, thanks for your support. Still I am a bit confused about the two types of sessions we are dealing with: as far as I understood, there is a wicket session that is stored within the http session of the container. Now, which session is responsible for the Page Expired situations? The Wicket session or the http session? If it would be the http session then it should not matter whether a wicket session is created or not as long as the wicket session is not bound to a http session, right? BTW: for not wasting your time, any links to documentation on the matter would be great as well. I looked through the wicket docs but did not find anything relevant. Cheers, J. Igor Vaynberg wrote: wicket will create session instances for every request if there is no session stored in httpsession. the session is stored into httpsession only when the user encounters a stateful page. i am guessing that since you changed the form to stateless the page itself is no longer stateful and so wicket will not save it into session, thus it creates an interim session for the duration of the request. if you want to manually bind the session then call bind() on it. -igor On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark
Re: [Newbie]Session lost in an AjaxFallbackLink onClick()
hi again A nono life wrote: I did the following try in between : - I rightly get the user and its content. So this part is properly working - I've tried the form's onSubmit, and there I get some part of my creature data but not all of it (I get the name but not others attributes...). I'm planning to display messages when my creature data are changed, maybe it could help. If you've any other ideas of things I could try, let me know ! This issue is very annoying, looking so strange for something normally so easy :'( bye nono -- View this message in context: http://www.nabble.com/-Newbie-Session-lost-in-an-AjaxFallbackLink-onClick%28%29-tp18016504p18036976.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: Inheritance inside a Container
Hi , after a few try and errors , I can conclude how the problem occurs In the ChildPanel , if my code is as follows : wicket:extend span wicket:id=selectDeselectGroup /span blah... /wicket:extend and code : RadioGroup selectDeselectGroup = new RadioGroup(selectDeselectGroup); add(selectDeselectGroup); Everything goes fine , no matter the Child Panel is collapsed / expanded , page-reloading is OK But , if I add something inside the CheckGroup : wicket:extend span wicket:id=selectDeselectGroup input type=radio wicket:id=selectAll/select all input type=radio wicket:id=deselectAll/clean /span /wicket:extend and code : RadioGroup selectDeselectGroup = new RadioGroup(selectDeselectGroup); add(selectDeselectGroup); Radio selectAll = new Radio(selectAll , new Model(Boolean.FALSE)); Radio deselectAll = new Radio(deselectAll , new Model(Boolean.FALSE)); selectDeselectGroup.add(selectAll); selectDeselectGroup.add(deselectAll); (Note , I haven't implement any AjaxEventBehavior(onclick) to the 2 radios) Here comes the problem : If the Child Panel is expanded , page reloading is OK. But... If the Child Panel is collapsed (folded /hidden) and do page reloading , it will throw exception : Root cause: org.apache.wicket.WicketRuntimeException: The component(s) below failed to render. A common problem is that you have added a component in code but forgot to reference it in the markup (thus the component will never be rendered). 1. [MarkupContainer [Component id = checkGroup, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:checkGroup.CheckGroup, isVisible = true, isVersioned = false]] 2. [MarkupContainer [Component id = selectDeselectGroup, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:selectDeselectGroup.RadioGroup, isVisible = true, isVersioned = false]] 3. [MarkupContainer [Component id = selectAll, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:selectDeselectGroup:selectAll.Radio, isVisible = true, isVersioned = false]] 4. [MarkupContainer [Component id = deselectAll, page = destiny.wicket.astrology.HoroscopePage, path = 3:selectPlanetsPanel:selectDeselectGroup:deselectAll.Radio, isVisible = true, isVersioned = false]] at org.apache.wicket.Page.checkRendering(Page.java:1116) at org.apache.wicket.Page.renderPage(Page.java:914)
Re: Session Creation Problem
stateless form generates a bookmarkable action url so the page instance is recreated when the form submits rather then pulled from session. -igor On Fri, Jun 20, 2008 at 1:12 PM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, thanks again for your help, replacing the form by the stateless form has done the job as I could verify by lowering the http session timeout. What I still do not fully understand is why the error has now disappeared because still a full http session is created as I can see from the Tomcat Management Console. Anyway, perhaps I will take me some time to figure it out by looking into the source... Thanks, J. Igor Vaynberg wrote: once the wicket sesson object is bound (stored in httpsesson) their lifecycles are the same. it is httpsession timing out that causes page expired errors. -igor On Fri, Jun 20, 2008 at 9:08 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi Igor, thanks for your support. Still I am a bit confused about the two types of sessions we are dealing with: as far as I understood, there is a wicket session that is stored within the http session of the container. Now, which session is responsible for the Page Expired situations? The Wicket session or the http session? If it would be the http session then it should not matter whether a wicket session is created or not as long as the wicket session is not bound to a http session, right? BTW: for not wasting your time, any links to documentation on the matter would be great as well. I looked through the wicket docs but did not find anything relevant. Cheers, J. Igor Vaynberg wrote: wicket will create session instances for every request if there is no session stored in httpsession. the session is stored into httpsession only when the user encounters a stateful page. i am guessing that since you changed the form to stateless the page itself is no longer stateful and so wicket will not save it into session, thus it creates an interim session for the duration of the request. if you want to manually bind the session then call bind() on it. -igor On Fri, Jun 20, 2008 at 8:43 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I tried using a stateless form for the Login page, but it seems that a new session is created before the page is even called. I inserted a stacktrack output in the constructor of my Wicket-Session (which happens to be s subclass of AuthenticatedWebSession) and that trace shows me that AuthenticatedWebApplication.newSession is called by wicket somewhere in the application lifecycle. I can reproduce the behavior by adding a logout link that invalidates the current session and redirects to the Homepage (implying a redirect to the Login page). Again, a new session is created immediately by wicket. Any clues? J. Igor Vaynberg wrote: use a stateless form -igor On Fri, Jun 20, 2008 at 1:21 AM, Jürgen Lind [EMAIL PROTECTED] wrote: Hi, I am facing a little annoyance in conjunction with session creation that I have been unable to fix until now: 1. My pages are guarded using MetaDataRoleAuthorizationStrategy 2. When the homepage is opened, the user is redirected to the Login page 3. Now, if the user does not fill out the form immediately but waits very long, a Page Expired error is thrown when the form is submitted As I said, this is not a big problem but rather an annoyance that I would like to have fixed. Can anybody tell me what the problem is? I assume that a session is created immediately when the user opens the home page. How can I avoid this behavior? Kind Regards, Jürgen -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - 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] -- Mit freundlichen Grüßen, Jürgen Lind -- Dr. Jürgen Lind iteratec GmbHFon: +49 (0)89 614551-44 Inselkammerstrasse 4 Fax: +49 (0)89 614551-10 82008 Unterhaching Web: www.iteratec.de Sitz und Registergericht der iteratec GmbH: München HRB 113 519 Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
Setting HiddenField name attrribute value
Hi, Is it possible to set specific name to the hidden field component? Here is my usage scenario - 1. I have radio group for shipping options on a page. 2. Depending on the shipping option selected, I need to show the order total changed 2. radio has associated model which obviously contains more information than just the shipping price The only way I can think of doing this efficiently without going to the server side is by using hidden fields for shipping costs. Using the javascript to update the total on the page. Problem is, seems like hidden field names cannot be specified or controlled and hence cannot be referenced by javascript precisely. Correct me if I am wrong, also let me know if there is a better way of doing this. -- View this message in context: http://www.nabble.com/Setting-HiddenField-name-attrribute-value-tp18037712p18037712.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]
User needs to set timer duration and start and stop
Hi, I am trying to use the AjaxSelfUpdatingTimer to implement a request to be able to turn the timer off and on. The users also need to be able to specify in minutes what the duration will be when the timer is on. Right now I have 2 buttons Off and On and a field that the user can enter in minutes. The user is looking at data that is time sensitive and may not want the page to keep refreshing if they are in the middle of something. Anyway I can't get this timer to shut off and turn back on. Is this not possible? I've tried removing behavior and re-adding and stopping the timer. Anyone done anything like this? Thanks Karen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: User needs to set timer duration and start and stop
you might have to roll your own variant that has both start() and stop() methods. -igor On Fri, Jun 20, 2008 at 9:02 PM, Karen Schaper [EMAIL PROTECTED] wrote: Hi, I am trying to use the AjaxSelfUpdatingTimer to implement a request to be able to turn the timer off and on. The users also need to be able to specify in minutes what the duration will be when the timer is on. Right now I have 2 buttons Off and On and a field that the user can enter in minutes. The user is looking at data that is time sensitive and may not want the page to keep refreshing if they are in the middle of something. Anyway I can't get this timer to shut off and turn back on. Is this not possible? I've tried removing behavior and re-adding and stopping the timer. Anyone done anything like this? Thanks Karen - 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]