Re: Thoughts on GWT 3.0 re: Java 8 and IE 8/9

2013-11-29 Thread Mike Dee
This sounds very much like Wicket.  When we were evaluating frameworks to 
use, about 2.5 years ago, to update our app it boiled down to Wicket and 
GWT.  Wicket had the advantage that it allowed designers and coders to work 
better together (markup and code in separate source files).  GWT won out 
because we are largely Java developers and it looked like designing an app 
that always filled the screen (for desktop and tablets - but not phones) 
would be easier.

I never understood why there wasn't more of a convergence between Wicket 
and GWT.  When uibinder was introduced I was hoping it would be more 
HTML-ish, like Wicket

-- 
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: What is the simplest way to show “loading indicator” during an RPC call in GWTP?

2013-11-29 Thread Mike Dee
We do exactly what you describe and it works fine.  However, we don't use 
GWTP.  Our code looks very similar to yours.  The presenter (activity) 
initiates the query and invokes the dialog and hides it when the callback 
returns.

Maybe GWTP is doing something in the interim.

Mike

On Saturday, October 26, 2013 2:21:57 AM UTC-7, Tom wrote:
>
> I am using GWTP to build my webapp. Here is my problem. I have a customer 
> page (CustPresenter). When that page is visited, it will call & load Data 
> from Database.
>
> It may take a while to load all data, so I *want my current Browser 
> locked* so that the user can not click any things while data has not 
> finished downloading yet.
>
> So here is what I am thinking. I want to show a DialogBox right before I 
> make the RPC call & hide it when the call finishes. Look at the below code:
>
> public class CustPresenter extends
> Presenter {
>
> private DialogBox loadingDialogBox=new DialogBox();
>
> @Inject DispatchAsync dispatchAsync;
>
> @Override
> public void prepareFromRequest(PlaceRequest request){
>  super.prepareFromRequest(request);
>  loadingDialogBox.show();
>  GetData getDataAction=new GetData();
>  dispatchAsync.execute(getDataAction, getDataCallback);
>
> }
>
> private AsyncCallback getDataCallback=new 
> AsyncCallback(){
>
> @Override
> public void onFailure(Throwable caught) {
> loadingDialogBox.hide();
> }
>
> @Override
> public void onSuccess(GetVerbFromTripleResult result) {
>  //show data here (it may take long time)
>  loadingDialogBox.hide();
> }
>};
> }
>
> However, when runing, the dialogbox only shows up for 1 second & then 
> disappears. Right After that all the UiBinder Guis show up on the Customer 
> Page & user can click any buttons on the page while the data has not 
> finished downloading yet. This is not a correct behavior.
>
> I want to do something like this http://sqlfiddle.com/#!2/a2581/1. As u 
> can see, when u first time open that link, a loading panel popups & u can't 
> click anything until all guis show up.
>
> So, why do I have this problem?
>
> How to fix it?
>
> Or generally, What is the simplest way to show "loading indicator" during 
> an RPC call in GWTP?
>

-- 
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: Can't debug on MacOS X

2013-11-29 Thread Mike Dee
I resolved this by installing a newer version (Kepler) of Eclipse.

On Tuesday, November 26, 2013 4:39:13 PM UTC-8, Mike Dee wrote:
>
> Trying to test our app on a Mac and can't debug the app.  Upon launching 
> the app in debug mode a "Problem Occured" dialog pops with with a message, 
> "Launching myapphtml has encountered a problem.  An internal error 
> occurred: "Launching myapp.html".  Clicking the Details button shows, "An 
> internal erroro occurred during: "Launching myapp.html". 
>  java.lang.NullPointerException.
>
> This works fine on a Windows machine.
>
> This is a fairly new Mac with Eclipse and GWT just installed: Mac OS 
> 10.8.3, Java 7 rel 25, GWT 2.5.1.
>
> Any ideas?
>

-- 
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: Issue with Loading image while using 'CellTable' in GWT

2013-11-29 Thread Mike Dee
We do that without much problem.  How do you load the image and determine 
when it is finished loading?  We use gwt-image-loader (
https://code.google.com/p/gwt-image-loader/).  It has an event that is 
thrown when the image is loaded.

Mike

On Thursday, November 28, 2013 10:35:36 PM UTC-8, Arnab wrote:
>
> Hello All,
>
> I am implementing a program using GWT where we need to show the 'Loading 
> image' every time we visit the page.
> I am using CellTable to perform this activity.
>
> But the Loading image shows only for the first time visit and from the 
> next time I do not get any loading image.
>
> I tried lot of logic(clearing the cache) but nothing work. Checked 
> different blog sites but didn't found any solution.
>
>
> Can any body tell me how to implement this, so that I can see 'Loading 
> image' every time I visit the page.
>
> Thanks in advance!
>
> Regards,
> Arnab
>

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


Can't debug on MacOS X

2013-11-26 Thread Mike Dee
Trying to test our app on a Mac and can't debug the app.  Upon launching 
the app in debug mode a "Problem Occured" dialog pops with with a message, 
"Launching myapphtml has encountered a problem.  An internal error 
occurred: "Launching myapp.html".  Clicking the Details button shows, "An 
internal erroro occurred during: "Launching myapp.html". 
 java.lang.NullPointerException.

This works fine on a Windows machine.

This is a fairly new Mac with Eclipse and GWT just installed: Mac OS 
10.8.3, Java 7 rel 25, GWT 2.5.1.

Any ideas?

-- 
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: Dynamically generated HTML and GWT

2013-06-04 Thread Mike Dee
This looks more difficult than I first thought.  I think I'd have to 
somehow also attach to the form element.  I would need to set the action to 
go to a servlet.  I don't see a way to take some HTML and get the FORM 
element.

I may try a completely different way to do this.  I'll create a servlet to 
get the form, display it, and handle the form submission.  The entire thing 
will be put in an iframe (GWT frame).

I think this may also be the only way to get some of our forms working that 
have Javascript in them.  It looks like the Frame class treats the document 
as completely independent from the app (and the RootPanel).

You need to subclass HTMLPanel and SubmitButton to get what you want. The 
> HTMLPanel only supports adding widgets to existing HTML elements, not just 
> make an Element into a widget without detaching.
>  
> First you need to subclass the SubmitButton so that you gain access to the 
> SubmitButton(Element) protected constructor. Use that constructor to create 
> the SubmitButton instance.
>  
>
>

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




Re: Dynamically generated HTML and GWT

2013-06-03 Thread Mike Dee
I guess what I would do for a fallback option is to simply show the form in 
the GWT app.  If the user wants to alter any form fields, they could click 
a link and the form could be showed in a JSP page (new window).   From a 
JSP we could get everything we need. But it would be nice to have this work 
right within the app.

This is how we handle printing.  Haven't found a good way to print with GWT 
- we mostly print reports (generated on the fly as HTML, generated 
externally).  A link pops up a (printer friendly) version of the page 
(without the GWT UI of the app) done in JSP.  Works well.

The reports are static and we can show them within the GWT app easily. 
 There is no user feedback.  However, on the form pages, the user can 
interact with the form (changing form fields and saving the form).  So, it 
is a little trickier than the static reports we display.

Mike



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




Re: Dynamically generated HTML and GWT

2013-06-03 Thread Mike Dee
So, what is recommended - or what is good practice for a case where one has 
a page of HTML and needs to do something relatively simply?  Think of a 
form (HTML generated externally) and the form needs to be displayed in a 
GWT Composite-derived class.  The only thing desired is to allow the form 
fields to be altered and saved.

One additional question.  Would it be possible to do this with some simply 
Javascript in the external HTML.  JS is largely to validate fields.

Also, was exploring this further over the weekend.  Would the 
addAndReplace() method be useful?  Haven't tried it yet.

Mike



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




Re: Dynamically generated HTML and GWT

2013-06-03 Thread Mike Dee
Is my case considered static HTML?  The HTML is not known at run time.  It 
is received once the app is up and running.  It is not altered at all. The 
intent is to display it.  The HTML is generally always contains a form and 
there is an option to allow the user to alter some of the form fields and 
save the form.

>From my experimentation with wrap() I can see very few circumstances in 
which case it is actually useful.  It appears to be useful where there is 
only one page.  The way nesting of widgets is handled would make it tricky 
in anything more complicated.

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




Re: Dynamically generated HTML and GWT

2013-05-31 Thread Mike Dee
Now, this has gone from fun to just downright frustrating.  I'm stuck at 
the point of finding and wrapping the submit button.  I get the ubiquitous, 
"A widget that has an existing parent widget may not be added to the detach 
list".  Looked through the dozens of posts regarding that message.  The 
most common response is "don't use wrap() the way are using it".  There's 
also, "that's not the use case for wrap()".  Maybe one of these is true in 
my case.

Code is fairly simple.

*uibinder*:


 

*The view class's onLoad()* (this is an Activites and Places app that uses 
MVP).  So this view is on the right side of a splitterpanel.  The left side 
has a stackpanel (think of the mail example).  When the appropriate stack 
panel item is selected, this view appears on the right of the splitter.

public class ReviewView extends ResizeComposite
{
  ...

  @UiField ScrollPanel mainScrollPanel; 

private String html;  // Set in a separate method and called before 
onLoad().  This HTML comes from an external source.

  ...
public void onLoad()
{
mainScrollPanel.clear(); 
HTMLPanel htmlPanel = new HTMLPanel( html );
mainScrollPanel.add( htmlPanel );
Element submitButtonElement = htmlPanel.getElementById( "save" );// 
This appears to work, without being deferred.  I tried it defered also.
Button submitButton = Button.wrap( submitButtonElement ); 
// This is where the assert exception occurs.
}
}

Of course the HTMLPanel has a parent widget, the ReviewView. And it is 
nested inside of a ScrollPanel, which is nested in a SplitterLayoutPanel, 
which is inside a RootLayoutPanel.  There are probably widgets attached to 
all of those.  So, can this be done? One solution in the posts is to wrap() 
from the inside out.  With an A&P app this seems nearly impossible as 
Widgets are always embedded in Widgets.  What is the point of wrap() if it 
is so finicky()?  

I also tried deferred method, replacing HTMLPanel with MyHtmlPanel:

*onLoad()* looks like this:

MyHtmlPanel htmlPanel = new MyHtmlPanel( html );
mainScrollPanel.add( htmlPanel );

And *MyHtmlPanel *looks like this:

private class MyHtmlPanel extends HTMLPanel
{
public MyHtmlPanel( String html )
{
super( html );
}
 protected void onAttach()
{
Element submitButtonElement = this.getElementById( "save" );// Appears 
to work.
Button submitButton = Button.wrap( submitButtonElement );// Same 
error occurs here.
}
 protected void onDetach()
{
}
}




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




Re: Dynamically generated HTML and GWT

2013-05-30 Thread Mike Dee
Thanks for pointing me in the right direction.

One last question.  How is the form submission handled?  Is a servlet 
needed?  In this case, the form will simply save any changes (to a db) and 
redisplay itself.

Thanks,
Mike

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




Dynamically generated HTML and GWT

2013-05-29 Thread Mike Dee
Hi,

I'm hoping this can be done with relative ease in GWT.  I need to integrate 
a couple of features that involve HTML that is generated on the fly. 
Basically, the app gets some XML and sends it to a service which returns 
HTML (via an XSL transform).

There are two cases. 

1) The first is easy and it is working with GWT, but I have a question.  We 
just create an HtmlPanel and put the HTML in it.  But does the HTML need to 
be complete - should it have HTML, HEAD, and BODY tags or can it just be a 
blob of HTML?  Right now it does not have the HTML header and it works (the 
blob is wrapped in a DIV).  Just want to know what is "correct".

2) The second case is a little more tricky. It is similar to the first, but 
the HTML is a form.  So, it needs to display (which it does).  But how do I 
handle the submit button?

Thanks,
Mike

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




Re: WindowBuilder (GWTDesigner) error

2013-05-03 Thread Mike Dee
init() simply sets up the controls in the view.  If settings is null, it 
doesn't do much accept leave the controls at their defaults.  If settings 
is not null, then it sets the controls to values specified in settings. 
 Basically its setting the index on a bunch of listboxes.

MyControlPanel looks like this:

public class MyControlPanel extends BaseControlPanel
{
private static MyControlPanel uiBinder = GWT.create( MyControlPanel .class 
);

@UiField ListBox qualityList;
@UiField ListBox reasonsList;
@UiField TextArea techCommentsTextArea;
@UiField TextArea medCommentsTextArea;
@UiField ListBox diagregList;
@UiField ListBox compregList;
@UiField Button reanalyzeButton;
@UiField Button holdButton;
 interface MyControlPanel extends UiBinder
{
}

...
}

And BaseControlPanel looks like this:

public class ReviewControlBaseBmdPanel extends Composite
{
// A few methods share by all derived classes
}

The WindowsBuilder error happens on all of the derived classes.



>

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




WindowBuilder (GWTDesigner) error

2013-05-02 Thread Mike Dee
I'm getting the following error when I try to switch to design mode.

GWT Designer can't load a module because of error in gwt.xml module 
description, incorrect resource which requires processing with GWT 
generator or by some other configuration error.

Please check your *$project_dir/.gwt/.gwt-log* for GWT-specific errors (not 
GWT Designer errors).
This log has the following error messages:

[ERROR] Failed to create an instance of 
'com.mycompany.app.client.panels.MyControlPanel' via deferred binding 


This error occurs when attempting to view  MyView.ui.xml in design mode. 
 MyView includes MyControlPanel.ui.xml.

The app actually runs fine.  I just can't use WindowBuilder.

After playing around with this for a while I noticed that MyControlPanel() 
has two constructors (as shown below).  They both call init() which does 
common initialization.  If I remove the call to init(null) in the first, it 
works fine!

public MyControlPanel()
{
initWidget( uiBinder.createAndBindUi( this ) );
init( null );
}
public MyControlPanel( Settings settings )
{
initWidget( uiBinder.createAndBindUi( this ) ); 
init( settings );
}

Any clues?

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




Re: How to globally catch all exceptions?

2013-04-15 Thread Mike Dee
I recently implemented this and found this article particularly useful:

http://www.summa-tech.com/blog/2012/06/11/7-tips-for-exception-handling-in-gwt/

On Wednesday, April 10, 2013 4:22:03 AM UTC-7, membersound wrote:
>
> Hi,
>
> how could one best catch all exceptions within the application that occur 
> and are not handled anywhere?
> Would it just require a try-catch block in the onModuleLoad()? Or maybe an 
> extra Servlet?
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Conceptual Doubt

2013-04-15 Thread Mike Dee
Take a look at Activities and Place and MVP.  There is a lot out there on 
these topics.  I think it is  what you are looking for.

Mike

On Sunday, April 14, 2013 2:04:17 PM UTC-7, Robson Braga wrote:
>
> Hi folks!
>
> I'm new in GWT and I'm writing a GWT Application from scratch.
>
> After studied some google documentation for GWT, I've concluded that the 
> only way to create different kind of forms, in the same application, is by 
> composites.
>
> The problem is that, according with I've read, the concept of composites 
> should be create custom widgets, not an entire form, like a configuration 
> form.
>
> Should I use composites to create Entries, Addresses, Orders, 
> Configuration forms and such? If not, how do I create different kind of 
> forms in the same GWT Application?
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Why doesn't this (AbsolutePanel inside a ScrollPanel) work?

2013-03-04 Thread Mike Dee
That got me thinking.  I can't really get rid of tbe ScrollPanel because a 
number of other panels other substituted into it.  But adjusting the 
overflow on the ScrollPanel seems to work.  So onResize() looks like this:

Style.Overflow cssover = Style.Overflow.HIDDEN;

if( w < absolutePanel.getWidgetLeft( horizontalPanel ) + 
horizontalPanel.getOffsetWidth() )
{
cssover = Style.Overflow.AUTO;
aw = absolutePanel.getWidgetLeft( horizontalPanel ) + 
horizontalPanel.getOffsetWidth();
}
 if( h < absolutePanel.getWidgetTop( horizontalPanel ) + 
horizontalPanel.getOffsetHeight() )
{
cssover = Style.Overflow.AUTO;
ah = absolutePanel.getWidgetTop( horizontalPanel ) + 
horizontalPanel.getOffsetHeight();
}
 scrollPanel.getElement().getStyle().setOverflow( cssover );
absolutePanel.setWidth( aw + "px" );
absolutePanel.setHeight( ah + "px" );




On Saturday, March 2, 2013 5:52:54 AM UTC-8, Patrick Tucker wrote:
>
> Try absolutePanel.getElement().getStyle().setOverflow(Overflow.AUTO) and 
> get rid of the ScrollPanel.  It by default sets overflow to hidden, but it 
> may work.

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




Why doesn't this (AbsolutePanel inside a ScrollPanel) work?

2013-03-01 Thread Mike Dee
 I've been banging my head on this for a while and have the bruises to 
show.  The goal is to place an AbsolutePanel inside a 
ScrollPanel.Scrollbars seem to randomly appear in Chrome.  Other browsers 
do weird things too.  I simply want to put stuff in an AbsolutePanel and 
have scrollbars appear if the window is too small.

Here's the code.

package com.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style;
import com.google.gwt.dom.client.Style.BorderStyle;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.HorizontalPanel;

/**
 * Entry point classes define onModuleLoad().
 */
