what date libraries are you using?

2013-08-22 Thread roegerle
Like many I'm a fan of Joda-Time.  I'm curious what date libraries are 
popular, if any, for GWT client side.  Goda looks dead.  GWT-Time looks as 
it might be of use.  Maybe pure javascript date packages are the way to go? 
 Whats been successful in your projects?

-- 
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: ImageResource question

2013-08-22 Thread Thomas Broyer
Beware when implementing com.google.gwt.resources interfaces (whose 
implementations are expected to be generated) that they might change and 
break your code. GWT 2.6 will introduce a new isStandalone() method for 
instance.

Also, BTW, you should probably use UriUtils.unsafeCastFromUntrustedString; 
it works exactly the same as fromSafeConstants, it's just a matter of 
"semantics": one says it's "safe" when the other clearly states that it's 
"unsafe but necessary".

On Wednesday, August 21, 2013 7:45:04 PM UTC+2, Steve C wrote:
>
> I haven't sorted out in my mind the best approach for a few of the 
> details, in particular making it reusable, but this works.  Consider it 
> more of a "proof of concept".
>
> You'd need to create red.png in the war directory, or could try out a data 
> url (which per my tests works with this).
>
> For a bundle with more images, the asynchronicity gets to be a bigger 
> issue, since you'd need to have something like a "master" callback once all 
> of the individual image callbacks have completed.  Also, there's no 
> facility for sprites, although I think it could be implemented.
>
>
> public class DynamicResourcesDemo implements EntryPoint {
> 
> private DynamicMenuBarResources resources;
> private MenuBar bar;
>
> public void onModuleLoad() {
> 
> MenuBar.Resources defaultResources = 
> GWT.create(MenuBar.Resources.class);
> MyImageResource imgres = new 
> MyImageResource(defaultResources.menuBarSubMenuIcon());
> resources = new DynamicMenuBarResources(imgres);
> 
> imgres.load("red.png", new Callback() {
> @Override
> public void onSuccess(Void result) {
> showUi();
> }
> 
> @Override
> public void onFailure(Throwable reason) {
> Window.alert("Error");
> }
> });
> }
> 
> private void showUi() {
> MenuBar fileMenu = new MenuBar(true);
> fileMenu.addItem("Open", new Scheduler.ScheduledCommand() {
> @Override
> public void execute() {
> Window.alert("Open File");
> }
> });
> fileMenu.addItem("Exit", new Scheduler.ScheduledCommand() {
> @Override
> public void execute() {
> Window.alert("So long!");
> }
> });
> MenuBar actionsMenu = new MenuBar(true, resources);
> actionsMenu.addItem("File", fileMenu);
> bar = new MenuBar();
> bar.addItem("Actions", actionsMenu);
> 
> RootPanel.get().add(bar);
> }
> }
>
> //-
>
> public class DynamicMenuBarResources implements Resources {
> 
> private static Resources base = GWT.create(Resources.class);
> private ImageResource menuBarSubmenuIconResource;
>
> public DynamicMenuBarResources() {
> }
>
> public DynamicMenuBarResources(ImageResource 
> menuBarSubmenuIconResource) {
> this.menuBarSubmenuIconResource = menuBarSubmenuIconResource;
> }
>
> @Override
> @ImageOptions(flipRtl = true)
> public ImageResource menuBarSubMenuIcon() {
> if (menuBarSubmenuIconResource != null) {
> return menuBarSubmenuIconResource;
> } else {
> return base.menuBarSubMenuIcon();
> }
> }
>
> }
>
> //
>
> public class MyImageResource implements ImageResource {
> 
> private Image image;
> private ImageResource defaultResource;
> private boolean imageValid = false;
> 
> public MyImageResource(ImageResource defaultResource) {
> image = new Image();
> this.defaultResource = defaultResource;
> }
>
> public void load(String url, final Callback callback) 
> {
> image.setUrl(url);
> final Panel pnl = new SimplePanel();
> pnl.add(image);
> Style pnlStyle = pnl.getElement().getStyle();
> pnlStyle.setVisibility(Visibility.HIDDEN);
> pnlStyle.setPosition(Position.ABSOLUTE);
> image.addLoadHandler(new LoadHandler() {
> @Override
> public void onLoad(LoadEvent event) {
> RootPanel.get().remove(pnl);
> imageValid = true;
> if (callback != null) callback.onSuccess(null);
> }
> });
> image.addErrorHandler(new ErrorHandler() {
> @Override
> public void onError(ErrorEvent event) {
> RootPanel.get().remove(pnl);
> // this lets the resource fall back to the default
> if (callback != null) callback.onSuccess(null);
> // this would instead invoke the error handling for the 
> callback
> //if (callback != null) callback.onFailure(new 
> Exception("Image Resource Load Error"));
> 

Re: what date libraries are you using?

2013-08-22 Thread Jens
Each day I pray that Java 8 won't get delayed any further and that GWT will 
include JSR 310 once Java 8 is released.

Currently I just avoid date manipulation code in shared classes. On client 
I use the Date class with its deprecated methods behind a date manipulation 
utility class and on the server I use JodaTime. So nothing fancy. Luckily I 
don't have to deal with timezones yet.

Only issues I had so far are daylight saving time issues for some dates. 
Looks like Linux, GWT and web browsers all have slightly different 
information about DST. 
See: https://groups.google.com/d/msg/google-web-toolkit/e7IqbcJIzTY/q04nxG_F8BkJ

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


gwt-google-apis library

2013-08-22 Thread Ümit Seren
This question  should be posted on the gwt-google-apis forum but I am not 
sure if anyone actually checks it (last post is from last year).  

I have been using the gwt-google-apis library (specifically 
gwt-visualisations) extensively. 
However there hasn't been any update to the library for a long time. 
In the meantime most of the JS libraries (gwt-charts, etc) have been 
evolving but the gwt wrappers haven't been updated to support new features. 
So I ended up copying the src and modifying it myself, but that's probably 
not the ideal solution (there are also a couple of other open source 
repository on github/google-code). 

Are there any plans by the SC members for handling this situation? 
I could imagine it should be possible to move it over to github and open it 
contributions by the community. 


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Build a DataGrid with 2 proxies

2013-08-22 Thread aurelie . virgile
Hi guys, 
Is it possible to mix up datas coming from multiples proxies on to a 
DataGrid or do i have to create a new proxy containing both ?

table = new DataGrid(numRows,
GWT. create(TableResources.class));
initWidget(GWT. create(Binder.class).createAndBindUi(this));
  
Column nameColumn = new NameColumn();
table.addColumn(nameColumn, "Acolumn");
table.setColumnWidth(nameColumn, "25ex");

table.setColumnWidth(descriptionColumn, "40ex");
table.addColumn(new CpColumn(), "BColumn");

Would like to add a column like 
Column ficheColumn = new FicheColumn();
table.addColumn(ficheColumn, "Demandeur");

It says 
The method addColumn(Column, String) in the type 
AbstractCellTable is not applicable for the arguments 
(Column, String)

Regards,

pierre

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


Roadmap

2013-08-22 Thread Marcos

Hi,

Is there any roadmap / plan to the next versions of GWT ?

Thanks

Mussi

-- 
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: Roadmap

2013-08-22 Thread Thomas Broyer
https://developers.google.com/events/io/sessions/327833110 ?

On Thursday, August 22, 2013 6:17:53 PM UTC+2, Marcos wrote:
>
>
> Hi,
>
> Is there any roadmap / plan to the next versions of GWT ?
>
> Thanks
>
> Mussi
>

-- 
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: Build a DataGrid with 2 proxies

2013-08-22 Thread Jens
BProxy would need to extend AProxy. If you don't want that you have to use 
a third class/proxy that contains AProxy and BProxy.

In both cases your columns must then figure out what data to render (using 
instanceof or null checks depending on your solution).

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


Re: GXT Grid row is not selectable

2013-08-22 Thread SaiP
I've figured it, some how i had to create(local variable) the grid local to 
the method and added to the content panel. Then this local grid, I assigned 
it to the global grid. fxed it. 

On Wednesday, August 21, 2013 12:50:33 PM UTC-5, SaiP wrote:
>
> Hello,
>
> I'm new to GWT. I've a grid which has simple data mapped from a BaseModel. 
> When the user selects a row, it is supposed to be selected. I've checked a 
> few examples and post, it seems that we are doing it correctly. Code below 
> to create the grid. 
>
> Could you please mention the senarios in which this selection will be 
> blocked?
>
> List gridData= new ArrayList();
>  List config = new ArrayList();
> config.add(new ColumnConfig("isPrimary","Primary",70));
> config.add(new ColumnConfig("accountName","Account Name",320));
> config.add(new ColumnConfig("activeProgram","Active Program",150));
> config.add(new ColumnConfig("accountNumber","Account",100));
> config.add(new ColumnConfig("accountXref","Account Xref",150));
> config.add(new ColumnConfig("status","Status",93));
>  ColumnModel cm = new ColumnModel(config);
>  PagingModelMemoryProxy proxy = new PagingModelMemoryProxy(gridData);
> final PagingLoader> loader = new 
> BasePagingLoader>(proxy);
>  loader.setRemoteSort(false);
> store = new GroupingStore(loader);
> final PagingToolBar toolBar = new PagingToolBar(10);
> toolBar.bind(loader);
> loader.load(0, 10);
>  GroupingView view = new GroupingView();
> view.setShowGroupedColumn(true);
> view.setForceFit(true);
> view.setGroupRenderer(new GridGroupRenderer() {
> public String render(GroupColumnData data) {
> String l = data.models.size() == 1 ? "Item" : "Items";
> return data.group.substring(data.group.indexOf("|") + 1, 
> data.group.length())
> + " (" + data.models.size() + " " + l + ")";
> }
> });
>  ContentPanel cp = new ContentPanel();
> cp.setBodyBorder(false);
>  cp.setButtonAlign(HorizontalAlignment.CENTER);
> cp.setLayout(new FitLayout());
> cp.setFrame(true);
> cp.setSize(verticalPanelWidth, "300px");
> cp.setBorders(hidden);
> cp.setBottomComponent(toolBar);
> GWT.log("store size" + store.getCount());
> grid = new Grid(store,cm);
> final GridSelectionModel sm = grid.getSelectionModel();
> sm.setSelectionMode(SelectionMode.SINGLE);
> grid.setSelectionModel(sm);
>  final CellSelectionModel csm = new CellSelectionModel();
> csm.bindGrid(grid);
>  grid.setBorders(true);
> grid.ensureDebugId("gridDebugId");
> //grid.ensureDebugId("gridDebugId");
> grid.setTabIndex(5);
> cp.add(grid);
> return cp;
>

-- 
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: Appearance of extra scroll bar in GWT Datagrid

2013-08-22 Thread Ryan
I've seen the exact same issue starting around Chrome 22-22 on OSX. I've 
been unable to track down which element(s) are causing it but having to 
look at bugs me to no end. If you find out how to address it please report 
back.

Cheers,
Ryan

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


get scroll event from iframe

2013-08-22 Thread bhomass
there seems to be no way in GWT to get the iframe scrollEvent.

I tried

(com.google.gwt.dom.client.IFrameElement)frame.addDomHandler(newScrollHandler() 
{

   @Override

 public void onScroll(ScrollEvent event) {

  // do something

 }

 }, ScrollEvent.getType());

but the event does not fire when scrolling

inside the iframe, you can get

 Document document = iframe.getContentDocument(); 

but it does not have methods for adding listeners. there is no method for 
returning the contentWindow like in javascript.

any one knows any way to get the iframe scroll event?



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


Access POST parameters via servlet?

2013-08-22 Thread John
I'm creating a GWT application that, when accessed, will be passed POST 
parameters (user id, etc.).

All the reading I've done so far has led me to believe that I should create 
a servlet (I'm using tomcat) that will handle the POST parameters and then 
forward to my GWT application.  I've gotten this working, but I'm still 
having trouble passing this data to my application.  I've seen 3 suggested 
approaches:

   1. Save data to context:  I have this working right now, but I'm not 
   happy with it.  When the servlet is accessed, I parse the parameters and 
   update the context of my GWT web application and then forward to the 
   application where I make an RPC call to read the context.  This does what I 
   want it to, but this creates a race condition when multiple users try to 
   access the application at the same and the context is rapidly changing.
   2. Store data in session:  I've tried saving the data to the request 
   session in my servlet, and then doing a 
   "response.sendRedirect(response.encodeRedirectURL("url"))" but I've not 
   been able to access the same session.  When I do 
   "this.getThreadLocalRequest().getSession()" I always get a new/different 
   session, so I assume I'm mucking this up somewhere.
   3. Pass data in URL:  My application will be opened in an iframe, 
   meaning "Window.location.getParameter()" will not be usable.

Any help would be greatly appreciated!  I'm still learning GWT and web 
development in general so don't be afraid to call me out on any obvious or 
silly mistakes.

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: Access POST parameters via servlet?

2013-08-22 Thread Matthew Dempsky
On Thu, Aug 22, 2013 at 11:23 AM, John  wrote:

> I'm creating a GWT application that, when accessed, will be passed POST
> parameters (user id, etc.).
>

What does this mean?  Your GWT application runs on the client side.  Are
you saying the host page is sent to the browser in response to an HTTP POST
request?

If so, the typical way to propagate extra information to the client app is
to embed them in the host page (e.g., a hidden  with some data, or a

Problem with AbstractCell in IE

2013-08-22 Thread Dominic Warzok
Hey,

i've got a problem with an AbstractCell.

I created a class to get an image link. This class extends an abstract cell.

To display the link I created a SelfHTML template. This looks like this: 

 @Template ( ""
+
"" +
" " +
"" +
"{1}")
SafeHtml hyperImageText( SafeUri link, String text, SafeUri image, 
String target );


In every Browser it's working fine but in InternetExplorer you can only 
click on the Image an not on the text. Thats a little bit anoing to our 
cutomers. 

The rendred output from InternetExplorer is: 

 http://heise.de"; target=_blank>




heise.de


Any idea how to fix this ? 

Thanks in advance ;)  

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