Re: How to remove tabindex=0 from the cell table html

2022-09-09 Thread Thomas Broyer
What kind of Cell is this? Can you show part of the code that sets up the 
table?
Did you set KeyboardSelectionPolicy to DISABLED?

On Friday, September 9, 2022 at 1:48:45 AM UTC+2 nidhi@gmail.com wrote:

> I am working on adding keyboard accessibility to my product. When I am 
> tabbing from a widget say a button, outside of the cell table to the 
> another button that is after the table my tabbing sequence includes the 
> first element on the celltable into the sequence. This element is just a 
> data and can not be edited. Due to the fact that html generated by GWT for 
> cell table that include tabindex= 0  it is added in the tabbing sequence. 
>  class="com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableEvenRow
>  
> com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableHoveredRow">
>  class="com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableCell 
> com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableEvenRowCell 
> com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableFirstColumn 
> dataGridCell textLeftAlignment wrapText 
> com-jenzabar-jx-ui-widgets-item-grid-JXCellTable-Style-cellTableHoveredRowCell">
>  *tabindex="0*">10/06/2021
>
> My question is how to remove this tabindex. I tried setting tabindex to -1 
> but that does not affect the div tag tabindex value. Any help will be 
> really appreciated. Thank you 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/6f0aa62b-f9ad-4420-8088-eee90b79a0c8n%40googlegroups.com.


How to remove tabindex=0 from the cell table html

2022-09-08 Thread nidhizener
I am working on adding keyboard accessibility to my product. When I am 
tabbing from a widget say a button, outside of the cell table to the 
another button that is after the table my tabbing sequence includes the 
first element on the celltable into the sequence. This element is just a 
data and can not be edited. Due to the fact that html generated by GWT for 
cell table that include tabindex= 0  it is added in the tabbing sequence. 


10/06/2021

My question is how to remove this tabindex. I tried setting tabindex to -1 
but that does not affect the div tag tabindex value. Any help will be 
really appreciated. Thank you 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/f56d4d93-a632-4d5b-9ed6-07ebcf9edde9n%40googlegroups.com.


Re: determine what table rows and columns are *actually* visible? (for scrollIntoView purposes.)

2020-05-14 Thread Thomas Broyer
You can get the actual  element using getRowElement() and compute 
everything from there, based on the element's offsetParent, offsetTop and 
offsetLeft.

BTW, depending on the browsers you need to support, you might be able to 
"just" use scrollIntoView with an options dictionary to center the cell: 
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

On Wednesday, May 13, 2020 at 11:49:34 PM UTC+2, Linus Kamb wrote:
>
> I have a DataGrid with a pager with a page size of 50 inside a 
> ScrollPanel.  When I ask the grid for the visible range, it give me a range 
> of 50 rows, the size of the page.   But what I can actually see at any 
> given time inside the ScrollPanel is often considerably fewer rows than the 
> page size.
>
> Is there any way to determine what rows and columns are *actually* visible 
> in the viewport of the ScrollPanel?
>
> The driver behind this is that I want to be able to programmatically 
> scroll a row+cell in to view, but I would like to scroll so the row+cell is 
> more or less in the center of the view, instead of just scrolled in to view 
> at the edge.  What I've tried to do is pick a row / column that is either 
> farther down / right or up / left so scroll in to view, but those 
> corrections depend on what is currently visible.
>
> Perhaps there is a "correct" way to do this.
>
> Thanks in advance.
> - Linus
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/1708b179-1b4e-4ee0-818b-a3448bf8c814%40googlegroups.com.


determine what table rows and columns are *actually* visible? (for scrollIntoView purposes.)

2020-05-13 Thread Linus Kamb
I have a DataGrid with a pager with a page size of 50 inside a 
ScrollPanel.  When I ask the grid for the visible range, it give me a range 
of 50 rows, the size of the page.   But what I can actually see at any 
given time inside the ScrollPanel is often considerably fewer rows than the 
page size.

Is there any way to determine what rows and columns are *actually* visible 
in the viewport of the ScrollPanel?

The driver behind this is that I want to be able to programmatically scroll 
a row+cell in to view, but I would like to scroll so the row+cell is more 
or less in the center of the view, instead of just scrolled in to view at 
the edge.  What I've tried to do is pick a row / column that is either 
farther down / right or up / left so scroll in to view, but those 
corrections depend on what is currently visible.

Perhaps there is a "correct" way to do this.

Thanks in advance.
- Linus

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/a4a8cbd4-7094-4387-af89-48839d648839%40googlegroups.com.


initialize the object using flex Table contents

2019-04-11 Thread Nanditha Nandu
Hi,

Im new to GWT
I have a fields in Custom class as,
getName(), setName, getCity(), setCity() etc.

Im using Flex table to read the values from the user:

   FlexTable t = new FlexTable();
t.setText(0, 0, "Name");
t.setText(0, 1, "City"); 

t.setWidget(1, 0, new TextBox()); 
t.setWidget(1, 1, new TextBox());

And using flex table addrow() , so that mutiple details can be entered at 
the same time.

Now how to store the data entered by user to the object of my class..like 
c.setName() ..so that it can be easy to store in the database.

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

2018-06-28 Thread BM
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.

2018-06-28 Thread BM
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.

2018-06-28 Thread Thomas Broyer
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.

2018-06-28 Thread BM
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: Using UIField HTML to create a dynamic table

2018-06-19 Thread Thomas Broyer
As can be seen in your screenshot, the request goes to 
/myaction/myActionService. The myActionService part comes from the 
@RemoteServiceRelativePath("myActionService"), and the /myaction part comes 
from the module name; or in this case most likely a rename-to="myaction" in 
your module (which is also what triggers GWT into generating a file named 
myaction.nocache.js in a myaction folder).
To make it work, you need to align map your servlet to 
/myaction/myActionService (instead of 
/com.google.gwt.myaction.client.MyAction/myaction)

On Tuesday, June 19, 2018 at 9:38:59 AM UTC+2, Joyce wrote:
>
> Do you have an idea how I can fix that problem? 
> I set my path to @RemoteServiceRelativePath("myActionService") and the 
> url in my web.xml is the following: "
> /com.google.gwt.myaction.client.client.MyAction/myaction". Is there an 
> other way how to set the url? Or how can I tell GWT to use a different 
> url for the service? I tried changing both parameters but in my browser the 
> error description didn't change. It seems to me that the url is configured 
> somewhere else. Thank you!!
>
> Am Montag, 18. Juni 2018 13:16:29 UTC+2 schrieb Jens:
>>
>>
>>
>>> 
>>>
>>
>> This means GWT has made a request to your server but the servlet is not 
>> registered at the expected location, thus the server responds with a 404 
>> not found status (take a look in your network inspector in the browser). 
>> You either have to update your web.xml or tell GWT to use a different url 
>> for the service. For the latter take a look at the javadoc of 
>> @RemoteServiceRelativePath for details.
>>
>> -- J.
>>
>

-- 
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: Using UIField HTML to create a dynamic table

2018-06-19 Thread Joyce
Do you have an idea how I can fix that problem? 
I set my path to @RemoteServiceRelativePath("myActionService") and the url 
in my web.xml is the following: "
/com.google.gwt.myaction.client.client.MyAction/myaction". Is there an 
other way how to set the url? Or how can I tell GWT to use a different url 
for the service? I tried changing both parameters but in my browser the 
error description didn't change. It seems to me that the url is configured 
somewhere else. Thank you!!

Am Montag, 18. Juni 2018 13:16:29 UTC+2 schrieb Jens:
>
>
>
>> 
>>
>
> This means GWT has made a request to your server but the servlet is not 
> registered at the expected location, thus the server responds with a 404 
> not found status (take a look in your network inspector in the browser). 
> You either have to update your web.xml or tell GWT to use a different url 
> for the service. For the latter take a look at the javadoc of 
> @RemoteServiceRelativePath for details.
>
> -- J.
>

-- 
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: Using UIField HTML to create a dynamic table

2018-06-18 Thread Jens


>
> 
>

This means GWT has made a request to your server but the servlet is not 
registered at the expected location, thus the server responds with a 404 
not found status (take a look in your network inspector in the browser). 
You either have to update your web.xml or tell GWT to use a different url 
for the service. For the latter take a look at the javadoc of 
@RemoteServiceRelativePath for details.

-- J.

-- 
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: Using UIField HTML to create a dynamic table

2018-06-18 Thread Joyce
Thank you for your help!
I changed my configuration in my MyAction class and now I get this error:



My code on server side in the class ActionServiceImpl looks like that:

public class ActionServiceImpl extends RemoteServiceServlet implements 
MyActionService {

private static final String[] actionName = new String[] { "Trikots für 
A-Jugend", "Rollstuhl für Maria" };
private static final double[] targetAmount = new double[] { 1000, 2500 };
private static final double[] donationMinimum = new double[] { 10, 10 };
private static final double[] amountDonationSoFar = new double[] { 258, 742 
};
private static final String[] accountName = new String[] { "Max 
Mustermann", "Maria Musterfrau" };
private static final String[] iban = new String[] { 
"DE447818032764520919100", "DE4478180328485419100" };
private static final String[] NameOfBank = new String[] { "ABC Bank", "XYZ 
Bank" };
private final HashMap actions = new HashMap();
private final HashMap accounts = new HashMap();

public ActionServiceImpl() {
initActions();
}

private void initActions() {

for (int i = 0; i < actionName.length; ++i) {
Account account = new Account(accountName[i], NameOfBank[i], 
iban[i]);
Campaign action = new Campaign(String.valueOf(i), actionName[i], 
targetAmount[i], donationMinimum[i],
amountDonationSoFar[i], account);
accounts.put(account.getName(), account);
actions.put(action.getId(), action);
}
}

@Override
public ArrayList getShowActions() {
ArrayList showActions = new ArrayList();

Iterator it = actions.keySet().iterator();
while (it.hasNext()) {
Campaign action = actions.get(it.next());
showActions.add(action.getActions());
}
return showActions;
}

The MyActionService Interface looks like this:

@RemoteServiceRelativePath("myActionService")public interface MyActionService 
extends RemoteService {
ShowActions addAction(Campaign action);
Campaign getCampaign(String id);
ArrayList getShowActions();

Campaign updateAction(Campaign action);}



Am Sonntag, 17. Juni 2018 23:09:31 UTC+2 schrieb Jens:
>
> The errors says you have a ClassCastException in line 14 in MyAction.java. 
> So you should start looking at MyAction.
>
> -- J.
>

-- 
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: Using UIField HTML to create a dynamic table

2018-06-17 Thread Jens
The errors says you have a ClassCastException in line 14 in MyAction.java. 
So you should start looking at MyAction.

-- J.

-- 
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: I want Datetimepicker in cell table how can i do that

2017-07-24 Thread Sachin Chaudhari
Hi harsh thanks for reply but I want time too in it.

On Sunday, July 23, 2017 at 10:58:21 PM UTC+5:30, harshyadav wrote:
>
> Hi,
>
> Please take a look at the GWT Showcase for an example usage:
>
> http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellSampler
>
> --Harsh
>
> On Sunday, July 23, 2017 at 3:17:26 AM UTC-4, Sachin Chaudhari wrote:
>>
>> Date time picker is already there but how can i want DateTimePicker
>>
>

-- 
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: I want Datetimepicker in cell table how can i do that

2017-07-23 Thread harshyadav
Hi,

Please take a look at the GWT Showcase for an example usage:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellSampler

--Harsh

On Sunday, July 23, 2017 at 3:17:26 AM UTC-4, Sachin Chaudhari wrote:
>
> Date time picker is already there but how can i want DateTimePicker
>

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


I want Datetimepicker in cell table how can i do that

2017-07-23 Thread Sachin Chaudhari
Date time picker is already there but how can i want DateTimePicker

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


GWT parse xml to server and on client get data from server in table

2017-05-04 Thread LifeSecrets
GWT parse xml to server and on client get data from server in table - help 
me pls

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


GWTMaterialDesign Data Table 1.0-SNAPSHOT is available.

2016-07-20 Thread mark kevin ringor
Proud to announce that the GMD Table 
<https://github.com/GwtMaterialDesign/gwt-material-table> is now available 
for community use! It has been set up as a separate library for the time 
being (could eventually be moved into the GMD 
<https://github.com/GwtMaterialDesign/gwt-material> library when 2.0 is 
released). All of the features mentioned in my original post have been 
implemented, so check it out for yourself now!

The sample project demonstrates how to use the table showing majority of 
its features. There is also a demo you can look at sampling the 
gwt-material-table-sample 
<https://github.com/GwtMaterialDesign/gwt-material-table-sample>project. 
InfiniteTable & StandardTable

The data table is based on GWT 2.8.0-SNAPSHOT using java 8 (yay lamdas!).

*It will be great to receive feedback from the community*! Hopefully it 
will improve things for the GMD developers, giving you all a complex data 
table for modern web application development.

You can also note that we are now utilizing JSInterop, giving us direct 
access to the JQuery javascript library (see GWT Material JQuery 
<https://github.com/GwtMaterialDesign/gwt-material-jquery>). This is a step 
in the right direction for GMD as a whole and will allow us to do some 
really neat things in the very near future!

 *- Ben Dol*
 *Creator of GMD DataTable*

You can find the demo from the link below!
https://github.com/GwtMaterialDesign/gwt-material-table-sample

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


how to validate editable text in the cell table

2016-05-23 Thread abdul


I have cell table which contains the editable textinputcell, see the below 
image which is of editable textinputcell

[image: enter image description here] <http://i.stack.imgur.com/i2ZaN.png> i 
want to validate the columns if its number of colleges then user can enter 
only number(integer cell) and for name of college user can enter only 
string(text cell). Is there a way to validate before entering the text into 
inputcell?

-- 
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: Sorting cell table columns populated from gwt rpc not working

2016-05-13 Thread Olar Andrei
Hello,

Thank you. It work perfectly now.

Have a nice day,
Andrei

vineri, 13 mai 2016, 21:12:40 UTC+3, Olar Andrei a scris:
>
> Hello, I'm pretty new to GWT
>
>
> I have a problem trying to sort specific columns from a cell table, whcih 
> is populated from the DB, using RPC. Basically I'm trying to sort the 
> family name column alphabetically, and it's just not working. Table gets 
> fully populated, but sorting does not work.
>
> Any ideas why ? 
>
>
> Thanks in advance
>
>
> // Create the family name column.
> final TextColumn familyNameColumn = new 
> TextColumn() {
>
> @Override
> public String getValue(ContactInfo object) {
> return object.getFamilyName();
> }
> };
> table.setColumnWidth(familyNameColumn, 20, Unit.PCT);
>
> // Make the family name sortable
> familyNameColumn.setSortable(true);
>
> // Add the columns
> table.addColumn(familyNameColumn, UserMenuConstants.FAMILY_NAME_COLUMN);
> table.addColumn(familyAdministratorColumn, 
> UserMenuConstants.FAMILY_ADMINISTRATOR_COLUMN);
> table.addColumn(apartmentNuberColumn, 
> UserMenuConstants.FAMILY_APARTMENT_NUMBER_COLUMN);
> table.addColumn(emailColumn, UserMenuConstants.EMAIL_ADDRESS_COLUMN);
> table.addColumn(phoneNumberColumn, UserMenuConstants.PHONE_NUMBER_COLUMN);
>
> DBGetContactInfoAsync rpcService = (DBGetContactInfoAsync) 
> GWT.create(DBGetContactInfo.class);
> ServiceDefTarget target = (ServiceDefTarget) rpcService;
> String moduleRelativeURL = GWT.getModuleBaseURL() + 
> "DBGetContactInfoImpl";
> target.setServiceEntryPoint(moduleRelativeURL);
>
> rpcService.getContacts(new AsyncCallback>() {
>
> @Override
> public void onSuccess(List result) {
>
> table.setRowCount(result.size());
>
> ListDataProvider dataProvider = new 
> ListDataProvider();
> dataProvider.addDataDisplay(table);
>
> List list = dataProvider.getList();
> for (ContactInfo contactInfo : result) {
> list.add(contactInfo);
> }
>
> ListHandler listHandler = new 
> ListHandler(result);
>
> listHandler.setComparator(familyNameColumn, new 
> Comparator() {
>
> @Override
> public int compare(ContactInfo o1, ContactInfo o2) {
> return o1.getFamilyName().compareTo(o2.getFamilyName());
> }
> });
>
> table.addColumnSortHandler(listHandler);
>
> }
>
> @Override
> public void onFailure(Throwable caught) {
> ...
> }
> });
>
>
>
>

-- 
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: Sorting cell table columns populated from gwt rpc not working

2016-05-13 Thread Stefan Bylund
Try to replace this line:
ListHandler listHandler = new ListHandler(result);

with the following line:
ListHandler listHandler = new 
ListHandler(dataProvider.getList());

I would also create the ListHandler, set its comparators and adding it to 
the table outside of the async callback when creating the table. The 
ListDataProvider can also be created initially with the table. Then you 
only need to update the ListDataProvider in your async callback.

/Stefan

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


Sorting cell table columns populated from gwt rpc not working

2016-05-13 Thread Olar Andrei


Hello, I'm pretty new to GWT


I have a problem trying to sort specific columns from a cell table, whcih 
is populated from the DB, using RPC. Basically I'm trying to sort the 
family name column alphabetically, and it's just not working. Table gets 
fully populated, but sorting does not work.

Any ideas why ? 


Thanks in advance


// Create the family name column.
final TextColumn familyNameColumn = new 
TextColumn() {

@Override
public String getValue(ContactInfo object) {
return object.getFamilyName();
}
};
table.setColumnWidth(familyNameColumn, 20, Unit.PCT);

// Make the family name sortable
familyNameColumn.setSortable(true);

// Add the columns
table.addColumn(familyNameColumn, UserMenuConstants.FAMILY_NAME_COLUMN);
table.addColumn(familyAdministratorColumn, 
UserMenuConstants.FAMILY_ADMINISTRATOR_COLUMN);
table.addColumn(apartmentNuberColumn, 
UserMenuConstants.FAMILY_APARTMENT_NUMBER_COLUMN);
table.addColumn(emailColumn, UserMenuConstants.EMAIL_ADDRESS_COLUMN);
table.addColumn(phoneNumberColumn, UserMenuConstants.PHONE_NUMBER_COLUMN);

DBGetContactInfoAsync rpcService = (DBGetContactInfoAsync) 
GWT.create(DBGetContactInfo.class);
ServiceDefTarget target = (ServiceDefTarget) rpcService;
String moduleRelativeURL = GWT.getModuleBaseURL() + "DBGetContactInfoImpl";
target.setServiceEntryPoint(moduleRelativeURL);

rpcService.getContacts(new AsyncCallback>() {

@Override
public void onSuccess(List result) {

table.setRowCount(result.size());

ListDataProvider dataProvider = new 
ListDataProvider();
dataProvider.addDataDisplay(table);

List list = dataProvider.getList();
for (ContactInfo contactInfo : result) {
list.add(contactInfo);
}

ListHandler listHandler = new 
ListHandler(result);

listHandler.setComparator(familyNameColumn, new 
Comparator() {

@Override
public int compare(ContactInfo o1, ContactInfo o2) {
return o1.getFamilyName().compareTo(o2.getFamilyName());
}
});

table.addColumnSortHandler(listHandler);

}

@Override
public void onFailure(Throwable caught) {
...
}
});



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


Cell Table keyboard navigation doesn't work in Firefox

2016-01-28 Thread N Troncoso
The CellTable has a keyboard mode to allow moving around with arrow keys. 
In Chrome, when moving to an input cell, the cell content is selected 
(hightlighted), but you can still moving to other cells until you start 
typeing.

In Firefox, the cell content does not highlight. You have to press enter to 
start typing.

Is this a known issue? Does anyone know of a work around?

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


Can not filter out correct output from page 2 in table if filter result is smaller than page size.

2015-12-04 Thread Chao Wang
Hi all,

When I use a filter in CellTable, I can not get correct paging index and 
data output in table when I input desired prefix in filter textbox from 
e.g. page 2 or later if filtered data length is smaller that page size:

for example: my page size is 8

before doing any filter I have a,b,c,d,e,f,g,h 8 elements in my page 1, and 
i,j,k,l,m,n,o,p 8 elements in my page 2, if I filter b from first page, it 
works fine. But if I move to page 2 and filter b, nothing is on table, I 
have "9-9 of 1" beside my table like:

9-9 of 1








I have to click and switch back to page 1 to see the real result. Looks 
like I have the correct filtering result, but it displays from page 2 which 
is empty page in this case.

When I debug gwt 
https://github.com/gwtproject/gwt/blob/c9c32256f6ffb8ca69f50693a06b91bc25331fef/user/src/com/google/gwt/view/client/AbstractDataProvider.java#L210

  protected void updateRowData(HasData display, int start, List values
) {
int end = start + values.size();
Range range = display.getVisibleRange();
int curStart = range.getStart();
int curLength = range.getLength();
int curEnd = curStart + curLength;
if (start == curStart || (curStart < end && curEnd > start)) {
  // Fire the handler with the data that is in the range.
  // Allow an empty list that starts on the page start.
  int realStart = curStart < start ? start : curStart;
  int realEnd = curEnd > end ? end : curEnd;
  int realLength = realEnd - realStart;
  List realValues = values.subList(
  realStart - start, realStart - start + realLength);
  display.setRowData(realStart, realValues);
}
  }

end is 1
curStart is 8
curLength is 8
curEnd is 16


As curStart < end is fales, it can not update row data properly. Is this a 
bug or I missed something when range is changed?

thanks.

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-09 Thread Mohammed Sameen
I solved 
it..http://stackoverflow.com/questions/31285655/how-to-update-cell-table-footer-dynamically/31312427#31312427

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-08 Thread Mohammed Sameen
Donald,in first step celltable will be get created ,data will come in 
response(Asyn) which will take some time to load.Once i received the data 
that time the celltable is created with header and footer.then i will push 
the data to celltable which will reload and showed in table this time i 
need to update the footer section as well .How its possible?

On Wednesday, July 8, 2015
>
> Hello Mohammed,
> Do you mean this method
> com.google.gwt.user.cellview.client.AbstractCellTable.addColumn(Column ?>, Header, Header) 
> does not meet your requiirement? (i.e dynamically updating the column 
> footer)
> Or do you mean you just want a footer and not a header?
> If so, you could provide an empty header and be left with your preferred 
> footer..
>
> Regards. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-08 Thread Mohammed Sameen
Donald,in first step celltable will be get created with data,data will come 
in response(Asyn) which will take some time to load.Once i received the 
data that time the celltable is created with header and footer.then i will 
push the data to celltable which will reload and showed in table this time 
i need to update the footer section as well .How its possible?

On Wednesday, July 8, 2015
>
> Hello Mohammed,
> Do you mean this method
> com.google.gwt.user.cellview.client.AbstractCellTable.addColumn(Column ?>, Header, Header) 
> does not meet your requiirement? (i.e dynamically updating the column 
> footer)
> Or do you mean you just want a footer and not a header?
> If so, you could provide an empty header and be left with your preferred 
> footer..
>
> Regards. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-08 Thread Donald Mteka
Hello Mohammed,
Do you mean this method
com.google.gwt.user.cellview.client.AbstractCellTable.addColumn(Column, Header, Header)
does not meet your requiirement? (i.e dynamically updating the column
footer)
Or do you mean you just want a footer and not a header?
If so, you could provide an empty header and be left with your preferred
footer..
Regards.

On Wed, Jul 8, 2015 at 11:48 AM, Mohammed Sameen 
wrote:

> Thanks Donald for your reply,As i already mention While creating column
> field i can use this addColumn but data is loading after this celltable
> creation,in that case i can't use addColumn.I just want to update the
> column footer.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Donald Mteka
+255653105004

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-08 Thread Mohammed Sameen
Thanks Donald for your reply,As i already mention While creating column 
field i can use this addColumn but data is loading after this celltable 
creation,in that case i can't use addColumn.I just want to update the 
column footer.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Update Cell Table Footer Dynamically

2015-07-08 Thread Donald Mteka
You should use the addColumn method which takes a Header object as a footer.
That way you have complete control at when to and what to show for the
footer text.
Just make sure you call cellTable.redrawFooters() each time you change the
footer text.
Regards

On Wed, Jul 8, 2015 at 10:06 AM, Mohammed Sameen 
wrote:

> I am trying to add footer to the celltable and finding hard time to change
> the celltable footer dynamically but i am able to add while creating
> columns like below
>
> cellTable.addColumn(qty, "Qty",Integer.toString(totalQty));
>
> This is not i am looking for,Is there any way to set footer to cell table
> dynamically.Any help?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Donald Mteka
+255653105004

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to Update Cell Table Footer Dynamically

2015-07-08 Thread Mohammed Sameen


I am trying to add footer to the celltable and finding hard time to change 
the celltable footer dynamically but i am able to add while creating 
columns like below

cellTable.addColumn(qty, "Qty",Integer.toString(totalQty)); 

This is not i am looking for,Is there any way to set footer to cell table 
dynamically.Any help?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Custom coloring of countries in Google Maps using Fusion Table

2015-04-11 Thread mohit

http://stackoverflow.com/questions/29577659/custom-coloring-of-countries-in-google-maps-gwt

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Apply Styling to particular Cell table Row ?

2015-04-07 Thread Juan Pablo Gardella
See
http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/cellview/client/AbstractCellTable.html#setRowStyles(com.google.gwt.user.cellview.client.RowStyles)

On 7 April 2015 at 13:30, Abdul  wrote:

> Any Suggestion on this?
>
>
> On Monday, April 6, 2015 at 3:50:37 PM UTC+5:30, Abdul wrote:
>>
>> I Would like to apply background color to particular cell table row
>> element based on some condition, I found one API method
>>  *getRowElement(rowNo).getStyle().setBackgroundColor*
>>
>>* public void setRowStyleCell(final int rowNo){*
>> *getRowElement(rowNo).getStyle().setBackgroundColor(style);*
>> *}*
>>
>> but its not taking this styling because of some other styling(Pseudocode
>> Styling) which is already applied to this cell table(got high priority).
>>
>>   *  tr:nth-child(odd){background:none !important;}*
>>
>> *tr:nth-child(even) {background:none !important;}*
>>
>> Is there any way to override this styling in gwt?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to Apply Styling to particular Cell table Row ?

2015-04-07 Thread Abdul
Any Suggestion on this?

On Monday, April 6, 2015 at 3:50:37 PM UTC+5:30, Abdul wrote:
>
> I Would like to apply background color to particular cell table row 
> element based on some condition, I found one API method 
>  *getRowElement(rowNo).getStyle().setBackgroundColor*
>
>* public void setRowStyleCell(final int rowNo){*
> *getRowElement(rowNo).getStyle().setBackgroundColor(style);*
> *}*
>
> but its not taking this styling because of some other styling(Pseudocode 
> Styling) which is already applied to this cell table(got high priority).
>
>   *  tr:nth-child(odd){background:none !important;}*
> 
> *tr:nth-child(even) {background:none !important;}*
>
> Is there any way to override this styling in gwt?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to Apply Styling to particular Cell table Row ?

2015-04-06 Thread Abdullah
I Would like to apply background color to particular cell table row element 
based on some condition, I found one API method 
 *getRowElement(rowNo).getStyle().setBackgroundColor*

   * public void setRowStyleCell(final int rowNo){*
*getRowElement(rowNo).getStyle().setBackgroundColor(style);*
*}*

but its not taking this styling because of some other styling(Pseudocode 
Styling) which is already applied to this cell table(got high priority).

  *  tr:nth-child(odd){background:none !important;}*

*tr:nth-child(even) {background:none !important;}*

Is there any way to override this styling in gwt?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-03 Thread Abdullah

Hi Frank,
Thanks for your suggestion..

I added this in Scheduler

Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
initTooltip();
}
});
This Works for me..

> can you try:
> $wnd.$($doc).ready(
>
> function(){
> $wnd.jQuery("[rel=tooltipTop]").tooltip({ placement: 'top'});
> });
>
>
> or skip the ready block your dom is already there...
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-02 Thread Frank Taffelt
can you try:
$wnd.$($doc).ready(
function(){
$wnd.jQuery("[rel=tooltipTop]").tooltip({ placement: 'top'});
});


or skip the ready block your dom is already there...


On Wednesday, April 1, 2015 at 6:22:36 PM UTC+2, Abdullah wrote:
>
> Hi,
> In my application i am using GWT Cell Table, for some of the Column Header 
> i want to add tooltip.Column Header is created by using SafeHtml and 
> Injecting JS to cell table header using JSNI. But that time the DOM is not 
> creating and JavaScript is not attaching to the column Header for 
> tooltip.If i use Timer then the Problem is goes off,I don't want to use 
> Timer.Is there any Way to inject JS?Any Clue?See below code,
>
> *Column Header SafeHtml:*
> SafeHtml="Total class='reqFull' data-original-title='{0}'> ";
>
> *JSNI:*
>  private static native void initTooltip() /*-{
> $wnd.$(document).ready(function(){
>  $wnd.jQuery("[rel=tooltipTop]").tooltip({ placement: 'top'});
> });
> 
> }-*/;
>
> I am Calling this JSNI after the table creation but still DOM is not ready.
> Even i tried calling this JSNI Script in onAttach() Method,
>
> @Override
> protected void onAttach() {
> super.onAttach();
> initTooltip();
>  }
>
> Any Suggestion?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Injecting JavaScript(JSNI) to Cell Table DOM

2015-04-01 Thread Abdullah
Hi,
In my application i am using GWT Cell Table, for some of the Column Header 
i want to add tooltip.Column Header is created by using SafeHtml and 
Injecting JS to cell table header using JSNI. But that time the DOM is not 
creating and JavaScript is not attaching to the column Header for 
tooltip.If i use Timer then the Problem is goes off,I don't want to use 
Timer.Is there any Way to inject JS?Any Clue?See below code,

*Column Header SafeHtml:*
SafeHtml="Total ";

*JSNI:*
 private static native void initTooltip() /*-{
$wnd.$(document).ready(function(){
 $wnd.jQuery("[rel=tooltipTop]").tooltip({ placement: 'top'});
});

}-*/;

I am Calling this JSNI after the table creation but still DOM is not ready.
Even i tried calling this JSNI Script in onAttach() Method,

@Override
protected void onAttach() {
super.onAttach();
initTooltip();
 }

Any Suggestion?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: FLEX TABLE

2015-03-25 Thread Anu Varghese
DEar Pooja,

Please refer table.getRowFormatter().setVisible(rowNum, false);

On Wed, Mar 25, 2015 at 4:11 PM, Pooja Revankar 
wrote:

> hi,
>
> I wana know how to remove or hide disabled options from flex table.
>
> i m just newbie in GWT feild.. plz help..
>
> regards,
> pooja
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


FLEX TABLE

2015-03-25 Thread Pooja Revankar
hi,
 
I wana know how to remove or hide disabled options from flex table.
 
i m just newbie in GWT feild.. plz help..
 
regards,
pooja

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to implement select all checkbox header for cell table

2015-02-05 Thread Jonathan Franchesco Torres Baca
Cell()) {

@Override
public String getValue(PrecioItemProxy object) {
return object.getDescripcion();
}

};

private void initStyle() {
MyResource.INSTANCE.getStlGridData().ensureInjected();

this.addStyleName(MyResource.INSTANCE.getStlGridData().stlGridData());
}

public void setData(List data) {
this.data = data;
this.setRowCount(data.size(), true);
this.setRowData(0, data);
this.setPageSize(data.size());
dataProvider.setList(data);
dataProvider.refresh();
//redraw();
}

public List getData() {
return data;
}

public SimplePager getPager() {
return pager;
}

@Override
public MultiSelectionModel getSelectionModel() {
return selectionModel;
}

public FilteredListDataProvider getDataProvider() {
return dataProvider;
}

public void setModo(String modo) {
this.modo = modo;
}

public HashSet getIndexUpdates() {
return indexUpdates;
}

}


Clase para la seleccion multifila:

/*
 * To change this license header, choose License Headers in Project
Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.webgocommerce.client.uiutil;

import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;

/**
 *
 * @author SISTEMAS
 */
public class CheckCellHead extends AbstractCell {

private Boolean isSelected = false;
private static final SafeHtml INPUT_CHECKED =
SafeHtmlUtils.fromSafeConstant("");
private static final SafeHtml INPUT_UNCHECKED =
SafeHtmlUtils.fromSafeConstant("");

public CheckCellHead() {
super("click");
}

@Override
public void render(Context context, Boolean value, SafeHtmlBuilder sb) {
if (isSelected) {
sb.append(INPUT_CHECKED);
} else {
sb.append(INPUT_UNCHECKED);
}
}

public Boolean isIsSelected() {
return isSelected;
}

public void setIsSelected(Boolean isSelected) {
this.isSelected = isSelected;
}



}




*Web: Http://company.kiongo.com 
<https://www.facebook.com/KiongoCompany>
<https://plus.google.com/u/0/102716337197852293734/about>
<https://www.linkedin.com/company/kiongo-inc>
<https://twitter.com/kiongoinc>
<https://www.youtube.com/channel/UC1HKa8IPofVRmeAFZ22m3HQ> *

La información contenida en este e-mail es confidencial, privilegiada y
está dirigida exclusivamente a su destinatario. Su revisión, difusión,
distribución o copiado está prohibido. Si ha recibido este e-mail por error
por favor bórrelo y envíe un mensaje al remitente.

The information contained in this e-mail is privileged and confidential and
is intended only for its addressee. Any review, dissemination, distribution
or copying of this is prohibited. If you have received this mail in error
please delete the original message and e-mail us.


2015-02-04 15:36 GMT-05:00 BM :

> So I followed the code given in these threads :
>
> https://groups.google.com/forum/#!searchin/google-web-toolkit/select$20all$20in$20celltable$20header/google-web-toolkit/IY8rfYOzRl0/guGZBgcZ9Z8J
> http://pgt.de/2012/05/09/checkbox-in-cell-table-data-grid-header/
>
> Apparently when I implemented this, it selects the header checkbox and
> thereby selects all records for every page.
>
> Here is my requirement :
>
> I have two column cell table.
>
> First Column : Checkbox for row selection
> Second Column : Employee Name
>
> The idea here is for each classroom, the user can go and select certain
> employees from list of all employees in cell table and save to DB. If the
> user comes back to the same classroom, the cell table should show all total
> employee records with the previously selected employees should have their
> corresponding row checkbox checked. The user can thereby update the
> selection by checking and unchecking employees and save again.
>
> This works fine but since we have paging mechanism in cell table I want to
> implement "Select All" checkbox on header above the First Column and when
> that is checked, the corresponding row for that page should all be
> selected. Then if the user paginates to next page, the "Select All"
> checkbox on header above the First Column for next page should be uncheck
> now and that next page should show list of employees with corresponding row
> checkbox checked (previously checked from DB) if any. The user can check
> that "Select All" checkbox on header to select all the corresponding row
> for that page and so on.
>
> The few important things here is,
> 1

How to implement select all checkbox header for cell table

2015-02-04 Thread BM
So I followed the code given in these threads : 
https://groups.google.com/forum/#!searchin/google-web-toolkit/select$20all$20in$20celltable$20header/google-web-toolkit/IY8rfYOzRl0/guGZBgcZ9Z8J
http://pgt.de/2012/05/09/checkbox-in-cell-table-data-grid-header/

Apparently when I implemented this, it selects the header checkbox and 
thereby selects all records for every page. 

Here is my requirement :

I have two column cell table. 

First Column : Checkbox for row selection
Second Column : Employee Name

The idea here is for each classroom, the user can go and select certain 
employees from list of all employees in cell table and save to DB. If the 
user comes back to the same classroom, the cell table should show all total 
employee records with the previously selected employees should have their 
corresponding row checkbox checked. The user can thereby update the 
selection by checking and unchecking employees and save again. 

This works fine but since we have paging mechanism in cell table I want to 
implement "Select All" checkbox on header above the First Column and when 
that is checked, the corresponding row for that page should all be 
selected. Then if the user paginates to next page, the "Select All" 
checkbox on header above the First Column for next page should be uncheck 
now and that next page should show list of employees with corresponding row 
checkbox checked (previously checked from DB) if any. The user can check 
that "Select All" checkbox on header to select all the corresponding row 
for that page and so on. 

The few important things here is, 
1) I do want to show previously checked employees from the DB in the list 
of total all employees.
2)  "Select All" checkbox on header should be uncheck every time user comes 
to this screen. 
3) When the user clicks  "Select All" checkbox on header, then only it 
should select all the rows "for that page only" and not all the records 
across all the pages. 
3) Clicking next page should show what I described in point 1 and 2 above. 

Any help would be appreciated. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: DataGrid inside InfoWindow doesn't show table data

2015-01-15 Thread Kevin Workman
Thanks for the reply. I ended up just using a CellTable:

package com.test.client;


import java.util.Arrays;


import com.google.gwt.ajaxloader.client.AjaxLoader;
import com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;
import com.google.gwt.cell.client.TextCell;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.dom.client.Document;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.maps.gwt.client.GoogleMap;
import com.google.maps.gwt.client.InfoWindow;
import com.google.maps.gwt.client.InfoWindowOptions;
import com.google.maps.gwt.client.LatLng;
import com.google.maps.gwt.client.MapOptions;
import com.google.maps.gwt.client.MapTypeId;


public class GwtTest implements EntryPoint {


 @Override
 public void onModuleLoad() {
 AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
 options.setOtherParms("sensor=false");
 Runnable callback = new Runnable() {
 public void run() {
 createMap();
 }
 };
 AjaxLoader.loadApi("maps", "3", callback, options);
 
 //this works
 CellTable dg = createTable();
 RootPanel.get("tableDiv").add(new ScrollPanel(dg));
 }


 public void createMap() {
 
 MapOptions mapOpts = MapOptions.create();
 mapOpts.setZoom(4);
 mapOpts.setCenter(LatLng.create(37.09024, -95.712891));
 mapOpts.setMapTypeId(MapTypeId.TERRAIN);
 mapOpts.setStreetViewControl(false);
 
 GoogleMap map = GoogleMap.create(Document.get().getElementById("map_canvas"
), mapOpts);
 
 CellTable dg = createTable();
 


 InfoWindowOptions iwo = InfoWindowOptions.create();
 iwo.setPosition(LatLng.create(37.09024, -95.712891));
 iwo.setContent(dg.getElement());
 
 InfoWindow infoWindow = InfoWindow.create(iwo);
 infoWindow.open(map);
 
 }
 
 public CellTable createTable(){
 Column columnA = new Column(new TextCell()){


 @Override
 public Object getValue(Object object) {
 return "one";
 }
 
 };
 
 Column columnB = new Column(new TextCell()){


 @Override
 public Object getValue(Object object) {
 return "two";
 }
 
 };
 
 Column columnC = new Column(new TextCell()){


 @Override
 public Object getValue(Object object) {
 return "three";
 }
 
 };
 
 CellTable dataGrid = new CellTable();
 dataGrid.addColumn(columnA, "A");
 dataGrid.addColumn(columnB, "B");
 dataGrid.addColumn(columnC, "C");
 
 dataGrid.setRowCount(1);
 dataGrid.setRowData(Arrays.asList("one", "two", "three"));
 
 dataGrid.setWidth("200px");
 dataGrid.setHeight("100px");


 return dataGrid;
 }
}


