Re: Response with FeedBackMessage
if you do getSession().info() 2010/1/1 Marek Šabo : > Hi, > > I would like to ask how can I achieve propagation of a feedback message to a > page that is set in setResponsePage(). > Consider this: > > try { > ... > info(); > setResponsePage(); > } catch (e) { > error(e); > } > > Of course the error is propagated, is it possible or can you suggest a > workaround to achieve propagation of feedback message into response? > > Thanks, regards > > -- > Marek Šabo > Chief Server Manager > Club SU CVUT Buben > Bubenečská Kolej > Terronská 28, Prague 16000 > XMPP: zeratul...@gmail.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
Response with FeedBackMessage
Hi, I would like to ask how can I achieve propagation of a feedback message to a page that is set in setResponsePage(). Consider this: try { ... info(); setResponsePage(); } catch (e) { error(e); } Of course the error is propagated, is it possible or can you suggest a workaround to achieve propagation of feedback message into response? Thanks, regards -- Marek Šabo Chief Server Manager Club SU CVUT Buben Bubenečská Kolej Terronská 28, Prague 16000 XMPP: zeratul...@gmail.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: question about swarm
Wow that was quick. Thanks a lot I really appreciate it Sent via BlackBerry from T-Mobile -Original Message- From: Olger Warnier Date: Thu, 31 Dec 2009 23:31:34 To: Subject: Re: question about swarm Hi Sam, Found the way to solve it. It is fixed in the trunk. Still need to fix the build server - so a check out and build of the whole is probably best. An anonymous class will act like its' parent now. Happy new year (to you all). Olger On 31 dec 2009, at 22:43, s...@sambarrow.com wrote: > In my opinion, that's how it should work; just seems like common sense to me. > Even for regular (non-anonymous) classes, it would be useful although that's > not as important. > > As far as the technical part I have no idea. I've only been working with swam > for 3 days. But I will do some looking at the source code. > > Sent via BlackBerry from T-Mobile > > -Original Message- > From: Olger Warnier > Date: Thu, 31 Dec 2009 22:35:22 > To: > Subject: Re: question about swarm > > Hi Sam & Jeremy, > > Together with the remark that Jeremy made - I agree, it is quite fragile - I > had a look at the code that does the checks. > I could 'assume' that an anonymous class needs the same rights as the > 'normal' class. so when your CreateItemPage has the proper rights, an > anonymous variant has the similar rights. > > The other way is some kind of inheritance assumption. This needs some kind of > syntax in the hive file like the 'inherit' that is currently available. This > inherit is more page with child component 'inheritance' and not like in OO > thinking (If understand this completely). > With this in mind, I would say that treating an anonymous class as the class > it 'extends' may be the best. > I tried to figure out how to recognize an anonymous class. It seems that > Class.getSimpleName = "" or a search to $[0-9] in getName is a solution but > it seems risky when you use a non-sun JVM. > > What do you think ? > > Kind Regards, > > Olger > > > On 31 dec 2009, at 10:53, Sam Barrow wrote: > >> I know I can do that, but there's no way do do it by inheritance? I have >> hundreds of anonymous subclasses throughout my application. Seems >> sensible that subclasses should inherit their parent's permissions. >> >> On Thu, 2009-12-31 at 10:41 +0100, Olger Warnier wrote: >>> Hi Sam, >>> >>> I have added a sample to the secureform sample where the home page creates >>> an anonymous class of the MySecurePage >>> An anonymous page has a kind of a class name. Look for a >>> >>> ERROR - RequestCycle - Not authorized to instantiate class >>> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >>> org.apache.wicket.authorization.UnauthorizedInstantiationException: Not >>> authorized to instantiate class >>> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >>> >>> And add the line to the hive: >>> >>> permission ${ComponentPermission} >>> "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", >>> "render, enable"; >>> >>> As you can see it does not contain a line with the target response page but >>> a line that contains the setResponsePage call. >>> So you need to add a line that contains the 'name' of the anonymous class >>> to the hive. >>> >>> >>> Kind Regards, >>> >>> Olger >>> >>> >>> On 31 dec 2009, at 02:46, Sam Barrow wrote: >>> I hope this is the right list for wasp/swarm. How do i manage permissions for an anonymous subclass? I have a page called ItemPage. I can view ItemPage, but if I try to redirect to an anonymous subclass of ItemPage, i get an access denied error. this works: setResponsePage(new CreateItemPage(getPage())); but this doesnt: setResponsePage(new CreateItemPage(getPage()) { @Override protected void onSuccess(final Serializable index) { setResponsePage(new ViewItemPage(getBackPage(), index)); } }); hive file: permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, render"; permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; - 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 >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket
Re: question about swarm
Hi Sam, Found the way to solve it. It is fixed in the trunk. Still need to fix the build server - so a check out and build of the whole is probably best. An anonymous class will act like its' parent now. Happy new year (to you all). Olger On 31 dec 2009, at 22:43, s...@sambarrow.com wrote: > In my opinion, that's how it should work; just seems like common sense to me. > Even for regular (non-anonymous) classes, it would be useful although that's > not as important. > > As far as the technical part I have no idea. I've only been working with swam > for 3 days. But I will do some looking at the source code. > > Sent via BlackBerry from T-Mobile > > -Original Message- > From: Olger Warnier > Date: Thu, 31 Dec 2009 22:35:22 > To: > Subject: Re: question about swarm > > Hi Sam & Jeremy, > > Together with the remark that Jeremy made - I agree, it is quite fragile - I > had a look at the code that does the checks. > I could 'assume' that an anonymous class needs the same rights as the > 'normal' class. so when your CreateItemPage has the proper rights, an > anonymous variant has the similar rights. > > The other way is some kind of inheritance assumption. This needs some kind of > syntax in the hive file like the 'inherit' that is currently available. This > inherit is more page with child component 'inheritance' and not like in OO > thinking (If understand this completely). > With this in mind, I would say that treating an anonymous class as the class > it 'extends' may be the best. > I tried to figure out how to recognize an anonymous class. It seems that > Class.getSimpleName = "" or a search to $[0-9] in getName is a solution but > it seems risky when you use a non-sun JVM. > > What do you think ? > > Kind Regards, > > Olger > > > On 31 dec 2009, at 10:53, Sam Barrow wrote: > >> I know I can do that, but there's no way do do it by inheritance? I have >> hundreds of anonymous subclasses throughout my application. Seems >> sensible that subclasses should inherit their parent's permissions. >> >> On Thu, 2009-12-31 at 10:41 +0100, Olger Warnier wrote: >>> Hi Sam, >>> >>> I have added a sample to the secureform sample where the home page creates >>> an anonymous class of the MySecurePage >>> An anonymous page has a kind of a class name. Look for a >>> >>> ERROR - RequestCycle - Not authorized to instantiate class >>> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >>> org.apache.wicket.authorization.UnauthorizedInstantiationException: Not >>> authorized to instantiate class >>> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >>> >>> And add the line to the hive: >>> >>> permission ${ComponentPermission} >>> "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", >>> "render, enable"; >>> >>> As you can see it does not contain a line with the target response page but >>> a line that contains the setResponsePage call. >>> So you need to add a line that contains the 'name' of the anonymous class >>> to the hive. >>> >>> >>> Kind Regards, >>> >>> Olger >>> >>> >>> On 31 dec 2009, at 02:46, Sam Barrow wrote: >>> I hope this is the right list for wasp/swarm. How do i manage permissions for an anonymous subclass? I have a page called ItemPage. I can view ItemPage, but if I try to redirect to an anonymous subclass of ItemPage, i get an access denied error. this works: setResponsePage(new CreateItemPage(getPage())); but this doesnt: setResponsePage(new CreateItemPage(getPage()) { @Override protected void onSuccess(final Serializable index) { setResponsePage(new ViewItemPage(getBackPage(), index)); } }); hive file: permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, render"; permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; - 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 >> > > > - > 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
SOLVED: FormTester.submit(buttonId) unchecks CheckBoxes @L
formTester.submit("deleteButton") failed because component with "deleteButton" id was a SubmitLink. The following code works: formTester.submitLink("deleteButton", false); On Thu, Dec 31, 2009 at 2:38 PM, Alec Swan wrote: > Note that the code works on the live system. In other words, records > selected by the user get deleted from the database when the user > submits the form. > > I'd appreciate any thoughts on why formTester.submit("deleteButton") > deselects each checkbox before submitting the form. > > Thanks > > On Thu, Dec 31, 2009 at 11:30 AM, Alec Swan wrote: >> I have a form which contains a DataView where each row has a checkbox. >> The form also contains a submit link which deletes the rows with >> selected checkboxes from the database. >> >> The following code uses WicketTester to test the form behavior. The >> checkboxes are selected correctly before FormTester.submit(buttonId) >> is called. However, FormTester.submit(buttonId) method calls >> CheckBox#unselect() on each checkbox before submitting the form. Why >> is that? >> >> Thanks, >> >> public void selectAndDeleteRecipients() { >> final FormTester formTester = tester.newFormTester("myForm"); >> final Form form = formTester.getForm(); >> form.visitChildren(CheckBox.class, new IVisitor() >> { >> �...@override >> public Object component(CheckBox component) { >> final IdCheckBoxModel checkBoxModel = >> (IdCheckBoxModel) component.getDefaultModel(); >> checkBoxModel.select(); >> return CONTINUE_TRAVERSAL; >> } >> }); >> >> formTester.submit("deleteButton"); // this call unselects all >> check boxes >> } >> >> >> /** >> * A checkbox containing an object id. >> */ >> public class IdCheckBoxModel extends AbstractCheckBoxModel >> { >> private final long objectId; >> >> private final Set selectedIds; >> >> public IdCheckBoxModel(Long objectId, Set selectedIds) { >> Verify.argumentsNotNull(objectId, selectedIds); >> this.objectId = objectId; >> this.selectedIds = selectedIds; >> } >> >> public long getObjectId() { >> return objectId; >> } >> >> �...@override >> public boolean isSelected() { >> return selectedIds.contains(objectId); >> } >> >> �...@override >> public void select() { >> selectedIds.add(objectId); >> } >> >> �...@override >> public void unselect() { >> selectedIds.remove(objectId); >> } >> } >> > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: question about swarm
In my opinion, that's how it should work; just seems like common sense to me. Even for regular (non-anonymous) classes, it would be useful although that's not as important. As far as the technical part I have no idea. I've only been working with swam for 3 days. But I will do some looking at the source code. Sent via BlackBerry from T-Mobile -Original Message- From: Olger Warnier Date: Thu, 31 Dec 2009 22:35:22 To: Subject: Re: question about swarm Hi Sam & Jeremy, Together with the remark that Jeremy made - I agree, it is quite fragile - I had a look at the code that does the checks. I could 'assume' that an anonymous class needs the same rights as the 'normal' class. so when your CreateItemPage has the proper rights, an anonymous variant has the similar rights. The other way is some kind of inheritance assumption. This needs some kind of syntax in the hive file like the 'inherit' that is currently available. This inherit is more page with child component 'inheritance' and not like in OO thinking (If understand this completely). With this in mind, I would say that treating an anonymous class as the class it 'extends' may be the best. I tried to figure out how to recognize an anonymous class. It seems that Class.getSimpleName = "" or a search to $[0-9] in getName is a solution but it seems risky when you use a non-sun JVM. What do you think ? Kind Regards, Olger On 31 dec 2009, at 10:53, Sam Barrow wrote: > I know I can do that, but there's no way do do it by inheritance? I have > hundreds of anonymous subclasses throughout my application. Seems > sensible that subclasses should inherit their parent's permissions. > > On Thu, 2009-12-31 at 10:41 +0100, Olger Warnier wrote: >> Hi Sam, >> >> I have added a sample to the secureform sample where the home page creates >> an anonymous class of the MySecurePage >> An anonymous page has a kind of a class name. Look for a >> >> ERROR - RequestCycle - Not authorized to instantiate class >> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >> org.apache.wicket.authorization.UnauthorizedInstantiationException: Not >> authorized to instantiate class >> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >> >> And add the line to the hive: >> >>permission ${ComponentPermission} >> "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", >> "render, enable"; >> >> As you can see it does not contain a line with the target response page but >> a line that contains the setResponsePage call. >> So you need to add a line that contains the 'name' of the anonymous class to >> the hive. >> >> >> Kind Regards, >> >> Olger >> >> >> On 31 dec 2009, at 02:46, Sam Barrow wrote: >> >>> I hope this is the right list for wasp/swarm. >>> How do i manage permissions for an anonymous subclass? >>> >>> I have a page called ItemPage. I can view ItemPage, but if I try to >>> redirect to an anonymous subclass of ItemPage, i get an access denied >>> error. >>> >>> this works: >>> setResponsePage(new CreateItemPage(getPage())); >>> >>> but this doesnt: >>> setResponsePage(new CreateItemPage(getPage()) { >>> @Override >>> protected void onSuccess(final Serializable index) { >>> setResponsePage(new ViewItemPage(getBackPage(), index)); >>> } >>> }); >>> >>> hive file: >>> >>> permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, >>> render"; >>> permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; >>> >>> >>> - >>> 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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
progressbar mvn repository
Hello, I'm using the mvn repository to retrieve the 1.3.0 snapshot for the wicketstuff-progressbar. The following folder is empty: http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-progressbar/1.3.0-SNAPSHOT/ And maven fails when trying to retrieve the wicketstuff-progressbar.jar. My mvn repository setting: wicket-snaps http://wicketstuff.org/maven/repository true true My mvn dependency setting: org.wicketstuff wicketstuff-progressbar 1.3.0-SNAPSHOT Any help would be appreciated. Thanks, - Ed
Re: FormTester.submit(buttonId) unchecks CheckBoxes @L
Note that the code works on the live system. In other words, records selected by the user get deleted from the database when the user submits the form. I'd appreciate any thoughts on why formTester.submit("deleteButton") deselects each checkbox before submitting the form. Thanks On Thu, Dec 31, 2009 at 11:30 AM, Alec Swan wrote: > I have a form which contains a DataView where each row has a checkbox. > The form also contains a submit link which deletes the rows with > selected checkboxes from the database. > > The following code uses WicketTester to test the form behavior. The > checkboxes are selected correctly before FormTester.submit(buttonId) > is called. However, FormTester.submit(buttonId) method calls > CheckBox#unselect() on each checkbox before submitting the form. Why > is that? > > Thanks, > > public void selectAndDeleteRecipients() { > final FormTester formTester = tester.newFormTester("myForm"); > final Form form = formTester.getForm(); > form.visitChildren(CheckBox.class, new IVisitor() > { > �...@override > public Object component(CheckBox component) { > final IdCheckBoxModel checkBoxModel = > (IdCheckBoxModel) component.getDefaultModel(); > checkBoxModel.select(); > return CONTINUE_TRAVERSAL; > } > }); > > formTester.submit("deleteButton"); // this call unselects all > check boxes > } > > > /** > * A checkbox containing an object id. > */ > public class IdCheckBoxModel extends AbstractCheckBoxModel > { > private final long objectId; > > private final Set selectedIds; > > public IdCheckBoxModel(Long objectId, Set selectedIds) { > Verify.argumentsNotNull(objectId, selectedIds); > this.objectId = objectId; > this.selectedIds = selectedIds; > } > > public long getObjectId() { > return objectId; > } > > �...@override > public boolean isSelected() { > return selectedIds.contains(objectId); > } > > �...@override > public void select() { > selectedIds.add(objectId); > } > > �...@override > public void unselect() { > selectedIds.remove(objectId); > } > } > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: question about swarm
Hi Sam & Jeremy, Together with the remark that Jeremy made - I agree, it is quite fragile - I had a look at the code that does the checks. I could 'assume' that an anonymous class needs the same rights as the 'normal' class. so when your CreateItemPage has the proper rights, an anonymous variant has the similar rights. The other way is some kind of inheritance assumption. This needs some kind of syntax in the hive file like the 'inherit' that is currently available. This inherit is more page with child component 'inheritance' and not like in OO thinking (If understand this completely). With this in mind, I would say that treating an anonymous class as the class it 'extends' may be the best. I tried to figure out how to recognize an anonymous class. It seems that Class.getSimpleName = "" or a search to $[0-9] in getName is a solution but it seems risky when you use a non-sun JVM. What do you think ? Kind Regards, Olger On 31 dec 2009, at 10:53, Sam Barrow wrote: > I know I can do that, but there's no way do do it by inheritance? I have > hundreds of anonymous subclasses throughout my application. Seems > sensible that subclasses should inherit their parent's permissions. > > On Thu, 2009-12-31 at 10:41 +0100, Olger Warnier wrote: >> Hi Sam, >> >> I have added a sample to the secureform sample where the home page creates >> an anonymous class of the MySecurePage >> An anonymous page has a kind of a class name. Look for a >> >> ERROR - RequestCycle - Not authorized to instantiate class >> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >> org.apache.wicket.authorization.UnauthorizedInstantiationException: Not >> authorized to instantiate class >> org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 >> >> And add the line to the hive: >> >>permission ${ComponentPermission} >> "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", >> "render, enable"; >> >> As you can see it does not contain a line with the target response page but >> a line that contains the setResponsePage call. >> So you need to add a line that contains the 'name' of the anonymous class to >> the hive. >> >> >> Kind Regards, >> >> Olger >> >> >> On 31 dec 2009, at 02:46, Sam Barrow wrote: >> >>> I hope this is the right list for wasp/swarm. >>> How do i manage permissions for an anonymous subclass? >>> >>> I have a page called ItemPage. I can view ItemPage, but if I try to >>> redirect to an anonymous subclass of ItemPage, i get an access denied >>> error. >>> >>> this works: >>> setResponsePage(new CreateItemPage(getPage())); >>> >>> but this doesnt: >>> setResponsePage(new CreateItemPage(getPage()) { >>> @Override >>> protected void onSuccess(final Serializable index) { >>> setResponsePage(new ViewItemPage(getBackPage(), index)); >>> } >>> }); >>> >>> hive file: >>> >>> permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, >>> render"; >>> permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; >>> >>> >>> - >>> 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 > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: render javascript included in ajax update
If you're doing it in an AJAX request, why not use AjaxRequestTarget.appendJavascript()? Other than that, I suspect you're using a Label to render the javascript and just need to add Label.setEscapeModelStrings(false). -- Jeremy Thomerson http://www.wickettraining.com On Thu, Dec 31, 2009 at 11:56 AM, wic...@geofflancaster.com < wic...@geofflancaster.com> wrote: > I'm using panels to add some javascript to a page via ajax. As of right > now, all that is visible is the script text (in the
FormTester.submit(buttonId) unchecks CheckBoxes @L
I have a form which contains a DataView where each row has a checkbox. The form also contains a submit link which deletes the rows with selected checkboxes from the database. The following code uses WicketTester to test the form behavior. The checkboxes are selected correctly before FormTester.submit(buttonId) is called. However, FormTester.submit(buttonId) method calls CheckBox#unselect() on each checkbox before submitting the form. Why is that? Thanks, public void selectAndDeleteRecipients() { final FormTester formTester = tester.newFormTester("myForm"); final Form form = formTester.getForm(); form.visitChildren(CheckBox.class, new IVisitor() { @Override public Object component(CheckBox component) { final IdCheckBoxModel checkBoxModel = (IdCheckBoxModel) component.getDefaultModel(); checkBoxModel.select(); return CONTINUE_TRAVERSAL; } }); formTester.submit("deleteButton"); // this call unselects all check boxes } /** * A checkbox containing an object id. */ public class IdCheckBoxModel extends AbstractCheckBoxModel { private final long objectId; private final Set selectedIds; public IdCheckBoxModel(Long objectId, Set selectedIds) { Verify.argumentsNotNull(objectId, selectedIds); this.objectId = objectId; this.selectedIds = selectedIds; } public long getObjectId() { return objectId; } @Override public boolean isSelected() { return selectedIds.contains(objectId); } @Override public void select() { selectedIds.add(objectId); } @Override public void unselect() { selectedIds.remove(objectId); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Problem with palette components
Hi Victor Can you provide more info? E.g. How your are defining your palette? Or the exception you get? Without more information there is little else I can suggest... Best, Ernesto On Thu, Dec 31, 2009 at 6:09 PM, victorTrapiello wrote: > > Hello Eranesto, > I was trying to use the method ("getselectedChoices"), but I´m facing more > problems, look a simple example: > > Iterator iter = palette.getSelectedChoices(); >while (iter.hasNext()) { >System.out.println(iter.next()); > } > > it only prints the first choice, an them it throws an error exception, > > Any other suggestion¿? thank you very much guys happy new year!! > > > > > reiern70 wrote: > > > > Did you tried Palette.getSelectedChoices() method? It will return an > > Iterator where T is the type of Model object. > > > > Ernesto > > > > On Tue, Dec 29, 2009 at 8:09 PM, victorTrapiello > > wrote: > > > >> > >> Hello guys I´m new in the Wicket world, I´m developing an online > >> application > >> with my development team, we are using the component "Palette", we > >> display > >> the palette on the screen but we can´t/ we do not know how to get the > >> list > >> of choices that we have selected, we have tried like in the example > with: > >> > >> palette.getModelObjectAsString()); > >> > >> but it seems our IDE does not recognize this... we have imported all of > >> the > >> libraries > >> > >> any help¿? > >> > >> Thanks very much in advance > >> > >> Regards. > >> -- > >> View this message in context: > >> > http://old.nabble.com/Repost%3A-Track-selected-entries-in-either-of-a-Palette%27s-Choices-components--tp26922651p26958594.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 > >> > >> > > > > > > -- > View this message in context: > http://old.nabble.com/Repost%3A-Track-selected-entries-in-either-of-a-Palette%27s-Choices-components--tp26922651p26980336.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 > >
render javascript included in ajax update
I'm using panels to add some javascript to a page via ajax. As of right now, all that is visible is the script text (in the
Re: Problem with palette components
Hello Eranesto, I was trying to use the method ("getselectedChoices"), but I´m facing more problems, look a simple example: Iterator iter = palette.getSelectedChoices(); while (iter.hasNext()) { System.out.println(iter.next()); } it only prints the first choice, an them it throws an error exception, Any other suggestion¿? thank you very much guys happy new year!! reiern70 wrote: > > Did you tried Palette.getSelectedChoices() method? It will return an > Iterator where T is the type of Model object. > > Ernesto > > On Tue, Dec 29, 2009 at 8:09 PM, victorTrapiello > wrote: > >> >> Hello guys I´m new in the Wicket world, I´m developing an online >> application >> with my development team, we are using the component "Palette", we >> display >> the palette on the screen but we can´t/ we do not know how to get the >> list >> of choices that we have selected, we have tried like in the example with: >> >> palette.getModelObjectAsString()); >> >> but it seems our IDE does not recognize this... we have imported all of >> the >> libraries >> >> any help¿? >> >> Thanks very much in advance >> >> Regards. >> -- >> View this message in context: >> http://old.nabble.com/Repost%3A-Track-selected-entries-in-either-of-a-Palette%27s-Choices-components--tp26922651p26958594.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 >> >> > > -- View this message in context: http://old.nabble.com/Repost%3A-Track-selected-entries-in-either-of-a-Palette%27s-Choices-components--tp26922651p26980336.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: question about swarm
That's extremely fragile. -- Jeremy Thomerson http://www.wickettraining.com On Thu, Dec 31, 2009 at 3:41 AM, Olger Warnier wrote: > Hi Sam, > > I have added a sample to the secureform sample where the home page creates > an anonymous class of the MySecurePage > An anonymous page has a kind of a class name. Look for a > > ERROR - RequestCycle - Not authorized to instantiate class > org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 > org.apache.wicket.authorization.UnauthorizedInstantiationException: Not > authorized to instantiate class > org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 > > And add the line to the hive: > >permission ${ComponentPermission} > "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", > "render, enable"; > > As you can see it does not contain a line with the target response page but > a line that contains the setResponsePage call. > So you need to add a line that contains the 'name' of the anonymous class > to the hive. > > > Kind Regards, > > Olger > > > On 31 dec 2009, at 02:46, Sam Barrow wrote: > > > I hope this is the right list for wasp/swarm. > > How do i manage permissions for an anonymous subclass? > > > > I have a page called ItemPage. I can view ItemPage, but if I try to > > redirect to an anonymous subclass of ItemPage, i get an access denied > > error. > > > > this works: > > setResponsePage(new CreateItemPage(getPage())); > > > > but this doesnt: > > setResponsePage(new CreateItemPage(getPage()) { > > @Override > > protected void onSuccess(final Serializable index) { > > setResponsePage(new ViewItemPage(getBackPage(), index)); > > } > > }); > > > > hive file: > > > > permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, > > render"; > > permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; > > > > > > - > > 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: SV: wicketstuff portlets - where did it go?
Right I thought as much once I found the source. Unfortunately it doesn't provide the actual JSR168 implementations from Apache Portals Bridges Common which I was hoping for. Cheers ~ steve (sent from my ipod) On 31/12/2009, at 7:48 PM, Wilhelmsen Tor Iver wrote: Ah looks like I may have found it: http://wicket-stuff.svn.sourceforge.net/viewvc/wicket- stuff/attic/wicket-portlets/ probably put in the attic because Wicket has supported portlets "natively" since 1.4-m3 or thereabouts. - Tor Iver - 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: error page
Hi, > what is the difference between > > @Override > public IApplicationSettings getApplicationSettings() { > IApplicationSettings settings= super.getApplicationSettings(); > settings.setInternalErrorPage(internalErrorPage) > return settings; > } > > settings.setInternalErrorPage(internalErrorPage) and You have no acces to the exception thrown. Perhaps this could be a RFE ? a) Something like: ErrorWebPage extends WebPage with ErrorWebPage(Exception e) as constructor? b) if the annotated error Page has a constructor InternalErrorPage(Exception e) use this one to create the class? > reqauestcycle.onruntimeexception(exception e) { return new myerrorpage(e); > } You acces the exception via the constructor. Best Regards, Ilja Pavkovic > > when is InternalErrorPageused and when is myerrorpage used ? > and also we have IExceptionSettings , when is this used ? > > igor.vaynberg wrote: > > reqauestcycle.onruntimeexception(exception e) { return new > > myerrorpage(e); } > > > > -igor > > > > On Wed, Dec 30, 2009 at 7:22 AM, tubin gen wrote: > >> We created our custom error page so any time error happens wicket > >> redirects > >> to this error page , I want also want to display the exception stack > >> trace > >> in this page , please tell me how to do this ? > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > -- binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin +49 · 171 · 9342 465 Handelsregister: HRB 115854 - Amtsgericht Charlottenburg Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: question about swarm
I know I can do that, but there's no way do do it by inheritance? I have hundreds of anonymous subclasses throughout my application. Seems sensible that subclasses should inherit their parent's permissions. On Thu, 2009-12-31 at 10:41 +0100, Olger Warnier wrote: > Hi Sam, > > I have added a sample to the secureform sample where the home page creates an > anonymous class of the MySecurePage > An anonymous page has a kind of a class name. Look for a > > ERROR - RequestCycle - Not authorized to instantiate class > org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 > org.apache.wicket.authorization.UnauthorizedInstantiationException: Not > authorized to instantiate class > org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 > > And add the line to the hive: > > permission ${ComponentPermission} > "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", "render, > enable"; > > As you can see it does not contain a line with the target response page but a > line that contains the setResponsePage call. > So you need to add a line that contains the 'name' of the anonymous class to > the hive. > > > Kind Regards, > > Olger > > > On 31 dec 2009, at 02:46, Sam Barrow wrote: > > > I hope this is the right list for wasp/swarm. > > How do i manage permissions for an anonymous subclass? > > > > I have a page called ItemPage. I can view ItemPage, but if I try to > > redirect to an anonymous subclass of ItemPage, i get an access denied > > error. > > > > this works: > > setResponsePage(new CreateItemPage(getPage())); > > > > but this doesnt: > > setResponsePage(new CreateItemPage(getPage()) { > > @Override > > protected void onSuccess(final Serializable index) { > > setResponsePage(new ViewItemPage(getBackPage(), index)); > > } > > }); > > > > hive file: > > > > permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, > > render"; > > permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; > > > > > > - > > 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: question about swarm
Hi Sam, I have added a sample to the secureform sample where the home page creates an anonymous class of the MySecurePage An anonymous page has a kind of a class name. Look for a ERROR - RequestCycle - Not authorized to instantiate class org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 org.apache.wicket.authorization.UnauthorizedInstantiationException: Not authorized to instantiate class org.apache.wicket.security.examples.secureform.pages.HomePage$2$1 And add the line to the hive: permission ${ComponentPermission} "org.apache.wicket.security.examples.secureform.pages.HomePage$2$1", "render, enable"; As you can see it does not contain a line with the target response page but a line that contains the setResponsePage call. So you need to add a line that contains the 'name' of the anonymous class to the hive. Kind Regards, Olger On 31 dec 2009, at 02:46, Sam Barrow wrote: > I hope this is the right list for wasp/swarm. > How do i manage permissions for an anonymous subclass? > > I have a page called ItemPage. I can view ItemPage, but if I try to > redirect to an anonymous subclass of ItemPage, i get an access denied > error. > > this works: > setResponsePage(new CreateItemPage(getPage())); > > but this doesnt: > setResponsePage(new CreateItemPage(getPage()) { > @Override > protected void onSuccess(final Serializable index) { > setResponsePage(new ViewItemPage(getBackPage(), index)); > } > }); > > hive file: > > permission ${ComponentPermission} "${pages}.CreateItemPage", "inherit, > render"; > permission ${ComponentPermission} "${pages}.CreateItemPage", "enable"; > > > - > 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
SV: creating item after form is submitted via ajax
> I'm doing that. I'm doing what the link referenced earlier in this > thread > said to do. Wicket Ajax cannot update anything that isn't in the DOM. You need a placeholder element for what you want to render in the Ajax, e.g. add(new WebMarkupContainer("panel2").setVisible(false).setOutputMarkupPlaceholderTag(true)); ... // in the Ajax method: Panel2 replacement = new Panel2("panel2"); replacement.setOutputMarkupId(true); getPage().replace(replacement); target.addComponent(replacement); - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
SV: wicketstuff portlets - where did it go?
> Ah looks like I may have found it: > http://wicket-stuff.svn.sourceforge.net/viewvc/wicket- > stuff/attic/wicket-portlets/ probably put in the attic because Wicket has supported portlets "natively" since 1.4-m3 or thereabouts. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org