• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

no RadioButtonCell in GWT 2.4 Cell?

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I check the GWT 2.4 API
Cell
and found there is no RadioButtonCell, so if I need a column with radio button on each row, how to do it using GWT 2.4?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can write your custom RadioCell by extending CheckboxCell class and override render() method.
 
peter tong
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Harendra Kumar wrote:You can write your custom RadioCell by extending CheckboxCell class and override render() method.



override this method
public void render(Cell.Context context,
java.lang.Boolean value,
SafeHtmlBuilder sb)
?

how to start?
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Recommended reading http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html
 
peter tong
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I extends the CheckboxCell.class as follow:


everything seems ok, but now I want to add a button, and when press that button, it will give me the selected record information, I try to use singleselectionmodel as follow:


but now a very strange thing occur, when I select a radiobutton in a row of the table, the radio button will not selected, I need press the radio button once more to get it selected, before adding the singleselectionmodel,
no this problem occur!!
 
peter tong
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


is there a way to locate the previous selected object so I can set its value to false?
I found that although I set the selected object to true, but the previous selected object is also true, and seems there is no method in onSelectionChange event to get the previous selected object, any method?
 
peter tong
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
really need help, maybe I simplify what I want to do.
there is a celltable with a column of radio button for each row, user can select a row using that radio button, and click a button outside the celltable to open the detail page for that row.
the requirement is easy, but I really do not know how to do it.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic