Re: production quality wicket applications running on GAE
Since I replied to that post, I've read in other threads about the notion of using a Memcache based PageStore on GAE. This may eliminate some of the issues I had with GAE/Wicket. I haven't had a chance to experiment since. Maybe someone else could comment if they've got production sites running with a non-HttpSessionStore and using the Memcache instead? That aside, what I said in the older thread still stands - HttpSessionStore = slow (due to speed of writes) and the serialization issues are still present. Essentially any HttpSession deserialization error will break the application for that user. This is made worse as Google still hasn't implemented any good way of cleaning up the _ah_session store. There's a servlet filter to do it, but it uses a lot of CPU and you may find the session table grows faster than you can clean it up. This isn't really much of a problem for apps that only store a few strings, etc. in HttpSession, so I guess that's why it's not seen as a priority. On 15 July 2010 16:29, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Dear All, With a little bit of effort on my side, and the help of a couple of tutorials out there, I have managed to deploy a little demo application on GAE [1]. Encouraged by this limited success I'm considering using GAE for the deployment of a production quality application... but over the last few months I have read some, sometimes scary, posts on this list regarding Wicket on GAE... e.g. [2]. I would greatly appreciate if someone can point out examples of production quality Wicket applications running on GAE... Moreover, I would even be more grateful if some of you can comment on the issues you faced and so on. Best, Ernesto 1-http://wiquery-plugins-demo.appspot.com/demo/ 2-http://apache-wicket.1842946.n4.nabble.com/Wicket-And-GAE-tt1892457.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Richard Nichols http://www.richardnichols.net/ :: http://onmydoorstep.com.au/
Re: Wicket's Form Model (using hibernate entity or value objects) Design
Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give me more information on it. Probably I should have mentioned that I wrap my hibernate entity in a CompoundPropertyModel like this MyForm extends Form{ MyForm( new CompoundPropertyModel(studyEntity)); //I also want to be able to add another model that will capture input from the form.e.g LdapStudy } Any pointers will be great thanks again for the time Nive On Thu, Jul 15, 2010 at 5:10 PM, vov vov...@mail.ru wrote: see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.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
Browser Back Button and WicketTester
Does WicketTester emulate the browser back button? E.g. tester.submitForm(myform); tester.goBack(); tester.submitForm(myform); // assert correct solution of double submit problem The Javadoc comment for WicketTester.NonPageCachingDummyWebApplication mentions the back button and seems to imply the WicketTester does support it by default, but I don't see how... Best regards, Harald - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Models and panel updates
Help me understand this, An AjaxBased components send update events as they change! That means except for SAVE having to save the data in one ajax request you dont need the other fields being AJAX based. See onAfterRender() this is able to give you the updated value as it happens: public ProductPanel(String id) { super(id); setOutputMarkupId(true); add(new Label(id)); //add(new Label(cost)); AjaxEditableLabel costLabel = new AjaxEditableLabelString(cost) { @Override public void onEdit(AjaxRequestTarget target) { super.onEdit(target); //Does the whole convert to text box magic Float cost = (Float)getDefaultModel().getObject(); log.info([ProductPanel.AjaxEditableLabel.onEdit] cost prior to update = + cost); } @Override public void onAfterRender() { super.onAfterRender(); Float cost = (Float)getDefaultModel().getObject(); log.info([ProductPanel.AjaxEditableLabel.onAfterRender] cost after update = + cost); } }; add(costLabel); //Updatable label add(new AjaxLinkString(save) { //But are we saving for?? All the other fields are already AJAX based and sending updates! @Override public void onClick(AjaxRequestTarget target) { log.info(saving product ); //Line below gives -- WicketMessage: No get method defined for class: class arjun.learning.data.Product expression: save Product model = (Product)getDefaultModel().getObject(); //Will give ERROR :( log.info([ProductPanel.AjaxLink.onClick] cost = + model.getCost()); } }); } ..The model is updated on changing the value of the cost field itself. Also, its perfectly understandable why the Model is not marshaling (becausethere are fields other than the domain object , and obviously the CompoundPropertyModel doesn't know the difference between a Domain Model field and a field added to the panel for display. They are all part of the model, some of which not in your domain model. ..So where am I missing the point? :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Models-and-panel-updates-tp2290043p2291094.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: IPropertyReflectionAwareModel
Igor Vaynberg schrieb: no reason that i can see, file a jira. cant be fixed in 1.4 though. WICKET-2947. yes, would be a breaking change. thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket's Form Model (using hibernate entity or value objects) Design
Your form can edit two different objects. It will edit whatever you bind your fields to On Jul 16, 2010 4:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give me more information on it. Probably I should have mentioned that I wrap my hibernate entity in a CompoundPropertyModel like this MyForm extends Form{ MyForm( new CompoundPropertyModel(studyEntity)); //I also want to be able to add another model that will capture input from the form.e.g LdapStudy } Any pointers will be great thanks again for the time Nive On Thu, Jul 15, 2010 at 5:10 PM, vov vov...@mail.ru wrote: see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.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: Wicket's Form Model (using hibernate entity or value objects) Design
Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.comwrote: Your form can edit two different objects. It will edit whatever you bind your fields to On Jul 16, 2010 4:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give me more information on it. Probably I should have mentioned that I wrap my hibernate entity in a CompoundPropertyModel like this MyForm extends Form{ MyForm( new CompoundPropertyModel(studyEntity)); //I also want to be able to add another model that will capture input from the form.e.g LdapStudy } Any pointers will be great thanks again for the time Nive On Thu, Jul 15, 2010 at 5:10 PM, vov vov...@mail.ru wrote: see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.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: Wicket's Form Model (using hibernate entity or value objects) Design
Either create a model object that contains your study and foo objects, or hold an IModelfoo as a private variable. Remember it's just regular java, so you can use member variables. Just don't forget to detach any model you hold as a variable manually. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 16, 2010 6:30 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.com wrote: Your form can edit two different objects. It will edit whatever you bind your fields to O...
WicketPortlet and Custom Modes
Hi All, I've recently started using Wicket to create some Portlets for WebSphere Portal. The basic examples work great, however I've hit a small problem when trying to switch portlet modes. How do I link the portlet mode with a given page? Right now all the standard modes (VIEW, EDIT, HELP) all link to the default homepage. Do I have to put all my logic in to one WebPage and switch between modes in there somehow (e.g. checking a request param or attribute?)? Thanks, Gareth
Re: Wicket's Form Model (using hibernate entity or value objects) Design
Hi Jeremy, Nice I follow you now. I can have a container java class and have any number of member variables which in turn can be a hibernate entity and a regular java bean. The container java class will be the model. And on detach; i would have to have the container java class extend IModel and implement the detach() am i right? Thank you will give that a shot. Thanks for the time and thoughts. Regards Nivedan On Fri, Jul 16, 2010 at 7:44 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Either create a model object that contains your study and foo objects, or hold an IModelfoo as a private variable. Remember it's just regular java, so you can use member variables. Just don't forget to detach any model you hold as a variable manually. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 16, 2010 6:30 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.com wrote: Your form can edit two different objects. It will edit whatever you bind your fields to O...
Re: Wicket's Form Model (using hibernate entity or value objects) Design
Hi Nivedan, Jeremy write IModelfoo as a private variable and James Your form can edit two different objects. It will edit whatever you bind your fields to If you have an form with some fields for some bean, and other fields for other beans, you can do something like: class panel { private modelForAnPropertyInSomeBean; private modelForAnPropertyInSomeOtherBean; some code block{ add(new textfield( id, modelForAnPropertyInSomeBean); add(new textfield( id, modelForAnPropertyInSomeOtherBean); } } Is this what you want? On Fri, Jul 16, 2010 at 10:43 AM, Nivedan Nadaraj shravann...@gmail.comwrote: Hi Jeremy, Nice I follow you now. I can have a container java class and have any number of member variables which in turn can be a hibernate entity and a regular java bean. The container java class will be the model. And on detach; i would have to have the container java class extend IModel and implement the detach() am i right? Thank you will give that a shot. Thanks for the time and thoughts. Regards Nivedan On Fri, Jul 16, 2010 at 7:44 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Either create a model object that contains your study and foo objects, or hold an IModelfoo as a private variable. Remember it's just regular java, so you can use member variables. Just don't forget to detach any model you hold as a variable manually. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 16, 2010 6:30 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.com wrote: Your form can edit two different objects. It will edit whatever you bind your fields to O... -- Pedro Henrique Oliveira dos Santos
FormTester.submitLink located outside of the form tags miss the update
Hi list, I'm new to wicket. I've some problem with a Formteser.submitLink that should sumbit a form throught a link that stay outside the form. I've played with the wicket provided test case org.apache.wicket.markup.html.link.submitLink.FormPage and FormPageTest. in the FormPage I've changed the definition of somevalue deleting the final keyword protected int somevalue = 1; In the TestCase I changed the testFormAndLinkAreSubmitted as follows, simply setting a value in the field before the submitLink and then verify in the model the correctness of the value. but fails, as if the submitLink doesn't post the data. public void testFormAndLinkAreSubmitted() { WicketTester tester = new WicketTester(); tester.startPage(FormPage.class); FormPage page = (FormPage)tester.getLastRenderedPage(); Assert.assertFalse(page.isSubmitLinkSubmitted()); Assert.assertFalse(page.isFormSubmitted()); FormTester formTester = tester.newFormTester(form); formTester.setValue(field, 2); formTester.submitLink(link, true); page = (FormPage)tester.getLastRenderedPage(); Assert.assertTrue(page.isFormSubmitted()); Assert.assertTrue(page.isSubmitLinkSubmitted()); tester.assertModelValue(form:field, 2); } It's a bug or a mine misunderstanding?Somebody could help me, please? Many thanks in advance Andrea Selva
Re: Wicket's Form Model (using hibernate entity or value objects) Design
You could put your components for editing the two different objects onto two different panels, which each have a CPM inside your form. On Fri, Jul 16, 2010 at 7:29 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.comwrote: Your form can edit two different objects. It will edit whatever you bind your fields to On Jul 16, 2010 4:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give me more information on it. Probably I should have mentioned that I wrap my hibernate entity in a CompoundPropertyModel like this MyForm extends Form{ MyForm( new CompoundPropertyModel(studyEntity)); //I also want to be able to add another model that will capture input from the form.e.g LdapStudy } Any pointers will be great thanks again for the time Nive On Thu, Jul 15, 2010 at 5:10 PM, vov vov...@mail.ru wrote: see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket's Form Model (using hibernate entity or value objects) Design
HI Pedro Thanks for taking the time. I really appreaciate this community and love it. What Jeremy mentioned provided the solution where in the we let wicket use the hierarchy to use the model class that contains other beans and introspect the property expression and set/get values. That way the panel is not holding on to the beans. I see your point to and i will try that as well. You have also provided a solution on the same basis ie have private members in a panel. Thanks again. I will get back to you on this. Thanks a lot Niv On Fri, Jul 16, 2010 at 9:52 PM, Pedro Santos pedros...@gmail.com wrote: Hi Nivedan, Jeremy write IModelfoo as a private variable and James Your form can edit two different objects. It will edit whatever you bind your fields to If you have an form with some fields for some bean, and other fields for other beans, you can do something like: class panel { private modelForAnPropertyInSomeBean; private modelForAnPropertyInSomeOtherBean; some code block{ add(new textfield( id, modelForAnPropertyInSomeBean); add(new textfield( id, modelForAnPropertyInSomeOtherBean); } } Is this what you want? On Fri, Jul 16, 2010 at 10:43 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi Jeremy, Nice I follow you now. I can have a container java class and have any number of member variables which in turn can be a hibernate entity and a regular java bean. The container java class will be the model. And on detach; i would have to have the container java class extend IModel and implement the detach() am i right? Thank you will give that a shot. Thanks for the time and thoughts. Regards Nivedan On Fri, Jul 16, 2010 at 7:44 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Either create a model object that contains your study and foo objects, or hold an IModelfoo as a private variable. Remember it's just regular java, so you can use member variables. Just don't forget to detach any model you hold as a variable manually. Jeremy Thomerson -- sent from my smartphone - please excuse formatting and spelling errors On Jul 16, 2010 6:30 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.com wrote: Your form can edit two different objects. It will edit whatever you bind your fields to O... -- Pedro Henrique Oliveira dos Santos
Re: Wicket's Form Model (using hibernate entity or value objects) Design
James Thanks mate. I have couple of options i guess that is what pedro meant as well. I guess Jeremy's solution is what i was looking for. in that the form instance will have a CPM that refers a container bean that has members. The solution u provided also is the identical but the members are in a panel. Cool. Thanks for the time, Niv On Fri, Jul 16, 2010 at 11:04 PM, James Carman ja...@carmanconsulting.comwrote: You could put your components for editing the two different objects onto two different panels, which each have a CPM inside your form. On Fri, Jul 16, 2010 at 7:29 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Thanks. How do i let the form know that it has one or more models? In the above I invoke the super(id, new CompoundPropertyModelStudy(study)); So this wraps the model as study. How will be able to add the second model in the same manner? If it sounds too basic do bear with me I will experiment as well. Thanks again Niv On Fri, Jul 16, 2010 at 7:04 PM, James Carman ja...@carmanconsulting.comwrote: Your form can edit two different objects. It will edit whatever you bind your fields to On Jul 16, 2010 4:23 AM, Nivedan Nadaraj shravann...@gmail.com wrote: Hi Thanks for the pointer. I did read through models and LoadableDetachableModel. Not sure if this model addresses the problem at hand. Isn't LDM related to performance and resoles Serialization issues? In the same note I came across Chaining of models. or Nesting of Models...can you/someone give me more information on it. Probably I should have mentioned that I wrap my hibernate entity in a CompoundPropertyModel like this MyForm extends Form{ MyForm( new CompoundPropertyModel(studyEntity)); //I also want to be able to add another model that will capture input from the form.e.g LdapStudy } Any pointers will be great thanks again for the time Nive On Thu, Jul 15, 2010 at 5:10 PM, vov vov...@mail.ru wrote: see org.apache.wicket.model.LoadableDetachableModel -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Re-Wicket-s-Form-Model-using-hibernate-entity-or-value-objects-Design-tp2289854p2289870.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to prevent rendering of unauthorized components?
Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Browser Back Button and WicketTester
no, it does not. its a testing tool for simple cases. -igor On Fri, Jul 16, 2010 at 1:38 AM, Harald Wellmann harald.wellm...@multi-m.de wrote: Does WicketTester emulate the browser back button? E.g. tester.submitForm(myform); tester.goBack(); tester.submitForm(myform); // assert correct solution of double submit problem The Javadoc comment for WicketTester.NonPageCachingDummyWebApplication mentions the back button and seems to imply the WicketTester does support it by default, but I don't see how... Best regards, Harald - 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: How to prevent rendering of unauthorized components?
I get this exception.. I don't want it ;] I want wicket to serve onunauthorizedaccess page. ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - 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: How to prevent rendering of unauthorized components?
I would have thought that wicket auth would pick it up and intercept the request in the request cycle and redirect.. Aparrently the last bit(redirecting) are missing.. You should be able to implement this yourself.. I know this is vague. I'd start by looking in the source of wicket auth.. regards Nino 2010/7/16 Martin Makundi martin.maku...@koodaripalvelut.com I get this exception.. I don't want it ;] I want wicket to serve onunauthorizedaccess page. ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - 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: How to prevent rendering of unauthorized components?
Do you have an idea where the leak occurs so I can prevent this? ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: I would have thought that wicket auth would pick it up and intercept the request in the request cycle and redirect.. Aparrently the last bit(redirecting) are missing.. You should be able to implement this yourself.. I know this is vague. I'd start by looking in the source of wicket auth.. regards Nino 2010/7/16 Martin Makundi martin.maku...@koodaripalvelut.com I get this exception.. I don't want it ;] I want wicket to serve onunauthorizedaccess page. ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - 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: How to prevent rendering of unauthorized components?
Hi Martin, the AuthorizationException handle mechanism that redirect response to the AccessDeniedPage is implemented at AbstractRequestCycleProcessor response method. You can set the onunauthorizedaccess page at the accessDeniedPage property on the ApplicationSettings. I don't understand what do you mean by: avoiding the error, because you can just remove the action restriction from the erroneous component. On Fri, Jul 16, 2010 at 3:06 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Do you have an idea where the leak occurs so I can prevent this? ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: I would have thought that wicket auth would pick it up and intercept the request in the request cycle and redirect.. Aparrently the last bit(redirecting) are missing.. You should be able to implement this yourself.. I know this is vague. I'd start by looking in the source of wicket auth.. regards Nino 2010/7/16 Martin Makundi martin.maku...@koodaripalvelut.com I get this exception.. I don't want it ;] I want wicket to serve onunauthorizedaccess page. ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - 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 -- Pedro Henrique Oliveira dos Santos
Re: How to prevent rendering of unauthorized components?
Hi! This is what I have: /** * @see org.apache.wicket.RequestCycle#onRuntimeException(org.apache.wicket.Page, java.lang.RuntimeException) */ @Override public Page onRuntimeException(Page page, RuntimeException e) { if ((e instanceof PageExpiredException) || (e instanceof AuthorizationException)) { return getEffectiveLoginPage(); } ... /** * @see org.apache.wicket.authorization.strategies.page.AbstractPageAuthorizationStrategy#isActionAuthorized(org.apache.wicket.Component, org.apache.wicket.authorization.Action) */ @Override public boolean isActionAuthorized(Component component, Action action) { if (instanceOf(component.getClass(), Page.class)) { return isPageAuthorized(component.getClass()); } return super.isActionAuthorized(component, action); } Now the problem is that despite the above, I get the render exception though I would expect that it renders login page. The exception looks nasty on logs and is unnecessary because it should be a clean redirect to login. What do you propose? ** Martin Hi Martin, the AuthorizationException handle mechanism that redirect response to the AccessDeniedPage is implemented at AbstractRequestCycleProcessor response method. You can set the onunauthorizedaccess page at the accessDeniedPage property on the ApplicationSettings. I don't understand what do you mean by: avoiding the error, because you can just remove the action restriction from the erroneous component. On Fri, Jul 16, 2010 at 3:06 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Do you have an idea where the leak occurs so I can prevent this? ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: I would have thought that wicket auth would pick it up and intercept the request in the request cycle and redirect.. Aparrently the last bit(redirecting) are missing.. You should be able to implement this yourself.. I know this is vague. I'd start by looking in the source of wicket auth.. regards Nino 2010/7/16 Martin Makundi martin.maku...@koodaripalvelut.com I get this exception.. I don't want it ;] I want wicket to serve onunauthorizedaccess page. ** Martin 2010/7/16 nino martinez wael nino.martinez.w...@gmail.com: Hmm do you end up with an exception or? 2010/7/15 Martin Makundi martin.maku...@koodaripalvelut.com Hi! I would like to avoid this error, to prevent the render alltogether. How can I do that? 2010-07-15 17:15:52,117 75919560 [24056...@qtp-13963314-568] ERROR RequestCycle - Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER org.apache.wicket.authorization.UnauthorizedActionException: Component [Page class = com.mycompany.application.view.application.MainPage, id = 0, version = 3, ajax = 1] does not permit action RENDER at org.apache.wicket.Page.renderPage(Page.java:876) at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:63) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) ** Martin - 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 -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org