Hi!

You should be able to use custom table rendering of a GWT 2.5 cell table to 
do what you want in your point (1) (extending AbstractCellTableBuilder and 
implement the buildStandardRowImpl method to put the relevant cell type 
into the column that alters based upon your condition in your point (2). 
 Then pass that renderer to the cell table, instead of the standard one, 
using its setTableBuilder method)

Information about this is a little sparse, but you could check out:

* http://showcase2.jlabanca-testing.appspot.com/#!CwCustomDataGrid , or
* GWTinAction edition 2 <http://www.manning.com/tacy> - a relevant example 
<http://code.google.com/p/gwtinaction2/wiki/DataPresentation>(different 
cells in the Tags column) can be found in code 
here<http://code.google.com/p/gwtinaction2/source/browse/trunk/gwtia-ch10-data-presentation-widgets/src/com/manning/gwtia/ch10/client/datagrid/CellDataGridExample.java>.
 
(it is still work in progress just now, so missing comments, but should be 
relatively self explanatory)

Hope that helps in some way!

//Adam

On Sunday, September 2, 2012 11:43:43 AM UTC+2, Saurabh Tripathi wrote:
>
> Hi all,
>
> I am stuck here with a requirement which is mentioned as follow:
>
> 1)A table where one or more (for now just one) column need to have 
> different widgets in editable cell.
>                for example: Class is Plant having property: 'name' and 
> access method: 'String getName()';
>                                   Now if(name.equals("true") || 
> name.equals("false"){ 
>                                                          ---> Render 
> CheckBox with respective checked value
>                                          }else if(name.equals("~")) {
>                                                        -----> Render 
> ListBox with some predefined items
>                                          }else {
>                                                         ----->just render 
> the String.
>                                          }
> 2)The cell where we render just the String should be Editable (i.e on 
> click textbox appear for edit), other than this other cells should be 
> non-editable i.e cells for checkbox and listbox should be non editable, 
>
> You may find this requirement very unusual and I agree it is because here 
> we dealing with raw xml/text kind of metadata.
> Anyway I have given a lot of effort over this, but I am in a catch 22 
> situation if somehow I am able to attain 1 condition than I am have 
> editable problem, if somehow I make that up, the valueupdater doesn't seem 
> to work properly........................................
>
> At last I am thinking that may be 'CellTable' API was never there for such 
> kind of requirement. So FlexTable could be the answer.
> Even if it is so there would be a lot of work for me then like -> 
> implementing sorting(while click on header), pagination etc, it would be 
> great if 
> some open source library is already there for it.                  
>
> Thanks in advance     
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Xy3F9oc6y0EJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to