Re: How to use IAuthorizationStrategy to control TabbedPanel title?
Hi Haulyn, It should be no different. Lets say one of the panel you use is called EditTypePanel which needs authorization, you can simply check like with the code shown below. @Override protected void init() { super.init(); getSecuritySettings().setAuthorizationStrategy(new IAuthorizationStrategy() { public boolean isActionAuthorized(Component component, Action action) { return true; } public T extends Component boolean isInstantiationAuthorized(ClassT componentClass) { if (EditTypePanel.class.isAssignableFrom(componentClass)) { // Is user signed in? if (((OASSession) Session.get()).isSignedIn()) { // okay to proceed return true; } // Force sign in throw new RestartResponseAtInterceptPageException(LoginPage.class); } return true; } }); Haulyn R. Jason wrote: Hi, I use IAuthorizationStrategy to control all my applications, but I do not know how to control TabbedPanel. I have three panels, I can control the panel itself, but in the same way, I write code to control the tabbledPanel title to display or not, it does not work. Is there a way to control that? Thanks. -- Thanks! VVThumb Production Location: Shumagang 6H-8, Jinan, Shandong, China 25 Mobile: +086-15864011231 email: haulynja...@vvthumb.com website: http://haulynjason.net gtalk: saharab...@gmail.com skype: saharabear QQ: 378606292 msn:saharab...@gmail.com msn%3asaharab...@gmail.com yahoo:jia_hao...@yahoo.com yahoo%3ajia_hao...@yahoo.com Twitter: http://twitter.com/saharabear Linkedin: http://www.linkedin.com/in/haulyn Haulyn Jason -- View this message in context: http://old.nabble.com/How-to-use-IAuthorizationStrategy-to-control-TabbedPanel-title--tp26403580p26560481.html Sent from the Wicket - User 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: CompoundPropertyModel
Also I've noticed, that if i submit the form, then redeploy the WAR, and then refresh the submitted page, it throws the exception described above. And hitting Ctrl + F5 doesn't fix the issue - you are unable to submit the form anymore... The reason is that it (at least, Firefox 3) accumulates JSESSIONID cookies - I've seen even three of them simultaneously. After I delete these stale JSESSIONID cookies, I'm able to submit the form again. I'm not sure, what a decision could be. Maybe it is a well known bug. Just reporting it to you. 2009/11/28 Николай Кучумов kuchum...@gmail.com Today I've finally worked out the cause of the error - that was the NginX caching server which was somehow caching data. It was set up incorrectly. Today I've corrected my NginX configuration files, and everything works now, even with the bookmarks. 2009/11/20 Николай Кучумов kuchum...@gmail.com Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CompoundPropertyModel
To come up with a decision, I can propose you to catch this special exception, then count all JSESSIONID cookies, and, if there are several of them, delete the stale JSESSIONID cookies, and then try to run the form submission cycle again programmaticaly. 2009/11/29 Николай Кучумов kuchum...@gmail.com Also I've noticed, that if i submit the form, then redeploy the WAR, and then refresh the submitted page, it throws the exception described above. And hitting Ctrl + F5 doesn't fix the issue - you are unable to submit the form anymore... The reason is that it (at least, Firefox 3) accumulates JSESSIONID cookies - I've seen even three of them simultaneously. After I delete these stale JSESSIONID cookies, I'm able to submit the form again. I'm not sure, what a decision could be. Maybe it is a well known bug. Just reporting it to you. 2009/11/28 Николай Кучумов kuchum...@gmail.com Today I've finally worked out the cause of the error - that was the NginX caching server which was somehow caching data. It was set up incorrectly. Today I've corrected my NginX configuration files, and everything works now, even with the bookmarks. 2009/11/20 Николай Кучумов kuchum...@gmail.com Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketSessionFilter and several domains
This is what I think about how to solve this problem, except that it will take a round trip more for the user who accesses to .com.ar thanks! On Sat, Nov 28, 2009 at 11:22 AM, bgooren b...@iswd.nl wrote: Well, even if it's regional the question remains why your site is available over two domainnames. You can solve your problem by running the site on one of the domains and issuing a 301 redirect from the other domainname to the main domain. Or did I misunderstand, and are you running the site from the .com.ar and only the flash part from the .com? Bas Fernando Wermus-2 wrote: Bas, The site is regional. It is for LATAM. I will try to append the session id to the flash post. thanks On Fri, Nov 27, 2009 at 1:17 PM, bgooren b...@iswd.nl wrote: There are serveral options; The easiest is probably to append the sessionId to the URL you are accessing from the flash file; If that is not an option, host both the flash and the website on the same domain. Cross-domain issues are a hassle ;-) What's your reason for working with two domain names anyway? Bas Fernando Wermus-2 wrote: Bas, Thanks. I havent checked this behavior with other browsers. I will. What do you think is the best solution or approach to this problem? Fernando -- View this message in context: http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26543760.html Sent from the Wicket - User 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 -- Fernando Wermus. www.linkedin.com/in/fernandowermus -- View this message in context: http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26547249.html Sent from the Wicket - User 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 -- Fernando Wermus. www.linkedin.com/in/fernandowermus
Re: [1.4.3] RequestUtils.toAbsolutePath() skips the last value
Hello Smallufo, Please open an issue on the Wicket jira so that the development team can track this bug. Regards, Erik. smallufo wrote: The code is following : WebApplication : mountBookmarkablePage(/TestPage , TestPage.class); TestPage.html : url = span wicket:id=url/span TestPage.java : final String url = RequestUtils.toAbsolutePath(); add(new Label(url , Model.of(url))); If I open http://foobar:8080/quickstart/app/TestPage it shows http://foobar:8080/quickstart/app/TestPage , correct if I open http://foobar:8080/quickstart/app/TestPage/a/b/ it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct BUT , if I open http://foobar:8080/quickstart/app/TestPage/a/b it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [1.4.3] RequestUtils.toAbsolutePath() skips the last value
Hi , I opened WICKET-2586 https://issues.apache.org/jira/browse/WICKET-2586 https://issues.apache.org/jira/browse/WICKET-2586But it is reported invalid ... This is intended ... but I still don't know why ... 2009/11/30 Erik van Oosten e.vanoos...@grons.nl Hello Smallufo, Please open an issue on the Wicket jira so that the development team can track this bug. Regards, Erik. smallufo wrote: The code is following : WebApplication : mountBookmarkablePage(/TestPage , TestPage.class); TestPage.html : url = span wicket:id=url/span TestPage.java : final String url = RequestUtils.toAbsolutePath(); add(new Label(url , Model.of(url))); If I open http://foobar:8080/quickstart/app/TestPage it shows http://foobar:8080/quickstart/app/TestPage , correct if I open http://foobar:8080/quickstart/app/TestPage/a/b/ it shows : http://foobar:8080/quickstart/app/TestPage/a/b/ , correct BUT , if I open http://foobar:8080/quickstart/app/TestPage/a/b it shows : http://foobar:8080/quickstart/app/TestPage/a , WRONG -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Please HELP - Value of the model not getting updated in a Panel
Hi, I have a panel which is present on a page. The panel consists of a link. By using JQuery I am opening a pop-up when this link is clicked. The pop-up contains a drop-down, text field and a save button. When the Save button is clicked, I am not able to get the new values entered in the drop-down and text field. The related code is as follows: MyPanel.html: wicket:panel form wicket:id=panelForm a class=pop-up href='' wicket:id=invoker data-showid=popupPanel data-width=350 title=Title spanClick to open pop-up/span /a div wicket:id=popupPanel class=hide DIV class=row DIV id=reviewed-by-title H6Title/H6 SELECT name=rb-title wicket:id=fnaTitle/SELECT /DIV DIV id=reviewed-by-name H6Name/H6 input name=rb-name wicket:id=reviwer /DIV DIV id=reviewed-by-comments H6Comments/H6 TEXTAREA name=rb-name wicket:id=reviewComments/TEXTAREA /DIV DIV class=text-right push-down A href=#IMG wicket:id=cancelPopup class=details-trigger pop-up-close alt=Cancel src=Cancel.gif /A A href=#IMG wicket:id=savePopup class=details-trigger pop-up-close alt=Save src=Save.gif /A /DIV /DIV /div /form /wicket:panel MyPanel.java: public class MyPanel extends Panel { private WebMarkupContainer popupPanelWMC; public MyPanel (String id, IModelReviewByVO model, ListTitleList titleList) { super(id, model); add(new PanelForm(panelForm, model, titleList)); } private class PanelForm extends Form { @SuppressWarnings(unchecked) public PanelForm(String id, IModelReviewByVO model, ListTitleList titleList) { super(id); final ReviewByVO reviewByVO = model.getObject(); this.setModel(new CompoundPropertyModelReviewByVO(reviewByVO)); AjaxLinkReviewByVO popupLink = new AjaxLinkReviewByVO(invoker) { @Override public void onClick(AjaxRequestTarget ajaxrequesttarget) { } }; popupPanelWMC = new WebMarkupContainer(popupPanel); popupPanelWMC.setOutputMarkupId(true); popupLink.add(new AttributeModifier(data-showid, new ModelString(# + popupPanelWMC.getMarkupId(; popupLink.add(new AttributeModifier(title, new ModelString( Reviewed By))); final TextFieldString nameTextField = new TextFieldString( reviwer); final TextAreaString commentsTextArea = new TextAreaString( reviewComments); final DropDownChoiceTitleList titleDropDown = new DropDownChoiceTitleList( fnaTitle, new PropertyModelTitleList(model.getObject(), titleList), titleList, new TitleRenderer()); add(popupLink); popupPanelWMC.add(nameTextField); popupPanelWMC.add(commentsTextArea); popupPanelWMC.add(titleDropDown); popupPanelWMC.add(new Button(cancelPopup)); popupPanelWMC.add(new AjaxSubmitLink(savePopup) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { nameTextField.processInput(); nameTextField.inputChanged(); System.out.println(nameTextField.getRawInput(): + nameTextField.getRawInput()); System.out.println(nameTextField.getValue(): + nameTextField.getValue()); System.out.println(nameTextField.hasRawInput(): + nameTextField.hasRawInput()); }); add(popupPanelWMC); } } } Regards, Vinay Karmarkar Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate,
Wicket Ajax in JBOSS Portal
Hello, I tried to deploy a wicket application (1.4.3 version) in JBOSS portal 2.7.2 as portlet, but it seemed that the AJAX functionality didn't work, for example, I would like to use rating panel in wicket extension but the ajax submit failed. Who knows how to resolve this problem or any workaround? Thanks Rylin _ “游日本,拿现金”MClub白领股神大赛火热报名中 http://club.msn.cn/pr/?a=emoney
RE: Please HELP - Value of the model not getting updated in a Panel
I think your input fields need an AjaxFormUpdatingBehavior Stefan -Ursprüngliche Nachricht- Von: vinay.karmar...@wipro.com [mailto:vinay.karmar...@wipro.com] Gesendet: Montag, 30. November 2009 08:45 An: users@wicket.apache.org Betreff: Please HELP - Value of the model not getting updated in a Panel Hi, I have a panel which is present on a page. The panel consists of a link. By using JQuery I am opening a pop-up when this link is clicked. The pop-up contains a drop-down, text field and a save button. When the Save button is clicked, I am not able to get the new values entered in the drop-down and text field. The related code is as follows: MyPanel.html: wicket:panel form wicket:id=panelForm a class=pop-up href='' wicket:id=invoker data-showid=popupPanel data-width=350 title=Title spanClick to open pop-up/span /a div wicket:id=popupPanel class=hide DIV class=row DIV id=reviewed-by-title H6Title/H6 SELECT name=rb-title wicket:id=fnaTitle/SELECT /DIV DIV id=reviewed-by-name H6Name/H6 input name=rb-name wicket:id=reviwer /DIV DIV id=reviewed-by-comments H6Comments/H6 TEXTAREA name=rb-name wicket:id=reviewComments/TEXTAREA /DIV DIV class=text-right push-down A href=#IMG wicket:id=cancelPopup class=details-trigger pop-up-close alt=Cancel src=Cancel.gif /A A href=#IMG wicket:id=savePopup class=details-trigger pop-up-close alt=Save src=Save.gif /A /DIV /DIV /div /form /wicket:panel MyPanel.java: public class MyPanel extends Panel { private WebMarkupContainer popupPanelWMC; public MyPanel (String id, IModelReviewByVO model, ListTitleList titleList) { super(id, model); add(new PanelForm(panelForm, model, titleList)); } private class PanelForm extends Form { @SuppressWarnings(unchecked) public PanelForm(String id, IModelReviewByVO model, ListTitleList titleList) { super(id); final ReviewByVO reviewByVO = model.getObject(); this.setModel(new CompoundPropertyModelReviewByVO(reviewByVO)); AjaxLinkReviewByVO popupLink = new AjaxLinkReviewByVO(invoker) { @Override public void onClick(AjaxRequestTarget ajaxrequesttarget) { } }; popupPanelWMC = new WebMarkupContainer(popupPanel); popupPanelWMC.setOutputMarkupId(true); popupLink.add(new AttributeModifier(data-showid, new ModelString(# + popupPanelWMC.getMarkupId(; popupLink.add(new AttributeModifier(title, new ModelString( Reviewed By))); final TextFieldString nameTextField = new TextFieldString( reviwer); final TextAreaString commentsTextArea = new TextAreaString( reviewComments); final DropDownChoiceTitleList titleDropDown = new DropDownChoiceTitleList( fnaTitle, new PropertyModelTitleList(model.getObject(), titleList), titleList, new TitleRenderer()); add(popupLink); popupPanelWMC.add(nameTextField); popupPanelWMC.add(commentsTextArea); popupPanelWMC.add(titleDropDown); popupPanelWMC.add(new Button(cancelPopup)); popupPanelWMC.add(new AjaxSubmitLink(savePopup) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { nameTextField.processInput(); nameTextField.inputChanged(); System.out.println(nameTextField.getRawInput(): + nameTextField.getRawInput()); System.out.println(nameTextField.getValue(): + nameTextField.getValue()); System.out.println(nameTextField.hasRawInput(): + nameTextField.hasRawInput()); }); add(popupPanelWMC); } } } Regards, Vinay Karmarkar Please do not