Re: Use SuggestBox suggestions in another widget

2013-07-02 Thread Johannes Barop
Hi,

the best code to refer is the source code of SuggestBox itself.

Having a look at this constructor you'll notice an interface SuggestionDisplay. 
The default implementation uses a MenuBar to display a list of text items. You 
can easily implement any custom rendering by implementing this interface and 
passing it to the SuggestBox's constructor.


Cheers,
Johannes


Am 02.07.2013 um 23:49 schrieb rahul neekhra :

> Thanks Kartik...
> with "Customized Display" u mean a simple panel right? or its diff widget.
> And also i donnot need the suggestion which we usually(like google search) 
> show in suggest box instead i need to show it in seprate panel. how can I 
> refresh my suggestion all the time in another panel when we type in suggest 
> box?
> please refer some code if you can.
>  
> Thanks
> Rahul
> 
> On Tuesday, 2 July 2013 15:49:13 UTC-4, Kartik Suba wrote:
> Hey you can easily make Customized Suggestion box and also a Customized 
> Display associated with it that will show the suggestions in the panel where 
> ever it is. I have already implemented a Custom Suggest box as I wanted the 
> SuggestionList to be displayed even when nothing is entered. So that I can 
> easily extend and incorporate your functionality. Do try making customized 
> one altogether. Do let me know if you needa code for reference. 
> 
> Kartik...
> 
> On Tuesday, 2 July 2013 03:26:50 UTC+5:30, rahul neekhra wrote:
> I need similar thing, but in my case i want to hide the suggestion from text 
> box and need to list them in seprate Panel with additional info.
> How we have achieve it?
>  
> Regards
> Rahul
> 
> On Tuesday, 16 June 2009 13:56:08 UTC-4, Josh wrote:
> Hi, 
> 
> I have been trying to think of a good way to add a specific feature to 
> my application to search through a list of data, but can't figure 
> anything out.  Here is what I would like: 
> 
> The interface would be a suggest box, and a vertical panel, or grid of 
> some sort with data. 
> 
> Initially all of the options are shown, as links, in the vertical 
> panel/grid.  When the user starts to type in the SuggestBox, not only 
> does the normal SuggestBox functioanlity occur, but also the panel/ 
> grid of all data updates as well to only have entries that match the 
> users input. 
> 
> Is this possible? 
> 
> Thanks, 
> Josh 
> 
> -- 
> 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: Memory growth in GWT Compiler

2013-07-02 Thread Ranjith Chungath
I compiled it with 2GB without memory dumping and as you 
mentioned, System.gc() was called and the graph was uniform similar to my 
second graph.
 
Thanks,
Ranjith
 

On Saturday, June 29, 2013 6:30:22 PM UTC+5:30, Jens wrote:

> Should GWT be calling System.gc() by default after each permutation 
>> compile so that the heap does not grow? (Right now it does that only with 
>> the -Dgwt.memory.usage option) 
>
>
> GWT calls System.gc() multiple times in order to give you more accurate 
> memory statistics. GWT just wants to make sure that when it prints out 
> stats for permutation 2 that there is no garbage left in memory from 
> permutation 1 as this would distort the statistic.
>
> Other than that GWT should not call the garbage collector after each 
> permutation as it only costs additional time and doesn't buy you a lot. 
> Sure your first graph without System.gc() does not look that uniform like 
> the second graph, but it doesn't mean that you need more memory for 
> compilation if you dont call System.gc(). 
> What your first graph does not show is that the JVM will garbage collect 
> on its own all the garbage left in memory from the previous permutations if 
> there is not enough space anymore in the heap. But in your example there is 
> enough heap and thus the JVM is not forced to clean up more memory than it 
> absolutely needs to.
> Before a JVM needs to throw an OutOfMemoryException if will absolutely try 
> everything to free up as much memory as possible. 
>
> Try to run your compilation with 2GB heap and without memory dumping. 2GB 
> is slightly below your highest peak in the first graph. Then compare the 
> result to your first graph which has used 3GB heap. I would bet that 
> compilation still works and you will see a slightly different graph at the 
> end of the compilation because the JVM is forced to do a bit more garbage 
> collection on its own.
>
> -- 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.




How to get Map InfoWindow Scrollbar to show

