Re: CellTable question

2011-07-29 Thread GeorgeS
Jeff, that worked like a charm! Thanks for helping me make it up the
Java curve!


On Jul 28, 1:27 pm, Jeff Larsen  wrote:
> when you build the column, specify the number
>
> MyTextColumn extends TextColumn{
>
> public MyTextColumn(int index){
>
>   this.index = index;
>
> }
>
> public String getValue(String[] strings){
>   return strings[index];
>
>
>
>
>
>
>
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



Re: CellTable question

2011-07-28 Thread GeorgeS
Thanks... I think that what I was looking for. I had also thought of
creating an array of TextControls but this looks much cleaner.


On Jul 28, 1:27 pm, Jeff Larsen  wrote:
> when you build the column, specify the number
>
> MyTextColumn extends TextColumn{
>
> public MyTextColumn(int index){
>
>   this.index = index;
>
> }
>
> public String getValue(String[] strings){
>   return strings[index];
>
>
>
>
>
>
>
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



Re: CellTable question

2011-07-28 Thread Jeff Larsen
when you build the column, specify the number

MyTextColumn extends TextColumn{

public MyTextColumn(int index){ 

  this.index = index;
}


public String getValue(String[] strings){
  return strings[index];
}

-- 
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/-/P1UEa3MCBpgJ.
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.



Re: CellTable question

2011-07-28 Thread GeorgeS
To clarify... there are 1-n entries where I have no what n is until
runtime so I can't hardcode stringValue[8]...


On Jul 28, 12:55 pm, GeorgeS  wrote:
> I think what I'm not understanding is how to create the getValue
> portion of the column creation before I add the column to the cell
> table when it isn't pre-defined. When I have code like:
>
> TextColumn fieldsColumn = new
> TextColumn() {
>     @Override
>     public String getValue(ResultDocument resultDoc) {
>         return resultDoc.documentFields;
>
>         }
>
> };
>
> I can see easily what to do but when that column is accessing the (for
> example) 8th value in a String [] then I can't see it. This is
> probably my newness to Java (again).
>
> On Jul 28, 12:22 pm, Magno Machado  wrote:
>
>
>
>
>
>
>
> > You just have to read whatever information you need and then just call
> > yourCellTableInstance.addColumn(...) as needed
>
> > On Thu, Jul 28, 2011 at 12:52 PM, GeorgeS  wrote:
> > > I see mention of a DataGrid in 2.4? Is there any documentation on this
> > > yet?
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google Web Toolkit" group.
> > > 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.
>
> > --
> > Magno Machado 
> > Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



Re: CellTable question

2011-07-28 Thread GeorgeS
I think what I'm not understanding is how to create the getValue
portion of the column creation before I add the column to the cell
table when it isn't pre-defined. When I have code like:

TextColumn fieldsColumn = new
TextColumn() {
@Override
public String getValue(ResultDocument resultDoc) {
return resultDoc.documentFields;

}
};

I can see easily what to do but when that column is accessing the (for
example) 8th value in a String [] then I can't see it. This is
probably my newness to Java (again).


On Jul 28, 12:22 pm, Magno Machado  wrote:
> You just have to read whatever information you need and then just call
> yourCellTableInstance.addColumn(...) as needed
>
> On Thu, Jul 28, 2011 at 12:52 PM, GeorgeS  wrote:
> > I see mention of a DataGrid in 2.4? Is there any documentation on this
> > yet?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > 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.
>
> --
> Magno Machado 
> Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



Re: CellTable question

2011-07-28 Thread Magno Machado
You just have to read whatever information you need and then just call
yourCellTableInstance.addColumn(...) as needed

On Thu, Jul 28, 2011 at 12:52 PM, GeorgeS  wrote:

> I see mention of a DataGrid in 2.4? Is there any documentation on this
> yet?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> 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.
>
>


-- 
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



Re: CellTable question

2011-07-28 Thread GeorgeS
I see mention of a DataGrid in 2.4? Is there any documentation on this
yet?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.



CellTable question

2011-07-27 Thread GeorgeS
I'm working on an GAE app using GWT and I'm running to a problem using
CellTable. I don't know until run time how many columns are needed and
their type in my CellTable (Note: there are always two fixed columns)
so I can't just hook up the columns at design time. The values I'm
reading are currently three strings where the third string gets parsed
into however many columns I need (just a simple split into a String
[]). Is there a way to do this? I'm still learning Java so I'm
thinking there is some very simple way that I haven't discovered.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.