How to modify the height and width of the button in ActionCell

2012-12-21 Thread tong123123
In ActionCell, a button is automatically generated and I want to change the 
button height and width, but I found that there is no addStyleName, 
setCellStyle or etc to write css to modify the generated button height and 
width, any method to do it?

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



if change css, need restart the server?

2012-12-21 Thread tong123123
my css is placed in structure like
public
   my.css
client
   xxx.java
shared
  xyz.java
server
  zzz.java

I try to modify the css and then close the development mode and restart it, 
but the css effect is still not seen. Everytime I change css, I need 
restart server, is this a easier way to modify css and see the effect 
without restart the server?

-- 
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/-/N0evKaRvb4gJ.
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 modify the height and width of the button in ActionCell

2012-12-21 Thread tong123123
using Column.setCellStyleNames(xxx);
I can modify the button size by 

 .xxx button{
   height: 10px;
   width: 20px;
 }


but I still cannot modify the size of the font in the button, any method to 
change the font size of the button?
I try 

 .xxx{
   font-size:10px;
 }

or 

 .xxx button{
   height: 10px;
   width: 20px;
   font-size: 10px;
 }


but all has no effect!! 

On Friday, December 21, 2012 4:48:04 PM UTC+8, tong123123 wrote:

 In ActionCell, a button is automatically generated and I want to change 
 the button height and width, but I found that there is no addStyleName, 
 setCellStyle or etc to write css to modify the generated button height and 
 width, any method to do it?



-- 
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/-/bm-kWXaYKQMJ.
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: Hit detection for GWT canvas - which strategy for drawings?

2012-12-21 Thread Philippe Lhoste

On 20/12/2012 15:15, Dean S. Jones wrote:

Of course, as Umit says, there are other FREE Frameworks that have figured it 
out, like
Lienzo, that take care of it all for you, http://www.emitrom.com/lienzo


Hey, I didn't know this one! Looks cool. Thanks for sharing.
(Even if I discovered you are involved with this company, which is perfectly OK, of 
course. As you wrote, it is free, after all.)


--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
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: how to set the width of each widget in horizontalpanel?

2012-12-21 Thread Thomas Broyer
setCellWidthhttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/CellPanel.html#setCellWidth(com.google.gwt.user.client.ui.Widget,
 
java.lang.String) ?

On Friday, December 21, 2012 9:31:14 AM UTC+1, tong123123 wrote:

 as shown in the figure, if I add a datagrid in a HorizontalPanel, although 
 I already set the datagrid width, but the space it occupy is very large and 
 do not know how to control it (the width of the blue area in firebug).
 In FlexTable, I can use setColWidth to set the width of the column, but if 
 in HorizontalPanel, any method to set the width of the widget occupy (the 
 blue area in the attachment)?


-- 
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/-/20rmW9gC5dsJ.
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: Clearing Browser cache for upadated deployments

2012-12-21 Thread Marco
http://seewah.blogspot.de/2009/02/gwt-tips-2-nocachejs-getting-cached-in.html

-- 
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/-/u2JGxvMGRgwJ.
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: client-side validation with request factory

2012-12-21 Thread kim young ill
thanx, is there a list somewhere about (un)supported annotations ? i just
figured out @size(min=, max=)  doesnt seem to work either, if at the end u
have to mix to much custom-validation code with validation-api, i'd better
not using it


thanx


On Thu, Dec 20, 2012 at 6:29 PM, ashwin.desi...@gmail.com 
ashwin.desi...@gmail.com wrote:

 not all validations are supported. email is one among them, but you can
 achieve email validation using regex pattern

 example:

 static String ATOM = [a-z0-9!#$%'*+/=?^_`{|}~-];
  static String DOMAIN = ( + ATOM + +(\\. + ATOM + +)*;
 static String IP_DOMAIN =
 \\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\];

 @Pattern(regexp=^ + ATOM + +(\\. + ATOM + +)*@
 + DOMAIN
 + |
  + IP_DOMAIN
 + )$,
 flags={Pattern.Flag.CASE_INSENSITIVE},
  message=Please provide a valid eMail id)
 @NotEmpty(message=Email is required)
  abstract String getEmail();
 abstract void setEmail(String email);

 ~Ashwin


 On Thu, Dec 20, 2012 at 6:39 PM, kim young ill khi...@googlemail.comwrote:

 well, it tooks me a while to realize that @Email doesnt work at all,
 allways give me Violation


 On Thu, Dec 20, 2012 at 11:37 AM, kim young ill khi...@googlemail.comwrote:

 thanx,
 that works




 On Thu, Dec 20, 2012 at 4:28 AM, ashwin.desi...@gmail.com 
 ashwin.desi...@gmail.com wrote:

 all the validations you put on the pojo's can be applied on the
 proxies.

 example:

 let's say you have a pojo named guest

 Guest {

 @NotNull
 String name;

 }

 now the same validation you will have to apply on your proxy as well

 GuestProxy {

 @NotNull
 String getName();
 SetName(String name);

 }

 As defined in the sample, create a validatorFactory. Instead of
 assigning the pojo.class use the pojoProxy.class to @GwtValidation
 Annotation.

 regards
 Ashwin


 On Wed, Dec 19, 2012 at 1:55 PM, kim young ill 
 khi...@googlemail.comwrote:

 Hi there,
 how can i use client-side validation with rf ?
 in the sample project of gwt-2.5, the client-pojos are annotated
 directly, but what about proxies ?

 thanx

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


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



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


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


-- 
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: using autobeans in a gwt-rpc call

2012-12-21 Thread Cenk Oguz
Requestfactory is more for CRUD style operations. Don't think it makes 
sense in our app as most operations are rpc in nature. Will probably go 
with using regular POJOs in this case. Thx!

-- 
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/-/Vpgx7FyRtaMJ.
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: if change css, need restart the server?

2012-12-21 Thread RyanZA
It could be something with your setup.

Using normal GWT dev mode with firefox, I can change my compiled GWT .css 
(css resource), hit F5 in the browser, and I see the css changes right 
away. If you are using css in your WAR folder, your browser may be caching 
it. Try hit shift+f5

On Friday, December 21, 2012 11:30:15 AM UTC+2, tong123123 wrote:

 my css is placed in structure like
 public
my.css
 client
xxx.java
 shared
   xyz.java
 server
   zzz.java

 I try to modify the css and then close the development mode and restart 
 it, but the css effect is still not seen. Everytime I change css, I need 
 restart server, is this a easier way to modify css and see the effect 
 without restart the server?


-- 
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/-/djnExZ_T8pkJ.
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: Error processing @WithTokenizers, cannot find type

2012-12-21 Thread RyanZA
It appears to depend on the compiled GWT code to find the correct class - 
but it runs before the compilation step. So new classes don't appear until 
it successfully compiles.

eg. You create a new .java class and add it to the tokenizer. Try to 
compile and it will fail. Remove the annotation and compile. Then add the 
annotation back and compile again, and it should work.

I've taken to just skipping the annotations and just implementing my own 
mapper - it gives you much better control of exactly what tokens to pass 
when/where and lets you use the nice #! for search engine crawling...

On Thursday, December 20, 2012 7:48:59 PM UTC+2, Tony B wrote:

 Ok, this is screwy.  Now it is working, and I did not really change 
 anything in this section.  Here is what I did that could have impacted this:

1. Restarted Eclipse at least one time
2. Did a full GWT compile ( with GWT 2.4 ) at least one time
3. Change GWT SDK from 2.4 to 2.5, and started debugger.  It worked
4. Changed GWT SDK back to 2.4, and started debugger.  It worked.

 I don't know if one or all of the above acts fix it, or if some code 
 change I forgot fixed it.  Anyway, thanks.

 Tony

 On Thursday, December 20, 2012 12:25:30 PM UTC-5, Tony B wrote:

 Right now I am using GWT 2.4.  So your suggesting I use GWT 2.5?

 Or maybe you changed the GWT source code to mimic the work around they 
 mentioned.

 On Thursday, December 20, 2012 10:19:07 AM UTC-5, Bauna wrote:

 I have a similar problem with @WithTokenizers and I used some the 
 workarounds from this issue: 
 http://code.google.com/p/google-web-toolkit/issues/detail?id=5658 

 On Tue 18 Dec 2012 07:01:42 PM ART, Tony B wrote: 
  Sadly, not yet.   If I found out something, I will update this thread. 
  
  On Tuesday, December 18, 2012 9:51:26 AM UTC-5, 
  sean.l...@perceptivesoftware.com wrote: 
  
  Hi Tony, 
  
  Having same problem - did you find a resolution to this? 
  
  Thanks 
  
  Sean 
  
  On Monday, December 17, 2012 5:00:25 PM UTC-5, Tony B wrote: 
  
  Hello, 
 I have a weird situation.  I am getting the following error 
  in my 
  
  16:48:34.027 [ERROR] [wmsapp] Error processing 
  @WithTokenizers, cannot find type 
  
 com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryDetailPlace.ProductSummaryDetailPlaceTokenizer
  

  
  
  The problem is that I know this exists.   First of all, this 
  happens in the following code: 
  
  package com.wmsvision.wmsapp.client; 
  
  import com.google.gwt.place.shared.PlaceHistoryMapper; 
  import com.google.gwt.place.shared.WithTokenizers; 
  import 
  
 com.wmsvision.wmsapp.client.activities.HomePlace.HomePlaceTokenizer; 
  import 
  
 com.wmsvision.wmsapp.client.activities.WmsListPlace.WmsListPlaceTokenizer; 
  import 
  
 com.wmsvision.wmsapp.client.activities.about.AboutPlace.AboutPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.configuration.ConfigPlace.ConfigPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.login.LoginPlace.LoginPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryDetailPlace.ProductSummaryDetailPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryMasterPlace.ProductSummaryMasterPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryPlace.ProductSummaryPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.receiving.ReceivingPlace.ReceivingPlaceTokenizer;
  

  import 
  
 com.wmsvision.wmsapp.client.activities.relocation.RelocationPlace.RelocationPlaceTokenizer;
  

  
  @WithTokenizers({ HomePlaceTokenizer.class, 
  LoginPlaceTokenizer.class, 
  AboutPlaceTokenizer.class, 
  WmsListPlaceTokenizer.class, 
  ReceivingPlaceTokenizer.class, 
  RelocationPlaceTokenizer.class, 
  ProductSummaryPlaceTokenizer.class, 
  ProductSummaryDetailPlaceTokenizer.class, 
  ProductSummaryMasterPlaceTokenizer.class, 
  ConfigPlaceTokenizer.class}) 
  public interface AppPlaceHistoryMapper extends 
  PlaceHistoryMapper { 
  } 
  
  
  I have a similar place defined in the same package that seems 
  to work fine ( it is called import 
  
 com.wmsvision.wmsapp.client.activities.productsearch.ProductSummaryMasterPlace
  

  ).  Anyway, the 

Re: CellTable Filtering on client-side Based On ListBox Selection

2012-12-21 Thread Alex opn
What's the problem or did I just miss it between the code? :)

Am Donnerstag, 20. Dezember 2012 17:09:12 UTC+1 schrieb VB:

 I have a CellTable with 3 columns, and 1 ListBox that is supposed to 
 provide a drop down of possible filter values.
 i want to drive the filtering of the celltable rows, based from a 
 selection in a ListBox (that contains all possible values) of one of the 
 columns in the CellTable
 I am using a ListDataProvider and just want to filter on the client side.

 The ListBox is populated with String values...
 final ListBox supportCaseStatusListBox = new ListBox();
 supportCaseStatusListBox.addItem(In Progress, 1);
 supportCaseStatusListBox.addItem(Closed, 5);
 ..

 The statusColumn in CellTable is defined as:
 TextColumnSupportCaseDTO statusColumn = new TextColumnSupportCaseDTO() 
 {
 @Override
 public String getValue(SupportCaseDTO supportCase) {
 return supportCase.getStatus();
 }
 };


 --

 import java.util.ArrayList;
 import java.util.List;

 import org.dozer.DozerBeanMapper;

 import com.google.common.collect.Lists;
 import com.google.gwt.core.client.Scheduler;
 import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.dom.client.Style.Unit;
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.user.cellview.client.CellTable;
 import com.google.gwt.user.cellview.client.SimplePager;
 import com.google.gwt.user.cellview.client.TextColumn;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.user.client.ui.ListBox;
 import com.google.gwt.user.client.ui.Panel;
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.view.client.ListDataProvider;

 public class ViewSupportCasesPanel extends BasePanel{

 static final String TITLE = View Support Case;

 private SupportCaseDTO supportCaseDTO = new SupportCaseDTO();
 private final Button backButton = new RpButton(Back);
 private final HorizontalPanel buttonPanel = new HorizontalPanel();
 private final RegistrationBean registrationBean;

 public ViewSupportCasesPanel(AppControl appControl,
 RegistrationBean registrationBean) {
 super(appControl);

 this.registrationBean = registrationBean;

 VerticalPanel mainVerticalPanel = new VerticalPanel();
 initWidget(mainVerticalPanel);

 final HTML header = new HTML(Messages.SUPPORT_CASE_VIEW_CASES_HEADER);
 mainVerticalPanel.add(header);

 final Label supportCaseStatusListLabel = new Label(Support Case Status:);
  final ListBox supportCaseStatusListBox = new ListBox();
 supportCaseStatusListBox.addItem(In Progress, 1);
 supportCaseStatusListBox.addItem(Closed, 5);
 supportCaseStatusListBox.addItem(Awaiting Customer Reply, 2);
 supportCaseStatusListBox.addItem(RMA, 3);
 supportCaseStatusListBox.addItem(Escalated to QA/Dev, 8);
 supportCaseStatusListBox.addItem(Software Upgrade Needed, 6);
 supportCaseStatusListBox.addItem(Product Replacement Needed, 7);
 supportCaseStatusListBox.addItem(Awaiting Customer Confirmation, 4);
  // create CellTable
 final CellTableSupportCaseDTO cellTable = new 
 CellTableSupportCaseDTO();

 // Create case number column.
 TextColumnSupportCaseDTO numberColumn = new TextColumnSupportCaseDTO() 
 {
 @Override
 public String getValue(SupportCaseDTO supportCase) {
 return supportCase.getCaseNumber();
 }
 };

 // Make the name column sortable.
 numberColumn.setSortable(false);

 // Create subject column.
 TextColumnSupportCaseDTO subjectColumn = new 
 TextColumnSupportCaseDTO() {
 @Override
 public String getValue(SupportCaseDTO supportCase) {
 return supportCase.getTitle();
 }
 };

 // Create status column.
 TextColumnSupportCaseDTO statusColumn = new TextColumnSupportCaseDTO() 
 {
 @Override
 public String getValue(SupportCaseDTO supportCase) {
 return supportCase.getStatus();
 }
 };
 /* // Create product column.
 TextColumnSupportCaseDTO productColumn = new 
 TextColumnSupportCaseDTO() {
 @Override
 public String getValue(SupportCaseDTO supportCase) {
 return supportCase.getProduct();
 }
 };*/

 // Add the columns.
 cellTable.addColumn(numberColumn, Case #);
 cellTable.addColumn(subjectColumn, Subject);
 cellTable.addColumn(statusColumn, Status);
 // cellTable.addColumn(productColumn, Product);

 cellTable.setWidth(100%, true);
 cellTable.setColumnWidth(numberColumn, 10, Unit.PCT);
 cellTable.setColumnWidth(subjectColumn, 60, Unit.PCT);
 cellTable.setColumnWidth(statusColumn, 15, Unit.PCT);
 // cellTable.setColumnWidth(productColumn, 15, Unit.PCT);
  // Create a data provider.
 ListDataProviderSupportCaseDTO listDataProvider = new 
 ListDataProviderSupportCaseDTO();

 // Connect the table to the data provider.
 listDataProvider.addDataDisplay(cellTable);

 DrSimplePager pager = new 

Re: using autobeans in a gwt-rpc call

2012-12-21 Thread Xi
gwt-rpc call needs concrete class type to do the serialization. So the 
generated autobean proxy won' t be serialized. 

If you do want to send your autobean object to server side, you need to 
use com.google.gwt.http.client.RequestBuilder (client side) to send the 
encoded string to server side, and create a servlet to handle this request.

I attached two files (used in our project), hope these can help you.


Le jeudi 20 décembre 2012 14:55:50 UTC+1, Cenk Oguz a écrit :

 I have a small application where I am using autobeans extensively both on 
 server and gwt side. I have an issue though with gwt-rpc calls, autobeans 
 are apparently not serializable which causes gwt to fail with: 

 com.google.gwt.user.client.rpc.SerializationException: Type '$Proxy85' was 
 not included in the set of types which can be serialized by this 
 SerializationPolicy

 Is there any obvious way that autobeans could be sent client-server side? 
 Gwt-rpc is not good enough? Sending it over as a JSON string imposes some 
 manual labor, seems overkill, would rather just go with POJOs in that case.

 /Cenk


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

package com.exemple.client.service;

import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.StatusCodeException;
import com.exemple.client.ClientAutoBeanUtils;
import com.exemple.domain.autobean.ServerInfoBean;

public class ServerInfoService {
	
	public final static String PATH = /serverInfo;

	public void getServerInfo(final AsyncCallbackServerInfoBean callback){
	
		RequestBuilder request = new RequestBuilder(RequestBuilder.POST, PATH);
		request.setCallback(new RequestCallback() {			
			@Override
			public void onResponseReceived(Request request, Response response) {
if(callback == null) return;
if(200 == response.getStatusCode()){
	try{
		callback.onSuccess(ClientAutoBeanUtils.decode(response.getText(), ServerInfoBean.class));
	}catch(Exception caught){
		callback.onFailure(caught);
	}
}else{
	callback.onFailure(new StatusCodeException(response.getStatusCode(), response.getText()));
}
			}
			
			@Override
			public void onError(Request request, Throwable exception) {
if(callback != null){
	callback.onFailure(exception);
}else if(GWT.getUncaughtExceptionHandler() != null){
	GWT.getUncaughtExceptionHandler().onUncaughtException(exception);
}
			}
		});
		try {
			request.send();
		} catch (RequestException exception) {
			if(callback != null){
callback.onFailure(exception);
			}else if(GWT.getUncaughtExceptionHandler() != null){
GWT.getUncaughtExceptionHandler().onUncaughtException(exception);
			}
		}
		
	}
	
}
package com.exemple.server.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.web.bindery.autobean.shared.AutoBean;
import com.exemple.client.service.ServerInfoService;
import com.exemple.domain.autobean.ServerInfoBean;
import com.exemple.server.ServerAutoBeanUtils;

@WebServlet(ServerInfoService.PATH)
public class ServerInfoServlet extends HttpServlet {

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		resp.sendRedirect(/);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		AutoBeanServerInfoBean bean = ServerAutoBeanUtils.createServerInfoBean();
		bean.as().setAvailable(true);
		bean.as().setVersion();
		String responsePayload = ServerAutoBeanUtils.encode(bean);
		// now you can write your response into resp...
	}
}


Re: Mehrbenutzerfähigkeit der Serverseite / Multiuserability serverside

2012-12-21 Thread Lukasz Plotnicki
Hi Sascha,

this depends on your server-side code and architecture. You need to provide 
more information to give us an opportunity to help you. What should your 
application do? In general, the server-side of an GWT app behave 
accordingly to the normal session-pattern (as the GWT-RPC services are 
based on Servlets)...

HTH,
Lukasz 

Am Donnerstag, 20. Dezember 2012 09:05:50 UTC+1 schrieb Sascha Hoffmann:

 Hallo ihr Lieben

 Ich habe folgendes Problem. Ich habe ein kleines GXT-Programm geschrieben 
 und musste nun vorstellen das die Serverseite die einzelnen Aufrufe nicht 
 trennt. 
 Als Beispiel:
  - Ich habe auf der Serverseite eine Variable die Client A mit dem Wert 
 TEST befüllt. Nun kann Client B diesen Wert auslesen und verändern.
 Ist das normal? Gibt es Möglichkeiten das zu ändern?

 Liebe Grüße
 Sascha



 Hello

 I have a problem. I wrote a little program and determined that the 
 serverside the calls not differt.
 A example:
 - I have a variable and Client A set the variable with TEST. Client B 
 can now read this variable or change it.
 Is this normal? Is there a possibillity to change this fact?
 http://dict.leo.org/ende?lp=endep=DOKJAAsearch=faithfullytrestr=0x8040
 Yours faithfully
 Sascha


-- 
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/-/K0tpTvIxb5QJ.
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: if change css, need restart the server?

2012-12-21 Thread Steve
I've been experiencing a similar problem in both FF and Chrome. 

The problem has always been there with Chrome, but FF started a month or two 
ago. 

In FF I've got the Web Developer Toolbar extension installed. Right click on 
webpage, goto the web developer menu, CSS menu, then reload CSS. 

It'll reload straight from your updated files. No need to even hit F5. 

HTH

Steve

-- 
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/-/ChdIpzRUL4sJ.
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: Clearing Browser cache for upadated deployments

2012-12-21 Thread Thomas Broyer


On Friday, December 21, 2012 12:03:30 PM UTC+1, Marco wrote:


 http://seewah.blogspot.de/2009/02/gwt-tips-2-nocachejs-getting-cached-in.html


See also 
https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#perfect_caching
 (which 
is also linked from 
https://developers.google.com/web-toolkit/doc/latest/DevGuideDeploying )

-- 
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/-/34skOAoAH_AJ.
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.



SASS Compiler

2012-12-21 Thread Joonas Lehtinen
Vaadin 7.0.0b11 released yesterday includes a GWT linker for the built in SASS 
compiler. This means that you can use SCSS in addition to CSS in your GWT 
projects - just as you would be using CSSResource. Take a look at howto blog 
post:

https://vaadin.com/blog/-/blogs/link-to-the-client-side-from-sass

-- 
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/-/dioXtxi3AggJ.
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: using autobeans in a gwt-rpc call

2012-12-21 Thread Thomas Broyer


On Friday, December 21, 2012 1:17:08 PM UTC+1, Cenk Oguz wrote:

 Requestfactory is more for CRUD style operations.


That just plain wrong. The early drafts of RF were indeed CRUD-oriented, 
but the released versions never were, particularly with ValueProxy-s added 
in 2.1.1 (something like a month after 2.1.0 was released)

-- 
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/-/GHQ8EgnI-WsJ.
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: SASS Compiler

2012-12-21 Thread Thomas Broyer

On Friday, December 21, 2012 4:56:24 PM UTC+1, Joonas Lehtinen wrote:

 Vaadin 7.0.0b11 released yesterday includes a GWT linker for the built in 
 SASS compiler. This means that you can use SCSS in addition to CSS in your 
 GWT projects - just as you would be using CSSResource. Take a look at howto 
 blog post:

 https://vaadin.com/blog/-/blogs/link-to-the-client-side-from-sass


This is more a reply to the linked blog entry but I'll post it here: I 
don't think supporting SASS in ClientBundle requires any change in GWT 
proper; you only need to use something other than CssResource (e.g. a 
SassResource interface) with its own ResourceGenerator (linked to the 
SassResource through a @ResourceGeneratorType annotation)

-- 
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/-/U34FzPiNHcsJ.
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: if change css, need restart the server?

2012-12-21 Thread Joshua Godi
Sometimes two refreshes will pick up CSS changes for me. But a word of 
advice, convert your CSS to use ClientBundle, that way it GWT will make it 
available on compile, so just a simple refresh will fix it.

There are many tutorials on how to use ClientBundle properly.

On Friday, December 21, 2012 3:30:15 AM UTC-6, tong123123 wrote:

 my css is placed in structure like
 public
my.css
 client
xxx.java
 shared
   xyz.java
 server
   zzz.java

 I try to modify the css and then close the development mode and restart 
 it, but the css effect is still not seen. Everytime I change css, I need 
 restart server, is this a easier way to modify css and see the effect 
 without restart the server?


-- 
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/-/4LJ9z-C0iJAJ.
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.



RequestFactory, ValueProxy support for Email, Link, User

2012-12-21 Thread Avanish Raju
Hi GWT team,

I've just started migrating from GWT-RPC to RequestFactory, and noticed
that even when using ValueProxy to wrap the datastore objects, they aren't
supported. For e.g, I created a UserProxy and a LinkProxy:

import com.google.appengine.api.users.User;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ValueProxy;

@ProxyFor(User.class)
public interface UserProxy extends ValueProxy {
String getUserId();
String getEmail();
String getNickName();
String getAuthDomain();
String getFederatedIdentity();
}

package com.kuryaat.lms.common.newdto;

import com.google.appengine.api.datastore.Link;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ValueProxy;

@ProxyFor(Link.class)
public interface LinkProxy extends ValueProxy {
 String getValue();

}

And I'm using them like this:

import com.google.web.bindery.requestfactory.shared.EntityProxy;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.kuryaat.lms.common.dto.DocRefType;
import com.kuryaat.lms.server.jdo.DocRef;
import com.kuryaat.lms.server.rf.DocRefLocator;

@ProxyFor(value = DocRef.class, locator = DocRefLocator.class)
public interface DocRefProxy extends EntityProxy {

String getName();
LinkProxy getLink();
DocRefType getDocType();
int getStackIndex();
String getSourceService();
}


But I get the following error when I try to run the code:
[ERROR] [myapp] - Line 7: User cannot be resolved to a type

What is the right way to handle these?

Thanks,
Avanish

-- 
Life is what you make of it
Y. Avanish Raju,

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

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



Best way to use webfonts in GWT?

2012-12-21 Thread RyanZA
The GWT CSS (clean.css, chrome.css, etc) all have a ton of the following:

.gwt-TextBox {
font-family: Arial Unicode MS,Arial,sans-serif;
}

What is the best way to overwrite these strange classes with a webfront 
family, so that it will conflict as little as possible with future GWT 
releases?

Options seem to be:
1) Subclass Textboxt and other standard widgets, and add a 'addClassName' 
with custom font class in the constructor.
2) Copy the clean.css file to gwt, and use a css resource with @NotStrict 
annotation

Any other methods that are nicer?

-- 
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/-/pvVGnx_cY1oJ.
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: Best way to use webfonts in GWT?

2012-12-21 Thread Jens
I have done the 2nd option. If you want to keep all the little images of 
the clean theme you should inherit CleanResources.gwt.xml instead of 
Clean.gwt.xml so that the images will be copied to your war directory but 
no CSS will be included in your host html page. After that you only have to 
modify the image paths in your Clean CssResource css file and start 
modifying things the way you want it.

To keep things a bit separated its also nice to have a Reset CssResource 
that sets the style of common HTML tags to defaults you want and not what 
browsers think would be best.

-- J.

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



jsni - overlay types - js arrays Java API

2012-12-21 Thread Sebastián Gurin
Hi all. I'm porting some javascript libraries to GWT and in this thread I 
hope I can share and learn best ways of accessing Js native arrays from 
java language. 

I try to add the minimun overhead so I'm using GWT's JsArray, JsArrayMixed, 
JsArrayString, etc for referencing arrays whenever I can. But this is not 
so friendly for a Java programmer accustomed to work with real java arryas 
(String[]) or with java.util.Collection API. 

The first thing I thought of was convert js arrays to Java arrays. 
Unfortunately i didn't found a way of doing this without (linear overhead); 

public static JsArrayNumber toJsArrayDouble(double[]a) {
if(a==null)
return null;
JsArrayNumber jsa = (JsArrayNumber) JsArrayNumber.createArray();
for (int i = 0; i  a.length; i++) {
jsa.push(a[i]);
}
return jsa;
}

Now I'm experimenting on wrapping a Js Array into a java Collection. For 
this I made a simple Java class that extends java.util.AbstractCollection 
[0] and wrapps a pure js array. So from jsni code now I can return Java 
Collections instead JsArray like types and the final user of my libs can 
write java statements like for(String s : myOverlay.getArrayProp()) {..}.  

Also this solution adds very few (constant) overhead. So now I'm using two 
getters for js arrays, one that return the real js array object using GWT's 
JsArray* and other that return a Java Collection: 

/**
 * Returns 'columns' property (JavaScript array)
 * @return
 */
public native final JsArrayString columns() /*-{
return this[columns]; 
}-*/;
/**
 * Returns 'columns' property (Java Collection)
 * @return
 */
public native final CollectionString getColumns() /*-{
return 
@org.sgx.test1.client.JsUtil::toJavaCollection(Lcom/google/gwt/core/client/JavaScriptObject;)(this[columns]);
 

}-*/;


I would like to hear what others in the same situation do. Use JsArray* 
GWT's classes vs more Java friendly API ???  Thanks in advance any 
suggestion or comment is most appreciated. 



[0] - Source code for my Java Collection class wrapper 


import java.util.AbstractCollection;
import java.util.Iterator;
import com.google.gwt.core.client.JavaScriptObject;

/**
 * a Java Friendly way of working with Js Arrays using the 
Java.util.Collection API
 * @author sg
 *
 * @param T
 */
public class JsArrayCollectionT extends  AbstractCollectionT {

private JsArrT _data; 
/**
 * creates an empty array
 */
public JsArrayCollection() {
_data = JsArr.create().cast(); 
}
/**
 * creates JsArrayCollection wrapping an existing js array
 */
public JsArrayCollection(JavaScriptObject data) {
this._data = data.cast(); 
}
public static T JsArrayCollectionT create(JavaScriptObject data) {
return new JsArrayCollectionT(data); 
}


@Override
public IteratorT iterator() {
return new JsArrayIteratorT(this); 
}

@Override
public int size() {
return _data.size(); 
}


public static class JsArrayIteratorT implements IteratorT {

private JsArrayCollectionT arr;
int currentIndex; 
public JsArrayIterator(JsArrayCollectionT arr) {
this.arr = arr; 
currentIndex=0; 
}

@Override
public boolean hasNext() {
//System.out.println(currentIndex+ - +arr.size());
return currentIndex  arr.size(); 
}

@Override
public T next() {
currentIndex++;
return arr._data.get(currentIndex-1); 
}

@Override
public void remove() {
arr._data.slice(currentIndex-1, currentIndex); 
}

}

/** untyped array */
private static class JsArrT extends JavaScriptObject {
protected JsArr(){}
public native final JsArrT slice(int start, int end)/*-{
return this.slice(start, end); 
}-*/;
public static final native T JsArrT create() /*-{
return []; 
}-*/;
public final native int size() /*-{
return this.length; 
}-*/;
public final native T get(int i) /*-{
return this[i]; 
}-*/;
}


}

-- 
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/-/DbMp1hrjhVUJ.
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: server support

2012-12-21 Thread El Mentecato Mayor
GWT is mostly a client-side library, so any server you want.

The only restrictions depend on the client-server communication method you 
want to use. GWT comes with basically three ways of doing that; 1) 
RequestBuilder, which you can use to transfer any format (text, xml, JSON) 
or style (RESTful, SOAP), 2) RPC, and 3) RequestFactory. For these last two 
you need a JVM-based server. GWT comes with an embedded Jetty server out of 
the box.
 

On Wednesday, December 19, 2012 4:18:27 AM UTC-5, nalin...@googlemail.com 
wrote:

 Hi, I am new to GWT and I am planning to build a prototype for a company.. 
 Could any one tell me what servers are supported by GWT?

-- 
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/-/samrTso991cJ.
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 Cells - Unnecessary headache?

2012-12-21 Thread Stephen Haberman

 I have been using the cell widgets for a while now and am having
 trouble understanding their purpose.

Well, as you say, the purpose is performance.

 Thoughts?

Personally I avoid cell-based widgets until I really, really need them,
and then push back on putting anything in the cells except really
simple functionality (showing text).

For example, a dashboard table of, say, employees, where each row has
interactive functionality to toggle/update/whatever aspects of the
employee, to me is just too hard to implement as cells. And it probably
doesn't make sense from a UX perspective to show 1000 of these
more-than-just text rows on the screen at a time anyway.

So, as you say, if you have 20 rows, or can filter/page the results
down to 20 rows anyway, just go with regular widgets.

- Stephen

-- 
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: SASS Compiler

2012-12-21 Thread Stephen Haberman

 This is more a reply to the linked blog entry but I'll post it here:
 I don't think supporting SASS in ClientBundle requires any change in
 GWT proper; you only need to use something other than CssResource
 (e.g. a SassResource interface) with its own ResourceGenerator
 (linked to the SassResource through a @ResourceGeneratorType
 annotation)

