• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

no RadioButtonCell in GWT 2.4 Cell?

 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
You can write your custom RadioCell by extending CheckboxCell class and override render() method.
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • 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?
 
peter tong
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • 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: 250
  • Mark post as helpful
  • send pies
  • 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: 250
  • Mark post as helpful
  • send pies
  • 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.
 
Brace yourself while corporate america tries to sell us its things. Some day they will chill and use tiny ads.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!