2013-07-02 Thread Matt Nolan
I'm using java for a map application, and I have a rather long string to be 
shown in an infowindow.  The window that displays overflows and overlays 
the map while the infowindow is open.  I'm wondering how I can add a 
vertical scrollbar to the infowindow.

-- 
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: Remove all rows from FlexTable

2013-07-02 Thread Narasimha Aditya Gollapudi
You could use myFlexTable.removeAllRows()

On Thursday, 2 October 2008 00:55:15 UTC-7, hezjing wrote:
>
> Hi
>
> I'm populating a FlexTable using setText(row, column, text).
>
> Here is what I did to clear the entire contents of a FlexTable,
>
> int count = myFlexTable.getRowCount();
> for (int i = 0; i < count; i++) {
> myFlexTable.removeRow(i);
> }
>
> Is there a more elegant way to clear a FlexTable?
>
> Thank you!
>
>
> -- 
>
> Hez
>  

-- 
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: Use SuggestBox suggestions in another widget

2013-07-02 Thread rahul neekhra
Thanks Kartik...
with "Customized Display" u mean a simple panel right? or its diff widget.
And also i donnot need the suggestion which we usually(like google search) 
show in suggest box instead i need to show it in seprate panel. how can I 
refresh my suggestion all the time in another panel when we type in suggest 
box?
please refer some code if you can.
 
Thanks
Rahul

On Tuesday, 2 July 2013 15:49:13 UTC-4, Kartik Suba wrote:

> Hey you can easily make Customized Suggestion box and also a Customized 
> Display associated with it that will show the suggestions in the panel 
> where ever it is. I have already implemented a Custom Suggest box as I 
> wanted the SuggestionList to be displayed even when nothing is entered. So 
> that I can easily extend and incorporate your functionality. Do try making 
> customized one altogether. Do let me know if you needa code for reference.  
>
> Kartik...
>
> On Tuesday, 2 July 2013 03:26:50 UTC+5:30, rahul neekhra wrote: 
>>
>> I need similar thing, but in my case i want to hide the suggestion from 
>> text box and need to list them in seprate Panel with additional info.
>> How we have achieve it?
>>  
>> Regards
>> Rahul
>>
>> On Tuesday, 16 June 2009 13:56:08 UTC-4, Josh wrote:
>>
>>> Hi, 
>>>
>>> I have been trying to think of a good way to add a specific feature to 
>>> my application to search through a list of data, but can't figure 
>>> anything out.  Here is what I would like: 
>>>
>>> The interface would be a suggest box, and a vertical panel, or grid of 
>>> some sort with data. 
>>>
>>> Initially all of the options are shown, as links, in the vertical 
>>> panel/grid.  When the user starts to type in the SuggestBox, not only 
>>> does the normal SuggestBox functioanlity occur, but also the panel/ 
>>> grid of all data updates as well to only have entries that match the 
>>> users input. 
>>>
>>> Is this possible? 
>>>
>>> Thanks, 
>>> Josh 
>>>
>>

-- 
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: GWT website moved to gwtproject.org

2013-07-02 Thread maticpetek
Hi,
  Great work. Maybe Google should include some links also 
on developers.google.com for GWT (gwtproject.org) - like they do for Dart. 
For example :
1) https://developers.google.com/ -> page footer -> "Other references"
2) https://developers.google.com/ -> "Products" -> "Web developer" -> left 
menu. It their is place for Dart, it should be also for GWT. 

Regards,
   Matic
--
GWT stuff twitter  - http://twitter.com/#!/gwtstuff


On Tuesday, July 2, 2013 10:57:49 PM UTC+2, Daniel Kurka wrote:
>
> Today we finally flipped the switch and moved all the GWT content from 
> developers.google.com to gwtproject.org. The old homepage will redirect 
> to gwtproject.org so there should be no broken links. However if you 
> encounter any missing content or broken links please file a 
> bug
> .
>
> Why did we do this?
>
> GWT is now an open source project and we wanted to enable people to 
> contribute to the website and documentation as well. Since 
> developers.google.com can only be updated by Google employees we needed 
> another home.
>
> - Daniel, on behalf of the GWT team

-- 
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: GWT website moved to gwtproject.org