On Tuesday, January 13, 2015 at 3:42:45 AM UTC-5, Martijn Wijns wrote:
>
> (Also answered this on StackOverflow here 
> <http://stackoverflow.com/a/27916092/3660671>)
>
> You need to use RootLayoutPanel in onModuleLoad instead of RootPanel. 
> There need to be layout panels all the way from the root to the DataGrid. 
> InfoWindow doesn't seem to be a layout panel, so you might need to hook up 
> the resizing yourself, see:
>
> http://www.gwtproject.org/doc/latest/DevGuideUiPanels.html#Resize
>
> Furthermore, you put the DataGrid inside a scrollpanel. You can do that 
> but then you have to give it an explicit size. DataGrid has its own 
> scrollpanel so you can probably also get rid of the explicitly created one.
>
>
> Op maandag 12 januari 2015 16:49:54 UTC+1 schreef Kevin Workman:
>>
>> I posted this on StackOverflow here 
>> <http://stackoverflow.com/questions/27847411/datagrid-inside-infowindow-doesnt-show-table-data>,
>>  
>> but nobody is biting, so I'm cross-posting here.
>>
>> I'm using GWT along with the GoogleMaps GWT API (v3.8 
>> <https://code.google.com/p/gwt-google-apis/downloads/list>, and no, I 
>> can't use the branflakes GoogleMaps API).
>>
>> I'm trying to put a DataGrid table inside an InfoWindow on the map. I 
>> have the DataGrid working fine as long as I display it outside the map, but 
>> whenever I add a DataGrid inside an InfoWindow, none of the table rows show 
>> up:
>>
>> <http://i.stack.imgur.com/JmU9z.png>
>>
>> If I right-click the InfoWindow, go to "inspect element", then trudge 
>> through the million divs that GWT creates, I can see that the data is 
>> there- it's just not visible for some reason.
>>
>> I've done quite a bit of googling, but all I've seen is that a DataGrid 
>> has to be a child of a LayoutPanel or ScrollPanel. But that's exactly what 
>> I'm doing:
>>
>> package com.test.client;
>> import java.util.Arrays;
>> import com.google.gwt.a

Re: DataGrid inside InfoWindow doesn't show table data

2015-01-13 Thread Martijn Wijns
(Also answered this on StackOverflow here 
<http://stackoverflow.com/a/27916092/3660671>)

You need to use RootLayoutPanel in onModuleLoad instead of RootPanel. There 
need to be layout panels all the way from the root to the DataGrid. 
InfoWindow doesn't seem to be a layout panel, so you might need to hook up 
the resizing yourself, see:

http://www.gwtproject.org/doc/latest/DevGuideUiPanels.html#Resize

Furthermore, you put the DataGrid inside a scrollpanel. You can do that but 
then you have to give it an explicit size. DataGrid has its own scrollpanel 
so you can probably also get rid of the explicitly created one.


Op maandag 12 januari 2015 16:49:54 UTC+1 schreef Kevin Workman:
>
> I posted this on StackOverflow here 
> <http://stackoverflow.com/questions/27847411/datagrid-inside-infowindow-doesnt-show-table-data>,
>  
> but nobody is biting, so I'm cross-posting here.
>
> I'm using GWT along with the GoogleMaps GWT API (v3.8 
> <https://code.google.com/p/gwt-google-apis/downloads/list>, and no, I 
> can't use the branflakes GoogleMaps API).
>
> I'm trying to put a DataGrid table inside an InfoWindow on the map. I have 
> the DataGrid working fine as long as I display it outside the map, but 
> whenever I add a DataGrid inside an InfoWindow, none of the table rows show 
> up:
>
> <http://i.stack.imgur.com/JmU9z.png>
>
> If I right-click the InfoWindow, go to "inspect element", then trudge 
> through the million divs that GWT creates, I can see that the data is 
> there- it's just not visible for some reason.
>
> I've done quite a bit of googling, but all I've seen is that a DataGrid 
> has to be a child of a LayoutPanel or ScrollPanel. But that's exactly what 
> I'm doing:
>
> package com.test.client;
> import java.util.Arrays;
> import com.google.gwt.ajaxloader.client.AjaxLoader;import 
> com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;import 
> com.google.gwt.cell.client.TextCell;import 
> com.google.gwt.core.client.EntryPoint;import 
> com.google.gwt.dom.client.Document;import 
> com.google.gwt.user.cellview.client.Column;import 
> com.google.gwt.user.cellview.client.DataGrid;import 
> com.google.gwt.user.client.ui.RootPanel;import 
> com.google.gwt.user.client.ui.ScrollPanel;import 
> com.google.maps.gwt.client.GoogleMap;import 
> com.google.maps.gwt.client.InfoWindow;import 
> com.google.maps.gwt.client.InfoWindowOptions;import 
> com.google.maps.gwt.client.LatLng;import 
> com.google.maps.gwt.client.MapOptions;import 
> com.google.maps.gwt.client.MapTypeId;
> public class GwtTest implements EntryPoint {
>
> @Override
> public void onModuleLoad() {
> AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
> options.setOtherParms("sensor=false");
> Runnable callback = new Runnable() {
> public void run() {
> createMap();
> }
> };
> AjaxLoader.loadApi("maps", "3", callback, options);
>
> //this works
> DataGrid dg = createTable();
> RootPanel.get("tableDiv").add(new ScrollPanel(dg));
> }
>
> public void createMap() {
>
> MapOptions mapOpts = MapOptions.create();
> mapOpts.setZoom(4);
> mapOpts.setCenter(LatLng.create(37.09024, -95.712891));
> mapOpts.setMapTypeId(MapTypeId.TERRAIN);
> mapOpts.setStreetViewControl(false);
>
> GoogleMap map = 
> GoogleMap.create(Document.get().getElementById("map_canvas"), mapOpts);
>
> DataGrid dg = createTable();
>
> InfoWindowOptions iwo = InfoWindowOptions.create();
> iwo.setPosition(LatLng.create(37.09024, -95.712891));
> iwo.setContent(new ScrollPanel(dg).getElement());
>
> InfoWindow infoWindow = InfoWindow.create(iwo);
> infoWindow.open(map);
> }
>
> public DataGrid createTable(){
> Column columnA = new Column(new TextCell()){
> public Object getValue(Object object) {
> return "one";
> }
> };
>
> Column columnB = new Column(new TextCell()){
> public Object getValue(Object object) {
> return "two";
> }
> };
>
> Column columnC 
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


DataGrid inside InfoWindow doesn't show table data

2015-01-12 Thread Kevin Workman
I posted this on StackOverflow here 
<http://stackoverflow.com/questions/27847411/datagrid-inside-infowindow-doesnt-show-table-data>,
 
but nobody is biting, so I'm cross-posting here.

I'm using GWT along with the GoogleMaps GWT API (v3.8 
<https://code.google.com/p/gwt-google-apis/downloads/list>, and no, I can't 
use the branflakes GoogleMaps API).

I'm trying to put a DataGrid table inside an InfoWindow on the map. I have 
the DataGrid working fine as long as I display it outside the map, but 
whenever I add a DataGrid inside an InfoWindow, none of the table rows show 
up:

<http://i.stack.imgur.com/JmU9z.png>

If I right-click the InfoWindow, go to "inspect element", then trudge 
through the million divs that GWT creates, I can see that the data is 
there- it's just not visible for some reason.

I've done quite a bit of googling, but all I've seen is that a DataGrid has 
to be a child of a LayoutPanel or ScrollPanel. But that's exactly what I'm 
doing:

package com.test.client;
import java.util.Arrays;
import com.google.gwt.ajaxloader.client.AjaxLoader;import 
com.google.gwt.ajaxloader.client.AjaxLoader.AjaxLoaderOptions;import 
com.google.gwt.cell.client.TextCell;import 
com.google.gwt.core.client.EntryPoint;import 
com.google.gwt.dom.client.Document;import 
com.google.gwt.user.cellview.client.Column;import 
com.google.gwt.user.cellview.client.DataGrid;import 
com.google.gwt.user.client.ui.RootPanel;import 
com.google.gwt.user.client.ui.ScrollPanel;import 
com.google.maps.gwt.client.GoogleMap;import 
com.google.maps.gwt.client.InfoWindow;import 
com.google.maps.gwt.client.InfoWindowOptions;import 
com.google.maps.gwt.client.LatLng;import 
com.google.maps.gwt.client.MapOptions;import 
com.google.maps.gwt.client.MapTypeId;
public class GwtTest implements EntryPoint {

@Override
public void onModuleLoad() {
AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();
options.setOtherParms("sensor=false");
Runnable callback = new Runnable() {
public void run() {
createMap();
}
};
AjaxLoader.loadApi("maps", "3", callback, options);

//this works
DataGrid dg = createTable();
RootPanel.get("tableDiv").add(new ScrollPanel(dg));
}

public void createMap() {

MapOptions mapOpts = MapOptions.create();
mapOpts.setZoom(4);
mapOpts.setCenter(LatLng.create(37.09024, -95.712891));
mapOpts.setMapTypeId(MapTypeId.TERRAIN);
mapOpts.setStreetViewControl(false);

GoogleMap map = 
GoogleMap.create(Document.get().getElementById("map_canvas"), mapOpts);

DataGrid dg = createTable();

InfoWindowOptions iwo = InfoWindowOptions.create();
iwo.setPosition(LatLng.create(37.09024, -95.712891));
iwo.setContent(new ScrollPanel(dg).getElement());

InfoWindow infoWindow = InfoWindow.create(iwo);
infoWindow.open(map);
}

public DataGrid createTable(){
Column columnA = new Column(new TextCell()){
public Object getValue(Object object) {
return "one";
}
};

Column columnB = new Column(new TextCell()){
public Object getValue(Object object) {
return "two";
}
};

Column columnC = new Column(new TextCell()){
public Object getValue(Object object) {
return "three";
}
};

DataGrid dataGrid = new DataGrid();
dataGrid.addColumn(columnA, "A");
dataGrid.addColumn(columnB, "B");
dataGrid.addColumn(columnC, "C");

dataGrid.setRowCount(1);
dataGrid.setRowData(Arrays.asList("one", "two", "three"));

dataGrid.setWidth("200px");
dataGrid.setHeight("100px");

return dataGrid;
}}


Is there some step I'm missing? How can I get a DataGrid to properly display 
inside an InfoWindow using the GoogleMaps API?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-12 Thread Gilberto
Ok, I won't start another "table vs. tableless layout" war. There are a lot 
of resources about it on the web.

My point here is simple: if the developer wants to use table layout, for 
whatever reason, at least the table should behave as expected according to 
the W3C recomendations, which states:

If a table is to be used for layout it must be marked with the attribute 
> role="presentation" for a user agent to properly represent the table to an 
> assistive technology and to properly convey the intent of the author to 
> tools that wish to extract tabular data from the document.


Source: http://www.w3.org/TR/html5/tabular-data.html#the-table-element

In other words, tables for layout should be marked as such. Table layout 
widgets should consider this.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-12 Thread Joel Handwell
Is deprecation considered to be scheduled on those table layout widgets?

On Tuesday, December 9, 2014 4:35:59 AM UTC-5, Thomas Broyer wrote:
>
>
>
> On Tuesday, December 9, 2014 8:20:41 AM UTC+1, Mohammed Sameen wrote:
>>
>> Hi,
>>  Why *table *layout is used in GWT?Why not *div *layout?
>>
>
> Only old widgets use "table layout", and they do so because at the time 
> they were written (years ago) it was the only reliable way of laying out 
> things cross-browser.
> Newer widgets don't use "table layout".
> I'd go as far as saying that if you use a widget that relies on "table 
> layout" today, You're Doing It Wrong™. Modern GWT apps should rely mostly 
> on FlowPanel and HTMLPanel (and the various "layout panels" for complex 
> layouts), you shouldn't need HorizontalPanel, VerticalPanel and the like.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-09 Thread Ltearno
Sometimes table layout is just the only option...

If you are really annoyed seeing  elements, you can use a div with a 
display attribute to table for example... (  )



Le mardi 9 décembre 2014 10:35:59 UTC+1, Thomas Broyer a écrit :
>
>
>
> On Tuesday, December 9, 2014 8:20:41 AM UTC+1, Mohammed Sameen wrote:
>>
>> Hi,
>>  Why *table *layout is used in GWT?Why not *div *layout?
>>
>
> Only old widgets use "table layout", and they do so because at the time 
> they were written (years ago) it was the only reliable way of laying out 
> things cross-browser.
> Newer widgets don't use "table layout".
> I'd go as far as saying that if you use a widget that relies on "table 
> layout" today, You're Doing It Wrong™. Modern GWT apps should rely mostly 
> on FlowPanel and HTMLPanel (and the various "layout panels" for complex 
> layouts), you shouldn't need HorizontalPanel, VerticalPanel and the like.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-09 Thread Thomas Broyer


On Tuesday, December 9, 2014 8:20:41 AM UTC+1, Mohammed Sameen wrote:
>
> Hi,
>  Why *table *layout is used in GWT?Why not *div *layout?
>

Only old widgets use "table layout", and they do so because at the time 
they were written (years ago) it was the only reliable way of laying out 
things cross-browser.
Newer widgets don't use "table layout".
I'd go as far as saying that if you use a widget that relies on "table 
layout" today, You're Doing It Wrong™. Modern GWT apps should rely mostly 
on FlowPanel and HTMLPanel (and the various "layout panels" for complex 
layouts), you shouldn't need HorizontalPanel, VerticalPanel and the like.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Why Table Layout in GWT?

2014-12-08 Thread Mohammed Sameen
Hi,
 Why *table *layout is used in GWT?Why not *div *layout?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Problem with dynamic table

2014-12-02 Thread Carsten Spieker
Hello,

we have a big problem using GWT tables in combination with Internet 
Explorer 11. 

Our software is a form management system with which a user can create forms 
with a WYSIWYG editor. The systems uses GWT to render these forms within 
the browser. In some - more or less strange - circumstances, the Internet 
Explorer 11
causes problems with input fields in the table. Focussed input fields do 
not show the cursor and editing the content has no effect, sometimes the 
edited text is even written somewhere into the DOM. 
With GWT 2.5.1 the problem was much more present than with GWT 2.7. This 
leads to the assumption that something within GWT was changed (or even 
fixed) from 2.5.1 to 2.7 according to this problem. We are very perplexed 
by now and do not 
know how to tackle the problem furthermore.

These are URLs to one form (with two different GWT versions) containing the 
problem as well in GWT 2.5.1 as in GWT 2.7.0.

http://webtest.d-velop.de:8081/forms/anonymous/index.jsp?formId=7mcn1rajo6jhgib518oekmh79m&formVersion=1&docId=&logLevel=INFO
 
(GWT 2.5.1 -> Problem)

http://webtest.d-velop.de:8081/forms21gwt270/anonymous/index.jsp?formId=7mcn1rajo6jhgib518oekmh79m&formVersion=1&docId=&logLevel=INFO
 
(GWT 2.7.0 -> STILL Problem)

These are URLs to one form (with two different GWT versions), in which the 
problem was solved from GWT 2.5.1 to GWT 2.7.0.

http://webtest.d-velop.de:8081/forms/anonymous/index.jsp?formId=62uc4i4g2b3h2kj5r1qiea1art&formVersion=2
 
(GWT 2.5.1 -> Problem)

http://webtest.d-velop.de:8081/forms21gwt270/anonymous/index.jsp?formId=62uc4i4g2b3h2kj5r1qiea1art&formVersion=2
 
(GWT 2.7.0 -> fixxed)

Does anybody know this problem or even have an idea how to solve it? It is 
very difficult to reduce the example since the problem seems to depend on 
special (unknown) circumstances. We hope that the GWT tean did some 
explicit fixes for IE11 
support which solved the problem, though not completely. 

We would appreciate any helpful idea or advice.

Thanks in advance!

Greetz
Carsten 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to listen a content changed event on a div/table using GWT?

2014-06-25 Thread Paladin Wonder
I write a gwt client to append one row data on a specific table, 
but if the page display is part-updated with AJAX, the row I added 
disappears, how can I add a listener to catch the event of div updated?

public void onModuleLoad() {
TableElement info_table =
TableElement.as(Document.get().getElementById("key_Table"));
String owner = "lora";

if (info_table != null) {
  TableRowElement newR = info_table.insertRow(-1);
  newR.insertCell(0).setInnerHTML("Owner");
  newR.insertCell(1).setInnerHTML(
  "" + owner + "");
}
  }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


empty table widget size and reuse

2014-05-14 Thread Steve C
I'd like to have an empty table widget in a DataGrid, which would cover the 
entire width and height of the table area. Basically, I'd like to just have 
a vertically and horizontally centered label.

Right now I can only get one that occupies the minimum area it needs based 
on it's content size, or I could fix a size in px.  But, trying to set the 
size to 100% for width and/or height has no effect, because it gets put 
inside a table that I believe I have no code access to.  And that table has 
no sizing specified. Is there a way to do this?

Question 2: I'd also like to have just one of these, to use across multiple 
grids.  But, assigning the same widget instance to all my grids doesn't 
work - I don't see it.   I suspect that it would show up for the last grid 
I added it to, if I can figure out which one that is.  It seems that the 
grid widget could store the reference and reattach it each time it's 
needed, allowing one single instance to be reused.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cell Table Styling

2014-04-01 Thread Alberto Mancini
Hi,
try to place the css file in the same package where  TableResources is;
com.rpc.client if i understand well.

Hope it helps.
   Alberto


On Tue, Apr 1, 2014 at 11:50 AM, Zbyněk Kočí  wrote:

> Im using NetBeans
> 00:43:37,382 [DEBUG] Rebinding
> com.rpc.client.mainEntryPoint.TableResources
>  00:43:37,393 [DEBUG] Invoking generator
> com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
>  00:43:37,394 [DEBUG] Preparing method cellTableStyle
>  00:43:37,396 [DEBUG] Finding resources
>  00:43:37,396 [ERROR] Resource CellTable.css not found. Is
> the name specified as ClassLoader.getResource() would expect?
>
> I understand this so I need to know where should I save my own
> CellTable.css which is actually in root of webpages.
>
> 00:43:37,400 [ERROR] Deferred binding failed for
> 'com.rpc.client.mainEntryPoint.TableResources'; expect subsequent failures
> 00:43:37,425 [ERROR] Unable to load module entry point class
> com.rpc.client.mainEntryPoint (see associated exception for details)
>
> java.lang.RuntimeException: Deferred binding failed for 
> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
> required module?)
>   at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
>   at com.google.gwt.core.shared.GWT.create(GWT.java:72)
>   at com.google.gwt.core.client.GWT.create(GWT.java:86)
>   at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
>   at 
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>   at 
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
>   at 
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
>   at java.lang.Thread.run(Thread.java:724)
> Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous 
> log entries)
>   at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610)
>   at 
> com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470)
>   at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
>   at com.google.gwt.core.shared.GWT.create(GWT.java:72)
>   at com.google.gwt.core.client.GWT.create(GWT.java:86)
>   at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
>   at 
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>   at 
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
>   at 
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
>
>  at java.lang.Thread.run(Thread.java:724)
> 00:43:37,426 [ERROR] Failed to load module 'com.rpc.main' from user agent
> 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/33.0.1750.117 Safari/537.36' at localhost:51831
>
> Hope this helps you
>
>
> Dne úterý, 1. dubna 2014 11:30:18 UTC+2 Thomas Broyer napsal(a):
>
>> Look at the Development Mode window (or the equivalent view in Eclipse if
>> that's what you're using), the answer must be there.
>> (feel free to copy/paste the whole log if you need help understanding it)
>>
>> On Tuesday, April 1, 2014 11:16:09 AM UTC+2, Zbyněk Kočí wrote:
>>>
>>> Log:
>>> onModuleLoad() threw an exception
>>>
>>> Exception while loading module *com.rpc.client.mainEntryPoint*. See
>>> Development Mode for details.
>>> java.lang.reflect.InvocationTargetException at sun.reflect.
>>> NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.
>>> NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> DelegatingMethodAccessorImpl.java:43) at 
>>> java.lang.reflect.Method.invoke(Method.java:606)
>>> at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at
>>> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>>> at 
>>> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
>>> at 
>>> com.google.gwt.dev.shell.BrowserChannelServer.run(Browser

Re: Cell Table Styling

2014-04-01 Thread Zbyněk Kočí
Im using NetBeans
00:43:37,382 [DEBUG] Rebinding com.rpc.client.mainEntryPoint.TableResources 

 00:43:37,393 [DEBUG] Invoking generator 
com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
 00:43:37,394 [DEBUG] Preparing method cellTableStyle 
 00:43:37,396 [DEBUG] Finding resources 
 00:43:37,396 [ERROR] Resource CellTable.css not found. Is 
the name specified as ClassLoader.getResource() would expect? 

I understand this so I need to know where should I save my own 
CellTable.css which is actually in root of webpages.

00:43:37,400 [ERROR] Deferred binding failed for 
'com.rpc.client.mainEntryPoint.TableResources'; expect subsequent failures  
00:43:37,425 [ERROR] Unable to load module entry point class 
com.rpc.client.mainEntryPoint (see associated exception for details) 

java.lang.RuntimeException: Deferred binding failed for 
'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53)
at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log 
entries)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610)
at 
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
at com.google.gwt.core.shared.GWT.create(GWT.java:72)
at com.google.gwt.core.client.GWT.create(GWT.java:86)
at com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411)
at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)

 at java.lang.Thread.run(Thread.java:724)