public class Tp implements EntryPoint
{
interface Binder extends UiBinder
{
}

private static final Binder binder = GWT.create( Binder.class );

@UiField(provided=true) ScrollPanel scrollPanel = new MyScrollPanel();
@UiField AbsolutePanel absolutePanel;
@UiField HorizontalPanel horizontalPanel;

/**
 * This is the entry point method.
 */
public void onModuleLoad()
{
binder.createAndBindUi( this );
 RootLayoutPanel.get().getElement().getStyle().setBackgroundColor( "gray" );
scrollPanel.getElement().getStyle().setBackgroundColor( "yellow" );

absolutePanel.getElement().getStyle().setBackgroundColor( "green" );
absolutePanel.getElement().getStyle().setMargin( 0.0, Style.Unit.PX );
absolutePanel.getElement().getStyle().setBorderWidth( 0.0, Style.Unit.PX );
absolutePanel.getElement().getStyle().setBorderStyle( BorderStyle.NONE );
absolutePanel.getElement().getStyle().setBorderWidth( 0.0, Style.Unit.PX );
absolutePanel.getElement().getStyle().setPadding( 0.0, Style.Unit.PX );

horizontalPanel.getElement().getStyle().setBackgroundColor( "cyan" );
horizontalPanel.getElement().getStyle().setMargin( 0.0, Style.Unit.PX );
horizontalPanel.getElement().getStyle().setBorderWidth( 0.0, Style.Unit.PX 
);
horizontalPanel.getElement().getStyle().setBorderStyle( BorderStyle.NONE );
horizontalPanel.getElement().getStyle().setBorderWidth( 0.0, Style.Unit.PX 
);
horizontalPanel.getElement().getStyle().setPadding( 0.0, Style.Unit.PX );
 RootLayoutPanel.get().add( scrollPanel );
 scrollPanel.onResize();
}
 private int SLOP = 1;

/*
 * 
 */
private class MyScrollPanel extends ScrollPanel
{
public void onResize()
{
System.out.println( "-- MyScrollPanel->onResize()" );
 int w = RootLayoutPanel.get().getOffsetWidth();
int h = RootLayoutPanel.get().getOffsetHeight();
 setWidth( w + "px" );
setHeight( h + "px" );
 if( w < absolutePanel.getWidgetLeft( horizontalPanel ) + 
horizontalPanel.getOffsetWidth() )
w = absolutePanel.getWidgetLeft( horizontalPanel ) + 
horizontalPanel.getOffsetWidth();
 if( h < absolutePanel.getWidgetTop( horizontalPanel ) + 
horizontalPanel.getOffsetHeight() )
h = absolutePanel.getWidgetTop( horizontalPanel ) + 
horizontalPanel.getOffsetHeight();
 absolutePanel.setWidth( ((int)w - SLOP) + "px" );
absolutePanel.setHeight( ((int)h - SLOP) + "px" );
 super.onResize();
 System.out.println( "  scrollpanel w=" + getOffsetWidth() + " h=" + 
getOffsetHeight() );
System.out.println( "  absolutePanel w=" + absolutePanel.getOffsetWidth() + 
" h=" + absolutePanel.getOffsetHeight() );
 System.out.println( "== MyScrollPanel->onResize()" );
}
}
}

uibinder:

http://dl.google.com/gwt/DTD/xhtml.ent";>

 



Hello World
Hello World







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




Designing to fill the page

2013-02-18 Thread Mike Dee
I'm trying to develop an app with a screen (using A&P) so that it fills the 
browser window.  The app basically displays a bunch of images in tiles.  
Images are roughly the same size, 300 by 400 pixels.  As the user resizes 
the window, the app calculates how many full images can be displayed 
horizontally.  It is slightly more complicated in that there is a strip 
above the image and below that contain info about the images.

The layout I've come up with is based on a LayoutPanel.  

-LayoutPanel
--Label
---ScrollPanel
HorizontalPanel
-Image 1
-Image 2
-Image N
---Label

The ScrollPanel is included in case the window is adjusted to smaller than 
the height of an image.  Than the user can simply scroll vertically.  Also, 
the ScrollPanel positioning is adjusted within the LayoutPanel to center 
the HorizontalPanel of images.  

As the window is resized, the number of images that fits in the 
HorizontalPanel is recalculated and an onResize() is called to force the 
page to update.  The onResize() also positions the ScrollPanel in the 
center of the LayoutPanel (between the two Labels).

The math for this is pretty straightforward and not what I'm having trouble 
with.   The problem is that it doesn't work in the ideal way.  All the math 
for positioning seems fine.  However, the initial display often times 
includes scrollbars - even when the LayoutPanel is sufficiently large to 
contain the HorizontalPanel of images (ie. the ScrollPanel width and height 
match the width and height of the HorizontalPanel!).

I've tried deferring the onResize(), but that doesn't help.

In debugging, I can see that while moving the edge of a window (during a 
resize) that the height and width (gotten with getOffsetWidth() and 
getOffsetHeight()) of the ScrollPanel is jumping around quite a bit.  For 
example, if the window is made narrower, the width doesn't smoothly 
decrease.  Instead it may increase and decrease (maybe I have a shaky 
hand?).

Anyway, is there a better way to do this?  Any suggestions on the way I'm 
doing it?

The onResize() code follows.

public void onResize()
{
  int layoutHeight = RootLayoutPanel.get().getOffsetHeight();
  int horizHeight = horizPanel.getOffsetHeight();
  int topLabelHeight = topLabel.getOffsetHeight();  // These two have 
the same height.
  int bottomLabelHeight = bottomLabel.getOffsetHeight();

  int vborder = 0;
  if( layoutHeight - topLabelHeight - bottomLabelHeight > horizHeight )
vborder = ( layoutHeight - horizHeight ) / 2;
  else
vborder = topLabelHeight ;

  layoutPanel.setOffsetHeight( layoutHeight + "px" );
  // Center scrollpanel vertically.
  layoutHeight .setWidgetTopBottom( scrollPanel, vborder, Style.Unit.PX, 
vborder, Style.Unit.PX );

  int layoutWidth = RootLayoutPanel.get().getOffsetWidth();
  int horizWidth = horizPanel.getOffsetWidth();

  int hborder = 0;
  if( layoutWidth > horizWidth )
hborder = ( layoutWidth - horizWidth ) / 2;

  layoutPanel.setOffsetWidth( layoutWidth + "px" );
  // Center scrollpanel horizontally
  topLayoutPanel.setWidgetLeftRight( scrollPanel, hborder, Style.Unit.PX, 
hborder, Style.Unit.PX );

  super.onResize();
}

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




Re: adding scroll panel to popup panel

2013-01-08 Thread Mike Dee
It's fairly simple.  Do as expected.  Put a ScrollPanel inside a popup. 
 Set the width and height of the ScrollPanel to that of the Popup width and 
height.  Put something (another panel) in the ScrollPanel and set its width 
and height independently.  

Here is an example with an HTMLPanel inside ScrollPanel.  Done with 
uibinder.

*Main:*
public class Tpopscroll implements EntryPoint
{
interface Binder extends UiBinder
{
}

private static final Binder binder = GWT.create( Binder.class );
 @UiField SimplePanel mainPanel;
@UiField Button button;

/**
 * This is the entry point method.
 */
public void onModuleLoad()
{
binder.createAndBindUi( this );
 RootLayoutPanel.get().add( mainPanel );
}
 @UiHandler("button")
void onButtonClick( ClickEvent event )
{
ThePopup popup = new ThePopup();
 popup.show();
}
}

*Main's uibinder:*

http://dl.google.com/gwt/DTD/xhtml.ent";>

 
Hey




*A popup class:*
public class ThePopup extends PopupPanel
{
private static final Binder binder = GWT.create( Binder.class );
@UiField ScrollPanel scrollPanel;
@UiField HTMLPanel htmlPanel;

interface Binder extends UiBinder
{
}

public ThePopup()
{
super( true );

setWidget( binder.createAndBindUi( this ) );
 HTML html = new HTML(); 
html.setHTML( s );
htmlPanel.add( html );
}
 static String s = "Here is someHTML in an HTML Panel." + 
"This hypertext markup sample can get very wide...so wide that it extends 
outside the viewable area.";
}

*Popup uibinder:*

http://dl.google.com/gwt/DTD/xhtml.ent";>









On Monday, January 7, 2013 10:09:08 PM UTC-8, sreenivas wrote:
>
> Hi,
>
> I have a popup panel which opens on a button click event. Popup panel 
> height should be fixed and if contents of popup panel exceeds the height of 
> popup panel, then a vertical scroll bar needs to be attached to it, and i 
> should be able to scroll it to see the contents. How to achieve this? Can 
> any body please help?
>
>
> Thanks,
> Sreenivas
>

-- 
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/-/jqmbRILxANIJ.
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 know the css used by the datagrid header?

2012-12-28 Thread Mike Dee
The style name is probably obfuscated.  The default styles for CellTable 
are not in the standard.css with other GWT styles.  You can find them in 
com.google.gwt.user.cellview.client.CellTable.css.  If you want to change 
them, make a copy, change the styles, and pass it to your CellTable 
constructor.

On Thursday, December 27, 2012 12:20:58 AM UTC-8, tong123123 wrote:
>
> I use F12 in IE9 or FF13 but still cannot see the css used by the datagrid 
> header, I want to create a label with the css property (like the height, 
> padding...) same as datagrid header, how to accomplish 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/-/uf2CBh0yzEsJ.
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 create columns with common header in data grid.

2012-12-28 Thread Mike Dee
I wanted something similar but did it differently. I created a CellTable 
with just a header row above another CellTable.  The top CellTable had an 
extra header and nothing else.

On Thursday, December 27, 2012 3:14:27 AM UTC-8, shray rawat wrote:
>
>
> 
>
>
> ===
> see the attached files for this question.
> I AM HAVING A,B,C AS MAIN HEADERS AND D,E,F,G AS THE SUB HEADERS UNDER C.
>
> how can i create these columns in data grid
>

-- 
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/-/VQNneE7qAF0J.
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: Vertical align elements in FlowPanel?

2012-12-28 Thread Mike Dee
You may be able to do it with CSS, but FlowPanels are not meant for 
controlling layout as you desire (centering).  Can you try one of the other 
Panels, like VerticalPanel or LayoutPanel?

On Friday, December 28, 2012 1:40:01 AM UTC-8, membersound wrote:
>
> Hi,
>
> how can I vertically center elements within a FlowPanel? I have several 
> FocusPanels inside a FlowPanel, which means they are stacked on each other. 
> One of the focuspanels has an image, which should be centered both 
> horizontally and vertically within that focuspanel. But no matter what I 
> tried, it is always placed at the top of this panel.
>
> 
>   
> 
>   
>
>   
> ...
> 
>
> Can anyone help?
>

-- 
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/-/uPbqADQVaEAJ.
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: Wishlist - What GWT developers want for Christmas

2012-12-15 Thread Mike Dee
One thing that I didn't see and I would have as number #1 on the list is 
better documentation and improved ease of use, particularly for those 
starting with GWT.  Much of the documentation is written for those already 
with an understanding of GWT or lack of consideration that a user may be a 
newbie.  

Some examples:

1) Use of styles in a GWT app is still a mystery.  There are many options: 
CssResource, local styles in uibinder, obfuscation, etc.  Same can be said 
for localization.

2) Take a look at some of the sample code in the GWT widget showcase.  Some 
of it is very dense.  The point is to show how to write a widget, not show 
one's prowess with Java.


On Tuesday, December 11, 2012 10:45:59 AM UTC-8, Joonas Lehtinen wrote:
>
> We just published all of the 2600+ wishes you guys added to the Future of 
> GWT survey on most important things needed in GWT. Take a look:
>
> https://vaadin.com/gwt/report-2012/wishlist
>

-- 
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/-/zA6muX-5xycJ.
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.



Multiple GWT sessions possible?

2012-12-10 Thread Mike Dee
After moving an app from a traditional web app (think PHP or similar 
scripting language) to a GWT app I noticed a difference in handling of 
sessions.  It seems like it is possible to have multiple simultaneous 
sessions with a GWT app running in the same browser (different tabs or 
windows).  Not sure if this is a correct understanding or I am out in space 
some where.  Also, concerned about potential security flaws with this.

In our case, once a user is logged in, we create a session variable (server 
side). The value is not important.  We simply check for its presence with 
every GWT-RPC call (server side).  If the variable is not there, we throw 
an exception - to signal a timeout - which is caught by the GWT app and the 
user must log in again.

Once the user is logged in, we don't really use the session (accept to 
check for its existence, as mentioned above). We do keep the user id on the 
client side - in the GWT client app though.  Most of the calls to the 
server (via GWT-RPC) are not user specific.  They are mostly queries.  When 
the user is needed, the user ID is passed through GWT-RPC to the server. 

This is where a GWT app seems to really differ from a traditional web app. 
Each instance of a GWT app can store its own user ID.  These are stored in 
the GWT client app (JS variables).  Thus it seems like multiple instances 
of a GWT app can be run (for example, in two tabs of the same browser), 
with each instance being logged in as a different user.  They would, of 
course, share the same session.  In general, this is not likely to be done 
with a traditional web app because they typically rely on cookies to 
identify the user to the server and there is typically one cookie per web 
app (not per instance of the app).

This idea still seems a little strange to me, coming from a world other 
than GWT.  Does this makes sense or am I missing something?

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



Is there anything different about internationalizing a Dialog?

2012-11-07 Thread Mike Dee
I just did my first dialog box in GWT - with uibinder.  Strangely the code 
I use for internationalizing didn't work (completely).  It looks like the 
dialog box is trying to be rendered in iso-8859-1 because some French chars 
are not recognized.

Here is the code that appears at the top of a uibinder view (generated in 
eclipse by the gwt plugin).  I also put it at the top of the dialog boxes 
uibinder.


http://dl.google.com/gwt/DTD/xhtml.ent";>


This works in all my view's but not in the dialog box.

Any ideas?

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



Scrolling on iPad

2012-11-02 Thread Mike Dee
I have an app with a DataGrid on it and a vertical Scrollbar.  Works as 
expected - when more data is available then fits within grid, vertical 
scrollbar allows user to scroll down.  On iPad, however, the scrollbar is 
not visible.  Strangely, scrolling still works.  It's just that the 
scrollbar doesn't appear and thus most users won't know that they can 
scroll.  How can I make the scrollbar appear?

-- 
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/-/VSD5crADEyAJ.
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: RPC call from server to client

2012-10-26 Thread Mike Dee
I wonder how this is done in Google Docs? The approach may be a bit of 
overkill for a chat client though. Multiple users can edit a word 
processing document or spreadsheet simultaneously.

I've seen talks about how this is done conceptually.  It involved the 
command pattern and there was a way to ship (serialized) objects from 
server to client.  I think it used the Google Chat protocol.

On Wednesday, October 17, 2012 4:31:23 AM UTC-7, Magnus wrote:
>
> Hello,
>
> I realized a simple chat within my chess application:
>
> When the user posts something, the posting is sent to the server and the 
> chat view on the client side is updated.
> But when another user posts something, the user's view is not updated 
> automatically.
>
> I wonder how to realize an automatic update. From the server's point of 
> view it chould be realized like this:
>
> Whenever *some* user sends a posting, do the following:
> {
>  List l = getAllUsersThatAreCurrentlyLoggedIn();
>  for (User u:l)
>   notifyClientOfUser(u);
> }
>
> However, I do not know how and where to start and how to realize the 
> methods used above.
> How can I determine the users who need to be notified?
> How can I send the notification to the users? I have access to the user's 
> session data, but how can I make a call, where do I have to define the 
> service methods and where does the call come out within the client?
>
> Thanks
> Magnus
>
>

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



Places with DataGrid, AsyncDataProvider, and SimplePager

2012-10-02 Thread Mike Dee
I am using Activities and Places and encountered a situation where I'd like 
to know the best practice or at least get some good ideas.  The app has an 
Activity with a simple search form and a DataGrid. The form has some text 
boxes (first name, lastname, etc) and a Find button.  Enter in a firstname 
(partially), click Find, and the DataGrid fills with matching items.  The 
DataGrid allows sorting on the columns (first name, lastname, city, state, 
etc).  There is also a SimplePager on the form.  All works well, except 
with Places.  

I want the URL to reflect the state of the form.  So, one could type in the 
URL and it works.  Also the back and forward buttons of the browser work as 
expected.  Here is a sample URL:


 http://mycompany.com/myapp.html?findpeople#firstname=J:sortyby=1:start=0

The sortby and start arguments are what you would expect.

The problem is getting Places to work with sorting and paging.  It works 
with the Find button.  So, when someone clicks the Find button two things 
are done:

// Force a refresh of the DataGrid, which calls 
AsyncDataProvider.onRangeChanged,
// based on the search fields (first name, lastname, etc).
peopleTable.setVisibleRangeAndClearData( new Range( 0, PAGESIZE 
), true );

// Push this search on the location stack.
History.new( createUrl( firstname, lastname ), false );
 
The URL with the arguments is pushed onto the browser's location stack.  
Works nicely, except when the column headers (to sort) and the pager's next 
and previous buttons are clicked.  These trigger an rangeChange event with 
the DataGrid's AsyncDataProvider.

I can get it to work they way I want but in a kludgy way.  I can add a 
setSaveHistory() method to the AsyncDataProvider.  When true the provider 
calls History.new.  But that doesn't seem like a good way to do it.  I 
don't like the idea of doing this when the query is performed (in the data 
provider).

Maybe SimplePager isn't the appropriate pager to use.  However, the same 
problem exists with sorting (and clicking on the column headers).

Any thoughts?


-- 
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/-/4ga8KXOtTK8J.
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 components/panels on an externally hosted web page

2012-07-23 Thread Mike Dee
Brilliant!  That did it.

Thank you.

-- 
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/-/E2VWDvf3k6QJ.
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: Any summary on The History and Future of Google Web Toolkit available?

2012-06-29 Thread Mike Dee
There seems to be some news.  Try 
this: https://twitter.com/#!/search/GWT?q=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/-/cvTVNQiDvm8J.
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: Disabling selection in CellTable/DataGrid

2012-06-21 Thread Mike Dee
I ended up going with simply changing the CSS. I tried this early without 
success, but I found out what was going wrong.

The DataGrid CSS can be overridden (as described in many postings here). 
 In short, custom CSS can be provided to the DataGrid (and CellTable) via 
the constructor like this.

private DataGrid.Resources tablecss = 
GWT.create(MyResources.TableCss.class);
@UiField(provided=true) DataGrid table = new DataGrid( 10, 
tablecss );

TableCss is in the ClientBundle and looks like this.

public interface MyResources extends ClientBundle
{
...

// TableCss cell table
public interface TableCss extends DataGrid.Resources
{
@Source({DataGrid.Style.DEFAULT_CSS, 
"com/mycompany/myapp/client/resources/Table.css"})
DataGridStyle dataGridStyle();
 interface DataGridStyle extends DataGrid.Style {}
}

...
}

I've done this before (with CellTable) and it works nicely.  But this time 
I noticed something that I don't yet understand.  Previously, I've only 
overridden the CellTable styles that I wanted to change in the CSS file. 
 In this case, I had to define all the DataGrid styles, that are defined in 
the default datagrid CSS.  Doing that worked.  Overriding just a few style 
didn't work, for some reason.

