Use pageparameters from authorized page to login
Hello, In my application all the pages are restricted using the MetaDataRoleAuthorizationStrategy. I want to give my user the ability to directly see the data from such a page using pageParameters: - http://www.mysite.com/page1.html?login=abcpass=123 - http://www.mysite.com/page2.html?login=abcpass=123 - ... When the page is constructed, wicket sees that the user is not logged in, so redirects to the loginpage (redirectToInterceptPage). There I want to use the pageparameters from the initial URL to do authorization and redirect back (continueToOriginalDestination). How can I get the pageparameters from the initial URL? Can't find them in request, not in pageparameters from loginpage, ... Thanks for any help ! Kind regards, Marieke Vandamme -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Use-pageparameters-from-authorized-page-to-login-tp3549134p3549134.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Use pageparameters from authorized page to login
Hi, You can always get the PageParameters from the page itself (given you received them in the constructor). In case you do not want to handle this on a page-by-page basis, they are also available through the RequestCycle (in wicket 1.4). You could check if the params contain login and pass keys, and if so, redirect to your login page with the current params. However, I hope you're aware that having the username and password in the url over http:// (instead of https://) makes accounts quite vulnerable. Bas *From:* Marieke Vandamme mailto:marieke.vanda...@tvh.be *Sent:* woensdag 25 mei 2011 1:11:50 *To:* users mailto:users@wicket.apache.org *Subject:* Use pageparameters from authorized page to login Hello, In my application all the pages are restricted using the MetaDataRoleAuthorizationStrategy. I want to give my user the ability to directly see the data from such a page using pageParameters: - http://www.mysite.com/page1.html?login=abcpass=123 - http://www.mysite.com/page2.html?login=abcpass=123 - ... When the page is constructed, wicket sees that the user is not logged in, so redirects to the loginpage (redirectToInterceptPage). There I want to use the pageparameters from the initial URL to do authorization and redirect back (continueToOriginalDestination). How can I get the pageparameters from the initial URL? Can't find them in request, not in pageparameters from loginpage, ... Thanks for any help ! Kind regards, Marieke Vandamme -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Use-pageparameters-from-authorized-page-to-login-tp3549134p3549134.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Use pageparameters from authorized page to login
Thanks for the answer, but I don't know how to get the PageParameters from the RequestCycle in the LoginPage, therefore some more information: - my application extends AuthenticatedWebApplication - the init of my Page1 or Page2 is never called because user is not authorized to see page (because not logged in) and therefore RestartResponseAtInterceptPageException is thrown. see AuthenticatedWebApplication:onUnauthorizedInstantiation = throw new RestartResponseAtInterceptPageException(getSignInPageClass()); - in RestartResponseAtInterceptPageException function redirectToInterceptPage is used which uses pageMap.redirectToInterceptPage(interceptPage) to go to LoginPage (=getSignInPageClass()). - No pageparameters are passed to the new request, so none are available in the LoginPage. Even not in the RequestCycle, because this is different from the initial one. Do we need to override onUnauthorizedInstantiation and pass the pageparameters pulled from RequestCycle? Thanks again. Marieke Vandamme -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Use-pageparameters-from-authorized-page-to-login-tp3549134p3549188.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Use pageparameters from authorized page to login
Hi Marieke, you could try to read page parameters before redirecting to interceptPage and build an instance of this page passing these parameters. Something like: //read parameters ...parameters = RequestCycle.get().getResquest().getQueryParameters() ; //convert parameters to PageParameters PageParameters pageParameters = ... //build an instance of interceptPage with page parameters interceptPage = new InterceptPage(pageParameters); pageMap.redirectToInterceptPage(interceptPage) Thanks for the answer, but I don't know how to get the PageParameters from the RequestCycle in the LoginPage, therefore some more information: - my application extends AuthenticatedWebApplication - the init of my Page1 or Page2 is never called because user is not authorized to see page (because not logged in) and therefore RestartResponseAtInterceptPageException is thrown. see AuthenticatedWebApplication:onUnauthorizedInstantiation = throw new RestartResponseAtInterceptPageException(getSignInPageClass()); - in RestartResponseAtInterceptPageException function redirectToInterceptPage is used which uses pageMap.redirectToInterceptPage(interceptPage) to go to LoginPage (=getSignInPageClass()). - No pageparameters are passed to the new request, so none are available in the LoginPage. Even not in the RequestCycle, because this is different from the initial one. Do we need to override onUnauthorizedInstantiation and pass the pageparameters pulled from RequestCycle? Thanks again. Marieke Vandamme -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Use-pageparameters-from-authorized-page-to-login-tp3549134p3549188.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
form in modal window
Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: form in modal window
Translate the message to English and search in Nabble/Google. It has been discussed many times. On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
AjaxButton in ModalWindow
Hi, i have AjaxButton which closes ModalWindow, but if i click twice on that button, exception is thrown: org.apache.wicket.WicketRuntimeException: Submit Button buttonOK... is not visible i've tried IndicatingAjaxButton and implementing IAjaxIndicatorAware and AjaxIndicatorAppender . but even though indicator is showed, i can still click on that button and get exception. (i use AutoHotKey script for fast clicking, but if some lag occurs, it is easily possible even for human to click twice... wicket 1.4.9) any solutions? thanks. V.
Re: AjaxButton in ModalWindow
it seems that https://issues.apache.org/jira/browse/WICKET-3087 pretty much fixed it. but sometimes, window is displayed more than once, and only button at the last window works and other throw exception.. but it may be due to my implementation... V.
Re: AjaxButton in ModalWindow
fixed. :-) before opening new window is good to call ModalWindow.closeCurrent(AjaxRequestTarget.get()); V.
Re: form in modal window
Thanks for answer. Sorry for the first question : it was not the main problem so I didn't search the solution. Now it's fine, the confirmation message disappear. But the main problem was the second : how can I prevent the modal to disappear when login failed? I tried to use ajaxButton instead submit button but then I can't I use the model of my form like I did with submit button. Any advice would be great... this is my actual code (with submit button, no ajax) : public class ConnexionContentPanel extends FeedbackPanel { private static final long serialVersionUID = 6952274296991345904L; @SpringBean private ServiceIdentification serviceIdentif; @SuppressWarnings(serial) public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } } 2011/5/25 Martin Grigorov mgrigo...@apache.org Translate the message to English and search in Nabble/Google. It has been discussed many times. On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
Re: form in modal window
just use an AjaxButton François Le 25 mai 2011 à 13:57, Mathilde Pellerin a écrit : Thanks for answer. Sorry for the first question : it was not the main problem so I didn't search the solution. Now it's fine, the confirmation message disappear. But the main problem was the second : how can I prevent the modal to disappear when login failed? I tried to use ajaxButton instead submit button but then I can't I use the model of my form like I did with submit button. Any advice would be great... this is my actual code (with submit button, no ajax) : public class ConnexionContentPanel extends FeedbackPanel { private static final long serialVersionUID = 6952274296991345904L; @SpringBean private ServiceIdentification serviceIdentif; @SuppressWarnings(serial) public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } } 2011/5/25 Martin Grigorov mgrigo...@apache.org Translate the message to English and search in Nabble/Google. It has been discussed many times. On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: form in modal window
@Override protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, Form? form) { form.getDefaultModel(). } Le 25 mai 2011 à 13:57, Mathilde Pellerin a écrit : Thanks for answer. Sorry for the first question : it was not the main problem so I didn't search the solution. Now it's fine, the confirmation message disappear. But the main problem was the second : how can I prevent the modal to disappear when login failed? I tried to use ajaxButton instead submit button but then I can't I use the model of my form like I did with submit button. Any advice would be great... this is my actual code (with submit button, no ajax) : public class ConnexionContentPanel extends FeedbackPanel { private static final long serialVersionUID = 6952274296991345904L; @SpringBean private ServiceIdentification serviceIdentif; @SuppressWarnings(serial) public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } } 2011/5/25 Martin Grigorov mgrigo...@apache.org Translate the message to English and search in Nabble/Google. It has been discussed many times. On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin François Meillet fm...@meillet.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: form in modal window
Ok, it's fix with an ajaxButton. The first time that I tried, I forgot a cast, that's why it didn't work. 2011/5/25 Mathilde Pellerin mathilde.pelle...@gmail.com Thanks for answer. Sorry for the first question : it was not the main problem so I didn't search the solution. Now it's fine, the confirmation message disappear. But the main problem was the second : how can I prevent the modal to disappear when login failed? I tried to use ajaxButton instead submit button but then I can't I use the model of my form like I did with submit button. Any advice would be great... this is my actual code (with submit button, no ajax) : public class ConnexionContentPanel extends FeedbackPanel { private static final long serialVersionUID = 6952274296991345904L; @SpringBean private ServiceIdentification serviceIdentif; @SuppressWarnings(serial) public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } } 2011/5/25 Martin Grigorov mgrigo...@apache.org Translate the message to English and search in Nabble/Google. It has been discussed many times. On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin mathilde.pelle...@gmail.com wrote: Hi all, I have a login form in a modal window. I want that an error message appears when login fail, so my panel extends FeedBackPanel. But when I submit the form, an confirmation message appears with this message : Voulez-vous vraiment quitter cette page ? Reloading this page will cause the modal window to disappear. Appuyer sur OK pour continuer, ou Annuler pour rester sur la page actuelle. and if I click on OK, the modal window disappear even if login failed. this is my code : public ConnexionContentPanel(String id) { super(id); FormMembre loginForm = new FormMembre(loginForm, new CompoundPropertyModelMembre(new LoadableDetachableModelMembre() { @Override protected Membre load() { return new Membre(); } })) { @Override protected void onSubmit() { Membre membre; try { membre = serviceIdentif.identifier(getModelObject().getId(), getModelObject().getPassword()); if(membre == null) error(Identifiant ou mot de passe incorrect); else System.out.println(Connexion); } catch (Exception e) { e.printStackTrace(); } } }; loginForm.add(new TextFieldMembre(membreId)); loginForm.add(new PasswordTextField(password)); add(loginForm); } how can I avoid the confirmation message, and how can I prevent the modal to disappear whan login failed? thanks. Mathilde -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/ Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/ -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin -- Mathilde Pellerin Ingénieur en Génie Logiciel Tél mobile : 06.60.78.79.03 E-mail : mathilde.pelle...@gmail.com Mon CV en ligne : http://www.mathilde-pellerin.fr/ http://www.mathilde-pellerin.fr/Mes liens : http://www.viadeo.com/fr/profile/mathilde.pellerin http://fr.linkedin.com/in/mathildepellerin
tree do not stay open tree collapsed after setResponsePage
hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div
Problems localized URLs (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html)
Hello, I am trying to realize localized URLs in my application (using Wicket 1.4.17) as described in the Wicket wiki (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html). However, I have problems accessing the pages then - e.g., calling the localization application of the wicket examples at http://localhost:8080/wicket-examples/pub resolves to http://localhost:8080/wicket-examples/pub/en/?null, which results to a 404 then. Does anyone have a hint for me what's going wrong? I tried to debug the code, but without any success. Thanks in advance, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ListView inside a ListView
Hello, I am trying for a ListView inside a Listview which are inter dependent. But, the error msg I am getting is WicketMessage: Unable to find component with id 'allocation' in [MarkupContainer [Component id = 0]]. This means that you declared wicket:id=allocation in your markup, but that you either did not add the component to your page at all, or that the hierarchy does not match. Here is my code... add(new ListViewAsset(assets, assetListModel) { @Override protected void populateItem(final ListItemAsset item) { // AssetName(general admissions tickets) item.add(new Label(assetNameLabel, new PropertyModelString( item.getModel(), assetName))); ListAllocation allocationListModel = (ListAllocation) getAllocation(((Asset) item .getModelObject()).getAssetID()); add(new ListViewAllocation(allocation, allocationListModel) { @Override protected void populateItem(ListItemAllocation item) { Allocation alloc = (Allocation) item.getModelObject(); item.add(new Label(regionNameLabel, alloc .getRegionName())); // item.add(new Label(regionNameLabel, new // PropertyModelString(item.getModel(), // regionName))); } }); }// End of populate item Asset });// End of List View Asset The markup being.. Asset Allocation div class=box table tr wicket:id=allocation th wicket:id=regionNameLabel Region/th thBusiness Unit/th thCountry/th thRequest Type/th thExceptions/th thQty/th /tr /table /div The allocation is dependent on Asset id... Any help is appreciated... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-inside-a-ListView-tp3550315p3550315.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView inside a ListView
add(new ListViewAllocation(allocation, allocationListModel) { shouldn't this be item.add ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView inside a ListView
For clarity, I would rename the ListItems: protected void populateItem(final ListItemAsset assetItem) { assetItem.add(new Label(...)); assetItem.add(new ListViewAllocation(...) { protected void populateItem(ListItemAllocation allocationItem) { allocationItem.add(new Label(...)); } } } On Wed, May 25, 2011 at 10:39 AM, Peter Karich peat...@yahoo.de wrote: add(new ListViewAllocation(allocation, allocationListModel) { shouldn't this be item.add ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView inside a ListView
Thank you so much!!! It worked Silly mistakes cost a lot!!! Thanks again!! On Wed, May 25, 2011 at 1:40 PM, Peter Karich [via Apache Wicket] ml-node+3550472-1465528180-240...@n4.nabble.com wrote: add(new ListViewAllocation(allocation, allocationListModel) { shouldn't this be item.add ? - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550472i=0 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550472i=1 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/ListView-inside-a-ListView-tp3550315p3550472.html To unsubscribe from ListView inside a ListView, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3550315code=cy52ZW5rYXRhNDEwQGdtYWlsLmNvbXwzNTUwMzE1fDEzMDcyMDgwMzE=. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-inside-a-ListView-tp3550315p3550495.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ListView inside a ListView
Will do that now!! Got it worked!!! Thanks a lot!!! On Wed, May 25, 2011 at 1:47 PM, scott.swank [via Apache Wicket] ml-node+3550491-1122803921-240...@n4.nabble.com wrote: For clarity, I would rename the ListItems: protected void populateItem(final ListItemAsset assetItem) { assetItem.add(new Label(...)); assetItem.add(new ListViewAllocation(...) { protected void populateItem(ListItemAllocation allocationItem) { allocationItem.add(new Label(...)); } } } On Wed, May 25, 2011 at 10:39 AM, Peter Karich [hidden email]http://user/SendEmail.jtp?type=nodenode=3550491i=0 wrote: add(new ListViewAllocation(allocation, allocationListModel) { shouldn't this be item.add ? - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550491i=1 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550491i=2 - To unsubscribe, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550491i=3 For additional commands, e-mail: [hidden email]http://user/SendEmail.jtp?type=nodenode=3550491i=4 -- If you reply to this email, your message will be added to the discussion below: http://apache-wicket.1842946.n4.nabble.com/ListView-inside-a-ListView-tp3550315p3550491.html To unsubscribe from ListView inside a ListView, click herehttp://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3550315code=cy52ZW5rYXRhNDEwQGdtYWlsLmNvbXwzNTUwMzE1fDEzMDcyMDgwMzE=. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ListView-inside-a-ListView-tp3550315p3550497.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: tree do not stay open tree collapsed after setResponsePage
Hi, you could implements your own ITreeState which stores node expansion in the session. There have been others who tried it (I don't know whether they succeeded though): http://apache-wicket.1842946.n4.nabble.com/setting-TreeState-in-Wicket-session-td1882197.html Sven On 05/25/2011 05:09 PM, hubert_hupe wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1);-- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: tree do not stay open tree collapsed after setResponsePage
How are you getting back to the original page? On Wed, May 25, 2011 at 11:09 AM, hubert_hupe hubert_h...@gmx.de wrote: hi folks, i get wicket with the wicket... what do i have is a simple tree in page X. after click a node i do a redirect to pageY. so far so good. but the tree collapsed after the redirect. it seems the tree is rebuild after the click. its a kind of postback behavior. my question is: what can i do to prevent collapsing the tree? if this is not possible, how can i open the old node? or how can i prevent the reloading/postbacking? best regards hubert add(new LinkTree(tree, createTreeModel()) { @Override protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) { System.out.println(test); System.out.println(node: + node.toString()); Page1 p1 = new Page1(node.toString()); setResponsePage(p1); -- } }); protected TreeModel createTreeModel() { DefaultMutableTreeNode root = new DefaultMutableTreeNode(new ModelBean(ROOT)); ... } i created a simple layout with div in the markup to ensure that the tree is on the left site and the navigated page on the right... div id=leftframe style=float: left; ... wicket:id=tree... /div div id=body wicket:child / /div - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Grouping DataView
Hi guys, yes, I've had a look at the standard Wicket repeaters but I will give a custom table view a try. Best regards. Am 16.05.2011 00:46, schrieb andrea del bene: Hi Marcus I guess you have already had a look at standard Wicket repeaters: http://wicketstuff.org/wicket14/repeater If no one of them satisfy your needs you can consider to implement a custom table view which reproduces the behavior of ERXGroupingRepetition Dear all, sorry for this newbie question, but I need a component to group Items within a DataView for display. Since I 've been working a lot with Apple's WebObjects and Project WOnder, I am wondering that there might be no component like good old ERXGroupingRepetition out there. Possibly I missed something, but I cannot find something like that on the net. Can you please give me a hint how to solve this problem with Wicket? Best regards - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problems localized URLs (https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html)
For examples with Wicket 1.5 see http://www.wicket-library.com/wicket-examples/mappers/en_US On Wed, May 25, 2011 at 8:22 PM, Andreas Maza andr.m...@gmail.com wrote: Hello, I am trying to realize localized URLs in my application (using Wicket 1.4.17) as described in the Wicket wiki ( https://cwiki.apache.org/WICKET/wicket-and-localized-urls.html). However, I have problems accessing the pages then - e.g., calling the localization application of the wicket examples at http://localhost:8080/wicket-examples/pub resolves to http://localhost:8080/wicket-examples/pub/en/?null, which results to a 404 then. Does anyone have a hint for me what's going wrong? I tried to debug the code, but without any success. Thanks in advance, andr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
wicket session statistics
Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks!
Re: add attributes to options elements within a palette
this is how i achieve adding tool tips to a wicket palette - basically overrode the method that conctructs the html for each of the options in the palette panes which is the onComponentTagBody in the AbstractOptions class. The code is almost identical to that in AbstractOptions onComponentTagBody method except that i inject the a title and subsequent value into each of the options tag. Tested in both Firefox and IE :) - probably more elegant solutions but it's one that works. conditionCodePalette = new Palette(conditionCodePalette, new Model(chosenList), new Model(availableList), renderer, 11, false){ @Override protected Component newChoicesComponent(){ return new ConditionCodeChoices(choices, this){ private static final long serialVersionUID = 1L; @Override protected Maplt;String, Stringgt; getAdditionalAttributes(Object choice){ return null; } }; } }; } //overriding the choices class wicket Palette uses so we can inject //tool tips into the palettes options. private class ConditionCodeChoices extends AbstractOptions{ public ConditionCodeChoices(String id, Palette palette){ super(id, palette); } @Override protected Iterator getOptionsIterator(){ return getPalette().getUnselectedChoices(); } @Override protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag){ final AppendingStringBuffer buffer = new AppendingStringBuffer(128); Iterator options = getOptionsIterator(); IChoiceRenderer renderer = getPalette().getChoiceRenderer(); while (options.hasNext()){ Object choice = options.next(); final CharSequence id; { String value = renderer.getIdValue(choice, 0); if (getEscapeModelStrings()){ id = Strings.escapeMarkup(value); } else{ id = value; } } final CharSequence value; { Object displayValue = renderer.getDisplayValue(choice); Class? displayClass = displayValue == null ? null : displayValue.getClass(); String displayString = getConverter(displayClass).convertToString(displayValue, getLocale()); displayString = getLocalizer().getString(displayString, this, displayString); if (getEscapeModelStrings()){ value = Strings.escapeMarkup(displayString); } else{ value = displayString; } } buffer.append(\noption title='+value+' value=\).append(id).append(\); MapString, String additionalAttributesMap = getAdditionalAttributes(choice); if (additionalAttributesMap != null){ for (String s : additionalAttributesMap.keySet()){ buffer.append( + s + =\ + additionalAttributesMap.get(s) + \); } } buffer.append().append(value).append(/option); } buffer.append(\n); replaceComponentTagBody(markupStream, openTag, buffer); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/add-attributes-to-options-elements-within-a-palette-tp1844870p3551244.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Slow ajax request and possible timeout variable?
Sometimes on slower connections I see issues with the application with ajax requests. If the request takes longer than 20 or 30 seconds my page/panels become unresponsive? Example pseudo code might include; new TextField(text).add(new AjaxBehavior(onchange)); With this request, the ajax request never returns ... say after 30 seconds. And the bevhaior is diferent for different browsers. IE8 may have an issue but Chrome does not. Is there something I could debug to see if this is the case? Is there some sort of issue or timeout with ajax requests.
RE: Slow ajax request and possible timeout variable?
This bug seems to be related to the issue I am experiencing. https://issues.apache.org/jira/browse/WICKET-2246 From: Brown, Berlin [GCG-PFS] Sent: Wednesday, May 25, 2011 11:57 PM To: 'users@wicket.apache.org' Subject: Slow ajax request and possible timeout variable? Sometimes on slower connections I see issues with the application with ajax requests. If the request takes longer than 20 or 30 seconds my page/panels become unresponsive? Example pseudo code might include; new TextField(text).add(new AjaxBehavior(onchange)); With this request, the ajax request never returns ... say after 30 seconds. And the bevhaior is diferent for different browsers. IE8 may have an issue but Chrome does not. Is there something I could debug to see if this is the case? Is there some sort of issue or timeout with ajax requests.
Re: wicket session statistics
org.apache.wicket.Session.getSizeInBytes() 2011/5/26 KingFee Dong kingfee.d...@gmail.com Hi,EVERYONE I am a newer to wicket ,now i want to statistics session,how can i do it? Can anyone give me some suggestion ? Thanks! -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com http://jweekend.com/
Job opportunity ...
Dear all, currently my team is working on a project with a Wicket frontend and a nearby deadline. Since we have not enough manpower to finish the project, we are looking for an external consultant located near Hamburg to help us implementing the frontend. Is there anybody out who is available in the near term and likes to join us for this project as contractor? Best regards - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: When will my panels be released?
hi, well could it be that you keep some references to the panels somewhere? Maybe in the Session? References to Componentes are garbage collected as every other class as soon as no reference to them is available to the GC. Regards Martin -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/When-will-my-panels-be-released-tp3549632p3551688.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org