Huh, that sounds pretty cool. I didn't realize adding custom resources
to ClientBundle would be that easy. Thanks for the insight.

- Stephen

-- 
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: SASS Compiler

2012-12-21 Thread Jens


 Huh, that sounds pretty cool. I didn't realize adding custom resources 
 to ClientBundle would be that easy. Thanks for the insight. 


As an example: http://retina.teknonsys.com/

-- J.

-- 
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/-/XUW2DQfJexEJ.
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: SASS Compiler

2012-12-21 Thread Thomas Broyer
Well, that's already what I proposed a while back for plugging Closure
Stylesheets and thus bring CSS3 support to GWT.
Le 21 déc. 2012 21:33, Stephen Haberman stephen.haber...@gmail.com a
écrit :


  This is more a reply to the linked blog entry but I'll post it here:
  I don't think supporting SASS in ClientBundle requires any change in
  GWT proper; you only need to use something other than CssResource
  (e.g. a SassResource interface) with its own ResourceGenerator
  (linked to the SassResource through a @ResourceGeneratorType
  annotation)

 Huh, that sounds pretty cool. I didn't realize adding custom resources
 to ClientBundle would be that easy. Thanks for the insight.

 - Stephen



-- 
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: SASS Compiler

2012-12-21 Thread Stephen Haberman

 As an example: http://retina.teknonsys.com/

