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.


Re: GWT React preview release on Maven Central

2016-05-13 Thread Paul Stockley
The problem I've got is that I need to pass the -generateJsInteropExports flag. 
The plugin doesn't support this.

On Friday, May 13, 2016 at 10:40:15 AM UTC-4, Paul Stockley wrote:
>
> I have pushed preview versions of gwt-react, gwt-react-router and 
> gwt-redux to Maven Central. Check out the documentation for details. 
> https://github.com/GWTReact
>
> Soon I hope to have a Gradle build file to make it easy to try out the 
> examples. I am just working around some issues with the Gradle gwt plugin 
> and GWT 2.8
>
> My next priority is to finish the MobX integration and then work on 
> stabilizing the interface towards a 1.0 release. Our company will start 
> using gwt-react and gwt-mobx in a production application within the next 4 
> months. I am sure this will flush out any issues relatively quickly.
>

-- 
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: GWT React preview release on Maven Central

2016-05-13 Thread Michael Joyner
 GWT Gradle plugin:

This works for us for 2.8BETA

gwt {
logLevel = 'INFO'

maxHeapSize = "1024M";

gwtVersion='2.8.0-beta1'

modules 'com.newsrx.ButterAdmin'

//jsInteropMode = "JS"

compiler {
disableClassMetadata = false;
enableClosureCompiler = false;
strict = true;
style = "OBF";
localWorkers = 1;
}

superDev {
noPrecompile = false;
failOnError = false;
bindAddress = "0.0.0.0";
}

eclipse {
addGwtContainer = false;
}
}

We use this in combination with gretty for running under tomcat:

war {
archiveName 'ContextName.war'
}

gretty {
port = 8080;
servletContainer = 'tomcat7'
managedClassReload = false
extraResourceBase 'build/gwt/out'
}

and dependencies:

dependencies {
providedCompile 'com.google.gwt:gwt-servlet:'+gwt.gwtVersion // we
don't use gwt RPC, so providedCompile prevents unwanted gwt jar in war
gwt 'com.google.gwt:gwt-user:'+gwt.gwtVersion
}



On 05/13/2016 10:40 AM, Paul Stockley wrote:

I have pushed preview versions of gwt-react, gwt-react-router and gwt-redux
to Maven Central. Check out the documentation for details.
https://github.com/GWTReact
Soon I hope to have a Gradle build file to make it easy to try out the
examples. I am just working around some issues with the Gradle gwt plugin
and GWT 2.8
My next priority is to finish the MobX integration and then work on
stabilizing the interface towards a 1.0 release. Our company will start
using gwt-react and gwt-mobx in a production application within the next 4
months. I am sure this will flush out any issues relatively quickly.
-- 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.

-- 
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: GWT React preview release on Maven Central

2016-05-13 Thread Juan Pablo Gardella
Thanks for sharing!

On Fri, 13 May 2016 at 09:40 Paul Stockley  wrote:

> I have pushed preview versions of gwt-react, gwt-react-router and
> gwt-redux to Maven Central. Check out the documentation for details.
> https://github.com/GWTReact
>
> Soon I hope to have a Gradle build file to make it easy to try out the
> examples. I am just working around some issues with the Gradle gwt plugin
> and GWT 2.8
>
> My next priority is to finish the MobX integration and then work on
> stabilizing the interface towards a 1.0 release. Our company will start
> using gwt-react and gwt-mobx in a production application within the next 4
> months. I am sure this will flush out any issues relatively quickly.
>
> --
> 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.
>

-- 
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 React preview release on Maven Central

2016-05-13 Thread Paul Stockley
I have pushed preview versions of gwt-react, gwt-react-router and gwt-redux 
to Maven Central. Check out the documentation for details. 
https://github.com/GWTReact

Soon I hope to have a Gradle build file to make it easy to try out the 
examples. I am just working around some issues with the Gradle gwt plugin 
and GWT 2.8

My next priority is to finish the MobX integration and then work on 
stabilizing the interface towards a 1.0 release. Our company will start 
using gwt-react and gwt-mobx in a production application within the next 4 
months. I am sure this will flush out any issues relatively quickly.

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


Javadoc from jsinterop annotations

2016-05-13 Thread Dmitry Skavish
hi everyone,

I am curious if it's possible to generate some kind of documentation
only from jsinterop annotations?

I mean is it possible now or I have to do it myself?

-- 
Dmitry Skavish

-- 
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: Abridged summary of google-web-toolkit@googlegroups.com - 2 updates in 2 topics

2016-05-13 Thread 'Marcius Brandão' via GWT Users
Por favor, me tirem dessa lista. O email
google-web-toolkit+unsubscr...@googlegroups.com. não funciona.

2016-05-13 10:05 GMT-03:00 :

> google-web-toolkit@googlegroups.com
> 
>  Google
> Groups
> 
> 
> Today's topic summary
> View all topics
> 
>
>- Sourcemaps with sso linker <#m_1476591876261469878_group_thread_0> - 1
>Update
>- MaterialSearch - issues <#m_1476591876261469878_group_thread_1> - 1
>Update
>
> Sourcemaps with sso linker
> 
> Dmitry Skavish : May 12 01:38PM -0400
>
> Thanks Thomas! Looks like the url is not inserted if I use sso linker.
> Is it known issue?
>
>
> --
> Dmitry Skavish
> ...more
> 
> Back to top <#m_1476591876261469878_digest_top>
> MaterialSearch - issues
> 
> Velusamy Velu : May 12 07:25AM -0700
>
> My fault, sorry for the inconvenience, I will make sure this doesn't
> happen
> again.
>
> On Wednesday, May 11, 2016 at 1:18:32 PM UTC-4, Mike Warne wrote:
> ...more
> 
> Back to top <#m_1476591876261469878_digest_top>
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page
> 
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
>



-- 
Marcius Brandão

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