2013-07-02 Thread Francesco Izzi
+1 Daniel


2013/7/2 Daniel Kurka 

> Today we finally flipped the switch and moved all the GWT content from
> developers.google.com to gwtproject.org. The old homepage will redirect
> to gwtproject.org so there should be no broken links. However if you
> encounter any missing content or broken links please file a 
> bug
> .
>
> Why did we do this?
>
> GWT is now an open source project and we wanted to enable people to
> contribute to the website and documentation as well. Since
> developers.google.com can only be updated by Google employees we needed
> another home.
>
> - Daniel, on behalf of the GWT team
>
> --
> 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.
>
>
>



-- 
Francesco Izzi
CNR - IMAA
geoSDI
Direzione Tecnologie e Sviluppo

C.da S. Loja
85050  Tito Scalo - POTENZA (PZ)
Italia

phone:  +39 0971427310
fax:  +39 0971 427271
mob:+39 3666373172
mail: francesco.i...@geosdi.org
skype:  neofx8080

web: http://www.geosdi.org

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




GWT website moved to gwtproject.org

2013-07-02 Thread Daniel Kurka


Today we finally flipped the switch and moved all the GWT content from 
developers.google.com to gwtproject.org. The old homepage will redirect to 
gwtproject.org so there should be no broken links. However if you encounter 
any missing content or broken links please file a 
bug
.

Why did we do this?

GWT is now an open source project and we wanted to enable people to 
contribute to the website and documentation as well. Since 
developers.google.com can only be updated by Google employees we needed 
another home.

- Daniel, on behalf of the GWT team

-- 
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: RPC AsyncCallback freezes chrome

2013-07-02 Thread Ed
Can you please isolate your problem in a stand alone gwt app?
If it then still occurs, could you please submit it as an gwt issue in the 
issue tracker?
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: Use SuggestBox suggestions in another widget

2013-07-02 Thread Kartik Suba
Hey you can easily make Customized Suggestion box and also a Customized 
Display associated with it that will show the suggestions in the panel 
where ever it is. I have already implemented a Custom Suggest box as I 
wanted the SuggestionList to be displayed even when nothing is entered. So 
that I can easily extend and incorporate your functionality. Do try making 
customized one altogether. Do let me know if you needa code for reference. 

Kartik...

On Tuesday, 2 July 2013 03:26:50 UTC+5:30, rahul neekhra wrote:
>
> I need similar thing, but in my case i want to hide the suggestion from 
> text box and need to list them in seprate Panel with additional info.
> How we have achieve it?
>  
> Regards
> Rahul
>
> On Tuesday, 16 June 2009 13:56:08 UTC-4, Josh wrote:
>
>> Hi, 
>>
>> I have been trying to think of a good way to add a specific feature to 
>> my application to search through a list of data, but can't figure 
>> anything out.  Here is what I would like: 
>>
>> The interface would be a suggest box, and a vertical panel, or grid of 
>> some sort with data. 
>>
>> Initially all of the options are shown, as links, in the vertical 
>> panel/grid.  When the user starts to type in the SuggestBox, not only 
>> does the normal SuggestBox functioanlity occur, but also the panel/ 
>> grid of all data updates as well to only have entries that match the 
>> users input. 
>>
>> Is this possible? 
>>
>> Thanks, 
>> Josh 
>>
>

-- 
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: How to avoid freezing with CellTable?

2013-07-02 Thread Kartik Suba
Hey you can use the pagination that is available with the cell table. Also 
I have also implemented a more functionality that loads for example 25 
records and when the scroll reaches it lower bottom i again load 25 and 
append more in the same table. The problem when there is more data is not 
because the call it taking time, but as everything is javascript the 
browser overloads and hangs. So see if this could help. Do mail me again if 
you need the more function as a reference.

Please let me know if you find this info useful. :)

Kartik..

