RE: Modifying model output to TextArea
You nailed it asking about convertToString(). In the custom converter I'd taken great care in converting the TextArea input to List. Then, somewhat blindly, in convertToString() just took that List and returned a toString() which, as as List toString() does, returned the enclosed objects within brackets. That has now been fixed. Thanks, Dave -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modifying-model-output-to-TextArea-tp4661830p4661834.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Modifying model output to TextArea
Well, take a look at the Wicket Guide to review how converters work: * 11.3 Input value conversion http://wicket.apache.org/guide/guide/single.html#chapter11_3 Did you remember to override the convertToString() method? Second, why not use a form component panel in this case? * 11.8 Creating complex form components with FormComponentPanel http://wicket.apache.org/guide/guide/chapter11.html#chapter11_8 And finally, don't expect your users to return to the previous page via a button click. They will use your browser's back button or some other key stroke shortcut that will mess up your workflow. ~ Thank you, Paul Bors -Original Message- From: dgn [mailto:david_nei...@hms.harvard.edu] Sent: Tuesday, October 15, 2013 2:45 PM To: users@wicket.apache.org Subject: Modifying model output to TextArea I'm stumped in how to modify model output for redisplay on a web page after confirmation. I have a TextArea> that gets added to a form. On submission I have a custom converter that work fine to transform the input into a model object with the same type of member. After form submit there is a confirmation page on which the user can either submit or return to the previous page containing the form. (The previous page is passed to the confirmation page so the 'return' button onSubmit() contains setResponsePage(previousPage). When the previous page re-renders all the data of the form is there except the List of email address is surrounded by brackets: [ema...@somedomain.com, ema...@somedomain.com]. This is understandable since the corresponding model is a List and a List.toString() displays its contents with brackets. Is there a Wicket way I can modify the rendering of this TextArea to remove these brackets? Or, would it be simpler to just modify the toString() of the List? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modifying-model-output-to-TextAre a-tp4661830.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Make a Shared Variable-Length ListView (checkbox matrix with N columns)
We have a tab panel with permissions per section of the product that would list the sections and then the permissions along with checkboxes to authorize a user different roles. That's a tab panel with a list view of sections which nest a list view of check boxes depending on the model of the parent. So yes, you can do it and re-use it throughout the app. Break it down into smaller panels and pay attention of the list model you pass around. ~ Thank you, Paul Bors -Original Message- From: eugenebalt [mailto:eugeneb...@yahoo.com] Sent: Tuesday, October 15, 2013 9:13 AM To: users@wicket.apache.org Subject: Make a Shared Variable-Length ListView (checkbox matrix with N columns) We have 2 cases where we need to display a matrix with checkboxes. In the first case, the matrix has 3 columns, in the second, it has 8. Both are working, and both were implemented as ListViews. But is there a way to make this a Shared Component, with a more elegant design? The problem is the HTML needs to list out the columns of every row. This makes it necessary to implement the 2 cases separately. We would like a reusable component. Example from Case 1, with 3 checkbox columns: Document Type View Upload Delete () Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-a-Shared-Variable-Length-Lis tView-checkbox-matrix-with-N-columns-tp4661825.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Modifying model output to TextArea
I'm stumped in how to modify model output for redisplay on a web page after confirmation. I have a TextArea> that gets added to a form. On submission I have a custom converter that work fine to transform the input into a model object with the same type of member. After form submit there is a confirmation page on which the user can either submit or return to the previous page containing the form. (The previous page is passed to the confirmation page so the 'return' button onSubmit() contains setResponsePage(previousPage). When the previous page re-renders all the data of the form is there except the List of email address is surrounded by brackets: [ema...@somedomain.com, ema...@somedomain.com]. This is understandable since the corresponding model is a List and a List.toString() displays its contents with brackets. Is there a Wicket way I can modify the rendering of this TextArea to remove these brackets? Or, would it be simpler to just modify the toString() of the List? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modifying-model-output-to-TextArea-tp4661830.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [auth-roles] Design of x-RoleAuthorizationStartegy
Thanks for your reply Sven. That makes sense. Ok then we can definitly build our own solution. Cheers Per Am 15.10.2013 13:48, schrieb Sven Meier: Hi, wicket-auth-roles is 'mostly a technology demonstration': https://wicket.apache.org/learn/projects/authroles.html It's a very simple starting point, thus it cannot serve all needs. Please use it as an inspiration for your own solution. Regards Sven - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Browser Page Refresh Not Really Refreshing
Sent from my HTC One SV - Reply message - From: "dhongyt" To: Subject: Browser Page Refresh Not Really Refreshing Date: Tue, Oct 15, 2013 8:55 AM I have a wicket page that contains a dataview of subscriptions. Any user that subscribes will show up on this page. If I am already on the page and someone else create a subscription and I do a browser refresh, like CTRL+R or F5 the user subscription does not show up. I would have to click on the actually page link again for the new data to show up. Is this because I need to set my headers to not cache? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Browser Page Refresh Not Really Refreshing
Is this because I need to set my headers to not cache? No. How do you iterate over your subscriptions: AbstractRepeater, ListView, DataTable? Where do you get the subscriptions from? Sven On 10/15/2013 03:54 PM, dhongyt wrote: I have a wicket page that contains a dataview of subscriptions. Any user that subscribes will show up on this page. If I am already on the page and someone else create a subscription and I do a browser refresh, like CTRL+R or F5 the user subscription does not show up. I would have to click on the actually page link again for the new data to show up. Is this because I need to set my headers to not cache? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Browser Page Refresh Not Really Refreshing
I have a wicket page that contains a dataview of subscriptions. Any user that subscribes will show up on this page. If I am already on the page and someone else create a subscription and I do a browser refresh, like CTRL+R or F5 the user subscription does not show up. I would have to click on the actually page link again for the new data to show up. Is this because I need to set my headers to not cache? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Browser-Page-Refresh-Not-Really-Refreshing-tp4661826.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Make a Shared Variable-Length ListView (checkbox matrix with N columns)
We have 2 cases where we need to display a matrix with checkboxes. In the first case, the matrix has 3 columns, in the second, it has 8. Both are working, and both were implemented as ListViews. But is there a way to make this a Shared Component, with a more elegant design? The problem is the HTML needs to list out the columns of every row. This makes it necessary to implement the 2 cases separately. We would like a reusable component. Example from Case 1, with 3 checkbox columns: Document Type View Upload Delete () Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-a-Shared-Variable-Length-ListView-checkbox-matrix-with-N-columns-tp4661825.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [auth-roles] Design of x-RoleAuthorizationStartegy
Hi, wicket-auth-roles is 'mostly a technology demonstration': https://wicket.apache.org/learn/projects/authroles.html It's a very simple starting point, thus it cannot serve all needs. Please use it as an inspiration for your own solution. Regards Sven On 10/11/2013 12:50 PM, Per Newgro wrote: Hi, we had a simple usecase today leading us to confusion on AnnotationsRoleAuthorizationStrategy (ARAS). We tried to protect a button by using two different permissions. So we had to use AuthorizeActions. We did it this way @AuthorizeActions(actions = { @AuthorizeAction(action = Action.RENDER, roles = { "entity.create" }), @AuthorizeAction(action = Action.RENDER, roles = { "document.fillout" }) }) private static class NewDocumentForNewEntityLink extends BookmarkablePageLink { public NewDocumentForNewEntityLink(String id, Class pageClass) { super(id, pageClass); } } Ok we don't use the roles as their name would suggest it. We use it more as permissions. But that is not relevant here (IMHO). In one of our test cases we've found out that only one permission is required to get that link displayed. But we would like to include all permissions. And so the story begins. The first maybe intuitive way to customize the annotation handling was to implement our own IRoleCheckingStrategy. But the first issue we had was the name of the interface method we had to implement (hasAny(Roles)) which suggests an or condition. => Isn't this to thight for an interface? Shouldn't the name be accepts(Roles)? With further checks we saw no chance to get an "and condition check" done by the current ARAS implementation. The only possibility was to overwrite protected boolean isActionAuthorized(final Class componentClass, final Action action) and do it by our own. Another problem could be the handling of the deny permissions. If we would like to use an "or condition check" here this wouldn't be possible because accept and deny checks use the same method (hasAny(Roles)). => Shouldn't the role check a task of the RoleCheckingStartegy? Shouldn't it be a more configurable implementation? I hope my problem got clear. I don't want to snub anybody. The intention of this is only to have a discussion here before we create a ticket with a patch. What do you think? Thanks for your opinion Per - 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