Also cool--thanks!

- Stephen


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



image manipulation in core GWT

2012-12-21 Thread Aldin Habibović
Hi guys,

Is there widget in GWT for achieving slide show like this one: slide
showhttp://www.nitinh.com/static/SlideShow/mootools.html

Any ideas how to implementing this slide show?

Thanks

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



gwt show value of texbox

2012-12-21 Thread vector

i need to show the value inserted into texbox i create this code 

public void onModuleLoad() {
 TextBox textValue = new TextBox();
 textValue.getSelectedText();
final String index = textValue.getValue().toString();


 Button button = new Button(button, new ClickHandler() {
  public void onClick(ClickEvent event) {
 
  Window.alert(You selected:  + index);

}
  });

 RootPanel.get().add(textValue);
 RootPanel.get().add(button);

}
}

but into window not appears the value

can help me?

-- 
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/-/iBSH87hWfLUJ.
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: Still problems with com.google.gwt.core.client.GWTBridge

2012-12-21 Thread Ara Yapejian
I'm also seeing this, has their been any updates or anyone know of a fix? 
 This happened trying to upgrade my jars to gwt 2.5

On Monday, November 5, 2012 1:15:43 PM UTC-5, daniel9x wrote:

 Hey Bauna,

 How exactly would I implement that jar to my project in Eclipse? I try 
 adding it to the classpath, but still get the same error. Any input would 
 help, thanks.

 On Wednesday, October 31, 2012 1:45:52 PM UTC-4, Bauna wrote:

 Moritz, 
 Until you find the actual problem you can use this jar. 

 Regards, 
 -- 
 Bauna 

 On 10/31/2012 09:08 AM, Moritz wrote: 
  Hi all, 
  
  I get a NoClassDefFoundError for com.google.gwt.core.client.GWTBridge 
  when I throw a RuntimeException on a server RPC. When I do not throw 
  the RuntimeException and the RPC completes fine also no 
  NoClassDefFoundError is thrown. 
  As a workaround, I created an abstract 
  com.google.gwt.core.client.GWTBridge which simply extends the 
  ...shared.GWTBridge class. I read about 
  http://code.google.com/p/google-web-toolkit/issues/detail?id=7527 but 
  it seems that this is something different, or not? Any solution? 
  
  Cheers, 
  Moritz. 
  
  PD, here comes the full stack trace, the exception seems to be related 
  to the Guice filters: 
  
  SEVERE: javax.servlet.ServletContext log: Exception while dispatching 
  incoming RPC call 
  java.lang.NoClassDefFoundError: com/google/gwt/core/client/GWTBridge 
  at java.lang.Class.forName0(Native Method) 
  at java.lang.Class.forName(Class.java:186) 
  at 
  
 com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
  

  at 
  
 com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:64)
  

  at 
  
 com.google.gwt.user.client.rpc.core.java.util.Arrays$ArrayList_CustomFieldSerializer.serialize(Arrays.java:64)
  

  at 
  
 com.google.gwt.user.client.rpc.core.java.util.Arrays$ArrayList_CustomFieldSerializer.serializeInstance(Arrays.java:94)
  

  at 
  
 com.google.gwt.user.client.rpc.core.java.util.Arrays$ArrayList_CustomFieldSerializer.serializeInstance(Arrays.java:34)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:786)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
  

  at 
  
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:585)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:755)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:794)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
  

  at 
  
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
  

  at 
  
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:585)
  

  at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:605) 
  at 
  
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:393) 
  at 
  
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:579) 
  at 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
  

  at 
  
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
  

  at 
  
 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
  

  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
  at 
  
 com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
  

  at 
  
 com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
  

  at 
  
 com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
  

  at 
  
 com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
  

  at 
  
 com.googlecode.objectify.cache.AsyncCacheFilter.doFilter(AsyncCacheFilter.java:59)
  

  at 
  
 

