Re: Radio Button in Cell Table or Data grid.
I think I got it. Will this be correct? private final SingleSelectionModel roleStatusSelectionModel = new SingleSelectionModel<>(KEY_PROVIDER); roleCellTable.setSelectionModel(roleStatusSelectionModel); private final CheckboxCell rowSelectionColumnCell = new CheckboxCell(true, false); final Column rowSelectionColumn = new Column(rowSelectionColumnCell) { @Override public Boolean getValue(final DTO dto) { return roleStatusSelectionModel.isSelected(dto); } } final Set selectedSet = roleStatusSelectionModel.getSelectedSet(); for (final DTO selected : selectedSet) { selected.setActive(true); } Secondly, If I have to do this custom radio based on CheckboxCell, what's the best way? On Thursday, June 28, 2018 at 11:20:36 AM UTC-5, Thomas Broyer wrote: > > Fwiw, if this is about selecting a value, have a look at the > SingleSelectionModel and how to apply it to a CheckboxCell. If you want the > additional type="radio" on the (for accessibility, mainly), then > create your own custom cell based on CheckboxCell. > If this is *not* about selection, then I'm afraid it'll be a bit harder, > as you won't have an event/callback/whatever on the "previously selected > radio" when you select another one. > > On Thursday, June 28, 2018 at 6:07:25 PM UTC+2, BM wrote: >> >> Basically to implement custom RadioGroupCell for Cell Table. This is not >> having a group of Radio buttons within a single cell. >> >> So what I want is a cell table which has a cell Column called "Active" >> and defined with one Radio button in that cell. Unlike checkboxes or custom >> cell of group of radio buttons within one cell, my requirement is the Radio >> buttons in all rows are part of one Group so one can select only one at a >> time. >> >> So here is what cell table would look like >> >> Role Active >> -- >> AdminRadio Button (YES) >> Role ARadio Button (NO) >> Role BRadio Button (NO) >> >> One can toggle to select only one Radio between roles. >> >> I can write a custom cell which has one radio button. But I don't know >> how each radio buttons becomes part of the single group across the rows. >> >> Any help or pointers would be much appreciated. >> > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Radio Button in Cell Table or Data grid.
Cheers Thomas. You are right on where my struggle is. Hmm. Ok so where can I find the SingleSelectionModel and how to apply it to a CheckboxCell example? As long as I can show a widget (either checkbox or radio) which toggles across each row to put ON or OFF value within the DTO field I am okay to show checkbox. On Thursday, June 28, 2018 at 11:20:36 AM UTC-5, Thomas Broyer wrote: > > Fwiw, if this is about selecting a value, have a look at the > SingleSelectionModel and how to apply it to a CheckboxCell. If you want the > additional type="radio" on the (for accessibility, mainly), then > create your own custom cell based on CheckboxCell. > If this is *not* about selection, then I'm afraid it'll be a bit harder, > as you won't have an event/callback/whatever on the "previously selected > radio" when you select another one. > > On Thursday, June 28, 2018 at 6:07:25 PM UTC+2, BM wrote: >> >> Basically to implement custom RadioGroupCell for Cell Table. This is not >> having a group of Radio buttons within a single cell. >> >> So what I want is a cell table which has a cell Column called "Active" >> and defined with one Radio button in that cell. Unlike checkboxes or custom >> cell of group of radio buttons within one cell, my requirement is the Radio >> buttons in all rows are part of one Group so one can select only one at a >> time. >> >> So here is what cell table would look like >> >> Role Active >> -- >> AdminRadio Button (YES) >> Role ARadio Button (NO) >> Role BRadio Button (NO) >> >> One can toggle to select only one Radio between roles. >> >> I can write a custom cell which has one radio button. But I don't know >> how each radio buttons becomes part of the single group across the rows. >> >> Any help or pointers would be much appreciated. >> > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Radio Button in Cell Table or Data grid.
Fwiw, if this is about selecting a value, have a look at the SingleSelectionModel and how to apply it to a CheckboxCell. If you want the additional type="radio" on the (for accessibility, mainly), then create your own custom cell based on CheckboxCell. If this is *not* about selection, then I'm afraid it'll be a bit harder, as you won't have an event/callback/whatever on the "previously selected radio" when you select another one. On Thursday, June 28, 2018 at 6:07:25 PM UTC+2, BM wrote: > > Basically to implement custom RadioGroupCell for Cell Table. This is not > having a group of Radio buttons within a single cell. > > So what I want is a cell table which has a cell Column called "Active" and > defined with one Radio button in that cell. Unlike checkboxes or custom > cell of group of radio buttons within one cell, my requirement is the Radio > buttons in all rows are part of one Group so one can select only one at a > time. > > So here is what cell table would look like > > Role Active > -- > AdminRadio Button (YES) > Role ARadio Button (NO) > Role BRadio Button (NO) > > One can toggle to select only one Radio between roles. > > I can write a custom cell which has one radio button. But I don't know how > each radio buttons becomes part of the single group across the rows. > > Any help or pointers would be much appreciated. > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Radio Button in Cell Table or Data grid.
Basically to implement custom RadioGroupCell for Cell Table. This is not having a group of Radio buttons within a single cell. So what I want is a cell table which has a cell Column called "Active" and defined with one Radio button in that cell. Unlike checkboxes or custom cell of group of radio buttons within one cell, my requirement is the Radio buttons in all rows are part of one Group so one can select only one at a time. So here is what cell table would look like Role Active -- AdminRadio Button (YES) Role ARadio Button (NO) Role BRadio Button (NO) One can toggle to select only one Radio between roles. I can write a custom cell which has one radio button. But I don't know how each radio buttons becomes part of the single group across the rows. Any help or pointers would be much appreciated. -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: RadioCell?
Hey, I know this is VERY old post. But do you know the code for RadioGroupCell? So what I want is a cell table which has a cell Column called "Active" and defined with one Radio button in that cell. Unlike checkboxes or custom cell of group of radio buttons within one cell, my requirement is the Radio buttons in all rows are part of one Group so one can select only one at a time. So here is what cell table would look like Role Active -- AdminRadio Button (YES) Role ARadio Button (NO) Role BRadio Button (NO) One can toggle to select only one Radio between roles. Any help or pointers would be much appreciated. On Thursday, September 13, 2012 at 12:20:29 AM UTC-5, S. DG wrote: > > I understand your point. > Even i had a similar view when i was asked to implement this. But again > for Tables where we have not more 2-3 Radio choices i guess it is fine. But > I am still not clear why GWT api have not implemented this yet. People have > been looking for it for quite sometime now. I started GWT-ing just a week > back. > Anyways I am able to create my own RadioGroupCell now after reading > through this and many other blogs and breaking my head. > > Thanks to all. > > On Thursday, 13 September 2012 09:20:47 UTC+5:30, Andrei wrote: >> >> I think it's a bad idea from a user interface perspective. Imagine you >> have three radio buttons in a cell, and a many rows. Now your user is >> presented with dozens of radio buttons that take a lot of space. It would >> look very confusing. Use a regular SelectionCell - this is a UI concept >> that all users are familiar with. And you will save a lot of time :) > > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: GWT csrf protection
My apologies for the bump. This seems to be the most apt place to put this information. Since we're upgrading our server from JBoss EAP 6.4.x to EAP 7.1.x we ran into an issue with the default XSRF protection of GWT. Undertow changes Session ID on authentication. To prevent Session Fixation. Our fix has been to generate a long random string, stick it into the HttpSession and check that the client sends that blob on each request. We just overrode the XsrfProtectedService validation and the XsrfTokenService generation methods. Even without Undertow this is possible with Servlet API 3.1 servers due to the addition of HttpServletRequest#changeSessionId() method. With kind regards, Maarten Daalder ISAAC On Sunday, 5 November 2017 20:21:05 UTC+1, Maarten Daalder (ISAAC Software Solutions) wrote: > > We are currently using it in production. The code hasn't changed since at > least 2.6.0 (and probably earlier). > The only problems we currently have are that sometimes the client doesn't > fetch a new token on start or that the client has to refresh the browser > after the session expired. > > On Tuesday, 31 October 2017 13:36:16 UTC+1, Rencia Cloete wrote: >> >> Gwt Documentation >> http://www.gwtproject.org/doc/latest/DevGuideSecurityRpcXsrf.html as >> well as GWT IN action >> https://manning-content.s3.amazonaws.com/download/d/07888ea-bada-44cc-9c55-ead15ea7fe85/GWT_sample-07.pdf >> >> recommend extending XsrfProtectedService on client side and >> XsrfProtectedServiceServlet on server side >> >> But both thse methods are still marked as "EXPERIMENTAL and subject to >> change. Do not use this in production code. " >> >> What gives? is this a leftover - or are they now safe to use in >> production? >> >> Thanks for your help in advance! >> > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.