Then I just altered the styles that had to do with hover and keyboard 
selection.  That gave me the effect I wanted.

-- 
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/-/2qShUa9pU5gJ.
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.



Disabling selection in CellTable/DataGrid

2012-06-20 Thread Mike Dee
At first I thought this would be easy to do.  But now I'm not sure about 
what I even want to do.  Maybe I should explain.

I simply want to have a DataGrid and: 1) not have the rows change color 
when the mouse hovers over them 2) not have the cell selected when I click 
on one.

At first I thought this could be handled via CSS.  Then I thought that the 
SelectionModel would handle it.  After some experimenting, I'm not sure 
which way is up.  In actuality, some DataGrids/CellTables will simply have 
data and I really want to disable all the hovering and all the cell 
selection.  In some cases a column will have buttons or checkboxes and I 
still want to get rid of the hovering and cell selection in these cases 
too, but if I do, would that disable the buttons and checkboxes?

-- 
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/-/XypXJS8p6AMJ.
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: Designing for testability with MVP and Activities and Places

2012-06-14 Thread Mike Dee
We probably we go with Selenium.  Someone else (other than me) will 
evaluate that.

I look at MVP + JRE based testing/mocking and I have trouble seeing the 
value.  All of our algorithms and database interactions are pojos and we 
have tons of JUnit tests written (without MVP + JRE tests/mocks).  I ask 
myself if there is much value in doing MVP + JRE based tests/mocks when 
Selenium will exercise those same areas.  Why do double the work?  Maybe I 
don't understand something or need to get used to the idea.

Then I ask myself why do MVP if not doing the MVP+JRE tests/mocks?  Yes, it 
makes the code cleaner, separating business logic from display.  Is that 
enough?

On Thursday, June 14, 2012 2:37:05 AM UTC-7, Thomas Broyer wrote:
>
>
>
> On Thursday, June 14, 2012 6:19:23 AM UTC+2, Mike Dee wrote:
>>
>> Have a look at 
>>> http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html
>>> The Wave guys came up with a model where the presenter controls the 
>>> view, so there's no getter; the view calls the presenter back with the 
>>> values when needed (i.e. your find() method would have the firstname et al. 
>>> as arguments).
>>>
>>
>> Useful, thanks.  I think we are doing something along those lines, but 
>> I'm not sure we'll stick with.  Still experimenting with testing.
>>  
>>
>>>
>>> Then a GWTTestCase could be written to call all the setters (which fill 
>>>> in the form fields) and press the Find button (need to add a method to 
>>>> simulate the pressing of the Find button).
>>>>
>>>
>>> If you assume Google tested the widgets, why are you using a 
>>> GWTTestCase? Mock the view and use a standard JUnit test case, it'll run so 
>>> much faster! 
>>>
>>
>> Your question brings up an issue I struggle with.  I understand the 
>> benefits of MVP in terms of testing.  However, I want to test the back-end 
>> simultaneously, including GWT-RPC and data queries.  As a result, I think 
>> GWTTestCase is needed.
>>
>
> In that case yes, either GWTTestCase or Selenium/WebDriver tests.
> But using GWTTestCase you can still create a mock view if it makes things 
> easier for you (though I must admit I'd use a mock RPC too in this case, 
> and testing "data queries" separately from GWT); otherwise I think you'd 
> have better results with Selenium/WebDriver (see below though).
>  
>
>> You may be correct, Selenium is the better way to do that.  I haven't 
>> tried Selenium with GWT apps (would be interested in hearing how well and 
>> easy it is to work with in terms of GWT).  I've heard it can be difficult, 
>> particularly with GWT apps.
>>
>
> I haven't used Selenium/WebDriver either.
> The key is to use ensureDebugId on your widgets, and run your tests 
> against an app compiled with the com.google.gwt.debug.Debug module (so that 
> ensureDebugId is not a no-op).
>

-- 
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/-/jomcMl99q_wJ.
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: Designing for testability with MVP and Activities and Places

2012-06-13 Thread Mike Dee

>
> Have a look at 
> http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html
> The Wave guys came up with a model where the presenter controls the view, 
> so there's no getter; the view calls the presenter back with the values 
> when needed (i.e. your find() method would have the firstname et al. as 
> arguments).
>

Useful, thanks.  I think we are doing something along those lines, but I'm 
not sure we'll stick with.  Still experimenting with testing.
 

>
> Then a GWTTestCase could be written to call all the setters (which fill in 
>> the form fields) and press the Find button (need to add a method to 
>> simulate the pressing of the Find button).
>>
>
> If you assume Google tested the widgets, why are you using a GWTTestCase? 
> Mock the view and use a standard JUnit test case, it'll run so much faster! 
>

Your question brings up an issue I struggle with.  I understand the 
benefits of MVP in terms of testing.  However, I want to test the back-end 
simultaneously, including GWT-RPC and data queries.  As a result, I think 
GWTTestCase is needed.  You may be correct, Selenium is the better way to 
do that.  I haven't tried Selenium with GWT apps (would be interested in 
hearing how well and easy it is to work with in terms of GWT).  I've heard 
it can be difficult, particularly with GWT apps.  

I'm considering if the technique described above could be an alternative to 
many Selenium tests.  It still allows testing in Java (even though it uses 
GWTTestCase).  As a Java programmer, that is very desirable.  Think of how 
easy it would be test a query driven case.  With Java/GWTTestCase the test 
case can drive the query (almost like scripting a view), exercise all the 
mechanics of the query (including the GWT-RPC), and easily check the 
results.  Essentially, all the layers of software are tested.  The only 
thing left out is the actual data entry by the user.

A good point made in the video you mentioned is Google follows a 70/20/10 
rule.  70% of test are micro tests that run quickly and involve no network 
traffice.  10% are big tests, largely GWTTestCase tests.  I guess I'm 
looking at the latter.  These are tests that run by QA to verify the 
product.  Being based on GWTTestCase (and it's being slow) is not that big 
of a deal, if it works better than Selenium.

-- 
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/-/y9uGaRn0IGYJ.
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: Designing for testability with MVP and Activities and Places

2012-06-13 Thread Mike Dee
I got this HyperlinkCell class somewhere and it works pretty good.

public class HyperlinkCell extends AbstractCell
{
@Override
public void render( com.google.gwt.cell.client.Cell.Context context, 
Hyperlink h, SafeHtmlBuilder sb )
{
sb.append( SafeHtmlUtils.fromTrustedString( h.toString() ) );
}
}

As I thought about it more I ask myself what do I want to test.  I'd like 
to test that the data in the view is retrieved properly, put into a query 
properly, and that the query works.  I don't need to test that the view 
displays things properly.  I'll assume Google tested its widgets.

Given that, what do you think about this idea for testing?  I got this idea 
by examining the Display interface technique.

Add getters and setters to for each view field.  Using the above example,

public class PersonSearchViewImpl extends ResizeComposite implements 
PersonSearchView
{
public void setFirstname( String firstname )
{
   this.firstname.setText( firstname );
}

public String getFirstname()
{
   firstname.getText();
}
}

Then a GWTTestCase could be written to call all the setters (which fill in 
the form fields) and press the Find button (need to add a method to 
simulate the pressing of the Find button).

On Wednesday, June 13, 2012 3:30:26 AM UTC-7, Thomas Broyer wrote:
>
>
>
> On Wednesday, June 13, 2012 2:59:33 AM UTC+2, Mike Dee wrote:
>>
>>
>> A couple of questions regarding a test I'd like to perform.  Let's assume 
>> that testing occurs with a live database (and GWT-RPC).  I know that 
>> contest of the database and what should be returned for certain queries.  
>> I'd like to run tests that execute certain queries and make sure they 
>> appear in the table (at certain positions).
>>
>
> I'd probably rather use Selenium/WebDriver tests here.
>  
>
>> 1) How would I test the clicking within the results.  For example, each 
>> person's name appears (per row) as a Hyperlink in the results.  This is 
>> implemented in a CellTable with Hyperlinks.  Normal behavior is that when 
>> the Hyperlink is clicked, GWT goes to the new place.  There is no 
>> notification to the activity.  I suppose a ClickHandler could be added, but 
>> it would have no usefulness other than testing.  Would it be better to not 
>> use a Hyperlink (maybe a Label with a click handler) and add a 
>> selectPerson() method to the Presenter.  Then the activity could test the 
>> selection and handle the advancing to the new Place?
>>
>
> How can you possibly use a Hyperlink (widget) in a CellTable?!
> You might want to handle the "click" event from within your cell and call 
> History.newItem() or PlaceController#goTo() from there (still not 
> testable), or use a callback (similar to ButtonCell, ActionCell, or 
> ClickableTextCell) where you put the History/PlaceController stuff, or 
> route it through the Presenter.
>  
>
>> 2) I've seen a technique where a Display interface is created within the 
>> Presenter.  It contains a list of HasText and HasClickHandlers that 
>> conceptually define the View.  It seems pretty fine grained.   Of course, 
>> this has the same issue related to Hyperlinks.
>>
>
> Don't do that, if you ever write tests with a mock view, it'll be a pain 
> to mock. 
>

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



Designing for testability with MVP and Activities and Places

2012-06-12 Thread Mike Dee
Here is a simple example that I'm working on.  Input would be appreciated.  
I'm sure there are different approaches, but I'm having trouble finding one 
and having a particular issue with the level of granularity of testing.

I know one answer, in advance, will be to not use GWTTestCase.  I will heed 
that.  But the example below represents a simpler situation where 
GWTTestCase will likely be needed.  So, how would one do this with 
GWTTestCase (assuming the actual case I'll be testing for is a good 
candidate for GWTTestCase)?

I have a basic search form.  It has fields on it like: first name, last 
name, etc.  There is also a Find button.  When the Find button is pressed, 
a list of people matching the criteria appear.  Each row in the list 
(CellTable) has person's name, date of birth, address, etc.   Many items 
are links (Hyperlinks).  For example, the person's name is a Hyperlink 
that, when clicked, goes to a new screen showing the person details.  Basic 
CRUD stuff.

There is a presenter, defined by the view.

public interface PersonSearchView extends IsWidget
{
public void setPresenter( Presenter listener );
public void setData( Vector psinfos );
...

public interface Presenter
{
  /**
 * Find people that match certain criteria.
 * 
 * @return
 */
void findPersons( String firstname, String lastname, int sortBy, 
int start, int cnt );

/**
 * Navigate to a new Place in the browser.
 */
void goTo( Place place );
}
}

The PersonSearchActivity implements the Presenter.

public class PersonSearchActivity extends AbstractActivity implements 
PersonSearchView.Presenter
{
 ...
public void findPersons( String firstname, String lastname, int sortBy, 
int start, int cnt )
{
MyServiceAsync srv = GWT.create( MyService.class );
PersonSearchCallback personSearchCallback = new 
PersonSearchCallback ();
srv .findPersons( firstname, lastname, sortBy, start, cnt, 
personSearchCallback );
}

private class PersonSearchCallback extends 
AsyncCallback>
{
public void onFail( Throwable caught )
{
 caught.printStackTrace();
}

public void onSuccess( Vector results )
{
 clientFactory.getPersonSearchView().setData( results );
}
}
}

The PersonSearchViewImpl has a bunch of test fields on it (firstname, 
lastname, find button, etc) and calls the activities method to actually do 
work.

public class PersonSearchViewImpl extends ResizeComposite implements 
PersonSearchView
{
interface Binder extends UiBinder
{
}

private static final Binder binder = GWT.create( Binder.class );

@UiField TextBox firstname;
@UiField TextBox lastname;
@UiField Button findButton;

/**
 * Handle Search button - do the search.
 */
@UiHandler( "findButton" )
protected void onFindButtonClick( ClickEvent event ) 
{
...
listener.findPersons( firstname, lastname, sortby, start, cnt );
...
}
}

A couple of questions regarding a test I'd like to perform.  Let's assume 
that testing occurs with a live database (and GWT-RPC).  I know that 
contest of the database and what should be returned for certain queries.  
I'd like to run tests that execute certain queries and make sure they 
appear in the table (at certain positions).

1) How would I test the clicking within the results.  For example, each 
person's name appears (per row) as a Hyperlink in the results.  This is 
implemented in a CellTable with Hyperlinks.  Normal behavior is that when 
the Hyperlink is clicked, GWT goes to the new place.  There is no 
notification to the activity.  I suppose a ClickHandler could be added, but 
it would have no usefulness other than testing.  Would it be better to not 
use a Hyperlink (maybe a Label with a click handler) and add a 
selectPerson() method to the Presenter.  Then the activity could test the 
selection and handle the advancing to the new Place?

2) I've seen a technique where a Display interface is created within the 
Presenter.  It contains a list of HasText and HasClickHandlers that 
conceptually define the View.  It seems pretty fine grained.   Of course, 
this has the same issue related to Hyperlinks.  

Anway, I'd appreciate feedback on various approaches.

-- 
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/-/EW14INAHCXIJ.
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: Help with GWTTestCase and GWT-RPC

2012-06-12 Thread Mike Dee
Figured it out.  Needed to add this to the module.gwt.xml file on order for 
the service servlet to run.




Found this out here:

http://stackoverflow.com/questions/8158818/gwt-getting-404-in-gwttestcase-when-trying-to-make-an-ajax-call
 

-- 
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/-/q4VyOH1g-M4J.
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.



Help with GWTTestCase and GWT-RPC

2012-06-12 Thread Mike Dee
I'm having trouble getting a basic GWTTestCase running with a simple 
GWT-RPC.  Here is what it looks like.  What am I doing wrong.

Note that when the test is run the callback's onFailure() is called with a 
404 error detail.

public class Test2 extends GWTTestCase
{
@Override
public String getModuleName()
{
return "com.test.app.MyApp";
}

public void testTwo()
{
System.out.println( "Test2 starting." );
 MyServiceAsync srv = GWT.create( MyService.class );
DoitCallback doitCallback = new DoitCallback();
srv.doit( doitCallback );
 delayTestFinish( 1 );
 System.out.println( "Test2 ending." );
}
 /**
 * 
 */
private class DoitCallback extends AsyncCallback
{
public void onFailure( Throwable caught )
{
assert false;
caught.printStackTrace();
}

public void onSuccess( String results )
{
System.out.println( results );
finishTest();
}
}
}

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



GWTTestCase and GWT-RPC

2012-06-12 Thread Mike Dee
I'm having trouble getting a basic GWTTestCase running with a simple 
GWT-RPC.  Here is what it looks like.  What am I doing wrong.

Note that when the test is run the callbacks onFailure() is called with a 
404 error detail.

public class Test2 extends GWTTestCase
{
@Override
public String getModuleName()
{
return "com.test.app.MyApp";
}

public void testTwo()
{
System.out.println( "Test2 starting." );
 MyServiceAsync srv = GWT.create( MyService.class );
DoitCallback doitCallback = new DoitCallback();
srv.doit( doitCallback );
 delayTestFinish( 1 );
 System.out.println( "Test2 ending." );
}
 /**
 * 
 */
private class DoitCountCallback extends AsyncCallback
{
public void onFailure( Throwable caught )
{
assert false;
caught.printStackTrace();
}

public void onSuccess( String results )
{
System.out.println( results );
finishTest();
}
}
}

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



Using GWTTestCase to test GWT-RPC

2012-06-12 Thread Mike Dee
Just getting started with GWTTestCase.  I'd like to create some tests that 
include testing of the backend.  Having trouble getting a basic GWTTestCase 
running.  Here is what it looks like:

public class Test2 extends GWTTestCase
{
@Override
public String getModuleName()
{
return "com.test.app.MyApp";
}

public void testTwo()
{
System.out.println( "Test2 starting." );
 BoneStationServiceAsync bssrv = GWT.create( BoneStationService.class );
FindScansCountCallback findScansCountCallback = new 
FindScansCountCallback();
bssrv.findScansCnt( "Bar%", null, null, null, null, null, null, -1, 
findScansCountCallback );
 delayTestFinish( 1 );
 System.out.println( "Test2 ending." );
}
 /**
 * 
 */
private class FindScansCountCallback extends AuthAsyncCallback
{
public void onFail( Throwable caught )
{
assert false;
caught.printStackTrace();
}

public void onSuccess( Integer results )
{
System.out.println( results );
finishTest();
}
}
}

-- 
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/-/xQFOv4yyP1AJ.
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: making Anchor look like a normal link

2012-06-04 Thread Mike Dee
Actually, I think the answer is here:  
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ 

On Monday, June 4, 2012 10:40:53 AM UTC-7, Mike Dee wrote:
>
> Just thinking.  When right-clicking a Hyperlink, which starts a new 
> instance of the app in a separate window/tab, how would one figure out the 
> user (that is logged in to the original instance)?  I assume the new 
> instance starts up (onModuleLoad()) and knows nothing about the instance 
> from which it was started.
>
> One idea is to pass the user on the URL, but would that be secure?  Is 
> there a standard way to do this?
>
> On Sunday, June 3, 2012 6:30:39 PM UTC-7, Thomas Broyer wrote:
>>
>>
>>
>> On Monday, June 4, 2012 12:06:42 AM UTC+2, Mike Dee wrote:
>>>
>>> And opening a new window is when authentication comes into play.  The 
>>> user hasn't logged into the new instance of the application (opened in the 
>>> new window).  Hence we are back to the original problem.
>>>
>>> With a regular web app, this wouldn't be a problem.  The state of 
>>> whether the user is logged in is maintained on the server (in session 
>>> variables).  In the case of GWT, the state of whether the user is logged is 
>>> in maintained on the client.
>>>
>>
>> Not necessarily; and if you're doing it that way, then IMO you're either 
>> "over-secure" (at the detriment of UX, which is fine if it's a conscious 
>> choice) or you're doing it wrong.
>>
>> First, I find it way easier to handle authentication separate from the 
>> GWT app, and just consider the user is logged in when/if it loads the GWT 
>> app. That way, you only have to handle the case that the user has been 
>> disconnected and tell him to refresh the page in order to re-authenticate. 
>> And if you open the app while you're already authenticated (using cookies 
>> or whatever, but this is dealt with the server, unknown to the GWT app) 
>> then it "just works": the GWT app does not know (and does not need to know) 
>> whether you just authenticated or you reloaded the page, or went back to 
>> the app while your authentication session was still active, or opened the 
>> app in another window/tab; it just loads, and you're authenticated.
>>
>> But even if you handle authenticating from within the app, you can very 
>> well set a cookie after authentication and check it onModuleLoad (I did it 
>> once, it works, in practice, not only theoretically).
>>
>

-- 
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/-/baLXrMk1SrMJ.
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: making Anchor look like a normal link

2012-06-04 Thread Mike Dee
Just thinking.  When right-clicking a Hyperlink, which starts a new 
instance of the app in a separate window/tab, how would one figure out the 
user (that is logged in to the original instance)?  I assume the new 
instance starts up (onModuleLoad()) and knows nothing about the instance 
from which it was started.

One idea is to pass the user on the URL, but would that be secure?  Is 
there a standard way to do this?

On Sunday, June 3, 2012 6:30:39 PM UTC-7, Thomas Broyer wrote:
>
>
>
> On Monday, June 4, 2012 12:06:42 AM UTC+2, Mike Dee wrote:
>>
>> And opening a new window is when authentication comes into play.  The 
>> user hasn't logged into the new instance of the application (opened in the 
>> new window).  Hence we are back to the original problem.
>>
>> With a regular web app, this wouldn't be a problem.  The state of whether 
>> the user is logged in is maintained on the server (in session variables). 
>>  In the case of GWT, the state of whether the user is logged is in 
>> maintained on the client.
>>
>
> Not necessarily; and if you're doing it that way, then IMO you're either 
> "over-secure" (at the detriment of UX, which is fine if it's a conscious 
> choice) or you're doing it wrong.
>
> First, I find it way easier to handle authentication separate from the GWT 
> app, and just consider the user is logged in when/if it loads the GWT app. 
> That way, you only have to handle the case that the user has been 
> disconnected and tell him to refresh the page in order to re-authenticate. 
> And if you open the app while you're already authenticated (using cookies 
> or whatever, but this is dealt with the server, unknown to the GWT app) 
> then it "just works": the GWT app does not know (and does not need to know) 
> whether you just authenticated or you reloaded the page, or went back to 
> the app while your authentication session was still active, or opened the 
> app in another window/tab; it just loads, and you're authenticated.
>
> But even if you handle authenticating from within the app, you can very 
> well set a cookie after authentication and check it onModuleLoad (I did it 
> once, it works, in practice, not only theoretically).
>

-- 
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/-/6zb2US25fQoJ.
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: making Anchor look like a normal link

2012-06-03 Thread Mike Dee
I think I understand what you are saying.  In this case, the app is a 
medical app and there are requirements that the app timeout after a period 
of inactivity (which is usually short: 15 to 30 minutes).  When logging in, 
an event is triggered and the app state is "logged in".  Currently, the 
timeout isn't implemented, but the app does check the session on each RPC 
call.  When the session doesn't exist (is expired) the app state is "logged 
out".  The way it works now is pretty good...except for linking within the 
app.

I'll need to think about what you suggest (setting a cookie after 
authentication) to figure out how 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/-/dZUrrq2kqxMJ.
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: making Anchor look like a normal link

2012-06-03 Thread Mike Dee
And opening a new window is when authentication comes into play.  The user 
hasn't logged into the new instance of the application (opened in the new 
window).  Hence we are back to the original problem.

With a regular web app, this wouldn't be a problem.  The state of whether 
the user is logged in is maintained on the server (in session variables). 
 In the case of GWT, the state of whether the user is logged is in 
maintained on the client.

On Friday, June 1, 2012 12:18:27 PM UTC-7, Joseph Lust wrote:
>
> If you're using Activities and Places, you can have a link like 
> http://www.yourApp.com/entryPoint.html#stateInfo=something 
>>
>> The state information in the URL triggers the page to load to a specific 
> point, the exact same as this Google Groups page does. That way, opening 
> the link would open a new window and jump to the desired point in the 
> application. Obviously however, only open a new page if you really need 
> one, since the application will need to load again and it would be faster 
> to just change to that state in the current open application window.
>
> Sincerely,
> Joseph
>

-- 
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/-/ZVMQymX1mJEJ.
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: making Anchor look like a normal link

2012-05-30 Thread Mike Dee
Actually, I made a mistake.  The problem doesn't seem to be the 
authentication (which simply checks the session).   I disabled the 
authentication and it still happens.

I believe this is the way GWT is supposed to work.  A GWT is one page.  The 
going back and forward through pages is simulated by the Places mechanism.

What happens with a Hyperlink when opening in new tab/window is a hard 
reload.  This is the same as cutting and pasting a URL (once inside the 
app) into a new tab or window.  GWT calls onModuleLoad().  That's the way 
GWT works, unless I fundamentally misunderstand it.

The confusion about Hyperlink remains.  What is an internal link to the app 
supposed to do when opening in new tab/window?

On Monday, May 28, 2012 12:40:05 PM UTC-7, Thomas Broyer wrote:
>
> If loading the app (when you're authenticated) doesn't bring you to the 
> place the URL represents, then your app is broken.
>
> Your issue is either with auth or app initialization, not with hyperlinks.
>
> Google Groups for instance brings you back to where you were when hitting 
> F5.
>
>

-- 
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/-/waqm5o3WVn4J.
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: making Anchor look like a normal link

2012-05-28 Thread Mike Dee
Here is the confusing thing about links (HyperLink and Anchor).  Picture a 
simple CRUD situation where one does a search, the search results appear, 
and one can click on "something" to be shown the details.  When Hyperlink 
is right-clicked, the usual options appear.  If an app requires 
authentication (basic cookie/session stuff) and "open in another tab" or 
"open in another window" is selected, it doesn't work.  The newly opened 
tab goes to the log on screen.  Open in new Tab/Window has the same basic 
effect as doing a refresh (F5).

I find the Hyperlink documentation and discussions about Hyperlink 
confusing in that regard.  They explain that Hyperlink is supposedly for 
internal linking (within an app).  Open in new tab/window should be 
allowed.  The result of opening in a new tab/window should be to bring the 
app to the appropriate state in the new tab/window.  

But they don't talk about this authentication issue.  Is there a 
recommended way to handle this using Hyperlink/Anchor?  Or, should a Label 
(ClickableText, maybe) be used in such a situation?  Or something else?

Mike



On Thursday, May 17, 2012 7:26:25 AM UTC-7, Thomas Broyer wrote:
>
>
>
> On Thursday, May 17, 2012 1:40:39 PM UTC+2, Matthew Pocock wrote:
>>
>> Hi,
>>
>> I have several g:Anchor elements in my UiBinder design. I attach OnClick 
>> handlers to these to do interesting things. In the browser, these anchors 
>> are being rendered as  elements lacking an href attribute. When the 
>> mouse hovers over them, they don't do the usual link display things - the 
>> mouse icon goes into text mode rather than link-follow mode, and there's no 
>> blue underline. I tried adding a dummy href="" attribute, but although now 
>> they look like normal links, clicking on them follows to the url (in this 
>> case, a boring one) instead of the click handler. I want to have my cake 
>> and eat it - I want these links to look like links but react with my click 
>> handler. Is there a trick for this?
>>
>
> If your "links" navigate in your app, then you should set the href to be 
> the target history token. Otherwise, you shouldn't use a link, which means 
> you shouldn't use an Anchor. Use a Label, InlineLabel, Button, PushButton, 
> or CustomButton instead, and style it like to look like a link if that's 
> what you want (but then beware that you could confuse users, as things that 
> look like links should behave like links –including the ctrl+click and 
> right-click to open the target in new tabs/windows, add the target as a 
> favorite, or copy the target URL to the clipboard–; Google had it wrong in 
> GMail –they used s at the time I looked at it, they might had used 
> s before that– and in one of their redesign iterations –even before the 
> "gray" overhaul– they fixed it by using buttons that looked like buttons 
> for actions, and use true links for navigation).
>
> href="javascript:;" sure does work (and Anchor has a –legacy– constructor 
> that will use that), but I'd discourage its use if you care the slightest 
> bit about accessibility (and/or semantics).
>
> In any case, with you should preventDefault() on the event to disable the 
> navigation done by the browser on links, if you already do it in your code. 
> This is what Hyperlink/InlineHyperlink do.
>

-- 
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/-/NwqRsw67vXMJ.
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: CellTable vs DataGrid

2012-05-16 Thread Mike Dee
Note that I'm using GWT 2.4.

On Wednesday, May 16, 2012 12:12:56 PM UTC-7, Mike Dee wrote:
>
> Where is the uibinder stuff for DataGrid defined?  I can't seem to find it 
> and it doesn't appear in GWTDesigner.
>
> On Tuesday, March 20, 2012 6:23:08 AM UTC-7, Thomas Broyer wrote:
>>
>>
>>
>> On Monday, March 19, 2012 7:23:07 PM UTC+1, Alexander Orlov wrote:
>>>
>>> *CellTable vs DataGrid* — when to use which? DataGrid is for "large 
>>> data sets" and CellTable for (kind of) smaller data sets. But is there a 
>>> *reason not to use* the DataGrid Composite for all kinds of data sets? 
>>> What would be the disadvantage, besides an (non-user-perceivable) init 
>>> delay?
>>>
>>>- http://gwt.google.com/samples/Showcase/Showcase.html#!CwDataGrid
>>>- http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable
>>>
>>>
>> To my knowledge, both CellTable and DataGrid are for "large data sets" 
>> (as all the other Cell widgets; as opposed to Grid or FlexTable). The main 
>> (if not only) difference is that Datagrid has a fixed header/footer and a 
>> scrolling area for data (and thus is a RequiresResize), whereas CellTable 
>> generates a single grid with headers, data and footers (and thus has to be 
>> put inside a ScrollPanel to handle overflow, and then the headers and 
>> footers can scroll along with the data, and outside the viewport).
>>
>

-- 
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/-/zMPVafGwDdIJ.
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: CellTable vs DataGrid

2012-05-16 Thread Mike Dee
Where is the uibinder stuff for DataGrid defined?  I can't seem to find it 
and it doesn't appear in GWTDesigner.

On Tuesday, March 20, 2012 6:23:08 AM UTC-7, Thomas Broyer wrote:
>
>
>
> On Monday, March 19, 2012 7:23:07 PM UTC+1, Alexander Orlov wrote:
>>
>> *CellTable vs DataGrid* — when to use which? DataGrid is for "large data 
>> sets" and CellTable for (kind of) smaller data sets. But is there a *reason 
>> not to use* the DataGrid Composite for all kinds of data sets? What 
>> would be the disadvantage, besides an (non-user-perceivable) init delay?
>>
>>- http://gwt.google.com/samples/Showcase/Showcase.html#!CwDataGrid
>>- http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable
>>
>>
> To my knowledge, both CellTable and DataGrid are for "large data sets" (as 
> all the other Cell widgets; as opposed to Grid or FlexTable). The main (if 
> not only) difference is that Datagrid has a fixed header/footer and a 
> scrolling area for data (and thus is a RequiresResize), whereas CellTable 
> generates a single grid with headers, data and footers (and thus has to be 
> put inside a ScrollPanel to handle overflow, and then the headers and 
> footers can scroll along with the data, and outside the viewport).
>

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



RootLayoutPanel versus RootPanel with ScrollPanel

2012-05-13 Thread Mike Dee
I've been having a problem getting ScrollPanel to work as expected (or as I 
expect) in my app.  So, I've reduced the problem to a simple case.

The code below is from the example of a Custom Data Provider that Google 
provides in the CellWidgets Developer Guide:

https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellWidgets  
(scroll down to Custom Data Source to see the code).

Question is, why doesn't this work when RootPanel is replaced with 
RootLayoutPanel?  No scroll bars appear at all, and that is what I'm 
experiencing in my app.

Mike

public class RangeChangeHandlerExample implements EntryPoint {

  @Override
  public void onModuleLoad() {
// Create a CellList.
final CellList cellList = new CellList(new TextCell());

// Add a range change handler.
cellList.addRangeChangeHandler(new RangeChangeEvent.Handler() {
  @Override
  public void onRangeChange(RangeChangeEvent event) {
Range range = event.getNewRange();
int start = range.getStart();
int length = range.getLength();

// Create the data to push into the view. At this point, you could send
// an asynchronous RPC request to a server.
List data = new ArrayList();
for (int i = start; i < start + length; i++) {
  data.add("Item " + i);
}

// Push the data into the list.
cellList.setRowData(start, data);
  }
});

// Force the cellList to fire an initial range change event.
cellList.setVisibleRangeAndClearData(new Range(0, 25), true);

// Create paging controls.
SimplePager pager = new SimplePager();
pager.setDisplay(cellList);

// Add the widgets to the root panel.
VerticalPanel vPanel = new VerticalPanel();
vPanel.add(pager);
vPanel.add(cellList);
RootPanel.get().add(vPanel);
  }
}



-- 
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/-/T0E8dvciA2MJ.
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 determine CellTable row height?

2012-05-09 Thread Mike Dee
Andrei,

That's a good response.  I think you convinced me to not do it.

Instead, I wonder if it is possible to do something like what other web 
apps do (Twitter and even the new GWT google group), which is to keep 
adding rows as one scrolls down.  I've experimented with range change event 
handler.  Maybe that would be a more modern way to provide tabular data?

Mike

On Wednesday, May 9, 2012 7:13:33 AM UTC-7, Andrei wrote:
>
> If your data never wraps within a cell, then the height of the row is 
> always the same - it is determined by the CSS. (As a sidenote, you can 
> change it in your CSS, or even apply different heights to different 
> tables). 
>
> Else, 
>
> 1. The height changes as data wraps within a cell. Thus, you can't 
> know the actual height of the row until the table is rendered. 
>
> 2. If the height changes with data (some rows have longer data and 
> wrap, other rows don't), what's the point of changing the number of 
> rows? Your first 10 rows may take 240 pixels, the next 10 rows can 
> take 330 pixels, and so on. 
>
> Also, remember that data can wrap more often when columns are 
> narrower. This means that if you want to predict the height of your 10 
> rows, you also need to take into consideration the width of each 
> column. 
>
> 3. Users can change the size of the font in their browsers, unless you 
> disable it, which is not a good practice. They can also resize their 
> windows, add or hide toolbars in their browsers, etc. You just can't 
> avoid having a scroll-bar.

-- 
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/-/sEq0Vi47ztQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to determine CellTable row height?

2012-05-08 Thread Mike Dee
Is there a way to determine the height of a CellTable row?  The question 
has been asked several times here, but without an answer.  I would like to 
fit as many rows a CellTable as possible without scrolling.  So, if the 
browse'sr window, which contains a CellTable, can fit 10 rows, then I'd 
like to adjust the page size on my Pager to 10.  If the CellTable can 
accommodate 15 rows, then I'd like to display that many.

The one unknown piece of info is the height of a row. I have a working 
pager.  I have an AsyncDataProvider.  I just don't know how to figure out 
the height of a row.

Any ideas?

Mike

-- 
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/-/8HmHgql2vTAJ.
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.



Catch-22 with Celltable and AsyncDataProvider

2012-05-05 Thread Mike Dee
According to the Celltable Developers Guide here:

https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellTable

The example given for AsyncDataProvider seems to have a flaw here when 
setting the row count.

// Add the columns.
table.addColumn(nameColumn, "Name");
table.addColumn(addressColumn, "Address");

// Set the total row count. You might send an RPC request to determine the 
total 
row count.
table.setRowCount(CONTACTS.size(), true); 

// Set the range to display. In this case, our visible range is smaller than 
the 
data set.
table.setVisibleRange(0, 3);

As the comment suggests, an RPC call would likely be necessary and it would 
likely be asynchronous.

That leaves the question, how does one know that the RPC call will return 
with the size by the time it is needed/used later on?  Should method wait 
until the value is returned?

-- 
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/-/BiktGfPQ-C8J.
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: Couple CSS questions

2012-04-24 Thread Mike Dee
But the question remains, why doesn't changing the gwt-DateBox CSS affect 
the appearance of the DatabBox?  In my case, the standard.css was replaced 
with my own.  So, why aren't my changes having any effect?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/I8Heevutr0EJ.
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: Resolution Dependent ImageBundles

2012-04-19 Thread Mike Dee
Shouldn't the image size remain constant with screen resolution?  Otherwise 
there would be a similar need on desktops.  Are you specifying image size in 
pixels? Could you use percent? 

Mike


 On Tuesday, April 17, 2012 2:21:41 AM UTC-7, Evan Ruff wrote:
> Hey guys,
> 
> 
> So I'm designing an application to be used on tablets and phones. With 
> the introduction of the new iPad, my images are getting BIG. Real big. HUGE. 
> They're so big at this point, that it's really unwieldy to download 
> the ginormous ImageBundle; further, when scaled down in the browser, the 
> images aren't presentable anymore on smaller devices.
> 
> 
> I was wondering if anyone had started developing a 
> resolution dependent ImageBundle, where I could define screen densities 
> and have corresponding packages, much like the Android concepts. If not, I 
> believe that this would be a useful extension to the framework as things like 
> PhoneGap, MobileObjects and mgwt are really starting to push GWT successfully 
> on to the mobile devices. Could someone who has some familiarity with the 
> ImageBundle source point me in the direction of the Linker for that 
> class?
> 
> 
> Thanks,
> 
> 
> E

-- 
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/-/qC_ly69jPu0J.
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: Recruiting

2012-04-19 Thread Mike Dee
I've had the same problem. Put a post in gwt jobs group, but little response.  
Difficult to find good developers and gwt, in particular.

Mike

On Wednesday, April 18, 2012 1:17:52 AM UTC-7, Thomas Lefort wrote:
> Hi Thanks. I did try (this is what I called the dedicated group) and
> got a couple of answers, with very good CVs indeed. However, I was
> expecting a fair amount more. My (quick) deduction was that there are
> not so many GWT developers out there - which is not great news for a
> company. Hence my question.
> 
> Although not the intention, I got some more CVs through this post. So
> I guess the GWT Employment group does not have such a wide audience.
> 
> 
> On 17 April 2012 23:20, Thad  wrote:
> > You might want to look at the google-web-toolkit-employment group.
> > (https://groups.google.com/forum/?fromgroups#!topic/google-web-toolkit/N9NaadyNOk4)
> >
> >
> > On Sunday, April 15, 2012 6:08:41 AM UTC-4, Thomas Lefort wrote:
> >>
> >> I am looking into recruiting - or at least a bit of freelancing first,
> >> ideally someone around Madrid but not necessarily. I tried the dedicated
> >> group and also a few other websites (free). I got a couple of good CVs with
> >> the group but only two and not in Spain. With the websites, nothing at all.
> >> I am trying pay for job boards now.
> >> I am wondering if anybody else experienced any difficulty recruiting GWT
> >> savvy people. I was naively hoping given the crisis recruiting would be 
> >> easy
> >> but it doesn't appear to be the case. There appears to be shortage of 
> >> highly
> >> skill computer engineers.
> >> Anybody else experienced difficulties recruiting gwt profiles, or even
> >> Java web engineers in general?
> >>
> > --
> > 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/-/I03pg9fDjLkJ.
> >
> > 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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/EPwUNplM0SoJ.
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: Call for action: Time to rethink a road-map and more frequent updates for GWT.

2012-04-18 Thread Mike Dee
Google needs to step up to the plate.  If you want to be the caretaker for 
GWT and you want me (and other developers to use it), I need to know what 
you have planned.  While I'm working on one GWT project now, I will not use 
it on others until I know what is planned.  I need to know what support 
there will be for future browsers, the plugin, and Designer.  Informal 
announcement from Google employees are not good enough.  I also noticed no 
sessions on GWT at Google IO this year.

Minimally, I'd like to see a commitment like GAE.  Google has agreed to 
support GAE for three years beyond killing it (should it do so).  Ideally, 
I'd like to see at least two years of roadmap.

Mike

On Monday, April 2, 2012 8:19:16 AM UTC-7, Joshua Kappon wrote:
>
> With the rise of the new developers.google.com, and with Google trying to 
> rally up developers using Google technologies and products, and the rise of 
> Dart and unclear future of GWT, I think it's about time that Google will 
> rethink the all "We don't and won't have a road map, and there are no 
> release dates for new GWT versions" and embrace the GWT developers 
> community.
>
> What do you guys think? (if you agree, +1 this)
>
> Best,
> Josh 
>

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



Web app design with GWT

2012-03-29 Thread Mike Dee
I've been working with GWT for 6+ months now.  I don't have much
interaction with other GWT developers.  Thankfully, this group has
been helpful in getting up to speed.  I've built many traditionally
designed web apps (JSP, PHP, etc). With GWT the way I design a web app
is a little different.  Would appreciate feedback.

http://mdichi.wordpress.com/2012/03/29/web-app-design-with-google-web-toolkit-gwt/

-- 
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: Help with resizing

2012-01-20 Thread Mike Dee
FANTASTIC, that worked.

Not sure if I understand all the nuances of uibinder yet.

Thank you.

And Thank you Patrick too.

On Jan 19, 8:59 pm, Ashwin Desikan  wrote:
> Mike,
> In your ui:binder you are using a SplitlayoutPanel. You have to use the same 
> for the variable definition in your view as well. At runtime assign qn 
> instance of your custom SplitPanel to the declared variable
>
> Example:
>
> @UiField
> SplitLayoutPanel splitPanel = MySplitLayoutPanel();
>
> You need to add a cast anywhere you are using methods which are not part if 
> the base class
>
> Thanks
> Ashwin
>
> Sent from my iPhone
>
> On Jan 20, 2012, at 12:18 AM,MikeDee wrote:
>
>
>
>
>
>
>
> > That gives a runtime error when the view calls initWidget() in its
> > constructor.
>
> > Here is a summary of the code.  Note it uses Activities and Places.
>
> > // The view
> > public class MyViewImpl extends Composite implements MyView,
> > RequiresResize, ProvidesResize
> > {
> >    interface Binder extends UiBinder
> >    {
> >    }
>
> >    private static final Binder binder = GWT.create( Binder.class );
>
> >    @UiField(provided=true) MySplitLayoutPanel splitPanel;
>
> >    ...
> >    public MyViewImpl()
> >    {
> >        initWidget( binder.createAndBindUi( this ) );   // <=== Exception
> > thrown here
> >    }
>
> > }
>
> > // MyView.ui.xml
> > 
> > http://dl.google.com/gwt/DTD/xhtml.ent";>
> >  > xmlns:g='urn:import:com.google.gwt.user.client.ui'
> >    xmlns:p1="urn:import:com.google.gwt.user.cellview.client">
>
> >    
> >        ...
> >    
> > 
>
> > // MySplitLayoutPanel.java
> > public class MySplitLayoutPanel extends SplitLayoutPanel
> > {
> >    private static MySplitLayoutPanellUiBinder uiBinder =
> > GWT.create( MySplitLayoutPanel.class );
>
> >    interface MySplitLayoutPanelUiBinder extends UiBinder > MySplitLayoutPanel>
> >    {
> >    }
>
> >    @UiField SplitLayoutPanel main;
>
> >    // Just want to be able to override onResize.
> >    @Override
> >    public void onResize()
> >    {
> >        System.out.println( "*** ONRESIZE ***" );
> >    }
> > }
>
> > // MySplitLayoutPanel.ui.xml
> > http://dl.google.com/gwt/DTD/xhtml.ent";>
> >  > xmlns:g="urn:import:com.google.gwt.user.client.ui">
> >    
> > 
>
> > On Jan 18, 5:57 am, Patrick Tucker 
> > wrote:
> >> Define the element as a SplitLayoutPanel in the uibinder and provide
> >> it with an instance of your class in the java code.
>
> >> @UiField(provided=true)
>
> >> On Jan 17, 7:37 pm,MikeDee wrote:
>
> >>> Just getting back to this.  Was working on something else.
>
> >>> I did as describe below, by Ashwin.
>
> >>> However, when I switch to design mode in GWTDesigner, the following
> >>> error occurs:
>
> >>> [ERROR] No class matching "west" in
> >>> urn:import:com.google.gwt.user.client.ui Element 
>
> >>> I assume that something else must be done so that GWTDesigner knows
> >>> either: 1) my class is based on SplitLayoutPanel and thus the same XML
> >>> is used to define it, 2) I have to some how tell GWTDesigner about all
> >>> the options supported by MySplitLayoutPanel so that it knows how to
> >>> interpret the uibinder code.
>
> >>> It seems like this would be a common practice - to extend GWT widgets
> >>> - and so I assume it isn't too difficult.  Any pointers?
>
> >>>Mike
>
> >>> On Dec 28 2011, 8:53 pm, Ashwin Desikan 
> >>> wrote:
>
> Mike,
>
>  As long as you have a default constrictor in your derivedayout panel, 
>  you should be able to use it in ui:binder like below.
>
>  
>  
>  
>
>  Above m is the namespace identifier for your package.
>
>  Did u try something like above?
>
>  Thanks
>  Ashwin
>  Sent from my iPhone
>
>  On Dec 28, 2011, at 10:53 PM,MikeDee wrote:
>
> > Hi Ashwin,
>
> > The SplitLayoutPanel is inside a DockLayoutPanel (in the center).  I
> > can see the DockLayoutPanel->onResize() calling SplitLayoutPanel-
> >> onResize().  However, it isn't calling the onResize() I added with
> > addHandler().  I assume addHandler() has no effect since
> > SplitLayoutPanel implements ResizeRequired.  So, now I am figuring out
> > how to get a hold of SplitLayoutPanel's onResize() to override.
>
> > I've created a derived panel, called MySplitLayoutPanel.  Currently
> > trying to figure out how to make this work with uibinder.
>
> >Mike
>
> > On Dec 28, 1:16 am, Ashwin Desikan  wrote:
> >> All layout panels implement the onResize method. So you don't Have to 
> >> extend the widget unless you are doing a custom Splitlayout panel.
>
> >> Do you use the Splitlayout panel inside other panels? Also, i trust 
> >> you are using rootlayout panel instead of rootpanel in the onModule 
> >> method of your entrypoint
>
> >> Since, I can't Access the entire thread over email I am assuming you 
> >> are having Splitlayout panel inside another layout like a htmlpanel 
> >> etc and expect it to resize on the change of view dimension

Re: Help with resizing

2012-01-19 Thread Mike Dee
That gives a runtime error when the view calls initWidget() in its
constructor.

Here is a summary of the code.  Note it uses Activities and Places.

// The view
public class MyViewImpl extends Composite implements MyView,
RequiresResize, ProvidesResize
{
interface Binder extends UiBinder
{
}

private static final Binder binder = GWT.create( Binder.class );

@UiField(provided=true) MySplitLayoutPanel splitPanel;

...
public MyViewImpl()
{
initWidget( binder.createAndBindUi( this ) );   // <=== 
Exception
thrown here
}

}

// MyView.ui.xml

http://dl.google.com/gwt/DTD/xhtml.ent";>



...



// MySplitLayoutPanel.java
public class MySplitLayoutPanel extends SplitLayoutPanel
{
private static MySplitLayoutPanellUiBinder uiBinder =
GWT.create( MySplitLayoutPanel.class );

interface MySplitLayoutPanelUiBinder extends UiBinder
{
}

@UiField SplitLayoutPanel main;

// Just want to be able to override onResize.
@Override
public void onResize()
{
System.out.println( "*** ONRESIZE ***" );
}
}

// MySplitLayoutPanel.ui.xml
http://dl.google.com/gwt/DTD/xhtml.ent";>





On Jan 18, 5:57 am, Patrick Tucker 
wrote:
> Define the element as a SplitLayoutPanel in the uibinder and provide
> it with an instance of your class in the java code.
>
> @UiField(provided=true)
>
> On Jan 17, 7:37 pm,MikeDee wrote:
>
>
>
>
>
>
>
> > Just getting back to this.  Was working on something else.
>
> > I did as describe below, by Ashwin.
>
> > However, when I switch to design mode in GWTDesigner, the following
> > error occurs:
>
> > [ERROR] No class matching "west" in
> > urn:import:com.google.gwt.user.client.ui Element 
>
> > I assume that something else must be done so that GWTDesigner knows
> > either: 1) my class is based on SplitLayoutPanel and thus the same XML
> > is used to define it, 2) I have to some how tell GWTDesigner about all
> > the options supported by MySplitLayoutPanel so that it knows how to
> > interpret the uibinder code.
>
> > It seems like this would be a common practice - to extend GWT widgets
> > - and so I assume it isn't too difficult.  Any pointers?
>
> >Mike
>
> > On Dec 28 2011, 8:53 pm, Ashwin Desikan 
> > wrote:
>
> > >Mike,
>
> > > As long as you have a default constrictor in your derivedayout panel, you 
> > > should be able to use it in ui:binder like below.
>
> > > 
> > > 
> > > 
>
> > > Above m is the namespace identifier for your package.
>
> > > Did u try something like above?
>
> > > Thanks
> > > Ashwin
> > > Sent from my iPhone
>
> > > On Dec 28, 2011, at 10:53 PM,MikeDee wrote:
>
> > > > Hi Ashwin,
>
> > > > The SplitLayoutPanel is inside a DockLayoutPanel (in the center).  I
> > > > can see the DockLayoutPanel->onResize() calling SplitLayoutPanel-
> > > >> onResize().  However, it isn't calling the onResize() I added with
> > > > addHandler().  I assume addHandler() has no effect since
> > > > SplitLayoutPanel implements ResizeRequired.  So, now I am figuring out
> > > > how to get a hold of SplitLayoutPanel's onResize() to override.
>
> > > > I've created a derived panel, called MySplitLayoutPanel.  Currently
> > > > trying to figure out how to make this work with uibinder.
>
> > > >Mike
>
> > > > On Dec 28, 1:16 am, Ashwin Desikan  wrote:
> > > >> All layout panels implement the onResize method. So you don't Have to 
> > > >> extend the widget unless you are doing a custom Splitlayout panel.
>
> > > >> Do you use the Splitlayout panel inside other panels? Also, i trust 
> > > >> you are using rootlayout panel instead of rootpanel in the onModule 
> > > >> method of your entrypoint
>
> > > >> Since, I can't Access the entire thread over email I am assuming you 
> > > >> are having Splitlayout panel inside another layout like a htmlpanel 
> > > >> etc and expect it to resize on the change of view dimensions?
>
> > > >> If thats the case on way to fire the onResize automatically is to use 
> > > >> a place the splitlayoutpanel inside a ResizeLayoutPanel or for that 
> > > >> matter any layout panels
>
> > > >> ~Ashwin
>
> > > >> Sent from my iPhone
>
> > > >> On Dec 28, 2011, at 1:08 PM,MikeDee wrote:
>
> > > >>> Played around with this a little more and came to a few conclusions.
> > > >>> I am guessing that adding a ResizeHandler to SplitLayoutPanel has no
> > > >>> effect because SplitLayoutPanel already implements onResize() - due to
> > > >>> its implementing RequiresResize.  I can see SplitLayoutPanel's
> > > >>> onResize() being called by stepping through the code.  The
> > > >>> ResizeHandler I added is no where to be found.
>
> > > >>> That leaves the option of deriving my own subclass of SplitLayoutPanel
> > > >>> and then overriding onResize().  Easy enough EXCEPT how does one get
> > > >>> such a class to work with uibinder?
>
> > > >>> --
> > > >>> You received th

Re: Help with resizing

2012-01-17 Thread Mike Dee
Just getting back to this.  Was working on something else.

I did as describe below, by Ashwin.

However, when I switch to design mode in GWTDesigner, the following
error occurs:

[ERROR] No class matching "west" in
urn:import:com.google.gwt.user.client.ui Element 

I assume that something else must be done so that GWTDesigner knows
either: 1) my class is based on SplitLayoutPanel and thus the same XML
is used to define it, 2) I have to some how tell GWTDesigner about all
the options supported by MySplitLayoutPanel so that it knows how to
interpret the uibinder code.

It seems like this would be a common practice - to extend GWT widgets
- and so I assume it isn't too difficult.  Any pointers?

Mike


On Dec 28 2011, 8:53 pm, Ashwin Desikan 
wrote:
> Mike,
>
> As long as you have a default constrictor in your derivedayout panel, you 
> should be able to use it in ui:binder like below.
>
> 
> 
> 
>
> Above m is the namespace identifier for your package.
>
> Did u try something like above?
>
> Thanks
> Ashwin
> Sent from my iPhone
>
> On Dec 28, 2011, at 10:53 PM,MikeDee wrote:
>
>
>
>
>
>
>
> > Hi Ashwin,
>
> > The SplitLayoutPanel is inside a DockLayoutPanel (in the center).  I
> > can see the DockLayoutPanel->onResize() calling SplitLayoutPanel-
> >> onResize().  However, it isn't calling the onResize() I added with
> > addHandler().  I assume addHandler() has no effect since
> > SplitLayoutPanel implements ResizeRequired.  So, now I am figuring out
> > how to get a hold of SplitLayoutPanel's onResize() to override.
>
> > I've created a derived panel, called MySplitLayoutPanel.  Currently
> > trying to figure out how to make this work with uibinder.
>
> >Mike
>
> > On Dec 28, 1:16 am, Ashwin Desikan  wrote:
> >> All layout panels implement the onResize method. So you don't Have to 
> >> extend the widget unless you are doing a custom Splitlayout panel.
>
> >> Do you use the Splitlayout panel inside other panels? Also, i trust you 
> >> are using rootlayout panel instead of rootpanel in the onModule method of 
> >> your entrypoint
>
> >> Since, I can't Access the entire thread over email I am assuming you are 
> >> having Splitlayout panel inside another layout like a htmlpanel etc and 
> >> expect it to resize on the change of view dimensions?
>
> >> If thats the case on way to fire the onResize automatically is to use a 
> >> place the splitlayoutpanel inside a ResizeLayoutPanel or for that matter 
> >> any layout panels
>
> >> ~Ashwin
>
> >> Sent from my iPhone
>
> >> On Dec 28, 2011, at 1:08 PM,MikeDee wrote:
>
> >>> Played around with this a little more and came to a few conclusions.
> >>> I am guessing that adding a ResizeHandler to SplitLayoutPanel has no
> >>> effect because SplitLayoutPanel already implements onResize() - due to
> >>> its implementing RequiresResize.  I can see SplitLayoutPanel's
> >>> onResize() being called by stepping through the code.  The
> >>> ResizeHandler I added is no where to be found.
>
> >>> That leaves the option of deriving my own subclass of SplitLayoutPanel
> >>> and then overriding onResize().  Easy enough EXCEPT how does one get
> >>> such a class to work with uibinder?
>
> >>> --
> >>> 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 
> >>> athttp://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 
> > athttp://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.



SplitLayoutPanel and deferred resizing

2012-01-14 Thread Mike Dee
I've been trying to figure out how to get resize events when the
SplitLayoutPanel's splitter is moved.  This question has been asked
many times before, such as here:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c069010b007dc9de/4e715fa1b3f28325?lnk=gst&q=splitlayoutpanel#4e715fa1b3f28325

and

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2a42a7efb61c9622/14557f3076a2eb16?lnk=gst&q=splitlayoutpanel#14557f3076a2eb16

I think the answer may be given here, which states the sizing is
deferred:

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/972bddc22564228c/f6d821760b78d717?lnk=gst&q=splitlayoutpanel#f6d821760b78d717

So, now the question is, how does one handle deferred sizing?  Where
can one get the resize event (or whatever the equivelant is)?

-- 
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: Handling styles application wide?

2012-01-11 Thread Mike Dee
Ashwin,

Thanks for the reply. We were doing this, to an extent.  I just didn't
think about putting the celltable style class in the ClientBundle.  It
works, BUT, is it possible to put the CSS for the entire app in one
CSS (not sure if this is entirely desirable right now).

For example, here is what the ClientBundle now looks like.