Re: Protocol Buffers for GWT: Issue 2649

2012-12-21 Thread Darren Robinson
I just starred both issues. I really hope to see support for this issue 
also. I would much prefer to use Protocol Buffers over JSON or XML for web 
applications. Protocol Buffers are so much more elegant. 

-- 
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/-/S28zwRl68GcJ.
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 show value of texbox

2012-12-21 Thread Goktug Gokdogan
You should read the value from TextBox after button is clicked:

public void onModuleLoad() {
final TextBox textValue = new TextBox();

Button button = new Button(button, new ClickHandler() {
  public void onClick(ClickEvent event) {

  Window.alert(You selected:  + textValue.getValue());

}
  });

 RootPanel.get().add(textValue);
 RootPanel.get().add(button);

}
}


On Fri, Dec 21, 2012 at 6:11 AM, vector ector1...@gmail.com wrote:


 i need to show the value inserted into texbox i create this code

 public void onModuleLoad() {
  TextBox textValue = new TextBox();
  textValue.getSelectedText();
 final String index = textValue.getValue().toString();


  Button button = new Button(button, new ClickHandler() {
   public void onClick(ClickEvent event) {

   Window.alert(You selected:  + index);

 }
   });

  RootPanel.get().add(textValue);
  RootPanel.get().add(button);

 }
 }

 but into window not appears the value

 can help me?

  --
 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/-/iBSH87hWfLUJ.
 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: Protocol Buffers for GWT: Issue 2649

2012-12-21 Thread Goktug Gokdogan
GWT's built-in library space is already bloated and getting harder to
maintain. Inside GWT, we need to do less but do better.
And good thing is, a lot of stuff doesn't need to be baked in; like
the protocol buffers; it is a valuable feature but I personally don't see
GWT having it as a first class citizen; at least in the near term.
On the other hand we can definitely help out on removing any blockers and
support anybody who would like to implement it as a 3rd party library.

It looks like there is enough demand, why don't you guys start a project
for that?

On Fri, Dec 21, 2012 at 2:28 PM, Darren Robinson agent8...@gmail.comwrote:

 I just starred both issues. I really hope to see support for this issue
 also. I would much prefer to use Protocol Buffers over JSON or XML for web
 applications. Protocol Buffers are so much more elegant.

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

 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: image manipulation in core GWT

2012-12-21 Thread Goktug Gokdogan
You can achieve this and similar transitions with just CSS3.
Take a look at http://css3.bradshawenterprises.com/cfimg/