On Monday, 1 July 2013 23:28:02 UTC+5:30, sebastie...@isen-lille.fr wrote:
>
> Hi everybody,
> I'm creating a website with GWT. I want to add CellTable into my project. 
> The problem is that I have a lot of data to put into the tables. So, my 
> website freeze and show my table after 2-3 minutes. 
>
> I find on internet that multi-threads are impossible with GWT. So, what is 
> the solution? Even if the user have to wait 2-3 minutes, I want to avoid 
> the fact that it's freezing.
>
> Any Ideas?
>
> Thank you.
>
> My code, maybe I can optimize it simply?
>
> public void refreshTable(final ArrayList arrListFilters, final 
> ArrayList arrListAll, String url) {
>
> // Get the CQ result
> RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
>
> try {
> Request response = builder.sendRequest(null, new RequestCallback() {
> public void onError(Request request, Throwable exception) {
> }
>
> public void onResponseReceived(Request request, Response response) {
> final json json = JsonUtils.unsafeEval(response.getText());
>
> int i = 0;
> int j = 0;
> int tot;
>
> // If there are too many results
> if (json.getResultslength() > 1) {
> tot = 1;
> } else {
> tot = json.getResultslength();
> }
>
> // Fill the list of rows
> while (j < tot) {
> i = 1;
> List rowTemp = new ArrayList();
> rowTemp.add(json.getDate(j));
> // Get the data to get a price result for a specific
> // customer query
> arrListLnNb.add(json.getLineNb(j));
> arrListId.add(json.getId(j));
> arrListCqid.add(json.getCqid(j));
> while (i < arrListFilters.size()) {
> rowTemp.add(json.getResults(j, arrListAll.indexOf(arrListFilters.get(i;
>
> i = i + 1;
> }
> rowTemp.add("");
> rows.add(rowTemp);
> j = j + 1;
>
> }
>
> // Provide rows to the table
> table.setRowCount(rows.size(), true);
> table.setRowData(0, rows);
>
> final ListDataProvider> provider = new 
> ListDataProvider>(rows);
>
> provider.addDataDisplay(table);
>
> // Handler to sort the columns
> List> list1 = provider.getList();
>
> ListHandler> columnSortHandler = new 
> ListHandler>(list1);
> i = 0;
> while (i < table.getColumnCount()) {
> final int columnIndex = i;
> columnSortHandler.setComparator(table.getColumn(i), new 
> Comparator>() {
> public int compare(List o1, List o2) {
>
> if (o1 == o2) {
> return 0;
> }
>
> // Compare the name columns.
> if (o1 != null) {
> return (o2 != null) ? o1.get(columnIndex).compareTo(o2.get(columnIndex)) : 
> 1;
> }
> return -1;
>
> }
> });
>
> i = i + 1;
> }
>
> table.addColumnSortHandler(columnSortHandler);
>
> i = 0;
> while (i < table.getColumnCount()) {
> table.getColumnSortList().push(table.getColumn(i));
> i = i + 1;
> }
> }
>
> });
> } catch (RequestException e) {
> }
> }
>

-- 
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: RF, ServiceLayerDecorator : The domain type com.test.persistance.entites.base.BaseTest cannot be sent to the client

2013-07-02 Thread Thomas Broyer
IIUC, in your resolveClientType, when called with Test.class will pass 
BaseTest.class down the chain, and you have no proxy associated with 
BaseTest (MvtProxy is associated with the Test class)

I have no idea what your decorator is meant to do; as it is, it seems more 
harmful than helpful.

On Tuesday, July 2, 2013 2:19:09 PM UTC+2, aurelie...@gmail.com wrote:
>
> Hi there,
>
> Sorry about this long question.
>
> I do experience some difficulties playing with GWT RF. ( *keywords*: Gwt 
> ,Hibernate, Valueproxy, Locator, ServiceLayerDecorator)
> i am beginner level.
> Will try to be as accurate as possible but i probably may have 
> misunderstood a couple of things and some typo errors can appear because 
> code is simplified.
>
> In brief, when RF is trying to send datas back to the client, i 've got an 
> error.
>
> com.google.web.bindery.requestfactory.server.UnexpectedException: The 
>> domain type com.test.persistance.entites.base.BaseTest cannot be sent to 
>> the client
>> at 
>> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
>> at 
>> com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveClientType(ResolverServiceLayer.java:91)
>> at 
>> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
>> at 
>> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
>> at 
>> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
>> at 
>> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
>> at com.test.server.MyDecorator.resolveClientType(MyDecorator.java:22
>>
>
> Call is made by
>
> requestFactory.createMvtRequest()
>> .findAllMvts()
>> .fire(rec);
>>
>  
> Receiver used  ( extract )
>
> Receiver> rec = new Receiver>()
>> {  public void onSuccess (List mvts) 
>>
>
> *In details :*
> *Client Side *
>
>-  Widget
>-  Factory  @Service(value = MvtService.class, locator = 
>MvtServiceLocator.class)
>-  MvtProxy as ValueProxy( @ProxyFor(value = Test.class, locator = 
>MvtLocator.class) 
>
>* Persistance Side*
>
>-  Test ( public class Test extends BaseTest )
>-  BaseTest ( public class BaseTest  implements Serializable )
>
> *Server Side*
>
>- MvtService (public class MvtService)
>- MvtServiceLocator (public class MvtServiceLocator implements 
>ServiceLocator)
>- CEMMvt (public class CEMMvt)
>- MyDecorator (public class MyDecorator extends ServiceLayerDecorator)
>- MyRequestFactoryServlet (public class MyRequestFactoryServlet 
>extends RequestFactoryServlet)  Replacing RFServlet in web.xml
>
> *Others infos* 
>
> CEMMvt list() method is using a DAO to get the datas from a database and 
> returning a List. It is well populated.
>
> I previously had the same error 
> "com.google.web.bindery.requestfactory.server.UnexpectedException: The 
> domain type com.test.persistance.entites.Test cannot be sent to the client"
> Seems to be resolved by using MyDecorator but whats am i doing wrong in 
> this particular case ?
>
> Many thanks for pointing me in the right direction.
>
> Regards,
>
> pierre
> 
> *MyRequestFactoryServlet :*
>
> import 
>> com.google.web.bindery.requestfactory.server.DefaultExceptionHandler;
>> import com.google.web.bindery.requestfactory.server.RequestFactoryServlet;
>>
>> public class MyRequestFactoryServlet extends RequestFactoryServlet
>> {
>> public MyRequestFactoryServlet() {
>> super(new DefaultExceptionHandler(), new MyDecorator());
>> }
>> }
>>
>
> *MyDecorator*
>
> import com.google.web.bindery.requestfactory.server.ServiceLayerDecorator;
>> import com.google.web.bindery.requestfactory.shared.Locator;
>>
>> public class MyDecorator extends ServiceLayerDecorator {
>>
>> @Override
>> public Class> resolveLocator(Class
>> domainType) {
>> if(domainType.getName().contains("Test"))
>> return 
>> super.resolveLocator(domainType.getSuperclass());
>> return super.resolveLocator(domainType);
>> }
>>
>> @Override
>> public  Class resolveClientType(Class domainClass,
>> Class clientType, boolean required) {
>> if(domainClass.getName().contains("Test"))
>> return 
>> super.resolveClientType(domainClass.getSuperclass(),clientType, required);
>>
>> return super.resolveClientType(domainClass, 
>> clientType,required);
>> }
>>
>> }
>>
>
> *CEMMvt*
>
>   public static List list () {
>> if (mvtsDAO == null) {
>> HttpServletRequest request = 
>> RequestFactoryServlet.getThreadLocalRequest();
>> ApplicationContext c

RF, ServiceLayerDecorator : The domain type com.test.persistance.entites.base.BaseTest cannot be sent to the client

2013-07-02 Thread aurelie . virgile
Hi there,

Sorry about this long question.

I do experience some difficulties playing with GWT RF. ( *keywords*: Gwt 
,Hibernate, Valueproxy, Locator, ServiceLayerDecorator)
i am beginner level.
Will try to be as accurate as possible but i probably may have 
misunderstood a couple of things and some typo errors can appear because 
code is simplified.

In brief, when RF is trying to send datas back to the client, i 've got an 
error.

com.google.web.bindery.requestfactory.server.UnexpectedException: The 
> domain type com.test.persistance.entites.base.BaseTest cannot be sent to 
> the client
> at 
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.die(ServiceLayerDecorator.java:216)
> at 
> com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveClientType(ResolverServiceLayer.java:91)
> at 
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
> at 
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
> at 
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
> at 
> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveClientType(ServiceLayerDecorator.java:142)
> at com.test.server.MyDecorator.resolveClientType(MyDecorator.java:22
>

Call is made by

requestFactory.createMvtRequest()
> .findAllMvts()
> .fire(rec);
>
 
Receiver used  ( extract )

Receiver> rec = new Receiver>()
> {  public void onSuccess (List mvts) 
>

*In details :*
*Client Side *
   
   -  Widget
   -  Factory  @Service(value = MvtService.class, locator = 
   MvtServiceLocator.class)
   -  MvtProxy as ValueProxy( @ProxyFor(value = Test.class, locator = 
   MvtLocator.class) 
   
   * Persistance Side*

   -  Test ( public class Test extends BaseTest )
   -  BaseTest ( public class BaseTest  implements Serializable )
   
*Server Side*

   - MvtService (public class MvtService)
   - MvtServiceLocator (public class MvtServiceLocator implements 
   ServiceLocator)
   - CEMMvt (public class CEMMvt)
   - MyDecorator (public class MyDecorator extends ServiceLayerDecorator)
   - MyRequestFactoryServlet (public class MyRequestFactoryServlet extends 
   RequestFactoryServlet)  Replacing RFServlet in web.xml
   
*Others infos* 

CEMMvt list() method is using a DAO to get the datas from a database and 
returning a List. It is well populated.

I previously had the same error 
"com.google.web.bindery.requestfactory.server.UnexpectedException: The 
domain type com.test.persistance.entites.Test cannot be sent to the client"
Seems to be resolved by using MyDecorator but whats am i doing wrong in 
this particular case ?

Many thanks for pointing me in the right direction.

Regards,

pierre

*MyRequestFactoryServlet :*

import com.google.web.bindery.requestfactory.server.DefaultExceptionHandler;
> import com.google.web.bindery.requestfactory.server.RequestFactoryServlet;
>
> public class MyRequestFactoryServlet extends RequestFactoryServlet
> {
> public MyRequestFactoryServlet() {
> super(new DefaultExceptionHandler(), new MyDecorator());
> }
> }
>

*MyDecorator*

import com.google.web.bindery.requestfactory.server.ServiceLayerDecorator;
> import com.google.web.bindery.requestfactory.shared.Locator;
>
> public class MyDecorator extends ServiceLayerDecorator {
>
> @Override
> public Class> resolveLocator(Class
> domainType) {
> if(domainType.getName().contains("Test"))
> return 
> super.resolveLocator(domainType.getSuperclass());
> return super.resolveLocator(domainType);
> }
>
> @Override
> public  Class resolveClientType(Class domainClass,
> Class clientType, boolean required) {
> if(domainClass.getName().contains("Test"))
> return 
> super.resolveClientType(domainClass.getSuperclass(),clientType, required);
>
> return super.resolveClientType(domainClass, 
> clientType,required);
> }
>
> }
>

*CEMMvt*

  public static List list () {
> if (mvtsDAO == null) {
> HttpServletRequest request = 
> RequestFactoryServlet.getThreadLocalRequest();
> ApplicationContext context = 
> WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
> mvtsDAO =context.getBean(IMvtEnteteDAO.class);
>
> 
> }
> try {
> List tempList = new ArrayList();
> Map map = new HashMap();
> map.put(Test.PROP_REF_RECEP, "EXAMPLE");
> 
> List  liste = mvtsDAO.loadAllTest(map);
> 
> return liste;
> 
> } catch (PersistanceEx

Re: GWT plugin

2013-07-02 Thread Tomas Ciboch
Thank you ;) As always, Windows 8 is guilty.

Dne úterý, 2. července 2013 9:50:57 UTC+2 Thomas Broyer napsal(a):
>
>
>
> On Tuesday, July 2, 2013 8:39:24 AM UTC+2, Tomas Ciboch wrote:
>>
>> Hi, 
>> I cant install gwt plugin from web store on my chrome. It says me that my 
>> computer is not supported. But on mozilla firefox its no problem. 
>>
>> IS there some way to install gwt plugin?
>>
>
> Windows 8? See 
> https://code.google.com/p/google-web-toolkit/issues/detail?id=7778 
>

-- 
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: How to avoid freezing with CellTable?

2013-07-02 Thread Ümit Seren
2-3 minutes ? There must be something seriously wrong because there is no 
way it should take so long to populate a CellTable. 

1.) Profile your web-app. What does take so long (serialization or 
rendering)? use Chrome Dev Tools to do that. 
2.) Use paging. From a UX point of view it doesn't make sense to show all 
rows at once. 
3.) Transfer chunks of data (using AsyncDataProvider) because as of point 2 
the user doesn't need to see all rows at once. 


On Monday, July 1, 2013 7:58:02 PM UTC+2, sebastie...@isen-lille.fr wrote:
>
> Hi everybody,
> I'm creating a website with GWT. I want to add CellTable into my project. 
> The problem is that I have a lot of data to put into the tables. So, my 
> website freeze and show my table after 2-3 minutes. 
>
> I find on internet that multi-threads are impossible with GWT. So, what is 
> the solution? Even if the user have to wait 2-3 minutes, I want to avoid 
> the fact that it's freezing.
>
> Any Ideas?
>
> Thank you.
>
> My code, maybe I can optimize it simply?
>
> public void refreshTable(final ArrayList arrListFilters, final 
> ArrayList arrListAll, String url) {
>
> // Get the CQ result
> RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
>
> try {
> Request response = builder.sendRequest(null, new RequestCallback() {
> public void onError(Request request, Throwable exception) {
> }
>
> public void onResponseReceived(Request request, Response response) {
> final json json = JsonUtils.unsafeEval(response.getText());
>
> int i = 0;
> int j = 0;
> int tot;
>
> // If there are too many results
> if (json.getResultslength() > 1) {
> tot = 1;
> } else {
> tot = json.getResultslength();
> }
>
> // Fill the list of rows
> while (j < tot) {
> i = 1;
> List rowTemp = new ArrayList();
> rowTemp.add(json.getDate(j));
> // Get the data to get a price result for a specific
> // customer query
> arrListLnNb.add(json.getLineNb(j));
> arrListId.add(json.getId(j));
> arrListCqid.add(json.getCqid(j));
> while (i < arrListFilters.size()) {
> rowTemp.add(json.getResults(j, arrListAll.indexOf(arrListFilters.get(i;
>
> i = i + 1;
> }
> rowTemp.add("");
> rows.add(rowTemp);
> j = j + 1;
>
> }
>
> // Provide rows to the table
> table.setRowCount(rows.size(), true);
> table.setRowData(0, rows);
>
> final ListDataProvider> provider = new 
> ListDataProvider>(rows);
>
> provider.addDataDisplay(table);
>
> // Handler to sort the columns
> List> list1 = provider.getList();
>
> ListHandler> columnSortHandler = new 
> ListHandler>(list1);
> i = 0;
> while (i < table.getColumnCount()) {
> final int columnIndex = i;
> columnSortHandler.setComparator(table.getColumn(i), new 
> Comparator>() {
> public int compare(List o1, List o2) {
>
> if (o1 == o2) {
> return 0;
> }
>
> // Compare the name columns.
> if (o1 != null) {
> return (o2 != null) ? o1.get(columnIndex).compareTo(o2.get(columnIndex)) : 
> 1;
> }
> return -1;
>
> }
> });
>
> i = i + 1;
> }
>
> table.addColumnSortHandler(columnSortHandler);
>
> i = 0;
> while (i < table.getColumnCount()) {
> table.getColumnSortList().push(table.getColumn(i));
> i = i + 1;
> }
> }
>
> });
> } catch (RequestException e) {
> }
> }
>

-- 
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: GWT plugin

2013-07-02 Thread Thomas Broyer


On Tuesday, July 2, 2013 8:39:24 AM UTC+2, Tomas Ciboch wrote:
>
> Hi, 
> I cant install gwt plugin from web store on my chrome. It says me that my 
> computer is not supported. But on mozilla firefox its no problem. 
>
> IS there some way to install gwt plugin?
>

Windows 8? See 
https://code.google.com/p/google-web-toolkit/issues/detail?id=7778 

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




GWT plugin

2013-07-02 Thread Tomas Ciboch
Hi, 
I cant install gwt plugin from web store on my chrome. It says me that my 
computer is not supported. But on mozilla firefox its no problem. 

IS there some way to install gwt plugin?

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