public interface MyAppResources extends ClientBundle
{
public static final MyAppResources INSTANCE =
GWT.create( MyAppResources.class );

@Source( "com/myapp/home.png" )
public ImageResource home();

@Source( "com/myapp/myapp.css" )
@CssResource.NotStrict
public MyAppStyles css();

public interface MyViewTableCss extends CellTable.Resources
{
@Source({CellTable.Style.DEFAULT_CSS, "com/myapp/resources/
MyViewTable.css"})
TableStyle cellTableStyle();

interface TableStyle extends CellTable.Style {}
}
}

As we create more CellTable with different styles, we will end up with
a CSS file for each.  It would be nice if they could be combined into
one.

Also, can WindowBuilder be integrated with ClientBundle so that styles
from the ClientBundle would appear as selectable in WindowBuilder?

On Jan 10, 11:21 pm, Ashwin Desikan  wrote:
> The best approach would be to use ClientBundle
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
>
> This would allow you to combine all your resources including
> TableResources, Application Images, Custom Styles etc.
>
> Make it a practise to use the styles defined in your external
> stylesheets across the application and your maintenance would become
> relatively easier.
>
> ~Ashwin
>
> On Wednesday 11 January 2012 09:53:38 AM IST, Mike Dee wrote:
>
>
>
>
>
>
>
> > What is a good ways to consistently handle styles application side?
> > I'm working on an app that has CellTables and widgets and HTML.  For
> > CellTables we use CellTable.Resources to store CSS.  For widgets, we
> > use uibinder with  for HTML we use external stylesheets.  Is
> > there a good strategy for putting all style info in one place?

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



Handling styles application wide?

2012-01-10 Thread Mike Dee
What is a good ways to consistently handle styles application side?
I'm working on an app that has CellTables and widgets and HTML.  For
CellTables we use CellTable.Resources to store CSS.  For widgets, we
use uibinder with  for HTML we use external stylesheets.  Is
there a good strategy for putting all style info in one place?

-- 
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: Centering an Image

2012-01-06 Thread Mike Dee
I found one way to do this.  I used a HorizontalPanel as a container
for the image, instead of a SimplePanel.

On Jan 6, 9:11 am, Mike Dee  wrote:
> How can I center an image in a panel?  I have a layout that looks like
> this:
>
> Vertical Panel
>   Cell Table
>   Simple Panel
>     Image
>   Cell Table
>
> Basically, this shows an image with a table of data above and a table
> of data below.  I can't get the image to center, however.  In this
> case I tried a SimplePanel, but I'm willing to use whatever works.
>
> Note that the celltable cell (for the SimplePanel) is set for
> alignment of center and middle.  This probably centers the SimplePanel
> within the cell.  But I'm interested in having the Image centered in
> the panel.
>
> 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.



Centering an Image

2012-01-06 Thread Mike Dee
How can I center an image in a panel?  I have a layout that looks like
this:

Vertical Panel
  Cell Table
  Simple Panel
Image
  Cell Table

Basically, this shows an image with a table of data above and a table
of data below.  I can't get the image to center, however.  In this
case I tried a SimplePanel, but I'm willing to use whatever works.

Note that the celltable cell (for the SimplePanel) is set for
alignment of center and middle.  This probably centers the SimplePanel
within the cell.  But I'm interested in having the Image centered in
the panel.

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.



Re: Help with resizing

2011-12-28 Thread Mike Dee
Hi Ashwin,

The SplitLayoutPanel is inside a DockLayoutPanel (in the center).  I
can see the DockLayoutPanel->onResize() calling SplitLayoutPanel-
>onResize().  However, it isn't calling the onResize() I added with
addHandler().  I assume addHandler() has no effect since
SplitLayoutPanel implements ResizeRequired.  So, now I am figuring out
how to get a hold of SplitLayoutPanel's onResize() to override.

I've created a derived panel, called MySplitLayoutPanel.  Currently
trying to figure out how to make this work with uibinder.

Mike

On Dec 28, 1:16 am, Ashwin Desikan  wrote:
> All layout panels implement the onResize method. So you don't Have to extend 
> the widget unless you are doing a custom Splitlayout panel.
>
> Do you use the Splitlayout panel inside other panels? Also, i trust you are 
> using rootlayout panel instead of rootpanel in the onModule method of your 
> entrypoint
>
> Since, I can't Access the entire thread over email I am assuming you are 
> having Splitlayout panel inside another layout like a htmlpanel etc and 
> expect it to resize on the change of view dimensions?
>
> If thats the case on way to fire the onResize automatically is to use a place 
> the splitlayoutpanel inside a ResizeLayoutPanel or for that matter any layout 
> panels
>
> ~Ashwin
>
> Sent from my iPhone
>
> On Dec 28, 2011, at 1:08 PM, Mike Dee  wrote:
>
>
>
>
>
>
>
> > Played around with this a little more and came to a few conclusions.
> > I am guessing that adding a ResizeHandler to SplitLayoutPanel has no
> > effect because SplitLayoutPanel already implements onResize() - due to
> > its implementing RequiresResize.  I can see SplitLayoutPanel's
> > onResize() being called by stepping through the code.  The
> > ResizeHandler I added is no where to be found.
>
> > That leaves the option of deriving my own subclass of SplitLayoutPanel
> > and then overriding onResize().  Easy enough EXCEPT how does one get
> > such a class to work with uibinder?
>
> > --
> > 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 
> > athttp://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: Help with resizing

2011-12-27 Thread Mike Dee
Played around with this a little more and came to a few conclusions.
I am guessing that adding a ResizeHandler to SplitLayoutPanel has no
effect because SplitLayoutPanel already implements onResize() - due to
its implementing RequiresResize.  I can see SplitLayoutPanel's
onResize() being called by stepping through the code.  The
ResizeHandler I added is no where to be found.

That leaves the option of deriving my own subclass of SplitLayoutPanel
and then overriding onResize().  Easy enough EXCEPT how does one get
such a class to work with uibinder?

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



Help with resizing

2011-12-27 Thread Mike Dee
I can't get onResize() to be called on some of my panels.  I'm using
Activities and Places.  The top level panel is a DockLayoutPanel.  All
of the activity happens in the center panel.  The view I'm having
trouble with looks like this.

public class MyViewImpl extends ResizeComposite implements MyView,
RequiresResize, ProvidesResize
{
interface Binder extends UiBinder
{
}

private static final Binder binder = GWT.create( Binder.class );
@UiField SplitLayoutPanel splitPanel; // The SplitPanel
@UiField FlowPanel westArea;   // FlowPanel in
SplitLayoutPanel's west area
@UiField TabLayoutPanel centerArea; // Tab panel is
SplitLayoutPanel's center area
@UiField FormPanel tab1Panel; // Tab 1
@UiField FormPanel tab2Panel; // Tab 2
@UiField HorizontalPanel tab3Panel;  // Tab 3

 ...

public void onResize()
{
   // This gets called.
}
}

MyViewImpl contains a top level SplitLayoutPanel that contains two
areas.  The west area is a FlowPanel and the center area contains a
TabLayoutPanel.  The TabLayoutPanel contains three tabs.  The third
tab contains a list of image tiles and the layout is adjusted upon
resize (which I can't get to fire).

When a resize occurs, the MyViewImple receives the onResize().  I
can't get the SplitLayoutPanel to receive the events though.
Ultimately I want the resize events to propogate to the TabLayoutPanel
so the third tab can layout the image tiles based on its dimensions.

I've tried to add a resize handler to the SplitLayoutPanel like this,
but it doesn't get called.

public MyViewImpl()
{
initWidget( binder.createAndBindUi( this ) );

ResizeHandler h = new ResizeHandler(){
public void onResize( ResizeEvent ev )
{
log.info( "Got Resize in splitter" );
}
};
splitPanel.addHandler( h, ResizeEvent.getType() );
}

I've also tried explicitly calling onResize() in the view's onResize()
like this, but it doesn't call the SplitLayoutPanel's on onResize().

public void onResize()
{
Widget child = getWidget();
if( child instanceof RequiresResize )
((RequiresResize)child).onResize();
}

Any ideas what I'm doing wrong?

-- 
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: Multiple gwt-rpc calls and UI

2011-12-16 Thread Mike Dee
I've been looking into this for the past few days.

RequestFactory seems like it could be a solution.  It would solve
other problems too, such as being able to selectively expose the
fields of entity classes.  Some of our entity classes would not
translate over to GWT.

However, my initial impression of RF is that it is unappealing.  It
reminds me of things like Corba and early versions of J2EE with entity
(EntityProxy) and session (ValueProxy) beans.  With j2ee there was
also the notion of container managed persistence, which we see RF
moving towards.  In our case, we already have a wonderful data model
in POJO.  Why create all these extra layers of software just to find a
way to display some portion of the model in a browser?  Seems like
overkill and over-complication. Plus our app is more than just CRUD
and I don't see RF making things easier in that case.

Another option is to simply try and move as much of our model into the
GWT client as possible.  In my first attempt to port over an existing
web app, I end up having lots of RPC calls that simply operate on
objects in the session (and never hit the database).  If these objects
could be made to work on the client side, then much of the work could
be moved there too while minimizing stuff sent over the wire.  The
session variables would go away, along with RPC calls to access them.
In general, the client would maintain the state, which is a huge
advantage.  RPC calls could then be very similar to web service calls
that actually do work.

I'm looking into this latter option.  If that doesn't work out, then I
will have to consider RF.  One possibility is to use RF with simply
ValueProxy's.  This kind of reminds me of how early j2ee developers
largely avoided EntityBeans in favor of SessionBeans!

Mike

On Dec 14, 11:47 pm, -sowdri-  wrote:
> Mike, this is exactly where DTO pattern has to be used.
>
>    1. Just create a DTO which encapsulated all the objects required at
>    startup.
>    2. And expose a new service, which would do all the sequential calls on
>    the server and construct the dto and return.
>
> Remember, a server call is the most costliest operation in terms of time
> for the client. Coupled that with making it sequential, (adding to the
> startup time) its going to take ages).
>
> Note: RF btw has request batching :)
>
> Hope this helps!

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



Multiple gwt-rpc calls and UI

2011-12-14 Thread Mike Dee
What is a preferable way to do multiple gwt-rpc calls to setup a UI?
In particular, we have a view that requires several successive calls
(order is important) to the database to setup.  This is necessary
because there is a stateful part to our app.  For example, first we
have to load A and once we have A we can then load B and C.

What I've been doing is to start the chain of events in the view's
onLoad.  I make a call to load A.  The handler for it then kicks off
loading B and C, in onSuccess().

Is this a good way to go about doing this?  Opinions appreciated.

-- 
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: Sessions and Activities and Places

2011-11-14 Thread Mike Dee
I think I've found a good way to handle this.  It really is pretty
easy.

I subclassed PlaceController and override it goTo() method.  It looks
like this:

public void goTo( Place newPlace )
{
if( isLoggedIn )
super.goTo( newPlace );
else
super.goTo( new LoginPlace() );
}

It seems to work well.  Handles pages that are bookmarked and the back
button.

On Nov 12, 5:43 pm, Mike Dee  wrote:
> What is a good way to have a GWT app redirect to a login screen when a
> session expires?  I've just hooked up a login page and a logout button
> at an Activities and Places app.  I basically handle this through the
> event bus with login and logout events (haven't hooked up a session
> time out yet).
>
> The events work nicely.  After logging in, the main place appears in
> the app.  When logging on, the login place appears.  Very nice.
>
> However, nothing prevents a user from accessing a place within the app
> - either by bookmarking or using the back button after logging out.
> I've experimented with a few things, but don't like any of them.  For
> example, in the AppActivityMapper if the user is not logged in, it
> goes to the login place regardless of the requested place.  I don't
> like this because the URL still shows the requested place.
>
> It looks like a central place to handle this is in
> PlaceController.goTo().  While looking at the source, it appears that
> changing places is handled via the event bus.
>
>     String warning = maybeGoTo(newPlace);
>     if (warning == null || delegate.confirm(warning)) {
>       where = newPlace;
>       eventBus.fireEvent(new PlaceChangeEvent(newPlace));
>
> Has anyone tried overriding this to handle loggin/logout?

-- 
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: Sessions and Activities and Places

2011-11-14 Thread Mike Dee
I'm sorry, I don't think I understand this.  How would a separate GWT
module help?  Wouldn't a separate module (with separate URL) produce a
separate session?

On Nov 13, 9:54 pm, -sowdri-  wrote:
> Have your tried moving login part to a separate GWT module, with a
> different url (consequently a separate host html) and let the container
> handle the session management?

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



Sessions and Activities and Places

2011-11-12 Thread Mike Dee
What is a good way to have a GWT app redirect to a login screen when a
session expires?  I've just hooked up a login page and a logout button
at an Activities and Places app.  I basically handle this through the
event bus with login and logout events (haven't hooked up a session
time out yet).

The events work nicely.  After logging in, the main place appears in
the app.  When logging on, the login place appears.  Very nice.

However, nothing prevents a user from accessing a place within the app
- either by bookmarking or using the back button after logging out.
I've experimented with a few things, but don't like any of them.  For
example, in the AppActivityMapper if the user is not logged in, it
goes to the login place regardless of the requested place.  I don't
like this because the URL still shows the requested place.

It looks like a central place to handle this is in
PlaceController.goTo().  While looking at the source, it appears that
changing places is handled via the event bus.

String warning = maybeGoTo(newPlace);
if (warning == null || delegate.confirm(warning)) {
  where = newPlace;
  eventBus.fireEvent(new PlaceChangeEvent(newPlace));

Has anyone tried overriding this to handle loggin/logout?

-- 
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: Popup windows & printing

2011-10-27 Thread Mike Dee
I really don't like the idea of popping up a new window and then
feeding it HTML.  In this case it works nicely because the main page
has HTML in it and the popup simply shows the same HTML but without
the UI.

However, I can think of situations where there is a celltable with
data and I want to print the celltable contents - in a printer
friendly format.  Now, there is no HTML (that could be fed into a
popup).  That HTML would have to be created.  Remember I want to
leverage the browser's ability to print HTML.

I guess there are two options:

1) Clicking a button (to popup the printer friendly window) would have
to create roughly equivalent HTML (as in the celltable) and feed it
into the popup window.

OR

2) Have the popup window do that logic.  This where I was thinking of
using another module.  But I'm not sure how to do that.  Another idea
is to simply put the logic in a JSP.  Then I'd need to check on how
session sharing works between JSP and GWT.



On Oct 27, 12:19 pm, Mike Dee  wrote:
> Did that.  Seems to work.  Have to figure out CSS issues.
>
> Experimenting now with using separate module.
>
> On Oct 27, 6:55 am, Jeffrey Chimene  wrote:
>
>
>
>
>
>
>
> > On 10/26/2011 9:02 PM, Mike Dee wrote:
>
> > > It seems easy topopupa new window, but I'm not sure how to stick the
> > > HTML into it.
>
> > That's the purpose of the _target attribute in the  element.
>
> > > If Window.open would return a reference to the window,
> > > I could see a way to do it.
>
> > Create a JSNI routine that creates a window and returns the handle.
>
> > > Here is another idea.  I can create another module to the GWT app.
> > > It's sole purpose is to handle printing.
>
> > Whatever.
>
> > Bueno Suerte,
> > jec

-- 
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: Popup windows & printing

2011-10-27 Thread Mike Dee
Did that.  Seems to work.  Have to figure out CSS issues.

Experimenting now with using separate module.

On Oct 27, 6:55 am, Jeffrey Chimene  wrote:
> On 10/26/2011 9:02 PM, Mike Dee wrote:
>
> > It seems easy topopupa new window, but I'm not sure how to stick the
> > HTML into it.
>
> That's the purpose of the _target attribute in the  element.
>
> > If Window.open would return a reference to the window,
> > I could see a way to do it.
>
> Create a JSNI routine that creates a window and returns the handle.
>
> > Here is another idea.  I can create another module to the GWT app.
> > It's sole purpose is to handle printing.
>
> Whatever.
>
> Bueno Suerte,
> jec

-- 
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: Popup windows & printing

2011-10-27 Thread Mike Dee
I say that.  It is from back in 2007.  The later messages indicate
users had problems with it.  Don't know if it is supported either.

On Oct 27, 3:03 am, Fabricio Pizzichillo 
wrote:
> I found this thread, maybe can help 
> you.http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> regards
>
> 2011/10/27 Mike Dee 
>
>
>
>
>
>
>
> > It seems easy to popup a new window, but I'm not sure how to stick the
> > HTML into it.  If Window.open would return a reference to the window,
> > I could see a way to do it.
>
> > Here is another idea.  I can create another module to the GWT app.
> > It's sole purpose is to handle printing.
>
> > The GWT app I'm working on is based on Activities and Places.  The
> > layout is based on a DockLayoutPanel, which contains a bunch of UI
> > stuff (that appears when printing and is not wanted).  The new module
> > will simply contain an HTML panel.
>
> > So the benefits of a new module are: works in standard GWT environment
> > (without much hacking) and allows a different layout from main app.
>
> > On Oct 26, 9:07 am, Jeff Chimene  wrote:
> > > On 10/26/2011 08:38 AM, Mike Dee wrote:
>
> > > > I was thinking about something like that.  In the posts about popup
> > > > windows this is seen as a negative because it is tricky to setup
> > > > communications between the main window and the popup.  But there
> > > > really is no communication needed in this case.
>
> > > > Do you see the popup window as a GWT window or just a straight HTML
> > > > window?
>
> > > The latter. This is one of those cases where I think that using GWT to
> > > create the child window doesn't get you anything except a "problem
> > > solved!" endorphin rush. As I said earlier, the solution can be made
> > > arbitrarily complex, so I'm sure that someone will chime in with a
> > > reason to implement the popup using GWT methods.
>
> > > To follow-up on the CSS: I've noticed that when there's a reference to a
> > > CSS with media type "print", then FF opens a print dialog automatically.
> > > I think Chrome does this too.
>
> > > > On Oct 26, 7:55 am, Jeffrey Chimene  wrote:
> > > >> On 10/26/2011 1:02 AM, Mike Dee wrote:
>
> > > >>> I have an app that creates reports, which are basically HTML.  The
> > > >>> reports need to be printed and that is what I'm trying to figure out.
>
> > > >>> I'm porting an older app - that is more of traditional web app.
> > > >>> Reports are displayed in a page - with a UI wrapped around them.
> >  When
> > > >>> a user wants to print a report, he clicks a "print" link, which pops
> > > >>> up a window with a printer friendly version (no UI elements).  He can
> > > >>> then selects the browser's print command.  Works nicely.
>
> > > >>> I'm trying to figure out how to do that in GWT.  I can display a
> > > >>> report.  Printing doesn't work well, because it prints all the UI
> > > >>> stuff too.
>
> > > >>> I've looked into separate popup windows.  Most of the messages here
> > > >>> recommend against doing it.  Instead they suggest using a Dialog box.
> > > >>> I've tried it and created a Dialog with simply an HTMLPanel.
> >  However,
> > > >>> selecting File->Print (in the browser) prints the entire page (the
> > > >>> entire window).
>
> > > >>> Any suggestions on a way to do this?
>
> > > >> Here's one idea I've implemented. It's amenable to arbitrary levels of
> > > >> complexity.
>
> > > >> Your UI posts a request to your server on user action (e.g. a button
> > > >> click event), and opens the result in a new window:
> > > >> 
> > > >> 
> > > >> 
> > > >> 
>
> > > >> Reminder: you should have css for print media.
>
> > --
> > 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: Popup windows & printing

2011-10-26 Thread Mike Dee
It seems easy to popup a new window, but I'm not sure how to stick the
HTML into it.  If Window.open would return a reference to the window,
I could see a way to do it.

Here is another idea.  I can create another module to the GWT app.
It's sole purpose is to handle printing.

The GWT app I'm working on is based on Activities and Places.  The
layout is based on a DockLayoutPanel, which contains a bunch of UI
stuff (that appears when printing and is not wanted).  The new module
will simply contain an HTML panel.

So the benefits of a new module are: works in standard GWT environment
(without much hacking) and allows a different layout from main app.

On Oct 26, 9:07 am, Jeff Chimene  wrote:
> On 10/26/2011 08:38 AM, Mike Dee wrote:
>
> > I was thinking about something like that.  In the posts about popup
> > windows this is seen as a negative because it is tricky to setup
> > communications between the main window and the popup.  But there
> > really is no communication needed in this case.
>
> > Do you see the popup window as a GWT window or just a straight HTML
> > window?
>
> The latter. This is one of those cases where I think that using GWT to
> create the child window doesn't get you anything except a "problem
> solved!" endorphin rush. As I said earlier, the solution can be made
> arbitrarily complex, so I'm sure that someone will chime in with a
> reason to implement the popup using GWT methods.
>
> To follow-up on the CSS: I've noticed that when there's a reference to a
> CSS with media type "print", then FF opens a print dialog automatically.
> I think Chrome does this too.
>
>
>
>
>
>
>
>
>
> > On Oct 26, 7:55 am, Jeffrey Chimene  wrote:
> >> On 10/26/2011 1:02 AM, Mike Dee wrote:
>
> >>> I have an app that creates reports, which are basically HTML.  The
> >>> reports need to be printed and that is what I'm trying to figure out.
>
> >>> I'm porting an older app - that is more of traditional web app.
> >>> Reports are displayed in a page - with a UI wrapped around them.  When
> >>> a user wants to print a report, he clicks a "print" link, which pops
> >>> up a window with a printer friendly version (no UI elements).  He can
> >>> then selects the browser's print command.  Works nicely.
>
> >>> I'm trying to figure out how to do that in GWT.  I can display a
> >>> report.  Printing doesn't work well, because it prints all the UI
> >>> stuff too.
>
> >>> I've looked into separate popup windows.  Most of the messages here
> >>> recommend against doing it.  Instead they suggest using a Dialog box.
> >>> I've tried it and created a Dialog with simply an HTMLPanel.  However,
> >>> selecting File->Print (in the browser) prints the entire page (the
> >>> entire window).
>
> >>> Any suggestions on a way to do this?
>
> >> Here's one idea I've implemented. It's amenable to arbitrary levels of
> >> complexity.
>
> >> Your UI posts a request to your server on user action (e.g. a button
> >> click event), and opens the result in a new window:
> >> 
> >> 
> >> 
> >> 
>
> >> Reminder: you should have css for print media.

-- 
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: Popup windows & printing

2011-10-26 Thread Mike Dee
I was thinking about something like that.  In the posts about popup
windows this is seen as a negative because it is tricky to setup
communications between the main window and the popup.  But there
really is no communication needed in this case.

Do you see the popup window as a GWT window or just a straight HTML
window?

On Oct 26, 7:55 am, Jeffrey Chimene  wrote:
> On 10/26/2011 1:02 AM, Mike Dee wrote:
>
>
>
>
>
>
>
>
>
> > I have an app that creates reports, which are basically HTML.  The
> > reports need to be printed and that is what I'm trying to figure out.
>
> > I'm porting an older app - that is more of traditional web app.
> > Reports are displayed in a page - with a UI wrapped around them.  When
> > a user wants to print a report, he clicks a "print" link, which pops
> > up a window with a printer friendly version (no UI elements).  He can
> > then selects the browser's print command.  Works nicely.
>
> > I'm trying to figure out how to do that in GWT.  I can display a
> > report.  Printing doesn't work well, because it prints all the UI
> > stuff too.
>
> > I've looked into separate popup windows.  Most of the messages here
> > recommend against doing it.  Instead they suggest using a Dialog box.
> > I've tried it and created a Dialog with simply an HTMLPanel.  However,
> > selecting File->Print (in the browser) prints the entire page (the
> > entire window).
>
> > Any suggestions on a way to do this?
>
> Here's one idea I've implemented. It's amenable to arbitrary levels of
> complexity.
>
> Your UI posts a request to your server on user action (e.g. a button
> click event), and opens the result in a new window:
> 
> 
> 
> 
>
> Reminder: you should have css for print media.

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



Popup windows & printing

2011-10-26 Thread Mike Dee
I have an app that creates reports, which are basically HTML.  The
reports need to be printed and that is what I'm trying to figure out.

I'm porting an older app - that is more of traditional web app.
Reports are displayed in a page - with a UI wrapped around them.  When
a user wants to print a report, he clicks a "print" link, which pops
up a window with a printer friendly version (no UI elements).  He can
then selects the browser's print command.  Works nicely.

I'm trying to figure out how to do that in GWT.  I can display a
report.  Printing doesn't work well, because it prints all the UI
stuff too.

I've looked into separate popup windows.  Most of the messages here
recommend against doing it.  Instead they suggest using a Dialog box.
I've tried it and created a Dialog with simply an HTMLPanel.  However,
selecting File->Print (in the browser) prints the entire page (the
entire window).

Any suggestions on a way to do this?

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



Lost with CssResource

2011-10-20 Thread Mike Dee
#1
At:
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#CssResourceCookbook

It says:
External and legacy scopes
In many cases, newly-developed CSS will need to be combined with
external or legacy CSS. The @external at-rule can be used to suppress
selector obfuscation while still allowing programmatic access to the
selector name.

Question: Why would anyone ever want obfuscation on?  If I have a CSS
selector ".myheader" wouldn't I always want to refer to it as:
MyResources.INSTANCE.css().myheader()?

#2
At:
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#Selector_obfuscation_details

It says:
Strict scoping
In the normal case, any class selectors that do not match String
accessor functions is an error. This behavior can be disabled by
adding a @NotStrict annotation to the CSS accessor method. Enabling
@NotStrict behavior is only recommended for applications that are
transitioning from external CSS files to CssResource.

Even with CssResource isn't all the CSS stored in a separate CSS file?

So far, CSS with GWT is a mystery to me.

-- 
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 stylesheet on a per page basis?

2011-10-19 Thread Mike Dee
If I do #1, the styles appear in all the pages (in the entire
module).  The app has several views and each view has its own UIBinder
file (.ui.xml).  In the one specific view that I want additional CSS I
added:



When I run the app and look at the view, the styles work.

BUT, when I look at the CSS using Firebug, the styles defined in
extracss.css are in all the pages in the app.  It is like adding the
 in one .ui.xml caused GWT to include it in all pages.

I can try #2.

On Oct 19, 5:32 am, Sudhakar Abraham 
wrote:
> There are two ways to add style sheet for one page
>
> 1. In ui.xml  specify the file name of css file Ex: src="client-specific.css" />
>     or Inline style sheet with in ui.xml file Ex:  ui:style>
>
> 2.Generate your css file.  The css file is referenced by CssResource
> interface.  Specify your Css file in Source attribute of
> ClientBundle.
>
> interface MyCss extends CssResource
>  {
>   String YourCssName();
>  }
>
> interface MyResources extends ClientBundle {
>   @Source("my.css")
>   MyCss css();
>
> }
>
> MyResources resources = GWT.create(MyResources.class);
> Button button = new Button("Some text");
> button .addStyleName(resources.css().className());
>
> S. Abrahamwww.DataStoreGwt.com
> Persist objects directly in Google App Engine
>
> On Oct 19, 12:37 am, Mike Dee  wrote:
>
>
>
>
>
>
>
> > How can a stylesheet be applied for one page - not an entire module?
> > Our app runs fine with a single stylesheet, but for a couple of pages
> > a client specified look and feel (with CSS) are needed.  I'd like to
> > apply (add) an additional stylesheet to just those.   How can that be
> > done?
>
> > Thanks,
> > Mike

-- 
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 stylesheet on a per page basis?

2011-10-18 Thread Mike Dee
After doing some testing, it doesn't looks like this works as
expected.  It appears that after adding:



that the CSS in that stylesheet appears in ALL pages, even though the
above line only appears in on view's UIBinder code.


On Oct 18, 12:53 pm, Mike Dee  wrote:
> Upon a little more investigation (ie. actually reading some
> documentation) this can be done with UIBinder, but I still need a
> little help.
>
> With UIBinder a stylesheet can be included easily, like this:
>
> 
>
> That works out nicely, especially since I'm already using UIBinder.
>
> However, the path is a little problematic.  The above example works
> because I put the CSS in the same directory as the view class and its
> ui.xml.  How can I put the CSS file in the directory with the web
> pages (war)?
>
> On Oct 18, 12:37 pm, Mike Dee  wrote:
>
>
>
>
>
>
>
> > How can a stylesheet be applied for one page - not an entire module?
> > Our app runs fine with a single stylesheet, but for a couple of pages
> > a client specified look and feel (with CSS) are needed.  I'd like to
> > apply (add) an additional stylesheet to just those.   How can that be
> > done?
>
> > Thanks,
> > Mike

-- 
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 stylesheet on a per page basis?

2011-10-18 Thread Mike Dee
Upon a little more investigation (ie. actually reading some
documentation) this can be done with UIBinder, but I still need a
little help.

With UIBinder a stylesheet can be included easily, like this:



That works out nicely, especially since I'm already using UIBinder.

However, the path is a little problematic.  The above example works
because I put the CSS in the same directory as the view class and its
ui.xml.  How can I put the CSS file in the directory with the web
pages (war)?



On Oct 18, 12:37 pm, Mike Dee  wrote:
> How can a stylesheet be applied for one page - not an entire module?
> Our app runs fine with a single stylesheet, but for a couple of pages
> a client specified look and feel (with CSS) are needed.  I'd like to
> apply (add) an additional stylesheet to just those.   How can that be
> done?
>
> Thanks,
> Mike

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



How to set stylesheet on a per page basis?

2011-10-18 Thread Mike Dee
How can a stylesheet be applied for one page - not an entire module?
Our app runs fine with a single stylesheet, but for a couple of pages
a client specified look and feel (with CSS) are needed.  I'd like to
apply (add) an additional stylesheet to just those.   How can that be
done?

Thanks,
Mike

-- 
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: Passing an argument to a View using Activities and Places

2011-10-08 Thread Mike Dee
Jens, Allison,

Yes, I see my problem.  I even used the GWT MVP View wizard to create
the Place, Activity, and View.  It very nicely generates template
classes - with the FooPlace.setName().  I must have deleted the method
in FooPlace at some point.

Thanks,
Mike

On Oct 6, 1:38 pm, Jens  wrote:
> Your FooPlace should have a getter method to return the stored id. In your
> ActivityMapper you create an activity for a given place. When you create
> your activity you can pass the place into its constructor or via a separate
> setPlace(Place place) method. Your activity would then call the getter of
> the FooPlace to get the id stored in the place and store it in a variable.
>
> Take a look
> athttp://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideMvpAc...
> The AppActivityMapper constructs a HelloActivity and passes in the given
> HelloPlace. Then the HelloActivity calls HelloPlace.getName() in its
> constructor and stores the value. In HelloActivity.start() you can then use
> the value to make database calls, configure your view or whatever you need
> to do.

-- 
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: What's a good widget for a small table?

2011-10-08 Thread Mike Dee
Wouldn't that be a Grid control?  Would a Grid control be a little
heavy handed in that it seems to be designed to handle widgets in its
cells.

A property table - or something like that - seems ideal (if it
existed).

On Oct 8, 8:30 am, Jeffrey Chimene  wrote:
> On 10/8/2011 7:29 AM, Aidan O'Kelly wrote:
>
> > Well, its creating a table with a table for each row.. to end up with
> > a table structure...
> > If its a statically sized table, you can just write the 
> > structure yourself in UiBinder, and place Widgets/Text in each .
>
> Is that to to reduce DOM complexity, time to implementation,
> performance? Or some other factor I'm not understanding?
>
>
>
>
>
>
>
>
>
> > On Sat, Oct 8, 2011 at 2:53 PM, Jeffrey Chimene  > <mailto:jchim...@gmail.com>> wrote:
>
> >     On 10/8/2011 4:23 AM, benneq wrote:
> >     > A vertical panel containing several horizontal panels SOUNDS pretty
> >     > straight forward, indeed.
> >     > BUT: Do it, look at you dom tree, and see that it's totally ugly!
> >     > It is: A  (vertical panel) containing several
> >     >  (1 horizontal panel).
>
> >     Sorry, I'm missing the point here...
>
> >     > On 7 Okt., 22:45, Jeff Chimene  >     <mailto:jchim...@gmail.com>> wrote:
> >     >> On 10/07/2011 01:38 PM, Mike Dee wrote:
>
> >     >>> I have small data tables that I'd like to display.  In the widget
> >     >>> showcase for DataGrid and CellTable it says they are ideal for
> >     large
> >     >>> amounts of data.
> >     >>> The goal is to display detail info.  For example, to display a
> >     single
> >     >>> record from a database - not a bunch of records from a
> >     database.  So
> >     >>> the columns of the database will be different.  Think of something
> >     >>> like:
> >     >>> Name: John Doe
> >     >>> Address: Main St.
> >     >>> Phone: 555-1234
> >     >>> I was thinking a PropertyTable would be ideal.  It doesn't exist,
> >     >>> although they have something similar in SmartGWT, which I'd
> >     like to
> >     >>> avoid for now.
> >     >>> Any ideas would be appreciated.
> >     >> I'd probably create a custom widget based on using ui.xml  It
> >     might not
> >     >> even be a widget, just an MVP instance. From your description
> >     it sounds
> >     >> like a Popup enclosing a VerticalPanel enclosing several
> >     >> HorizontalPanels. Very simple, very straightforward to implement.

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



What's a good widget for a small table?

2011-10-07 Thread Mike Dee
I have small data tables that I'd like to display.  In the widget
showcase for DataGrid and CellTable it says they are ideal for large
amounts of data.

The goal is to display detail info.  For example, to display a single
record from a database - not a bunch of records from a database.  So
the columns of the database will be different.  Think of something
like:

Name: John Doe
Address: Main St.
Phone: 555-1234

I was thinking a PropertyTable would be ideal.  It doesn't exist,
although they have something similar in SmartGWT, which I'd like to
avoid for now.

Any ideas would be appreciated.

-- 
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: Passing an argument to a View using Activities and Places

2011-10-06 Thread Mike Dee
FooActivity.start() looks like this.  Note that while it can get
FooView from the clientfactory, it has no notion of FooPlace, which is
where the argument (fooid) is stored.

@Override
public void start( AcceptsOneWidget containerWidget, EventBus
eventBus )
{
  FooView view = clientFactory.getFooView();
  view.setPresenter( this );
  containerWidget.setWidget( view.asWidget() );
}

I guess the call to view.setName() could be made in FooActivity's
constructor, where a FooPlace is passed in.

public FooActivity( FooPlace place, ClientFactory clientFactory )
{
  this.clientFactory = clientFactory;
}

But I don't know how to get the argument (token) out of FooPlace.


On Oct 6, 10:51 am, Alisson Prestes  wrote:
> Yes, I think this will work.
>
> Alisson Presteswww.google.com/profiles/javalisson
>
>
>
>
>
>
>
> On Thu, Oct 6, 2011 at 2:48 PM, Mike Dee  wrote:
> > Would the call to set the arg in the view go in FooActivity.start()?
>
> > On Oct 6, 10:46 am, Mike Dee  wrote:
> > > So, should I put code in FooActivity?  I am not sure if the
> > > boilerplate code generated by the activity should have done that or
> > > not.
>
> > > On Oct 6, 10:44 am, Alisson Prestes  wrote:
>
> > > > The FooActivity extracts the arguments from the FooPlace. Then it calls
> > the
> > > > right method in the FooView. Place and View do not interact with each
> > other
> > > > directly.
>
> > > > Alisson Presteswww.google.com/profiles/javalisson
>
> > > > On Thu, Oct 6, 2011 at 2:17 PM, Mike Dee 
> > wrote:
> > > > > I'm using Activities and Place and can't figure this out.  I've been
> > > > > looking at samples but don't see it in there. I think I'm missing
> > > > > something.
>
> > > > > I have a button in one place that, when clicked, will trigger a new
> > > > > activity and place (along with a new view).  The code for that button
> > > > > simply looks like this:
>
> > > > > listener.goTo( new FooPlace( fooid ) );
>
> > > > > The above code is in the button handler of BarViewImpl (view
> > > > > implementation for a separate place/activity).
>
> > > > > This above line works in that it goes to FooPlace and the URL shows
> > > > > the parameter (123456):
>
> > > > > MyApp.html?gwt.codesvr=127.0.0.1:9997#FooPlace:123456
>
> > > > > But fooid doesn't make it to FooView.  How does the FooPlace or
> > > > > FooActivity pass the fooid to FooView?
>
> > > > > --
> > > > > 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: Passing an argument to a View using Activities and Places

2011-10-06 Thread Mike Dee
Would the call to set the arg in the view go in FooActivity.start()?