On Fri, Dec 21, 2012 at 1:48 PM, Aldin Habibović
habibovic.al...@gmail.comwrote:

 Hi guys,

 Is there widget in GWT for achieving slide show like this one: slide 
 showhttp://www.nitinh.com/static/SlideShow/mootools.html

 Any ideas how to implementing this slide show?

 Thanks

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


-- 
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: Still problems with com.google.gwt.core.client.GWTBridge

2012-12-21 Thread Thomas Broyer


On Friday, December 21, 2012 6:40:24 PM UTC+1, Ara Yapejian wrote:

 I'm also seeing this, has their been any updates or anyone know of a fix?


Please refer to the issue linked in the first post in this thread.
 

 This happened trying to upgrade my jars to gwt 2.5


We'll release 2.5.1 soon that'll fix it. 

-- 
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/-/9_zpL30TDVQJ.
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: jsni - overlay types - js arrays Java API

2012-12-21 Thread Thomas Broyer


On Friday, December 21, 2012 8:39:34 PM UTC+1, Sebastián Gurin wrote:

 Hi all. I'm porting some javascript libraries to GWT and in this thread I 
 hope I can share and learn best ways of accessing Js native arrays from 
 java language. 

 I try to add the minimun overhead so I'm using GWT's JsArray, 
 JsArrayMixed, JsArrayString, etc for referencing arrays whenever I can. But 
 this is not so friendly for a Java programmer accustomed to work with real 
 java arryas (String[]) or with java.util.Collection API. 

 The first thing I thought of was convert js arrays to Java arrays. 
 Unfortunately i didn't found a way of doing this without (linear overhead); 

 public static JsArrayNumber toJsArrayDouble(double[]a) {


There's 
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/JsArrayUtils.html
 
for that, but it comes with restrictions on what you're allowed to do with 
the returned value.

For the reverse, see 
https://code.google.com/p/gwt-in-the-air/source/browse/trunk/src/net/ltgt/gwt/jscollections/client/JsArrays.java
That reverse operation allows using a for loop to iterate on a JsArray*, 
e.g.: for (double : toArray(myJsArrayNumber)) { … }

Now I'm experimenting on wrapping a Js Array into a java Collection. For 
 this I made a simple Java class that extends java.util.AbstractCollection 
 [0] and wrapps a pure js array. So from jsni code now I can return Java 
 Collections instead JsArray like types and the final user of my libs can 
 write java statements like for(String s : myOverlay.getArrayProp()) {..}.  

 Also this solution adds very few (constant) overhead. So now I'm using two 
 getters for js arrays, one that return the real js array object using GWT's 
 JsArray* and other that return a Java Collection: 

 /**
  * Returns 'columns' property (JavaScript array)
  * @return
  */
 public native final JsArrayString columns() /*-{
 return this[columns]; 
 }-*/;
 /**
  * Returns 'columns' property (Java Collection)
  * @return
  */
 public native final CollectionString getColumns() /*-{
 return 
 @org.sgx.test1.client.JsUtil::toJavaCollection(Lcom/google/gwt/core/client/JavaScriptObject;)(this[columns]);
  

 }-*/;


FYI, I would have written it:

public final CollectionString getColumns() {
   return JsUtils.toJavaCollection(columns());
}

I would like to hear what others in the same situation do. Use JsArray* 
 GWT's classes vs more Java friendly API ???  Thanks in advance any 
 suggestion or comment is most appreciated. 



 [0] - Source code for my Java Collection class wrapper 


 import java.util.AbstractCollection;
 import java.util.Iterator;
 import com.google.gwt.core.client.JavaScriptObject;

 /**
  * a Java Friendly way of working with Js Arrays using the 
 Java.util.Collection API
  * @author sg
  *
  * @param T
  */
 public class JsArrayCollectionT extends  AbstractCollectionT {


Maybe we should have something like that in GWT proper. There hasn't been 
much demand AFAICT, and if we start going that way, people will likely ask 
for java.util.List rather than java.util.Collection.

-- 
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/-/C8GfwAM0ItAJ.
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: Protocol Buffers for GWT: Issue 2649

2012-12-21 Thread Thomas Broyer


On Saturday, December 22, 2012 2:50:00 AM UTC+1, Goktug Gokdogan wrote:

 GWT's built-in library space is already bloated and getting harder to 
 maintain. Inside GWT, we need to do less but do better.
 And good thing is, a lot of stuff doesn't need to be baked in; like 
 the protocol buffers; it is a valuable feature but I personally don't see 
 GWT having it as a first class citizen; at least in the near term.
 On the other hand we can definitely help out on removing any blockers and 
 support anybody who would like to implement it as a 3rd party library.


+1

Wondering what Google is doing though ;-)
Are you somehow generating, say, RequestFactory ValueProxy-s from .proto 
files? It looks like what BobV was planning.
 

 It looks like there is enough demand, why don't you guys start a project 
 for that?


Feel free to continue protobuf-gwt where I left it, I can add 
committers/owners if anyone's interested (let's discuss it 
in https://groups.google.com/d/forum/protobuf-gwt then)
I wonder whether it would make sense to support the binary serialization 
using TypedArrays in browsers that support them.
As for generating client code, the patch I made was never merged into 
protobuf, so wrt codegen, I think I'd rather use the approach taken by 
Wave: use protoc to generate normal Java classes, then load the classes 
and use the protobuf reflection API to generate GWT-specific 
implementations.

-- 
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/-/vj4wP3pdv3MJ.
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: image manipulation in core GWT

2012-12-21 Thread Stevko
Have you seen this simple slideshow from IO2011 written entirely in html/css
http://html5slides.googlecode.com/svn/trunk/template/index.html#1
Write out html using GWT and letting CSS do the heavy lifting.


On Friday, 21 December 2012 13:48:16 UTC-8, Aldin wrote:

 Hi guys,

 Is there widget in GWT for achieving slide show like this one: slide 
 showhttp://www.nitinh.com/static/SlideShow/mootools.html  

 Any ideas how to implementing this slide show?

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