00:43:37,426 [ERROR] Failed to load module 'com.rpc.main' from user agent 
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/33.0.1750.117 Safari/537.36' at localhost:51831 

Hope this helps you 
 

Dne úterý, 1. dubna 2014 11:30:18 UTC+2 Thomas Broyer napsal(a):
>
> Look at the Development Mode window (or the equivalent view in Eclipse if 
> that's what you're using), the answer must be there.
> (feel free to copy/paste the whole log if you need help understanding it)
>
> On Tuesday, April 1, 2014 11:16:09 AM UTC+2, Zbyněk Kočí wrote:
>>
>> Log:
>> onModuleLoad() threw an exception
>>
>> Exception while loading module *com.rpc.client.mainEntryPoint*. See 
>> Development Mode for details.
>> java.lang.reflect.InvocationTargetException at 
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>  
>> at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>  
>> at java.lang.reflect.Method.invoke(Method.java:606) at 
>> com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at 
>> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>>  
>> at 
>> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
>>  
>> at 
>> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
>>  
>> at java.lang.Thread.run(Thread.java:724) *Caused by: 
>> java.lang.RuntimeException: Deferred binding failed for 
>> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
>> required module?) at 
>> c

Re: Cell Table Styling

2014-04-01 Thread Thomas Broyer
Look at the Development Mode window (or the equivalent view in Eclipse if 
that's what you're using), the answer must be there.
(feel free to copy/paste the whole log if you need help understanding it)

On Tuesday, April 1, 2014 11:16:09 AM UTC+2, Zbyněk Kočí wrote:
>
> Log:
> onModuleLoad() threw an exception
>
> Exception while loading module *com.rpc.client.mainEntryPoint*. See 
> Development Mode for details.
> java.lang.reflect.InvocationTargetException at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  
> at java.lang.reflect.Method.invoke(Method.java:606) at 
> com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at 
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>  
> at 
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
>  
> at 
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
>  
> at java.lang.Thread.run(Thread.java:724) *Caused by: 
> java.lang.RuntimeException: Deferred binding failed for 
> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
> required module?) at 
> com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at 
> com.google.gwt.core.shared.GWT.create(GWT.java:72) at 
> com.google.gwt.core.client.GWT.create(GWT.java:86) at 
> com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150) ... 9 
> more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see 
> previous log entries) at 
> com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610) at 
> com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470) 
> at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 
> 12 more*
>
> Is it ok now? Or need something exactly from Devmode? BTW thanks for your 
> fast response
>
> Dne úterý, 1. dubna 2014 11:06:13 UTC+2 Thomas Broyer napsal(a):
>>
>>
>>
>> On Tuesday, April 1, 2014 11:02:53 AM UTC+2, Zbyněk Kočí wrote:
>>>
>>> Hello, every single hint from you all for apply own style for this is 
>>> about the same and causes an error: 
>>> "*Caused by: java.lang.RuntimeException: Deferred binding failed for 
>>> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
>>> required module?)*"
>>>
>>
>> There must be other errors up in the log. There's a reason why deferred 
>> binding failed.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cell Table Styling

2014-04-01 Thread Zbyněk Kočí
Log:
onModuleLoad() threw an exception

Exception while loading module *com.rpc.client.mainEntryPoint*. See 
Development Mode for details.
java.lang.reflect.InvocationTargetException at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
at java.lang.reflect.Method.invoke(Method.java:606) at 
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
 
at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526)
 
at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
 
at java.lang.Thread.run(Thread.java:724) *Caused by: 
java.lang.RuntimeException: Deferred binding failed for 
'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
required module?) at 
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at 
com.google.gwt.core.shared.GWT.create(GWT.java:72) at 
com.google.gwt.core.client.GWT.create(GWT.java:86) at 
com.rpc.client.mainEntryPoint.onModuleLoad(mainEntryPoint.java:150) ... 9 
more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see 
previous log entries) at 
com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610) at 
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470) 
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 
12 more*

Is it ok now? Or need something exactly from Devmode? BTW thanks for your 
fast response

Dne úterý, 1. dubna 2014 11:06:13 UTC+2 Thomas Broyer napsal(a):
>
>
>
> On Tuesday, April 1, 2014 11:02:53 AM UTC+2, Zbyněk Kočí wrote:
>>
>> Hello, every single hint from you all for apply own style for this is 
>> about the same and causes an error: 
>> "*Caused by: java.lang.RuntimeException: Deferred binding failed for 
>> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
>> required module?)*"
>>
>
> There must be other errors up in the log. There's a reason why deferred 
> binding failed.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cell Table Styling

2014-04-01 Thread Thomas Broyer


On Tuesday, April 1, 2014 11:02:53 AM UTC+2, Zbyněk Kočí wrote:
>
> Hello, every single hint from you all for apply own style for this is 
> about the same and causes an error: 
> "*Caused by: java.lang.RuntimeException: Deferred binding failed for 
> 'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
> required module?)*"
>

There must be other errors up in the log. There's a reason why deferred 
binding failed.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cell Table Styling

2014-04-01 Thread Zbyněk Kočí
Hello, every single hint from you all for apply own style for this is about 
the same and causes an error: 
"*Caused by: java.lang.RuntimeException: Deferred binding failed for 
'com.rpc.client.mainEntryPoint$TableResources' (did you forget to inherit a 
required module?)*"

There is no solution yet, just one post about it but still isnt solved or 
even answered. Could anyone help me with this because you didnt say a word 
about changing or implementing something else... confused

gwt.xml:



Dne středa, 21. září 2011 9:06:03 UTC+2 Sudhakar Abraham napsal(a):
>
> To change the property of  .cellTableEvenRow , .cellTableOddRow  in 
> CellTableStyle.css. Inject your CellTableStyle.css in client side 
> code. 
>
> //client side code 
> interface TableResources extends CellTable.Resources 
>   { 
> @Source(value = { CellTable.Style.DEFAULT_CSS, 
> "CellTableStyle.css" }) 
>     CellTable.Style cellTableStyle(); 
>   } 
>
> CellTable table = new CellTable(15, GWT. 
> create(TableResources.class)); 
>
> //CellTableStyle.css 
>
> .cellTableCell { 
> height: 35px; 
> cursor: pointer; 
> padding: 2px 25px; 
> } 
> .cellTableEvenRow { 
> background: #fffaf0; 
> font-size:12px; 
> } 
>
> .cellTableOddRow { 
> background: #fff8e8; 
> } 
>
> S. Abraham 
> www.DataStoreGwt.com 
> Persist objects directly in GAE 
>
>
> On Sep 21, 7:04 am, gangurg gangurg  wrote: 
> > I am trying to come up with styling of Cell Table . However  not able to 
> > figure out how . 
> > 
> > Trying to achieve 
> > 1. Should be able to Style any given row of a Cell table 
> > 2, Any Column of a Cell table 
> > 3. dynamically style any particular cell of a cell table . 
> > 
> > I tried to do the style sheet injection means by using resource , but 
> its 
> > not helping me . I would appreciate any working example for the same .

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cell Table toggling readonly/editable cell

2014-03-20 Thread BM
Thanks Tom for the quick reply. 

Hmm. I don't know if it defeats the purpose of using cell table approach 
because we have to redraw it again. Or is it not?

What about custom EditTextCell and intercept the OnBrowserEvent and check 
for a boolean flag which would get set based on Edit button is clicked and 
Save button is clicked? I don't know if the following code will ever work 
when a EditTextCell is clicked in Read-only mode as it will intercept and 
since the boolean flag is false, it will not turn into editable cell. 

public class ButtonEnableEditTextCell extends EditTextCell {

private boolean click;

@Override
public void onBrowserEvent(Context context, Element parent, String value, 
NativeEvent event,
ValueUpdater valueUpdater) {
if (click) {
super.onBrowserEvent(context, parent, value, event, valueUpdater);
}
}

public void setClick(Boolean click) {
this.click = click;
}
}


On Thursday, March 20, 2014 1:21:39 PM UTC-5, Thomas Broyer wrote:
>
> Can't you use a Cell that delegates to either a TextCell or 
> EditableTextCell depending on a flag?
> And then your toggle button switches the flag and redraws the table.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT Cell Table toggling readonly/editable cell

2014-03-20 Thread Thomas Broyer
Can't you use a Cell that delegates to either a TextCell or EditableTextCell 
depending on a flag?
And then your toggle button switches the flag and redraws the table.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT Cell Table toggling readonly/editable cell

2014-03-20 Thread BM
I have a cell table and here is my requirement.

I want to show all rows and columns in cell table in read-only mode when 
the user first arrives.

If the user wants to update a cell, they click Edit button on top of the 
Screen which would change all the cells inside the cell table to Edit mode. 
The user can change values and Click save button on Top of the screen which 
saves the data and make the Cell Table Read-only Mode with updated data. 


Currently I can do this but my problem is when the Cell table is in 
Read-only mode, I can still click on cell to change to editable text box 
because I use Editable Text Cell. So Cell table doesn't really understand 
when not to make it editable.

Anyone can help to provide best way to handle my requirement?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: CellTable - ListDataProvider - Table not updating on subsequent calls

2013-12-23 Thread Alfredo Quiroga-Villamil
Hi:

Apologize for the delayed response.

That sounds different to the issue I was running into. In my case I do
recall the update working (server side) as well as the actual response over
the wire. For me It was purely an issue of how the Store/List Provider was
populated and shown in the UI widget with the latest response received from
the server.

Best regards.

Alfredo


On Sun, Dec 22, 2013 at 1:14 PM, Javed  wrote:

> I actually found the underlying cause.  Basically on the second update I
> am getting an optimistic locking error.
>
> But I am convinced I am using my JPA correctly.
>
> Does that ring any bells or jog your memory?
>
>
> On 21 December 2013 15:54, Alfredo Quiroga  wrote:
>
>> Ufff it's been so long I can't remember :( sorry and on top of it I
>> deleted the project. I just read my own email again to see if I could tell
>> what I was doing wrong and even now can't really tell.
>>
>> Sent from my iPhone
>>
>> On Dec 21, 2013, at 8:40 AM, Javed Sumra 
>> wrote:
>>
>> Hello Alfredo.  I am having a similar issue.  Did you get to the bottom
>> of this?
>>
>> Thanks
>>
>> On Saturday, August 4, 2012 3:10:46 PM UTC+1, Alfredo Quiroga-Villamil
>> wrote:
>>>
>>> I am still investigating here on my side, but I have a feeling I might
>>> be missing the obvious so if someone knows what I am missing or
>>> potentially doing wrong please let me know.
>>>
>>> Elements:
>>>
>>> - A CellTable
>>> - A ListDataProvider
>>> - RequestFactory
>>> - A "refresh" button
>>>
>>> Scenario:
>>>
>>> - The CellTable is populated via RequestFactory.
>>> - On the first load, all data is shown in the table (all rows are
>>> populated)
>>> - I have a button (refresh).
>>> - The Table can be edited, so as an example I edit the first row,
>>> first cell and simply change the text to something else.
>>> - I click on the refresh button and load a brand new list of proxies
>>> from the server using request factory.
>>> - I clear my provider's list and add the new proxies.
>>> - The new list doesn't replace the old values (previously edited).
>>>
>>> Curiosity:
>>>
>>> I've noticed that after I click refresh, although at first glance the
>>> edited cell didn't change, if I click on it once or twice, it'll
>>> correctly display the last value loaded from the server. This is very
>>> unusual behavior. I've also tried to invoke refresh and flush on the
>>> provider itself after adding the new set of proxies.
>>>
>>> Presenter's code that is invoked for the first load and subsequent
>>> ones is shown below:
>>>
>>> @Override
>>> public void readAll() {
>>>
>>> destinationContext = 
>>> factory.getRequestFactory().createDestinationContext();
>>>
>>> destinationContext.findAll().with("cards",
>>> "cards.trunks",
>>> "daysOfWeek", "daysOfWeek.hourlySchedule", "holidays")
>>> .fire(new Receiver>()
>>> {
>>>
>>> @Override
>>> public void 
>>> onSuccess(List
>>> proxies) {
>>>
>>> view.
>>> getDestinationCellTable().getProvider().getList().clear();
>>> view.
>>> getDestinationCellTable().getProvider().getList().addAll(proxies);
>>>
>>> if (proxies != null &&
>>> proxies.size() > 0) {
>>>
>>> view.getDestinationCellTable().getCellTable().getSelectionModel().setSelected(proxies.get(0),
>>>
>>> true);
>>> }
>>>
>>> }
>>>
>>> });
>>>
>>> }
>>>
>>> I am still investigating here, but as I previously said if you see
>>> that I am simply missing the obvious I would appreciate it if you can
>>> let me know.
>>>
>>> Thank you in advance,
>>>
>>> Alfredo
>>>
>>> --
>>> Alfredo Quiroga-Villamil
>>>
>>> AOL/Yahoo/Gmail/MSN IM:  lawwt

Re: CellTable - ListDataProvider - Table not updating on subsequent calls

2013-12-22 Thread Javed
I actually found the underlying cause.  Basically on the second update I am
getting an optimistic locking error.

But I am convinced I am using my JPA correctly.

Does that ring any bells or jog your memory?


On 21 December 2013 15:54, Alfredo Quiroga  wrote:

> Ufff it's been so long I can't remember :( sorry and on top of it I
> deleted the project. I just read my own email again to see if I could tell
> what I was doing wrong and even now can't really tell.
>
> Sent from my iPhone
>
> On Dec 21, 2013, at 8:40 AM, Javed Sumra 
> wrote:
>
> Hello Alfredo.  I am having a similar issue.  Did you get to the bottom of
> this?
>
> Thanks
>
> On Saturday, August 4, 2012 3:10:46 PM UTC+1, Alfredo Quiroga-Villamil
> wrote:
>>
>> I am still investigating here on my side, but I have a feeling I might
>> be missing the obvious so if someone knows what I am missing or
>> potentially doing wrong please let me know.
>>
>> Elements:
>>
>> - A CellTable
>> - A ListDataProvider
>> - RequestFactory
>> - A "refresh" button
>>
>> Scenario:
>>
>> - The CellTable is populated via RequestFactory.
>> - On the first load, all data is shown in the table (all rows are
>> populated)
>> - I have a button (refresh).
>> - The Table can be edited, so as an example I edit the first row,
>> first cell and simply change the text to something else.
>> - I click on the refresh button and load a brand new list of proxies
>> from the server using request factory.
>> - I clear my provider's list and add the new proxies.
>> - The new list doesn't replace the old values (previously edited).
>>
>> Curiosity:
>>
>> I've noticed that after I click refresh, although at first glance the
>> edited cell didn't change, if I click on it once or twice, it'll
>> correctly display the last value loaded from the server. This is very
>> unusual behavior. I've also tried to invoke refresh and flush on the
>> provider itself after adding the new set of proxies.
>>
>> Presenter's code that is invoked for the first load and subsequent
>> ones is shown below:
>>
>> @Override
>> public void readAll() {
>>
>> destinationContext = 
>> factory.getRequestFactory().createDestinationContext();
>>
>> destinationContext.findAll().with("cards",
>> "cards.trunks",
>> "daysOfWeek", "daysOfWeek.hourlySchedule", "holidays")
>> .fire(new Receiver>()
>> {
>>
>> @Override
>> public void 
>> onSuccess(List
>> proxies) {
>>
>> view.
>> getDestinationCellTable().getProvider().getList().clear();
>> view.
>> getDestinationCellTable().getProvider().getList().addAll(proxies);
>>
>> if (proxies != null &&
>> proxies.size() > 0) {
>>
>> view.getDestinationCellTable().getCellTable().getSelectionModel().setSelected(proxies.get(0),
>>
>> true);
>> }
>>
>> }
>>
>> });
>>
>> }
>>
>> I am still investigating here, but as I previously said if you see
>> that I am simply missing the obvious I would appreciate it if you can
>> let me know.
>>
>> Thank you in advance,
>>
>> Alfredo
>>
>> --
>> Alfredo Quiroga-Villamil
>>
>> AOL/Yahoo/Gmail/MSN IM:  lawwton
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" 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.
> V

Re: CellTable - ListDataProvider - Table not updating on subsequent calls

2013-12-21 Thread Alfredo Quiroga
Ufff it's been so long I can't remember :( sorry and on top of it I deleted the 
project. I just read my own email again to see if I could tell what I was doing 
wrong and even now can't really tell.

Sent from my iPhone

> On Dec 21, 2013, at 8:40 AM, Javed Sumra  wrote:
> 
> Hello Alfredo.  I am having a similar issue.  Did you get to the bottom of 
> this?
> 
> Thanks
> 
>> On Saturday, August 4, 2012 3:10:46 PM UTC+1, Alfredo Quiroga-Villamil wrote:
>> I am still investigating here on my side, but I have a feeling I might 
>> be missing the obvious so if someone knows what I am missing or 
>> potentially doing wrong please let me know. 
>> 
>> Elements: 
>> 
>> - A CellTable 
>> - A ListDataProvider 
>> - RequestFactory 
>> - A "refresh" button 
>> 
>> Scenario: 
>> 
>> - The CellTable is populated via RequestFactory. 
>> - On the first load, all data is shown in the table (all rows are populated) 
>> - I have a button (refresh). 
>> - The Table can be edited, so as an example I edit the first row, 
>> first cell and simply change the text to something else. 
>> - I click on the refresh button and load a brand new list of proxies 
>> from the server using request factory. 
>> - I clear my provider's list and add the new proxies. 
>> - The new list doesn't replace the old values (previously edited). 
>> 
>> Curiosity: 
>> 
>> I've noticed that after I click refresh, although at first glance the 
>> edited cell didn't change, if I click on it once or twice, it'll 
>> correctly display the last value loaded from the server. This is very 
>> unusual behavior. I've also tried to invoke refresh and flush on the 
>> provider itself after adding the new set of proxies. 
>> 
>> Presenter's code that is invoked for the first load and subsequent 
>> ones is shown below: 
>> 
>> @Override 
>> public void readAll() { 
>> 
>> destinationContext = 
>> factory.getRequestFactory().createDestinationContext(); 
>> destinationContext.findAll().with("cards", "cards.trunks", 
>> "daysOfWeek", "daysOfWeek.hourlySchedule", "holidays") 
>> .fire(new Receiver>() 
>> { 
>> 
>> @Override 
>> public void 
>> onSuccess(List proxies) { 
>> 
>> 
>> view.getDestinationCellTable().getProvider().getList().clear(); 
>> 
>> view.getDestinationCellTable().getProvider().getList().addAll(proxies); 
>> 
>> if (proxies != null && 
>> proxies.size() > 0) { 
>> 
>> view.getDestinationCellTable().getCellTable().getSelectionModel().setSelected(proxies.get(0),
>>  
>> true); 
>> } 
>> 
>> } 
>> 
>> }); 
>> 
>> } 
>> 
>> I am still investigating here, but as I previously said if you see 
>> that I am simply missing the obvious I would appreciate it if you can 
>> let me know. 
>> 
>> Thank you in advance, 
>> 
>> Alfredo 
>> 
>> -- 
>> Alfredo Quiroga-Villamil 
>> 
>> AOL/Yahoo/Gmail/MSN IM:  lawwton
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: CellTable - ListDataProvider - Table not updating on subsequent calls

2013-12-21 Thread Javed Sumra
Hello Alfredo.  I am having a similar issue.  Did you get to the bottom of 
this?

Thanks

On Saturday, August 4, 2012 3:10:46 PM UTC+1, Alfredo Quiroga-Villamil 
wrote:
>
> I am still investigating here on my side, but I have a feeling I might 
> be missing the obvious so if someone knows what I am missing or 
> potentially doing wrong please let me know. 
>
> Elements: 
>
> - A CellTable 
> - A ListDataProvider 
> - RequestFactory 
> - A "refresh" button 
>
> Scenario: 
>
> - The CellTable is populated via RequestFactory. 
> - On the first load, all data is shown in the table (all rows are 
> populated) 
> - I have a button (refresh). 
> - The Table can be edited, so as an example I edit the first row, 
> first cell and simply change the text to something else. 
> - I click on the refresh button and load a brand new list of proxies 
> from the server using request factory. 
> - I clear my provider's list and add the new proxies. 
> - The new list doesn't replace the old values (previously edited). 
>
> Curiosity: 
>
> I've noticed that after I click refresh, although at first glance the 
> edited cell didn't change, if I click on it once or twice, it'll 
> correctly display the last value loaded from the server. This is very 
> unusual behavior. I've also tried to invoke refresh and flush on the 
> provider itself after adding the new set of proxies. 
>
> Presenter's code that is invoked for the first load and subsequent 
> ones is shown below: 
>
> @Override 
> public void readAll() { 
>
> destinationContext = 
> factory.getRequestFactory().createDestinationContext(); 
> destinationContext.findAll().with("cards", "cards.trunks", 
> "daysOfWeek", "daysOfWeek.hourlySchedule", "holidays") 
> .fire(new 
> Receiver>() { 
>
> @Override 
> public void 
> onSuccess(List proxies) { 
>
> 
> view.getDestinationCellTable().getProvider().getList().clear(); 
>
> 
> view.getDestinationCellTable().getProvider().getList().addAll(proxies); 
>
>
> if (proxies != null && 
> proxies.size() > 0) { 
> 
> view.getDestinationCellTable().getCellTable().getSelectionModel().setSelected(proxies.get(0),
>  
>
> true); 
> } 
>
> } 
>
> }); 
>
> } 
>
> I am still investigating here, but as I previously said if you see 
> that I am simply missing the obvious I would appreciate it if you can 
> let me know. 
>
> Thank you in advance, 
>
> Alfredo 
>
> -- 
> Alfredo Quiroga-Villamil 
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Strange issue with GWT sorting columns of a cell table

2013-10-27 Thread Fanny Wong
Hi everyone,

I'm currently trying to implement column sorting in a cell table for my 
data, however my data doesn't sort and the sort arrow only moves when I 
click on a row after clicking on a column header. Not sure what I did wrong 
since most of what I have follows closely to the GWT tutorials and the GWT 
show case example.

If anyone could give me some pointers that would be great :) 

I'm thinking either I'm not properly triggering the sorting or the cell 
table content isn't loading.

public class BrowseVendorsContent extends Content {
private static final String pageName = "Browse Vendors";
private static final String pageStub = "vendors";

private final BrowseVendorsServiceAsync browseVendorsService = GWT
.create(BrowseVendorsService.class);

public BrowseVendorsContent(Sneaky_Xpress module) {
super(module);
}

@Override
public String getPageName() {
return pageName;
}

@Override
public String getPageStub() {
return pageStub;
}

@Override
public void getAndChangeContent(final String input) {
browseVendorsService.browseVendorsServer(input,
new AsyncCallback>() {
public void onFailure(Throwable caught) {
module.addMessage(GENERIC_ERROR_MESSAGE);
}

public void onSuccess(List result) {
HTMLPanel content = new HTMLPanel(""); // The new
// content to
// return

// The sub-navigation bar
HTMLPanel list = new HTMLPanel("ul", "");
list.addStyleName("nav nav-tabs");

// The tabs in the sub-navigation bar
HTMLPanel listView = new HTMLPanel("li", "");
HTMLPanel mapView = new HTMLPanel("li", "");

// Links for the tabs
Anchor listViewLink = new Anchor("List View");
listViewLink.addClickHandler(new PageClickHandler(
BrowseVendorsContent.this, "list"));
listView.add(listViewLink);

Anchor mapViewLink = new Anchor("Map View");
mapViewLink.addClickHandler(new PageClickHandler(
BrowseVendorsContent.this, "map"));
mapView.add(mapViewLink);

// Create the sub-navigation bar
list.add(listView);
list.add(mapView);
content.add(list);

// Load the appropriate view
if (input.equals("map")) {
mapView.addStyleName("active");
listView.removeStyleName("active");
// Add the map etc.
} else {
    // By default load the list view
listView.addStyleName("active");
    mapView.removeStyleName("active");

// Add data table under List view
Widget table = displayDataInTable(result);
    content.add(table);
    }

module.changeContent(content);
}
});

}

public Widget displayDataInTable(List vendorList) {
// Create new cell table object
CellTable table = new CellTable();

// Configure table to display all results onto one page
table.setPageSize(vendorList.size());

// Configure to select a row vs one cell at a time
MultiSelectionModel selectionModel = new MultiSelectionModel();
table.setSelectionModel(selectionModel);

// Create a list data provider.
final ListDataProvider dataProvider = new ListDataProvider();

// Instantiate sort handler
ListHandler colSortHandler = new ListHandler(
vendorList);

// Add Key column and sort to column
TextColumn keyCol = new TextColumn() {
@Override
public String getValue(Vendor vendor) {
return vendor.getVendorId();
}
};
table.addColumn(keyCol, "Key");
keyCol.setSortable(true);
colSortHandler.setComparator(keyCol, new KeyComparator());

// Add Name column and sort to column
TextColumn nameCol = new TextColumn() {
@Override
public String getValue(Vendor vendor) {
return vendor.getName();
}
};
table.addColumn(nameCol, "Name");
nameCol.setSortable(true);
colSortHandler.setComparator(nameCol, new NameComparator());

// Add Location column
TextColumn locCol = new TextColumn() {
@Override
public String getValue(Vendor vendor) {
return vendor.getLocation();
}
};
table.addColumn(locCol, "Location");
locCol.setSortable(true);
colSortHandler.setComparator(locCol, new LocComparator());

// Add Description column
TextColumn desCol = new TextColumn() {
@Override
public String getValue(Vendor vendor) {
    return vendor.getDescription();
}
};
table.addColumn(desCol, "

Re: Load on demand - table \ grid

2013-10-03 Thread Jens
Sounds like you want to check out DataGrid + AsyncDataProvider + 
SimplePager.

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwDataGrid

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Load on demand - table \ grid

2013-10-03 Thread Nir Avital
Hi,
We're examining GWT for our next generation project.
We would like to create a simple table \ grid that will represent a 
database table.
What we want to do is to populate this table\grid with our database data.

Our tables are very big (~2 Million rows)

and therefore our requirements from the table\grid are:
1) to load on demand the results
2) to support pagination
3) do both automatically

Is there any quick way for us to experiment with such an example?
any code links \ references will be helpful.
thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problem with SuggextBox as table cell

2013-09-27 Thread Timothy Gonzalez
jorge vasquez  writes:

> 
> 
> Hi Christian Pelster ,I watched your code , because I need implement some 
similar and I could solved your problem , you should modify the method 
updateViewData
>  some like this:
> 
>  private String updateViewData(final Context context, final Element 
parent, final ViewData viewData,
>           final boolean isEditing, final NativeEvent event) {
>     deleteLastPopup ();
>     //final InputElement input = (InputElement) parent.getFirstChild();
>     final InputElement input = getInputElement(parent);
>     final String value = input.getValue();
>     viewData.setText(value);
>     viewData.setEditing(isEditing);
>     
>     SuggestBox suggestBox = suggestBoxes.get(getKeyFromKontext(context));
>     //suggestBox.removeFromParent();
>     if (suggestBox != null) {
>       suggestBox.setText(value);
>       
>       textBox = new MyTextBox(input);
>       suggestBox = new SuggestBox(suggestBox.getSuggestOracle(), textBox);
>       
>       implementarEstilos(suggestBox);
>       DomEvent.fireNativeEvent(event, textBox);
>       
>       
>     }
>     suggestBox.setFocus(true);
>     return value;
>   }
> you should call a new  textBox = new MyTextBox(input); because with this 
he can found the coordenates where will show the results, also you should 
add a method deleteLastPopup which delete the last popup of results showed.
> this is the method :
> 
> 
> private void deleteLastPopup () {
>     Element popupEmpresaServicio =
(Element)Document.get().getBody().getLastChild();
>     String classNameLastChild=popupEmpresaServicio.getClassName();
>     if(popupStyleName.equals(classNameLastChild)) {
>       
Document.get().getBody().removeChild(Document.get().getBody().getLastChild()
);
>     }
>   }
> 
> always the popup is created in the last part of the code generated there 
we can found (in my case i can found for the classname) and delete , then 
the new result will be show
> 
> I found other thing which need solve , for show the suggestbox better , if 
you found others fix or solutions for solve you can put here for improve the 
code :D
> regards,
> 
> Jorge Vasquez
> 
> 
> 

Hello, I know this is an old post, but it helped me and I was able to 
improve so I thought I'd share my findings.

Jorge you're fix for the placement does work, but it opens up a new issue 
with the multiple popups. That issue I wasn't able to solve, because the 
SuggestBox is trying to do this cleanup itself and we're fighting each 
other, so I had to backtrack a bit and find a new fix for the placement 
issue.

Creating a new suggest box is what's causing the multiple popups to appear. 
Just by taking this part out, it fixes the multiple popups.

Now is the issue of placement.

To handle this I simply created a new suggest box each time the edit method 
is called, regardless if one exists in the map.

This way the suggest box always has a TextBox so it can place it's menus 
correctly, and we never create more than one SuggestBox so we never get 
duplicate menu's.


My edit method looks like below.

protected void edit(Context context, Element parent, String value) {
setValue(context, parent, value);
InputElement input = getInputElement(parent);

input.focus();
input.select();

// Always create a new SuggestBox so it opens at the correct 
place.
// Never create more than one SuggestBox, otherwise you will 
end up with multiple pop up menus.
TextBox textBox = new MyTextBox(input);
parent.replaceChild(input, 
textBox.getElement()).getOwnerDocument();
SuggestBox suggestBox = getNewSuggestBox(context, 
getSuggestOracle(), textBox);
suggestBoxes.put(getKeyFromContext(context), suggestBox);

}


In addition one big thing I had to do was handling the commits.

There is a bit of a conflict here, because a commit will be performed when 
selecting a suggestion (blur). So to handle this part I save the commit 
data, let the cell commit as normal in onBrowserEvent, then on the 
SuggestBox select event I call the commit again with the saved data and the 
selected value. Below is my SuggestBox handler which performs this.

suggestBox.addSelectionHandler(new 
SelectionHandler() {
@Override
public void onSelection(SelectionEvent 
event) {

CommitParameters cp = 
SuggestCell.this.commitParameters.get(getKeyFromContext(context));

// A commit is always performed on blur,
// the selected text was inserted, but then 
lost by the blur commit (this is needed in case a selection isn't made).
// Re-insert it so the commit can be 
performed using the selection text.

Best cell widget/table to populate columns?

2013-06-19 Thread Tim Oshea
 

I am creating a GWT app that will use a table to display some data. I am 
not sure which cell widget/table to use to populate data vertically in 
column. Basically I want to populate data going down instead of going 
across.

Simple example:

Category A   |  Category B-|-
item 1a  |  item 1b
item 2a  |  item 2b...

Based of off the showcase of feaures: 
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTable

My best option might be to just use a grid, or to create a bunch of 
separate cell tables for each category. Anyone have any ideas??

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.




Build tree table with GWT CellTableBuilder

2013-05-22 Thread jaga
Hi, I managed this. I followed the example given on the latest GWT showcase for 
the custom data grid 
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTable

Key is new TableRowBuilder. You can inject rows into the table. Use a Click 
event on a cell to trigger the injection. I used an asynchronous callback to 
get the data and found it easier to redraw the entire table. In the example the 
objects already contain the data. He iterates through a list building a new row 
for each item. 

James 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Build tree table with GWT CellTableBuilder

2013-05-22 Thread Ben


Is it possible to build a tree table like 
this<http://www.sencha.com/examples/#ExamplePlace:basictreegrid>with the new 
CellTableBuilder of "vanilla" GWT?
<https://lh5.googleusercontent.com/-oHWT1_E1_LY/UZzQ8WUvYlI/AAM/I8q4wxhkTt4/s1600/oqDJW.png>
The GWT Showcase 
example<http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCustomDataGrid>
 only 
allows to expand the "top level" rows. My use case requires expansion of 
multiple row levels.

How can I achieve this with pure GWT?


Regards
Ben

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT 2.1 CELL TABLE

2013-03-02 Thread David Phan

Check the content of your .css file.  
It could cause Deferred Binding problem.  
I ran into the same issue.  
After I re-copied CellTable.css into my .css and reran everything was fine.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT 2.1 cell table paging bug?

2013-02-13 Thread JahSon
If you want the table height to remain consistent, couldn't you wrap the 
table in a containing element (e.g. div) of a fixed height?  That way, if 
you display the pager directly underneath the table for example, it will 
always stay in the same spot and just the table itself will shrink.

I prefer manstis' (Mike's) fix to the default behavior of AbstractPager.  I 
couldn't agree more with Steve's remarks.  To reiterate: when you page 
over, I would expect to see a new result at the start of the table.  Yes, 
that means the table must shrink, but you can use CSS to deal with that.

I also want to reiterate manstis' concern of a second RangeChangeEvent 
being fired.  I would think this behavior to be extremely undesirable as I 
would imagine most of us are performing a server side call to a database to 
retrieve more data in onRangeChange().  So a needless call to the server 
will be made.  This is bad!

I think that the behavior of AbstractPager should be modified and manstis' 
implementation of setPageStart() should be the default.  Perhaps a boolean 
configurable (restrictVisibleRowsToPageSize) should be added which allows 
for the user to utilize the current behavior of setPageStart().

Just in case anyone else comes across this post, it should also be noted (I 
found it very confusing, at least) that while setting 
AbstractPager.isRangeLimited via AbstractPager.setRangeLimited() will make 
the next page and last page buttons behave the same (showing only new data, 
even if less than pageSize) it is not a solution to this problem because 
then the next and last page buttons will not be disabled.

On Friday, January 6, 2012 7:27:48 AM UTC-5, Emilian Bold wrote:
>
> I agree. The current GWT pagination seems to be more of a workaround. 
> They try to avoid having less items on the last page because it might 
> change the layout and the pager position. 
>
> What should actually happen is that the table should maintain the full 
> height as if it has all the rows, but display only the few remaining 
> rows on the last page. 
>
> Basically, the table should have the same height regardless of the 
> number of rows and the pager component should remain in place when 
> switching pages. 
>
> I'm surprised there isn't an actual bugreport for this. 
>
> --emi 
>
> On Dec 21 2011, 3:16 am, Steve  wrote: 
> > This behavior deviates from widespread usage of pagination across the 
> web 
> > so I don't see how it's desirable to do something unexpected by users 
> > unless it's clearly superior. 
> > 
> > When I navigate from one page to another it's because I want to see the 
> > next set of results/data and I expect the stuff at the top to be 
> different 
> > than what was on the previous page I was on. If it overlaps, then I have 
> to 
> > scan down and figure out where to start looking.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT 2.1 cell table paging bug?

2013-02-13 Thread JahSon
If you want the table height to remain consistent, couldn't you wrap the 
table in a containing element (e.g. div) of a fixed height?  That way, if 
you display the pager directly underneath the table for example, it will 
always stay in the same spot and just the table itself will shrink.

I prefer manstis' (Mike's) fix to the default behavior of AbstractPager.  I 
couldn't agree more with Steve's remarks.  To reiterate: when you page 
over, I would expect to see a new result at the start of the table.  Yes, 
that means the table must shrink, but you can use CSS to deal with that.

I also want to reiterate manstis' concern of a second RangeChangeEvent 
being fired.  I would think this behavior to be extremely undesirable as I 
would imagine most of us are performing a server side call to a database to 
retrieve more data in onRangeChange().  So a needless call to the server 
will be made.  This is bad!

I think that the behavior of AbstractPager should be modified and manstis' 
implementation of setPageStart() should be the default.  Perhaps a boolean 
configurable (restrictVisibleRowsToPageSize) should be added which allows 
for the user to utilize the current behavior of setPageStart().

On Friday, January 6, 2012 7:27:48 AM UTC-5, Emilian Bold wrote:
>
> I agree. The current GWT pagination seems to be more of a workaround. 
> They try to avoid having less items on the last page because it might 
> change the layout and the pager position. 
>
> What should actually happen is that the table should maintain the full 
> height as if it has all the rows, but display only the few remaining 
> rows on the last page. 
>
> Basically, the table should have the same height regardless of the 
> number of rows and the pager component should remain in place when 
> switching pages. 
>
> I'm surprised there isn't an actual bugreport for this. 
>
> --emi 
>
> On Dec 21 2011, 3:16 am, Steve  wrote: 
> > This behavior deviates from widespread usage of pagination across the 
> web 
> > so I don't see how it's desirable to do something unexpected by users 
> > unless it's clearly superior. 
> > 
> > When I navigate from one page to another it's because I want to see the 
> > next set of results/data and I expect the stuff at the top to be 
> different 
> > than what was on the previous page I was on. If it overlaps, then I have 
> to 
> > scan down and figure out where to start looking.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT 2.1 cell table paging bug?

2013-02-13 Thread JahSon
If you want the table height to remain consistent, couldn't you wrap the 
table in a containing element (e.g. div) of a fixed height?  That way, if 
you display the pager directly underneath the table for example, it will 
always stay in the same spot and just the table itself will shrink.

I prefer manstis' (Mike's) fix to the default behavior of AbstractPager.  I 
couldn't agree more with Steve's remarks.  To reiterate: when you page 
over, I would expect to see a new result at the start of the table.  Yes, 
that means the table must shrink, but you can use CSS to deal with that.

I think that the behavior of AbstractPager should be modified and manstis' 
implementation of setPageStart() should be the default.  Perhaps a boolean 
configurable (restrictVisibleRowsToPageSize) should be added which allows 
for the user to utilize the current behavior of setPageStart().

On Friday, January 6, 2012 7:27:48 AM UTC-5, Emilian Bold wrote:
>
> I agree. The current GWT pagination seems to be more of a workaround. 
> They try to avoid having less items on the last page because it might 
> change the layout and the pager position. 
>
> What should actually happen is that the table should maintain the full 
> height as if it has all the rows, but display only the few remaining 
> rows on the last page. 
>
> Basically, the table should have the same height regardless of the 
> number of rows and the pager component should remain in place when 
> switching pages. 
>
> I'm surprised there isn't an actual bugreport for this. 
>
> --emi 
>
> On Dec 21 2011, 3:16 am, Steve  wrote: 
> > This behavior deviates from widespread usage of pagination across the 
> web 
> > so I don't see how it's desirable to do something unexpected by users 
> > unless it's clearly superior. 
> > 
> > When I navigate from one page to another it's because I want to see the 
> > next set of results/data and I expect the stuff at the top to be 
> different 
> > than what was on the previous page I was on. If it overlaps, then I have 
> to 
> > scan down and figure out where to start looking.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: GWT 2.1 cell table paging bug?

2013-02-13 Thread JahSon


On Friday, January 6, 2012 7:27:48 AM UTC-5, Emilian Bold wrote:
>
> I agree. The current GWT pagination seems to be more of a workaround. 
> They try to avoid having less items on the last page because it might 
> change the layout and the pager position. 
>
> What should actually happen is that the table should maintain the full 
> height as if it has all the rows, but display only the few remaining 
> rows on the last page. 
>
> Basically, the table should have the same height regardless of the 
> number of rows and the pager component should remain in place when 
> switching pages. 
>
> I'm surprised there isn't an actual bugreport for this. 
>
> --emi 
>
> On Dec 21 2011, 3:16 am, Steve  wrote: 
> > This behavior deviates from widespread usage of pagination across the 
> web 
> > so I don't see how it's desirable to do something unexpected by users 
> > unless it's clearly superior. 
> > 
> > When I navigate from one page to another it's because I want to see the 
> > next set of results/data and I expect the stuff at the top to be 
> different 
> > than what was on the previous page I was on. If it overlaps, then I have 
> to 
> > scan down and figure out where to start looking.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




jsp, google charts, table has no columns

2013-01-30 Thread streethawk707
Hi All

Im getting the "table has no columns" all the time. Please let me know 
where I went wrong.

Below are my codes.

JSP: pie.jsp (This is to pull data from DB/DS. Currently Im trying with 
hardcode values as below.)

<%@page contentType="application/json; charset=UTF-8"%>
<%@page import="net.sf.json.JSONObject,net.sf.json.JSONArray"%>

<%
JSONObject obj=new JSONObject();
obj.put("name","foo");
obj.put("num",new Integer(100));
obj.put("balance",new Double(1000.21));
obj.put("is_vip",new Boolean(true));
obj.put("nickname",null);
out.print(obj);
out.flush();
%>

JSP: Charts.jsp (This is to show the output chart)


Charts




google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var jsonData = $.ajax({
url: "./charts/pie.jsp",
dataType:"json",
async: false,
options: {'title': 'Reports'}
}).responseText;
   var data = new google.visualization.DataTable(jsonData);
  // var data = new 
google.visualization.arrayToDataTable(jsonData); 
   var chart = new 
google.visualization.PieChart(document.getElementById('chart_div'));
   chart.draw(data, {width: 400, height: 240});
}



Charts Demo




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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 http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: cannot break word in table td

2013-01-21 Thread tong123123
I found the solution, before I set the FlexTable

> table-layout:fixed
>
then in td, set

> white-space:normal;
> word-wrap:break-word;
>
in column, I set

> flexTable.getColumnFormatter().setWidth(0, "150px");
> flexTable.getcolumnFormatter().setWidth(1, "200px");
>

 the word in td cannot be broken, after I add

> flexTable.setWidth("350px");
>
the word in td can be broken!!


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



How to drag and drop multiple rows from cell table

2013-01-01 Thread Revital


I need to drag and drop multiple selected rows from a cell table (that 
contains specific objects).

I’m trying to use DragAndDropCellTable but I can drag only one cell this 
way. Anyone knows how can I drag few rows?

I’m catching the drop using DroppableWidget and I want the 
DropEvent.getDraggableData()  to be the list of selected Objects (currently 
it’s just one Object).

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



How to drag and drop multiple rows from cell table

2013-01-01 Thread Revital
Hi,

I need to drag and drop multiple selected rows from a cell table (that 
contains specific objects).

I’m trying to use DragAndDropCellTable but I can drag only one cell this 
way. Anyone knows how can I drag few rows?

I’m catching the drop using DroppableWidget and I want the 
DropEvent.getDraggableData()  to be the list of selected Objects (currently 
it’s just one Object).

Thanks,

Revital


-- 
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/-/2VnuxJIxQnkJ.
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: Problem with SuggextBox as table cell

2012-12-18 Thread jorge vasquez
Hi Ande , sorry i forgot put this method but i can explain you, the method 
implementarEstilos(suggestBox); set a styleName to the object suggestBox  ,
and the popupStyleName is a constant  with the name that you put to 
suggestBox popup (because is the unique way how we can found the popup 
hidden in the code generated), you must evaluate that the last 
child popupStyleName is called equal to the popup that you showed and then 
delete when close the popup
this is the method 
// popupStyleName is necesary for show and delete popup
 private void implementarEstilos(final SuggestBox suggestBox) {
if (!styleName.isEmpty()) {
  suggestBox.setStyleName(styleName);
}
if (!popupStyleName.isEmpty()) {
  suggestBox.setPopupStyleName(popupStyleName);
}
  }

if you have another question, ask me.

I hope I can clear your doubts.

Jorge Vasquez.

El miércoles, 12 de diciembre de 2012 10:40:27 UTC-5, Ande escribió:
>
> Hi Jorge Vasquez,
>
> I tried to follow your solution, but I can not figure out what this method 
> does:
>
>   implementarEstilos(suggestBox);
>>
>  
> Also I have no idea where you retrieve the popupStyleName in this line:
>
> if(popupStyleName.equals(classNameLastChild)) {
>>
>
>
> greetings
> Ande
>  
>

-- 
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/-/k_JiGR3JM-kJ.
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: Problem with SuggextBox as table cell

2012-12-12 Thread Ande
Hi Jorge Vasquez,

I tried to follow your solution, but I can not figure out what this method 
does:

  implementarEstilos(suggestBox);
>
 
Also I have no idea where you retrieve the popupStyleName in this line:

if(popupStyleName.equals(classNameLastChild)) {
>


greetings
Ande
 

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



How to add a check-all checkbox for cell table?

2012-11-12 Thread Thomas Frisch
I have a Cell Table of which the last column is a checkbox. I would like to 
add a Check-All-Box as a footer that when clicked selects every checkbox 
for every row. Somehow it won't work here is what I got so far:

private Header initFooterUnSelectAll(){

ValueUpdater updater = new ValueUpdater() {
@Override
public void update(Boolean value) {
for (Object task : getVisibleItems())
task.setSelected(value);

selectAllValue = value;
}
};

Header footer = new CheckboxFooter(updater) {
@Override
public Boolean getValue() {
return selectAllValue;
}
};  
return footer;}



private void addColumn() {...

 //Header
 Header header = new Header(new TextCell()) {
  @Override
  public String getValue() {
  return "HEADER";
  }
 }; 

 addColumn(COLUMN, header, footerSelectAll());

Does anyone know what I'm doing wrong?

-- 
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/-/0PeWIR5OxakJ.
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: Problem with SuggextBox as table cell

2012-11-06 Thread jorge vasquez
Hi Christian Pelster ,I watched your code , because I need implement some 
similar and I could solved your problem , you should modify the method 
updateViewData
 some like this:

 private String updateViewData(final Context context, final Element parent, 
final ViewData viewData,
  final boolean isEditing, final NativeEvent event) {
deleteLastPopup ();
//final InputElement input = (InputElement) parent.getFirstChild();
final InputElement input = getInputElement(parent);
final String value = input.getValue();
viewData.setText(value);
viewData.setEditing(isEditing);

SuggestBox suggestBox = suggestBoxes.get(getKeyFromKontext(context));
//suggestBox.removeFromParent();
if (suggestBox != null) {
  suggestBox.setText(value);
  
  textBox = new MyTextBox(input);
  suggestBox = new SuggestBox(suggestBox.getSuggestOracle(), textBox);
  
  implementarEstilos(suggestBox);
  DomEvent.fireNativeEvent(event, textBox);
  
  
}
suggestBox.setFocus(true);
return value;
  }
you should call a new  textBox = new MyTextBox(input); because with this he 
can found the coordenates where will show the results, also you should add 
a method deleteLastPopup which delete the last popup of results showed.
this is the method :


private void deleteLastPopup () {
Element popupEmpresaServicio 
=(Element)Document.get().getBody().getLastChild();
String classNameLastChild=popupEmpresaServicio.getClassName();
if(popupStyleName.equals(classNameLastChild)) {
  
Document.get().getBody().removeChild(Document.get().getBody().getLastChild());
}
  }

always the popup is created in the last part of the code generated there we 
can found (in my case i can found for the classname) and delete , then the 
new result will be show

I found other thing which need solve , for show the suggestbox better , if 
you found others fix or solutions for solve you can put here for improve 
the code :D
regards,

Jorge Vasquez

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



Custom Cell in Table

2012-10-24 Thread furious_panda
Hi all,

I'm new in GWT and I want to create* a table with custom cell.*

I want to do a custom cell similar to the gwt examples : 
http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList

The difference is each row, I have for example 5 columns, and each cell 
must be a custom cell who is initialized with different data.

Each column of each row have'nt relation.

for example: 

I have a list of cars (Lamborghini aventador, Ferrari F400, Ferrari 
california, Porsche  911, Lamborghini reventon, Lamborghini gallardo, 
etc...)

In one row, I have 5 column, I want to display 5 cars in first row, and 
five others in second one, etcand I want to include a pagination on my 
table.

Each cell (row, column), must display one car with the following 
informations:

   - Name of the car
   - Image of the car
   - and other informations

Can anyone help me and indicate how do this ?

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/-/7CrJ4nY-XlgJ.
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: default table button style outside a table

2012-10-03 Thread Raymond Cidad
And the same style is applied when you put a button inside a panel. 


On Wednesday, October 3, 2012 9:58:55 AM UTC-4, Raymond Cidad wrote:
>
> hey there, 
>
> When you use a button inside a cellTable, it gets a style from the default 
> cellTable style. 
>
> When you use a button outside that, it uses another style.
>
> How can I use that same style outside the table?
>
> I'm using UiBinder ui.xml and putting all my css there. 
>
> thanks
>
>
>

-- 
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/-/3pHOf0dw1hIJ.
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.



default table button style outside a table

2012-10-03 Thread Raymond Cidad
hey there, 

When you use a button inside a cellTable, it gets a style from the default 
cellTable style. 

When you use a button outside that, it uses another style.

How can I use that same style outside the table?

I'm using UiBinder ui.xml and putting all my css there. 

thanks


-- 
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/-/l6FA3K0KPiYJ.
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: GWT tree table data grid?

2012-10-02 Thread Nuno Gonçalves
 I'm also searching for this.

On Thursday, January 26, 2012 10:11:06 PM UTC, CRISTI Stamate wrote:
>
> Can anyone tell me if exist in GWT the tree table data gid component? 
>
> I mean by tree table data grid a component that is: 
> - data grid like in GWT 2.4 (fixed header and footer and scrollable 
> content). 
> - content like CellTree (each row can be a tree node). 
>
> If didn't already exist in GWT 2.4 can be an option for GWT 2.5 ...? 
>
> Thank you in advanced. 
> CRISTI

-- 
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/-/KbjRaklvwx4J.
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: How to dynamically resize the table width after adding/removing columns?

2012-09-20 Thread Andrei
If you want the width of the DataGrid to change, set width of all columns in 
pixels, and use setWidth() on your DataGrid after each change.

If you want the width to be constant (a better option from the UI perspective, 
in my opinion), set the width of your DataGrid once and set width of at least 
one column in percentages. After you add or remove columns DataGrid will 
automatically resize columns to fit its width.

Minimum width setting is useful when you set width of your DataGrid as a 
percentage of its parent widget or add it to a layer of a resizable panel. When 
a browser window (or other content) forces DataGrid to change its size, it will 
automatically resize its columns until it hits the minimum width, at which 
point a horizontal scrollbar will appear and columns will not be resized 
anymore.

-- 
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/-/Gd0NmY4Cm94J.
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: How to dynamically resize the table width after adding/removing columns?

2012-09-20 Thread James
I have the same request. Can somebody answer this question?


James

On Wednesday, June 27, 2012 5:32:08 PM UTC-4, javadev79 wrote:
>
> How do I ensure the datagrid expands to the total columns width or shrinks 
> to the minimum table width on adding/removing columns?
>
> Using refreshColumnWidths() after add/remove columns has no effect.
>

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



Table with horizontal header

2012-09-12 Thread Andrei
If you don't mind the first column scrolling out of the view, then just add 
style to the first column. 

Any other solution is many times more complicated: a FlowPanel with special CSS 
settings that houses two DataGrids side by side with fixed row heights (or 
special logic to sync heights of all rows), and a resize handler. I am not sure 
this is worth your time to simply avoid situations when the first column is 
scrolled out of the view.

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



Table with horizontal header

2012-09-12 Thread Poalo Pacussi
Hi folks,

as far as I read the documentation and read some blogposts, I could not 
find a hint on built-in support for a horizontal header (header cells on 
the left side of the table). Am I mistaken? If not what would you suggest 
to be the easiest/correct way to implement such a feature? First thing that 
comes to my mind is using the first column with some special styling.

Best regards

-- 
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/-/ujiu8YVuhMUJ.
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: Clear Cell table data

2012-09-03 Thread Kara Marie Rawson
try updating your row count and row data.

getDataGrid().setRowCount(getDataCount(), true);
getAsyncDataProvider().updateRowCount(getDataCount(),
getAsyncDataProvider().updateRowData(getOffset(), getDataList());

rather then using my async provider you would get your list provider or
whatever else. This provider is bound to the cell table (datagrid and cell
table are the same thing for the most part.)

kara

On Tue, Aug 28, 2012 at 10:28 AM, lucky  wrote:

> Can any one help me on this?
>
> On Monday, 11 June 2012 21:13:45 UTC+5:30, lucky wrote:
>>
>> How to clear celltable data when i click on the Button 'Clear'?
>>
>> i tried with cellTable.setRowCount(0);
>> and
>> private void clearTable() {
>> if (dataProvider.getDataDisplays(**) != null &&
>> dataProvider.getDataDisplays()**.isEmpty() == false) {
>> dataProvider.**removeDataDisplay(cellTable);
>> }
>>
>> 
>> cellTable.**setVisibleRangeAndClearData(**resultListGrid.**getVisibleRange(),
>> true);
>>
>> }
>>
>> but this is not working for me.
>>
>> Could you please tell me did i do any thing wrong ?
>> or let me know the best way to clear the cellTable data
>>
>> 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/-/9c-T_-LkYvwJ.
> 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.
>

-- 
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: Clear Cell table data

2012-08-30 Thread Thad
I create an empty ArrayList of my data and assign it to my CellTable:

data = new ArrayList();
...
hexArea.setRowCount(data.size(), true);
hexArea.setRowData(0, data);

There may well be better ways (there is *so much* to understand about cell 
views).

On Tuesday, August 28, 2012 10:28:26 AM UTC-4, lucky wrote:
>
> Can any one help me on this?
>
> On Monday, 11 June 2012 21:13:45 UTC+5:30, lucky wrote:
>>
>> How to clear celltable data when i click on the Button 'Clear'?
>>
>> i tried with cellTable.setRowCount(0);
>> and
>> private void clearTable() {
>> if (dataProvider.getDataDisplays() != null && 
>> dataProvider.getDataDisplays().isEmpty() == false) {
>> dataProvider.removeDataDisplay(cellTable);
>> }
>>
>> 
>> cellTable.setVisibleRangeAndClearData(resultListGrid.getVisibleRange(), 
>> true);
>> 
>> }
>>
>> but this is not working for me.
>>
>> Could you please tell me did i do any thing wrong ?
>> or let me know the best way to clear the cellTable data
>>
>> 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/-/x7mbhHnFpicJ.
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: Clear Cell table data

2012-08-28 Thread lucky
Can any one help me on this?

On Monday, 11 June 2012 21:13:45 UTC+5:30, lucky wrote:
>
> How to clear celltable data when i click on the Button 'Clear'?
>
> i tried with cellTable.setRowCount(0);
> and
> private void clearTable() {
> if (dataProvider.getDataDisplays() != null && 
> dataProvider.getDataDisplays().isEmpty() == false) {
> dataProvider.removeDataDisplay(cellTable);
> }
>
> 
> cellTable.setVisibleRangeAndClearData(resultListGrid.getVisibleRange(), 
> true);
> 
> }
>
> but this is not working for me.
>
> Could you please tell me did i do any thing wrong ?
> or let me know the best way to clear the cellTable data
>
> 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/-/9c-T_-LkYvwJ.
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.



Problem with SuggextBox as table cell

2012-08-24 Thread Christian Pelster
Hi all,

I'm currently evaluating the possibility to use a SuggestBox as a table 
cell. As a proof of concept I copied the code from EditTextCell and added 
the creation of the SuggestBox to the edit method (please ignore the  map 
holding all SuggestBox instances, this is just for debugging purposes):

---
protected void edit(Context context, Element parent, String value)
{
setValue(context, parent, value);
InputElement input = getInputElement(parent);

input.focus();
input.select();

if (!suggestBoxes.containsKey(getKeyFromKontext(context)))
{
TextBox textBox = new MyTextBox(input);

parent.replaceChild(input, textBox.getElement()).getOwnerDocument();

SuggestBox suggestBox = new SuggestBox(getSuggestOracle(), textBox);
suggestBoxes.put(getKeyFromKontext(context), suggestBox);
}
 }
---

All relevant browser events are rerouted to the TextBox contained in the 
SuggestBox and it works like a charm, except for one little detail, that 
drives me crazy. The first activated SuggestBox (no matter which row) is 
always drawn on the upper left corner of the page, the second and all 
others ones a drawn correctly below the textbox. The problem seems to 
reside inside the PopupPanel around line 1191:

---
int textBoxOffsetWidth = relativeObject.getOffsetWidth();
---

for the first Box, relativeObject.getOffsetWidth() always returns zero. 

I attached a hopefully working example, any hints on this?

Regards,

   Pelle

-- 
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/-/t-ZHJmlcerAJ.
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.



import java.util.ArrayList;

import com.google.gwt.cell.client.FieldUpdater;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.view.client.ListDataProvider;
import com.google.gwt.view.client.SingleSelectionModel;

public class CellTableTest implements EntryPoint
{
	public class SomeDTO
	{
		private String a;

		public SomeDTO(String a)
		{
			this.a = a;
		}

		public String getA()
		{
			return a;
		}

		public void setA(String a)
		{
			this.a = a;
		}

	}

	private void addColumns(CellTable cellTable)
	{
		Column colA = new Column(new SuggestCell())
		{
			@Override
			public String getValue(SomeDTO object)
			{
return object.getA();
			}
		};
		colA.setFieldUpdater(new FieldUpdater()
		{
			@Override
			public void update(int index, SomeDTO object, String value)
			{
			}
		});
		
		cellTable.addColumn(colA, "Column A");
	}


	private ArrayList getData()
	{
		ArrayList tableData = new ArrayList();
		tableData.add(new SomeDTO("AAA"));
		tableData.add(new SomeDTO("BBB"));
		tableData.add(new SomeDTO("CCC"));
		tableData.add(new SomeDTO("DDD"));
		tableData.add(new SomeDTO("EEE"));
		return tableData;
	}

	@Override
	public void onModuleLoad()
	{
		CellTable cellTable = new CellTable();
		cellTable.setSelectionModel(new SingleSelectionModel());

		addColumns(cellTable);

		ListDataProvider listDataProvider = new ListDataProvider();
		listDataProvider.setList(getData());
		listDataProvider.addDataDisplay(cellTable);

		RootPanel.get().add(cellTable);

	}

}

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.google.gwt.cell.client.AbstractEditableCell;
import com.google.gwt.cell.client.ValueUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.DomEvent;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.client.SafeHtmlTemplates.Template;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.text.shared.SafeHtmlRenderer;
import com.google.gwt.text.shared.SimpleSafeHtmlRenderer;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SuggestBox;
import com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay;
import com.google.gwt.user.client.ui.SuggestOracle;
import com.google.gwt.user.client.ui.TextBox;

public class SuggestCell extends AbstractEditableCell
{

	private class MyTextBox extends TextBox
	{
		public MyTextBox(Element element)
		{
			super(element);
		}
	}

	interface Template extends SafeHtmlTemplates
	{
		@Template("")
		SafeHtml input(

CellTable - ListDataProvider - Table not updating on subsequent calls

2012-08-04 Thread Alfredo Quiroga-Villamil
I am still investigating here on my side, but I have a feeling I might
be missing the obvious so if someone knows what I am missing or
potentially doing wrong please let me know.

Elements:

- A CellTable
- A ListDataProvider
- RequestFactory
- A "refresh" button

Scenario:

- The CellTable is populated via RequestFactory.
- On the first load, all data is shown in the table (all rows are populated)
- I have a button (refresh).
- The Table can be edited, so as an example I edit the first row,
first cell and simply change the text to something else.
- I click on the refresh button and load a brand new list of proxies
from the server using request factory.
- I clear my provider's list and add the new proxies.
- The new list doesn't replace the old values (previously edited).

Curiosity:

I've noticed that after I click refresh, although at first glance the
edited cell didn't change, if I click on it once or twice, it'll
correctly display the last value loaded from the server. This is very
unusual behavior. I've also tried to invoke refresh and flush on the
provider itself after adding the new set of proxies.

Presenter's code that is invoked for the first load and subsequent
ones is shown below:

@Override
public void readAll() {

destinationContext = 
factory.getRequestFactory().createDestinationContext();
destinationContext.findAll().with("cards", "cards.trunks",
"daysOfWeek", "daysOfWeek.hourlySchedule", "holidays")
.fire(new Receiver>() {

@Override
public void 
onSuccess(List proxies) {


view.getDestinationCellTable().getProvider().getList().clear();

view.getDestinationCellTable().getProvider().getList().addAll(proxies);

if (proxies != null && 
proxies.size() > 0) {

view.getDestinationCellTable().getCellTable().getSelectionModel().setSelected(proxies.get(0),
true);
}

}

});

}

I am still investigating here, but as I previously said if you see
that I am simply missing the obvious I would appreciate it if you can
let me know.

Thank you in advance,

Alfredo

-- 
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

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



  1   2   3   4   5   6   >