On Oct 6, 10:46 am, Mike Dee  wrote:
> So, should I put code in FooActivity?  I am not sure if the
> boilerplate code generated by the activity should have done that or
> not.
>
> On Oct 6, 10:44 am, Alisson Prestes  wrote:
>
>
>
>
>
>
>
> > The FooActivity extracts the arguments from the FooPlace. Then it calls the
> > right method in the FooView. Place and View do not interact with each other
> > directly.
>
> > Alisson Presteswww.google.com/profiles/javalisson
>
> > On Thu, Oct 6, 2011 at 2:17 PM, Mike Dee  wrote:
> > > I'm using Activities and Place and can't figure this out.  I've been
> > > looking at samples but don't see it in there. I think I'm missing
> > > something.
>
> > > I have a button in one place that, when clicked, will trigger a new
> > > activity and place (along with a new view).  The code for that button
> > > simply looks like this:
>
> > > listener.goTo( new FooPlace( fooid ) );
>
> > > The above code is in the button handler of BarViewImpl (view
> > > implementation for a separate place/activity).
>
> > > This above line works in that it goes to FooPlace and the URL shows
> > > the parameter (123456):
>
> > > MyApp.html?gwt.codesvr=127.0.0.1:9997#FooPlace:123456
>
> > > But fooid doesn't make it to FooView.  How does the FooPlace or
> > > FooActivity pass the fooid to FooView?
>
> > > --
> > > 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: Passing an argument to a View using Activities and Places

2011-10-06 Thread Mike Dee
So, should I put code in FooActivity?  I am not sure if the
boilerplate code generated by the activity should have done that or
not.

On Oct 6, 10:44 am, Alisson Prestes  wrote:
> The FooActivity extracts the arguments from the FooPlace. Then it calls the
> right method in the FooView. Place and View do not interact with each other
> directly.
>
> Alisson Presteswww.google.com/profiles/javalisson
>
>
>
>
>
>
>
> On Thu, Oct 6, 2011 at 2:17 PM, Mike Dee  wrote:
> > I'm using Activities and Place and can't figure this out.  I've been
> > looking at samples but don't see it in there. I think I'm missing
> > something.
>
> > I have a button in one place that, when clicked, will trigger a new
> > activity and place (along with a new view).  The code for that button
> > simply looks like this:
>
> > listener.goTo( new FooPlace( fooid ) );
>
> > The above code is in the button handler of BarViewImpl (view
> > implementation for a separate place/activity).
>
> > This above line works in that it goes to FooPlace and the URL shows
> > the parameter (123456):
>
> > MyApp.html?gwt.codesvr=127.0.0.1:9997#FooPlace:123456
>
> > But fooid doesn't make it to FooView.  How does the FooPlace or
> > FooActivity pass the fooid to FooView?
>
> > --
> > 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: Passing an argument to a View using Activities and Places

2011-10-06 Thread Mike Dee
Just want to add one thing.  FooView has a method named setName(),
which (I think) is used to set the argument.  I've noticed this is not
called, even though it is passed in creating the FooPlace.

On Oct 6, 10:17 am, Mike Dee  wrote:
> I'm using Activities and Place and can't figure this out.  I've been
> looking at samples but don't see it in there. I think I'm missing
> something.
>
> I have a button in one place that, when clicked, will trigger a new
> activity and place (along with a new view).  The code for that button
> simply looks like this:
>
> listener.goTo( new FooPlace( fooid ) );
>
> The above code is in the button handler of BarViewImpl (view
> implementation for a separate place/activity).
>
> This above line works in that it goes to FooPlace and the URL shows
> the parameter (123456):
>
> MyApp.html?gwt.codesvr=127.0.0.1:9997#FooPlace:123456
>
> But fooid doesn't make it to FooView.  How does the FooPlace or
> FooActivity pass the fooid to FooView?

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



Passing an argument to a View using Activities and Places

2011-10-06 Thread Mike Dee
I'm using Activities and Place and can't figure this out.  I've been
looking at samples but don't see it in there. I think I'm missing
something.

I have a button in one place that, when clicked, will trigger a new
activity and place (along with a new view).  The code for that button
simply looks like this:

listener.goTo( new FooPlace( fooid ) );

The above code is in the button handler of BarViewImpl (view
implementation for a separate place/activity).

This above line works in that it goes to FooPlace and the URL shows
the parameter (123456):

MyApp.html?gwt.codesvr=127.0.0.1:9997#FooPlace:123456

But fooid doesn't make it to FooView.  How does the FooPlace or
FooActivity pass the fooid to FooView?

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



PlaceHistoryHandler for URL with multiple args

2011-10-03 Thread Mike Dee
Just wondering about how to go about implementing a history mechanism
(using Activities and Places) for URLs with multiple arguments.  For
example, lets say I want a book search url (call it BookSearch) to be
bookmarkable and have multiple arguments.  In a traditional web app
the URL may look like BookSearch.php?
title=xxx&author=yyy&publisher=zzz.

One idea I can see is to make the place token the entire argument
list.  So, in the above case it would look like:
title=xxx&author=yyy&publisher=zzz.  Then I could parse each arg (are
there any tools in GWT to help with this?).

Another idea would be to create a separate token for each argument.
The place class may look like this:

public class BookSearchPlace extends Place
{
public BookSearchPlace ( String title, String author, String
publisher )



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



CellSampler

2011-09-30 Thread Mike Dee
I'd like to reiterate the sentiment in this message:

http://groups.google.com/group/google-web-toolkit/browse_frm/thread/34aaaefe6c35a7f5/ed4fb0378cbf88d2?lnk=gst&q=cellsampler#ed4fb0378cbf88d2

The CellSampler code is difficult to understand.  The sample is here:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellSampler

I'm not even sure if it will compile. It refers to a DataGrid, which I
can not find anywhere.  It also refers to a CategoryChange class,
which I can not find.  Has this been kept up to date?  Where can I
find DataGrid and CategoryChange?  They don't appear in the gwt
javadoc.

This would be a great example if it were simpler to understand.

Mike

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



UIBinder, HTMLPanel, and style interactions

2011-09-26 Thread Mike Dee
I'm noticing something weird.  It is my first attempt at using
HTMLPanel.  The app is laid out with a DockLayoutPanel.  The south
panel is a footer panel and simply has a piece of text in it, which is
always there.  I want the text to be right justified with a bit of
padding.



  Some Text Here



The style, my-footer-panel, has a font, color, and padding.  The
padding doesn't appear to work.

When I look at the page in Firebug I seem some strange things (see
below).  The style is in there (as a class), but the style attribute
looks to be overriding the class with some inline styles.



Some Text Here



Why does the DIV have both a class and a style?  Where does the style
come from (the DockLayoutPanel)?

Mike

-- 
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: Basic CSS question

2011-09-26 Thread Mike Dee
Sorry, was a way for a week.  Thanks, I got this working.  I started
over from scratch and it worked.  Must have been something in there
that I did (while experimenting) that prevented it from working.

Mike

On Sep 15, 12:18 pm, Ernesto Oltra  wrote:
> The documentation you have linked is for vesion < 2.0. It clearly says at
> the beggining:
>
> *Documentation for the GWT 2.0 release of
> ClientBundle<http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html>
> can
> be found on the GWT Developer's Guide website.*
>
> 1) I have included a hyphen example in the files
> 2) Have you add CssResource.NotStrict? If not, the things declared in the
> CSS file and not declared in the interface will be reported as errors
> 3) Uibinder doesn't modify ClientBundle in any way. If the file
> (MyCSSFile.css in this example) is not found, it's a compile error, not a
> runtime one.
>
> This is a complete working example (Java imports excluded for shortness):
>
> *com/example/myapp/MyApp.gwt.xml*
> *
> *
>      "http://google-web-toolkit.googlecode.com/svn-history/r10350/trunk/dis...
> ">
> 
>
>   
>
>   
>
> 
> *
> *
> *com/example/myapp/client/MyCSSFile.css*
> *
> *
> body {
>   background-color: red; /* only an example of changing the color */
>   font: bold 20pt sans-serif;
>
> }
>
> .example-with-hyphens {
>   font-weight: bold;
>
> }
>
> *com/example/myapp/client/Resources.java*
>
> public interface Resources extends ClientBundle {
>
>   public static final Resources INSTANCE = GWT.create(Resources.class);
>
>   public interface Style extends CssResource {
>     @ClassName("example-with-hyphens")
>     exampleWithHpyhens();
>   }
>
>   @ClientBundle.Source("MyCSSFile.css")
>   @CssResource.NotStrict // If a class is present in the css file,
>   Style css();           //but not in the interface, don't
>                          // return any compiler errors
>
> }
>
> *com/example/myapp/client/MyApp.java*
>
> public class MyApp implements EntryPoint {
>
>   public void onModuleLoadSafe() {
>     Resources.INSTANCE.css().ensureInjected();
>
>     Button button = new Button("Example button");
>
>     String cls = Resources.INSTANCE.css().exampleWithHyphens();
>     // Now cls contains the obfuscated name
>     // of .example-with-hyphens
>
>     button.setStyleName(cls);
>
>     RootPanel.add(button);
>   }
>
> }
>
> 2011/9/15 Mike Dee 
>
>
>
>
>
>
>
> > I've been playing around with this for a couple of days, to great
> > frustration.  Can't get it to work.
>
> > I followed the example here:
> >  http://code.google.com/p/google-web-toolkit/wiki/ClientBundle#Examples
>
> > That doesn't work either.  The call to Window.Alert to print out the
> > css shows no text.
>
> > I also noticed a few other things.
>
> > 1) I took to naming my styles with hyphens, just like in all the GWT
> > examples.  Hyphens are not allowed.
>
> > 2) The app won't start.  An error message appears and the fix was to
> > add "@external" to the front of my styles.  But WHY?  Nothing I did
> > was any different from the GWT samples and none of them used
> > @external.  So, I just did something for which I have no understanding
> > (the documentation is not helpful).  I'd like to know, when is
> > @external not needed?
>
> > 3) I am using uibinder and removed my css file from the war directory
> > and moved it someplace where the CssResource can access it (in the
> > class hierarchy).  Now those styles are not being picked up.  Probably
> > because the enjureInjected() isn't working.  Or maybe ensureInjected()
> > doesn't work with uibinder.  Haven't been able to get far enough to
> > determine.
>
> > I would like to see some decent documentation.  It is nice to have
> > step by step just-do-it-this-way instructions. But when that doesn't
> > work, I have no idea why I am doing what I am doing.  Seems like the
> > docs are written for those who already understand GWT, which kind of
> > defeats the purpose.
>
> > Mike
>
> > On Sep 8, 1:23 pm, Ernesto Oltra  wrote:
> > > Sorry, I meant if you use the CssResource to bundle your stylesheets
> > > together with your app, it has a method ensureInjected(). The load
> > process
> > > would be something like that:
>
> > > Host page -> GWT code -> standard.css -> Your code -> Your CSS file
> > injected
>
> > > So it's easier 

Re: Basic CSS question

2011-09-15 Thread Mike Dee
Made progress on this.  Posting here since it may be helpful to
someone else.  Also additional questions.

Started from scratch.  Having @CssResource.NotStrict is important.
That pretty much allowed the css to be loaded without @external.

One problem occurs if there is a css class with a hyphen in the name.
A corresponding "foo-bar()" method is not allowed in the CssResource
class as the hyphen is an illegal char in a Java method name. That was
no big deal for me, since I don't need to programatically access css
classes.

I started out on this path to check if UiBinder would work with a
CssResource.  It does.  The ensureInject() seems to stick the styles
in myapp.css into the HEAD of the app's page (after standard.css).
However, GwtDesigner doesn't reflect the styles.  In using a
CssResource myapp.css was moved from the WAR directory (where the
myapp.html file is) to com.mycompany.myapp.resources.  I don't think
GwtDesigner knows to look there. I guess a copy of myapp.css could be
left in both places, but I'll probably forget to keep them in sync.

On Sep 15, 9:12 am, Mike Dee  wrote:
> I've been playing around with this for a couple of days, to great
> frustration.  Can't get it to work.
>
> I followed the example here:
>  http://code.google.com/p/google-web-toolkit/wiki/ClientBundle#Examples
>
> That doesn't work either.  The call to Window.Alert to print out the
> css shows no text.
>
> I also noticed a few other things.
>
> 1) I took to naming my styles with hyphens, just like in all the GWT
> examples.  Hyphens are not allowed.
>
> 2) The app won't start.  An error message appears and the fix was to
> add "@external" to the front of my styles.  But WHY?  Nothing I did
> was any different from the GWT samples and none of them used
> @external.  So, I just did something for which I have no understanding
> (the documentation is not helpful).  I'd like to know, when is
> @external not needed?
>
> 3) I am using uibinder and removed my css file from the war directory
> and moved it someplace where the CssResource can access it (in the
> class hierarchy).  Now those styles are not being picked up.  Probably
> because the enjureInjected() isn't working.  Or maybe ensureInjected()
> doesn't work with uibinder.  Haven't been able to get far enough to
> determine.
>
> I would like to see some decent documentation.  It is nice to have
> step by step just-do-it-this-way instructions. But when that doesn't
> work, I have no idea why I am doing what I am doing.  Seems like the
> docs are written for those who already understand GWT, which kind of
> defeats the purpose.
>
> Mike
>
> On Sep 8, 1:23 pm, Ernesto Oltra  wrote:
>
>
>
>
>
>
>
> > Sorry, I meant if you use the CssResource to bundle your stylesheets
> > together with your app, it has a method ensureInjected(). The load process
> > would be something like that:
>
> > Host page -> GWT code -> standard.css -> Your code -> Your CSS file injected
>
> > So it's easier to overwrite styles in this way.
>
> > Sample code:
>
> > public interface Resources extends ClientBundle {
>
> >   public static final Resources INSTANCE = GWT.create(Resources.class);
>
> >   public interface Style extends CssResource {
> >     String myCssClassHere();
> >     String myCssClassHere2();
> >   }
>
> >   @ClientBundle.Source("Style.css")
> >   @CssResource.NotStrict // If a class is present in the css file,
> >   Style css();           //but not in the interface, don't
> >                          // return any compiler errors
>
> >   ImageResource blahBlah();
> >   // Othere resources
>
> > }
>
> > public class MyApp implements EntryPoint {
>
> >   public void onModuleLoadSafe() {
> >     Resources.INSTANCE.css().ensureInjected();
> >   }
>
> > }
>
> > 2011/9/8 Tobias 
>
> > > I am currently also struggling with that issue, see:
>
> > >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > > On Sep 8, 9:29 pm,MikeDee wrote:
> > > > What does "injecting" mean in terms of CSS?  Sounds like this may
> > > > alter the way cascading works in a typical web site/app?
>
> > > > On Sep 8, 11:47 am, Ernesto Oltra  wrote:
>
> > > > > Hi,
>
> > > > > Use Firebug or Chrome Dev Tools to see the cascade of styles, because 
> > > > > I
> > > had
> > > > > some hard times with that. You define the font X for body, but then 
> > > > > GWT
> > > &g

Re: Basic CSS question

2011-09-15 Thread Mike Dee
I've been playing around with this for a couple of days, to great
frustration.  Can't get it to work.

I followed the example here:
  http://code.google.com/p/google-web-toolkit/wiki/ClientBundle#Examples

That doesn't work either.  The call to Window.Alert to print out the
css shows no text.

I also noticed a few other things.

1) I took to naming my styles with hyphens, just like in all the GWT
examples.  Hyphens are not allowed.

2) The app won't start.  An error message appears and the fix was to
add "@external" to the front of my styles.  But WHY?  Nothing I did
was any different from the GWT samples and none of them used
@external.  So, I just did something for which I have no understanding
(the documentation is not helpful).  I'd like to know, when is
@external not needed?

3) I am using uibinder and removed my css file from the war directory
and moved it someplace where the CssResource can access it (in the
class hierarchy).  Now those styles are not being picked up.  Probably
because the enjureInjected() isn't working.  Or maybe ensureInjected()
doesn't work with uibinder.  Haven't been able to get far enough to
determine.

I would like to see some decent documentation.  It is nice to have
step by step just-do-it-this-way instructions. But when that doesn't
work, I have no idea why I am doing what I am doing.  Seems like the
docs are written for those who already understand GWT, which kind of
defeats the purpose.

Mike

On Sep 8, 1:23 pm, Ernesto Oltra  wrote:
> Sorry, I meant if you use the CssResource to bundle your stylesheets
> together with your app, it has a method ensureInjected(). The load process
> would be something like that:
>
> Host page -> GWT code -> standard.css -> Your code -> Your CSS file injected
>
> So it's easier to overwrite styles in this way.
>
> Sample code:
>
> public interface Resources extends ClientBundle {
>
>   public static final Resources INSTANCE = GWT.create(Resources.class);
>
>   public interface Style extends CssResource {
>     String myCssClassHere();
>     String myCssClassHere2();
>   }
>
>   @ClientBundle.Source("Style.css")
>   @CssResource.NotStrict // If a class is present in the css file,
>   Style css();           //but not in the interface, don't
>                          // return any compiler errors
>
>   ImageResource blahBlah();
>   // Othere resources
>
> }
>
> public class MyApp implements EntryPoint {
>
>   public void onModuleLoadSafe() {
>     Resources.INSTANCE.css().ensureInjected();
>   }
>
> }
>
> 2011/9/8 Tobias 
>
>
>
>
>
>
>
> > I am currently also struggling with that issue, see:
>
> >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > On Sep 8, 9:29 pm, Mike Dee  wrote:
> > > What does "injecting" mean in terms of CSS?  Sounds like this may
> > > alter the way cascading works in a typical web site/app?
>
> > > On Sep 8, 11:47 am, Ernesto Oltra  wrote:
>
> > > > Hi,
>
> > > > Use Firebug or Chrome Dev Tools to see the cascade of styles, because I
> > had
> > > > some hard times with that. You define the font X for body, but then GWT
> > > > loads and injects the standard.css file and you have sans-serif or
> > whatever
> > > > again.
>
> > > > You could:
>
> > > > 1) Load your stylesheet and inject it after GWT loads.
>
> > > > 2) Use your own version of standard.css (it's only a css file with some
> > > > images, copy it and use it)
>
> > > > Hope it helps,
>
> > > > Ernesto
>
> > --
> > 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: Basic CSS question

2011-09-08 Thread Mike Dee
What does "injecting" mean in terms of CSS?  Sounds like this may
alter the way cascading works in a typical web site/app?

On Sep 8, 11:47 am, Ernesto Oltra  wrote:
> Hi,
>
> Use Firebug or Chrome Dev Tools to see the cascade of styles, because I had
> some hard times with that. You define the font X for body, but then GWT
> loads and injects the standard.css file and you have sans-serif or whatever
> again.
>
> You could:
>
> 1) Load your stylesheet and inject it after GWT loads.
>
> 2) Use your own version of standard.css (it's only a css file with some
> images, copy it and use it)
>
> Hope it helps,
>
> Ernesto

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



  1   2   >