Confused by the i18n support for formatting dates, time and currency

2008-10-03 Thread Andreas Magnusson

I have one simple requirement that doesn't seem to be supported by
GWT, even though all the parts seems to be in place.
I want to format dates, time and currency according to the users
default language in their browser. Users expect to see such entities
in formats they understand.
However, I have no intention of translating my application. But as I
have understood it, GWTs support of DateTimeConstants etc rely on the
fact that I have compiled the application for all the locales that my
users might be using. And that's just crazy. I can understand the need
if you want to translate the UI as well.

As an example, Swedish users have no problem with a UI in English, but
we get *very* confused by the US date format.

Is there a way to just get support for formatting in all the locales
that GWT has in com.google.gwt.i18n.client.Constants?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Struts2 Integration

2008-10-03 Thread olivier nouguier
Hi Frank
 GWT FormPanel support regular (HTML) post !


On Thu, Oct 2, 2008 at 8:41 PM, FrankNC [EMAIL PROTECTED] wrote:


 I am new to GWT. I have a existing Web application which is using
 Struts 2. I am considering to use GWT on some of the Web pages in this
 web application.

 I took a look at the Struts GWT Plugin. It looks good. But it only
 covers how to use asynchronous call to the Struts action on the server
 side and how to process the data returned from the action in GWT. The
 Web page is still controlled by the same GWT module.

 However, in some cases I just want to use the GWT as a Web UI, but do
 not want the Ajax (asynchronous call) part. For example, I want to use
 GWT to build a form and do client side verification, after the user
 click the submit button, instead of sending an asynchronous call to
 the server, I want it acting as a regular form post, which posts the
 data to the Struts 2 action on the server side and let the server
 redirect the Web page based on the result of the action. It can be a
 plain Jsp file or another Jsp file which has GWT in it.

 Can someone help me on this?

 Thanks in advance,

 Frank

 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Timers - say no to it with IE

2008-10-03 Thread Ivan


Right, sorry that I haven't posted code before.
And the broblem is actually not in timers, because I temporarily
removed them,
there's smth else.

Here is the code:

c
// file ChartItem.java

public class ChartItem extends AbsolutePanel implements
ChartItemChanger {

private PopupMenu pp = PopupMenu.getInstance();

private ChangeListener mouseOverListener,  mouseOutListener,
mouseOnClickListener,mouseOnMouseDownListener,
mouseOnMouseUpListener;

public ChartItem () {
   sinkEvents(Event.MOUSEEVENTS);
   setMouseListeners();
  }

 private void setMouseListeners() {

  mouseOnClickListener = new ChangeListener() {/* This
is the place where IE does not respond*/
public void onChange(final Widget wdgt) {

/* Sending link to an interface */
pp.setChartItemInterface(ChartItem.this);

/* Calling standard methods of PopupPanel
class*/
pp.setPopupPosition(getAbsoluteLeft(),
getAbsoluteTop() );
pp.show();
}
};

mouseOnMouseDownListener = new ChangeListener() {...}
mouseOnMouseUpListener = new ChangeListener() {...};
mouseOverListener = new ChangeListener() {...};
mouseOutListener = new ChangeListener() {...};
  }

 public void onBrowserEvent(Event event) {
super.onBrowserEvent(event);
int type = DOM.eventGetType(event);
   switch (type) {
   case Event.ONCLICK:
mouseOnClickListener.onChange(this);
break;
...
   }
}

}

//
// file PopupMenu.java
/* A singleton class */

final public class PopupMenu extends PopupPanel {

  private static PopupMenu INSTANCE;

  private ChartItemChanger changer;

  public static PopupMenu getInstance() {
if (INSTANCE == null) {
INSTANCE = new PopupMenu();
}
   return INSTANCE;
}

 private PopupMenu() {
super(true);
 ...
 }

  void setChartItemInterface(ChartItemChanger changer) {
this.changer = changer;
}

 @Override
public void show()
{   if (Flags.ALLOW_POPUP_MENU_SHOWING)
super.show();
}

}

// file Flags.java

public class Flags {
 boolean ALLOW_POPUP_MENU_SHOWING=true;
 ...
}
/c

ChartItem also contains an image and when user clicks on it PopupMenu
should be shown.
It is ok in FF, but not in IE.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: redirect problem

2008-10-03 Thread falafala

For GWT RPC and Spring integration, you may first look at the GWT
Server Library
http://gwt-widget.sourceforge.net/   .  The GWT-SL provides a
GWTHandler to
handle the GWT RPC request and then invoke the corresponding service
POJO.
The configuration is rather standard and straight forward.
To intercept the call between the GWT-SL GWTHandler and the POJO
service,
you can look at the Spring AOP, eg, BeanNameAutoProxyCreator ... sth
like that.


On 10月3日, 上午8時32分, deanhiller [EMAIL PROTECTED] wrote:
 This combined with the post just after sounds like the best solution
 so far(though educating developers on using the adapter is a pain, it
 will have to do).

 In that case though, if I am using tomcat with straight GWT, can I
 still do this?  I don't know much about spring at all.  Can I get more
 details on how to specify the servlet in this case as don't you need
 to specify the Spring servlet or specify the layer in between GWT
 Servlet and client somehow.  What does the code look like and what
 does the web.xml look like here?

 On Oct 2, 1:25 am, falafala [EMAIL PROTECTED] wrote:

  The gwt client cannot interpret the redirect or invalid response
  (hence invocation exception).  I do it this way...
  I use GWT server library so I can implement the service as POJO in
  Spring container and published as gwt service.  I cannot use servlet
  filter  bcoz it cannot handle the marshaling of the response.  It
  should be behind the GWT rpc servlet. So I intercept the call to POJO
  service using Spring aop and check the session there, and throw
  session expired exception. The SessionExpiredException can also
  include the URL to be redirected. This can be marshaled and sent back
  to the gwt client.

  On the client side, you can catch the SessionExpiredException in the
  AsyncCallback handler and call the Javascript to do the redirect.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Timers - say no to it with IE

2008-10-03 Thread Thomas Broyer


On 3 oct, 09:47, Ivan [EMAIL PROTECTED] wrote:
 Right, sorry that I haven't posted code before.
 And the broblem is actually not in timers, because I temporarily
 removed them,
 there's smth else.
[...]
           mouseOnClickListener = new ChangeListener() {        /* This
 is the place where IE does not respond*/
             public void onChange(final Widget wdgt) {

                         /* Sending link to an interface */
                         pp.setChartItemInterface(ChartItem.this);

                         /* Calling standard methods of PopupPanel
 class*/
                         pp.setPopupPosition(getAbsoluteLeft(),
 getAbsoluteTop() );
                         pp.show();
             }
         };
[...]
 ChartItem also contains an image and when user clicks on it PopupMenu
 should be shown.
 It is ok in FF, but not in IE.

What if you set a ClickListener on the Image?
It might be related to 
http://groups.google.fr/group/Google-Web-Toolkit/t/4783c9b0cc35e081/
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT SITE? (example)

2008-10-03 Thread rov.ciso

Good day! Do anybody know sites based on GWT? What is big project
write with GWT? Please, give me url. 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Spring Spring Security (ex acegi).

2008-10-03 Thread noon

Hi Olivier,

What's the benefit compared to GWT-SL Spring integration ?

Regards
Bruno

On 3 oct, 09:38, olivier nouguier [EMAIL PROTECTED]
wrote:
 Hi all,

  Here are our GWT Sprint  Spring security component.

  http://code.google.com/p/net-orcades-spring/

  There is a sample war as featured download for the very impatient.

  It's allow to:

 * dispatch RPC-GWT request to Spring managed bean.
 * trigger the authentication from GWT-RPC request.
 * allow UI component to activate / deactivate regarding the granted
 authorities (experimental).

 Thanks for commenting !!
 --
 Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
 dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
 comestible
      - proverbe indien Cri
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread mig

have a look at www.seges.sk , ev. www.seges.eu or www.seges.com

On Oct 3, 10:42 am, rov.ciso [EMAIL PROTECTED] wrote:
 Good day! Do anybody know sites based on GWT? What is big project
 write with GWT? Please, give me url. 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Spring Spring Security (ex acegi).

2008-10-03 Thread olivier nouguier
Hi,
 For the my GWT Dispatcher you don't need extra xml configuration to map
the GWTHandler to the Managed bean:

 * the Spring configuration (application context) is unaware on the GWT-RPC
underlying.
 * very simpler to maintain.

 This DispatchServlet resolve the Managed Bean that implements the
RemoteService invoked without any configuration in your applicationContext.




On Fri, Oct 3, 2008 at 10:55 AM, noon [EMAIL PROTECTED] wrote:


 Hi Olivier,

 What's the benefit compared to GWT-SL Spring integration ?

 Regards
 Bruno

 On 3 oct, 09:38, olivier nouguier [EMAIL PROTECTED]
 wrote:
  Hi all,
 
   Here are our GWT Sprint  Spring security component.
 
   http://code.google.com/p/net-orcades-spring/
 
   There is a sample war as featured download for the very impatient.
 
   It's allow to:
 
  * dispatch RPC-GWT request to Spring managed bean.
  * trigger the authentication from GWT-RPC request.
  * allow UI component to activate / deactivate regarding the granted
  authorities (experimental).
 
  Thanks for commenting !!
  --
  Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
  dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
  comestible
   - proverbe indien Cri
 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Troubles linking GWT and php server using JSon

2008-10-03 Thread RamI

ok I tried without the port :
String url = http://localhost/Portail/www/com.op.Portail/
authenticate.php?name=\'+name+\'pwd=\'+pass+\';

and it works !
So I will try to change my configuration as you suggested Andrej

What I still don't understand :
ok in hosted mode my script is not interpreted because it is a tomcat.
But since I didn't precise the port in the url, why is this still not
interpreted when compiled?

Thanks all

RamI
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Troubles linking GWT and php server using JSon

2008-10-03 Thread RamI

I tried your solution Andrej

If I well understood, I have to replace
stringAttribute key=org.eclipse.jdt.launching.PROGRAM_ARGUMENTS
value=-out www com.op.Portail/Portail.html/
by
stringAttribute key=org.eclipse.jdt.launching.PROGRAM_ARGUMENTS
value=-out www Portail/www/com.op.Portail/Portail.html -noserver -
port 80/

and it also works ^^ and this solution also allows me to keep the
relative path for my url

Thanks again

RamI
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Removing padding from tree items...

2008-10-03 Thread Ibmurai

I solved it with this:

div {
margin-top: 0px !important;
margin-bottom: 0px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
}
span {
margin-top: 0px !important;
margin-bottom: 0px !important;
padding-top: 0px !important;
padding-bottom: 0px !important;
}

But that's not really optimal... It's like putting down cats with
nuclear bombs...

On 3 Okt., 11:30, Ibmurai [EMAIL PROTECTED] wrote:
 Even though I use the stylesheet below, all tree items are contained
 in a div with 3px padding. This didn't happen prior to my upgrade to
 1.5.2 (from 1.4.6)
 I need that padding to be 0px...
 Help?

 .gwt-Tree {
         margin: 0px;
         padding: 0px;}

 div {
         margin-top: 0px;
         margin-bottom: 0px;
         padding-top: 0px;
         padding-bottom: 0px;}

 .gwt-Tree .gwt-TreeItem {
         padding: 0px;
         margin-top: 0px;
         margin-bottom: 0px;

 }
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Hosted mode ServletContextProxy not available in javax.servlet.Filter

2008-10-03 Thread olivier nouguier
Hi all,
 I've encountered a problem with the resolution of the Serialization file in
hosted mode, because the shell servlet uses a ServletContextProxy which is
not available in the a javax.servlet.Filter.
My work around in hosted mode is to ask this resources (IUZIUZUI.gwt.rpc) to
the shell servlet using an HTTP request (it's not very efficient, but in
hosted mode in not a big deal). Is there a cleaner solution ?

-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread Rob Coops
On Fri, Oct 3, 2008 at 10:42 AM, rov.ciso [EMAIL PROTECTED] wrote:


 Good day! Do anybody know sites based on GWT? What is big project
 write with GWT? Please, give me url. Thanks.
 
 Try gpokr.com it is a nice example of a none business application written
in GWT, showing you that a lot more can be done with it then just a fancy
way to present a form.

Regards,

Rob

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Removing padding from tree items...

2008-10-03 Thread mig

get firebug to check the CSS of the tree...find applied styles , then
change the CSS
hope, it helps

On Oct 3, 11:37 am, Ibmurai [EMAIL PROTECTED] wrote:
 I solved it with this:

 div {
     margin-top: 0px !important;
     margin-bottom: 0px !important;
     padding-top: 0px !important;
     padding-bottom: 0px !important;}

 span {
     margin-top: 0px !important;
     margin-bottom: 0px !important;
     padding-top: 0px !important;
     padding-bottom: 0px !important;

 }

 But that's not really optimal... It's like putting down cats with
 nuclear bombs...

 On 3 Okt., 11:30, Ibmurai [EMAIL PROTECTED] wrote:



  Even though I use the stylesheet below, all tree items are contained
  in a div with 3px padding. This didn't happen prior to my upgrade to
  1.5.2 (from 1.4.6)
  I need that padding to be 0px...
  Help?

  .gwt-Tree {
          margin: 0px;
          padding: 0px;}

  div {
          margin-top: 0px;
          margin-bottom: 0px;
          padding-top: 0px;
          padding-bottom: 0px;}

  .gwt-Tree .gwt-TreeItem {
          padding: 0px;
          margin-top: 0px;
          margin-bottom: 0px;

  }
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT Spring Spring Security (ex acegi).

2008-10-03 Thread olivier nouguier
Hi all,

 Here are our GWT Sprint  Spring security component.

 http://code.google.com/p/net-orcades-spring/

 There is a sample war as featured download for the very impatient.

 It's allow to:

* dispatch RPC-GWT request to Spring managed bean.
* trigger the authentication from GWT-RPC request.
* allow UI component to activate / deactivate regarding the granted
authorities (experimental).

Thanks for commenting !!
-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Removing padding from tree items...

2008-10-03 Thread Ibmurai

Even though I use the stylesheet below, all tree items are contained
in a div with 3px padding. This didn't happen prior to my upgrade to
1.5.2 (from 1.4.6)
I need that padding to be 0px...
Help?

.gwt-Tree {
margin: 0px;
padding: 0px;
}
div {
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
.gwt-Tree .gwt-TreeItem {
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Radio Button Bug?

2008-10-03 Thread Arji

Hi Guys,

Is this a bug in the GWT? Or maybe I'm implementing it the wrong way.

Can anyone try this, having 2 Radio Buttons on the same group, both
have added Listeners (CheckboxListenerAdapter).  Sometimes it is
throwing the slow script message.  Is anyone experiencing this?
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT in netbeans 6.0.1

2008-10-03 Thread prabesh shrestha

Thanks YoeZ it worked.Actually i didn't download gwt-windows earlier,
I only installed the gwt plugin in netbeans.Now it worked after i
downloaded the package,anyhow my project is started.Thanks again.

Regards,
Prabesh Shrestha
On Oct 2, 7:20 pm, YoeZ [EMAIL PROTECTED] wrote:
 installation folder is where you extracted the GWT (ex. C:\GWT\gwt-
 windows-1.5.2)

 On Oct 2, 1:10 pm, prabesh shrestha [EMAIL PROTECTED] wrote:

  I have installed the GWT plugin in my netbeans IDE .But when i start a
  new project in comes to a hold when i select the installation folder
  for gwt.It says this is not a valid installation folder for gwt.
  I am using netbeans in windows XP.What is the valid installation
  folder?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread Andrej Harsani

check this out:
http://www.demo.qualityunit.com/pax4/merchants/

Andrej
www.gwtphp.com
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Radio Button Bug?

2008-10-03 Thread olivier nouguier
hi ...
It might depend on what your listener are doing ;)
(Particularly if they are changing state of other checks ...)

On Fri, Oct 3, 2008 at 12:06 PM, Arji [EMAIL PROTECTED] wrote:


 Hi Guys,

 Is this a bug in the GWT? Or maybe I'm implementing it the wrong way.

 Can anyone try this, having 2 Radio Buttons on the same group, both
 have added Listeners (CheckboxListenerAdapter).  Sometimes it is
 throwing the slow script message.  Is anyone experiencing this?
 Thanks
 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



colorating a tab

2008-10-03 Thread Zied Hamdi

Hi folks,

I'm new to GWT (but I read the tutorial). I need to give my tabs a
different color, and this is what I see in my firebug:

.gwt-TabBar .gwt-TabBarItem {standard.css (line 870)
background:#D0E4F6 none repeat scroll 0%;
color:black;
cursor:pointer;
font-weight:bold;
margin-left:6px;
padding:3px 6px;
text-align:center;
}
.gwt-TabBar-Into .gwt-TabBarItem {main.css (line 55)
background:#EE none repeat scroll 0%;
color:#6F6F6F;
}

so the standard css background and color are overriding my locally
defined attrs in main.css.

Is it due to a bad configuration? or is it the way it is supposed to
work?

I added a style to the tab bar:
mainTabPanel.getTabBar().addStyleDependentName(Into);

But this doesn't affect each tab (I was also expeting a method such as
addChildrenStyleDependentName() )...

The only solution I found is to call setStylePrimaryName() and copy
all subsequent styles : for the tabbar, the bar, the items... from
standard.css changing only the colors: I don't think GWT was designed
this way...

Anyway, any help is very welcome.

Regards,
Zied Hamdi

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Menu Active Item Hightlighted

2008-10-03 Thread karmela

Hi Sumit,
Thank you so much for getting back to me.
The hovering works just fine. When hover over the menu item the class
changes to gwt-MenuItem-selected. But when an actual item is selected,
the class/id does not change.
So I'm not sure how to change the class so that I can give it specific
style.
I'd really appreciate it if you could help.

Thanks again Sumit.
Karmela


On Oct 2, 9:54 am, Sumit Chandel [EMAIL PROTECTED] wrote:
 Hi Karmela,
 Have you taken a look at the latest Menu Bar widget in the Showcase sample
 application? It provides default CSS styles for menu items to be highlighted
 whenever the cursor is hovering over them.

 You can check it out here:

 http://gwt.google.com/samples/Showcase/Showcase.html#CwMenuBar

 Note that you can see both the Java source and the CSS code for the Menu Bar
 in the same display. You should be able to use this and tweak the styles for
 the purpose of your application.

 Hope that helps,
 -Sumit Chandel

 On Tue, Sep 30, 2008 at 4:45 PM, karmela [EMAIL PROTECTED] wrote:

  Hi all,
  Hope someone can help me with this.
  I want to have the active menu item to be highlighted. Basically when
  an item gets selected and goes to a page, i want that link (menu item)
  to be in a different color.
  Is that possible to do with GWT?

  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: colorating a tab

2008-10-03 Thread Alex D

GWT has default styles for all its widgets. For example, Button class
has the style .gwt-Button. The same applies for other widgets,
including more complex ones.
What you see in firebug, .gwt-TabBar is the default style for TabBar,
and .gwtTabBarItem (the next style on the same line) is the style for
TabBarItem which is furthermore cascaded (derived) from .gwtTabBar.

When you don't set any styles for a widget, it uses its default style
(and further, cascades the style for complex widgets).
You said the code overwrote your styles defined in main.css, this is
because you don't have the required styles names in your CSS file
(main.css). Otherwise, GWT would load the styles from your file.

If you want other names for your styles, just define them and use
setPrimaryStyleName (...). Furthermore (let's say you have a generic
setting for a widget and you want further customization for a specific
one), use setStyleDependentName (...).

To finish, I haven't checked the following case: if I set a style
name, let's say shyStyle for a TabBar, I don't know if GWT knows the
styles for subitems, like .shyStyle .getTabBarItem

Hope it helps, cheers.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: creating a custom MenuItem - ?

2008-10-03 Thread Alex D

You could try creating a custom class that extends Composite :)
This was our solution for creating a left sided tab panel (like the
regular one you can find in GWT, but tabs are not up, but on left).

On Oct 3, 10:08 am, gsmd [EMAIL PROTECTED] wrote:
 I'm thinking of putting a Button and a TextBox to MenuBar.
 Is there an easy/described way of extending MenuItem in order to
 achieve that? Any hints?

 TIA.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Radio Button Bug?

2008-10-03 Thread Alex D

It looks like you are using the code in a wrong way, maybe you are
doing something recursive there.

On Oct 3, 1:06 pm, Arji [EMAIL PROTECTED] wrote:
 Hi Guys,

 Is this a bug in the GWT? Or maybe I'm implementing it the wrong way.

 Can anyone try this, having 2 Radio Buttons on the same group, both
 have added Listeners (CheckboxListenerAdapter).  Sometimes it is
 throwing the slow script message.  Is anyone experiencing this?
 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Confused by the i18n support for formatting dates, time and currency

2008-10-03 Thread Lothar Kimmeringer

Andreas Magnusson schrieb:

 Is there a way to just get support for formatting in all the locales
 that GWT has in com.google.gwt.i18n.client.Constants?

No, beacuse the classes don't exist inside the compiled
Javascript-result. If the values are coming from the
server-side, you can format them there by adding a
parameter locale to the list of parameters of the
method:

public MyDataResult getServerStatus(String locale){
  MyDataResult res = new MyDataResult();
  res.startDate = getServerStatus().getStartDate();
  Locale l = getLocale();
  DateFormat formatter = 
SimpleDateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, l);
  res.startDateFormatted = formatter.format(res.startDate);
  return res;
}

private Locale getLocale(String locale){
  StringTokenizer tt = new StringTokenizer(locale, _);
  Locale loc = new Locale(tt.nextToken(), tt.hasMoreTokens() ? tt.nextToken() : 
, tt.hasMoreTokens() ? tt.nextToken() : );
  return loc;
}

The locale passed to the servlet can be read using JSNI (I don't
know if there is a way to get it via GWT already) or the servlet
reads in the corresponding HTTP-request-header (then you can
leave away the parameter or you use it as default if the parameter
is null).


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Weird problem with shared code

2008-10-03 Thread olivier nouguier
Hi,

Since GWT 1.4, IsSerializable is not necessary, Serializable is enough.

1:) AFAIK the Type must be known at compile time so setObject(Object o) is
out !
 You should have a base Serializable class (know at compile time)

2:) The JavaBean contract must be honored : That getThat / setThat(That
that).




On Fri, Oct 3, 2008 at 1:07 PM, Alex D [EMAIL PROTECTED] wrote:


 Hello everybody, I have encountered a very weird problem with shared
 code between client and server.

 The client is GWT compatible Java code and the server is pure Java.

 We have created a serializable class, Request (public class Request
 implements IsSerializable) which we want to use to exchange data
 between client and server code. The class was included in the .rpc
 file generated by the compiler, so it's indeed serializable. Moreover,
 inside this class we have a method that sets the object for this
 request; inside this method, an encoding protocol is obtained via
 object's class name (if this is a list, we typecast it to List and get
 the first element's class name - if the size is != 0). The code for
 all protocols is compatible with GWT, since it compiles successfully,
 the request object arrives at the servlet and the response back.

 However, writing any of the following lines of code has no effect:
 request.setObject (o)
 or
 request.getObject ()

 It acts as if they don't exist, in either client/server code. I have
 print-lined before and after the request in servlet, and all prints
 BEFORE the request sets a list of objects work, BUT all after DON'T;
 this would indicate that setting an object is a problem, BUT then, the
 function exists successfully, since client code receives the request.
 You would ask 'if you get a new request back, what's the problem?'

 The problem is handling this request, since I have agents that handle
 the object inside this request,
 so ... request.getObject () - again, something breaks, because I used
 Window.alert(...) just before getting the object and again one just
 after. The second one doesn't get executed, but no errors, no
 exceptions!!

 I should mention that hosted mode works just fine and I am able to
 display the object (so it's handled correctly).

 Is there any problem if I use a shared package/classes (within same
 project) for both client and server code? How would I detect this
 problem since I don't get any errors?

 Sorry for the long post, I hope you have the patience to read it :)
 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread Lothar Kimmeringer

deanhiller schrieb:

 BEFORE methods are even called, I want to chech if there is a User
 object in the Session(ie. user is logged in).  If there is not, the
 Session probably expired and I want to throw a NotLoggedInException on
 every one of these methods(but not in the method itself).

By looking into RemoteServiceServlet I see a couple of ways
that should be possible (I haven't tried, so I might be
wrong ;-)

/**
 * Override this method to examine the serialized version of the request
 * payload before it is deserialized into objects. The default implementation
 * does nothing and need not be called by subclasses.
 */
protected void onBeforeRequestDeserialized(String serializedRequest);

Overwriting this method allow you to throw the NotLoggedInException
for every method that is going to be called.

If you want to throw the execption only for a list of methods
(e.g. to allow the login without creating a second servlet),
you might overwrite processCall instead. Here an example of how I
think it should be possible:

public String processCall(String payload) throws SerializationException{
  try {
RPCRequest rpcRequest = RPC.decodeRequest(payload, this.getClass(), this);
if (!rpcRequest.getMethod().getName().equals(checkLogin)){
  if (!isValidSession){
throw new NotLoggedInException();
  }
}
  }
  catch(SerializationException se){
throw se;
  }
  catch(Exception e){}
  return super.processCall(payload);
}

NotLoggedInException must be derived from SerializableException

 I would
 prefer this is reusable in an abstract class that implements
 RemoteServiceServlet and any GWT Servlet any team creates here will
 extend that and inherit this functionality since all the
 authentication stuff is the same for all our services.

Above should be usable in an abstract way, you can define the
list of allowed methods by using e.g. annotations or a list
of strings being set in the init-method of the derived servlets.

The only thing missing is a class implemeting AsyncCallback that
overwrites onFailure and checks for the NotLoggedInException to
redirect to the login-panel automatically.


Regards, Lothar


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



creating a custom MenuItem - ?

2008-10-03 Thread gsmd

I'm thinking of putting a Button and a TextBox to MenuBar.
Is there an easy/described way of extending MenuItem in order to
achieve that? Any hints?

TIA.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Confused by the i18n support for formatting dates, time and currency

2008-10-03 Thread Andreas Magnusson

On 3 Okt, 15:03, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 I don't see a chance except requesting that information from
 the server or building your own client-class that is taking
 the values from the classes of GWT (so that these values are
 compiled into every iteration. Personally I would go the first
 way, because otherwise the application might grow in size
 significantly where just a few bytes per user are needed.
 If you already exchange data with the server, you might
 add these informations to the response.

 Regards, Lothar

Good idea. Then I *only* have to modify the date picker to use my
locale information instead of GWT's, but it's doable. Perhaps I should
request that they make it pluggable instead?

/Andreas
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Confused by the i18n support for formatting dates, time and currency

2008-10-03 Thread Thomas Broyer


On 3 oct, 08:53, Andreas Magnusson [EMAIL PROTECTED]
wrote:
 I have one simple requirement that doesn't seem to be supported by
 GWT, even though all the parts seems to be in place.
 I want to format dates, time and currency according to the users
 default language in their browser. Users expect to see such entities
 in formats they understand.
 However, I have no intention of translating my application. But as I
 have understood it, GWTs support of DateTimeConstants etc rely on the
 fact that I have compiled the application for all the locales that my
 users might be using. And that's just crazy. I can understand the need
 if you want to translate the UI as well.

 As an example, Swedish users have no problem with a UI in English, but
 we get *very* confused by the US date format.

 Is there a way to just get support for formatting in all the locales
 that GWT has in com.google.gwt.i18n.client.Constants?

As Lothar said: no.

However, JavaScript's Date object has some handy methods:
toLocaleString(), toLocaleDateString() and toLocaleTimeString(), so
you could use JSNI to get the javascript Date used by the
java.util.Date emulation and call the toLocaleDateString or
toLocaleTimeString on it (java.util.Date::toLocaleString() already
maps to javascript's Date.prototype.toLocaleString):

   public static native String toLocaleDateString(Date d) /*-{
  return d.jsdate.toLocaleDateString();
   }-*/;

You'd have to use some GWT.isScript()-protected code for the hosted-
mode (see below); and I don't know to what extent those methods are
supported in browsers... (they seem to be supported in Firefox and
IE6+ at least, so it shouldn't be a problem using them).

   public static String toLocaleDateString(Date d) {
  if (GWT.isScript()) {
 return nativeToLocaleDateString(d);
  } else {
 // put your hosted-mode pure Java code here
  }
   }

   private static native String nativeToLocaleDateString(Date d) /*-{
  return d.jsdate.toLocaleDateString();
   }-*/;


...note that this means too that you're quite limited in the formats
you can use...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: gwt-maps API - Custom Projection boolean error

2008-10-03 Thread Tim White

On Sep 26, 9:49 am, Eric Ayers [EMAIL PROTECTED] wrote:
 I've found the problem and updated the issue. I've got a proposed solution
 out for review on the Google-Web-Toolkit-Contributors mailing list.

I puleld down the latest 1.0 SVN, and my code works now, thanks!!!

Tim
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread deanhiller

where is the posted project so I can check it out?

On Oct 3, 1:42 am, olivier nouguier [EMAIL PROTECTED]
wrote:
 Hi,
  If you don't want to give a try with Spring( or Guice), you could use
 AspectJ to weave your desired behaviour (handling security).
  But it might be more long  hard than to learn spring  spring security
 (I've just post a project that illustrate this).
 hih



 On Fri, Oct 3, 2008 at 7:23 AM, deanhiller [EMAIL PROTECTED] wrote:

  I saw someone talking about proxying all the methods to add code(like
  an aspect or filter) using spring and I am wondering how I can do
  this(hopefully without spring as I don't feel like learning that right
  now and just want a quick solution).

  Basically, if my GWT servlet has these methods
  public void doSomething(int i);
  public String doSomethingAgain(String s);
  public long increaseSomething(int i);

  BEFORE methods are even called, I want to chech if there is a User
  object in the Session(ie. user is logged in).  If there is not, the
  Session probably expired and I want to throw a NotLoggedInException on
  every one of these methods(but not in the method itself).  I would
  prefer this is reusable in an abstract class that implements
  RemoteServiceServlet and any GWT Servlet any team creates here will
  extend that and inherit this functionality since all the
  authentication stuff is the same for all our services.

  How do I do this in a common way?  It looks like the
  RemoteServiceServlet is kind of screwed up in not exposing a good
  method to override that I could use as the filter.

  Any ideas?
  thanks,
  Dean

 --
 Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
 dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
 comestible
      - proverbe indien Cri
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread deanhiller

that doesn't work.  I have tried that.  If you throw an Exception in
onBeforeRequestDeserialized, the Exception never gets translated into
the GWT protocol as that code is lower down the stack and instead GWT
receives an InvocationException and doesn't know what happened.
overriding processCall is to high up and you get no translation
either.

To do what you are suggested, a new method in RPC called invokeMethod
would need to be created like so
(these two lines from RPC.java invokeAndEncodeResponse)
  Object result = serviceMethod.invoke(target, args);
  responsePayload = encodeResponseForSuccess(serviceMethod,
result,
  serializationPolicy);

invokeAndEncodeResponse method would call that new method and I could
override that and then GWT would be translating the exception
correctly for me, BUT GWT does not have this.  I have submitted this
change years ago but to no avail as I would LOVE to override that
method.I guess spring is the only way if only I can get some
example code.

On Oct 3, 7:00 am, Lothar Kimmeringer [EMAIL PROTECTED] wrote:
 deanhiller schrieb:

  BEFORE methods are even called, I want to chech if there is a User
  object in the Session(ie. user is logged in).  If there is not, the
  Session probably expired and I want to throw a NotLoggedInException on
  every one of these methods(but not in the method itself).

 By looking into RemoteServiceServlet I see a couple of ways
 that should be possible (I haven't tried, so I might be
 wrong ;-)

 /**
  * Override this method to examine the serialized version of the request
  * payload before it is deserialized into objects. The default implementation
  * does nothing and need not be called by subclasses.
  */
 protected void onBeforeRequestDeserialized(String serializedRequest);

 Overwriting this method allow you to throw the NotLoggedInException
 for every method that is going to be called.

 If you want to throw the execption only for a list of methods
 (e.g. to allow the login without creating a second servlet),
 you might overwrite processCall instead. Here an example of how I
 think it should be possible:

 public String processCall(String payload) throws SerializationException{
   try {
     RPCRequest rpcRequest = RPC.decodeRequest(payload, this.getClass(), this);
     if (!rpcRequest.getMethod().getName().equals(checkLogin)){
       if (!isValidSession){
         throw new NotLoggedInException();
       }
     }
   }
   catch(SerializationException se){
     throw se;
   }
   catch(Exception e){}
   return super.processCall(payload);

 }

 NotLoggedInException must be derived from SerializableException

  I would
  prefer this is reusable in an abstract class that implements
  RemoteServiceServlet and any GWT Servlet any team creates here will
  extend that and inherit this functionality since all the
  authentication stuff is the same for all our services.

 Above should be usable in an abstract way, you can define the
 list of allowed methods by using e.g. annotations or a list
 of strings being set in the init-method of the derived servlets.

 The only thing missing is a class implemeting AsyncCallback that
 overwrites onFailure and checks for the NotLoggedInException to
 redirect to the login-panel automatically.

 Regards, Lothar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread olivier nouguier
http://code.google.com/p/net-orcades-spring/

It's dispatching your GWT-RPC.

Provides security including authentication  authorization  around GWT
service.

There also some test to build some widget that can activate / deactivate
when user login / logout.

There is a sample as Featured download.

Regards.

On Fri, Oct 3, 2008 at 3:33 PM, deanhiller [EMAIL PROTECTED] wrote:


 where is the posted project so I can check it out?

 On Oct 3, 1:42 am, olivier nouguier [EMAIL PROTECTED]
 wrote:
  Hi,
   If you don't want to give a try with Spring( or Guice), you could use
  AspectJ to weave your desired behaviour (handling security).
   But it might be more long  hard than to learn spring  spring
 security
  (I've just post a project that illustrate this).
  hih
 
 
 
  On Fri, Oct 3, 2008 at 7:23 AM, deanhiller [EMAIL PROTECTED]
 wrote:
 
   I saw someone talking about proxying all the methods to add code(like
   an aspect or filter) using spring and I am wondering how I can do
   this(hopefully without spring as I don't feel like learning that right
   now and just want a quick solution).
 
   Basically, if my GWT servlet has these methods
   public void doSomething(int i);
   public String doSomethingAgain(String s);
   public long increaseSomething(int i);
 
   BEFORE methods are even called, I want to chech if there is a User
   object in the Session(ie. user is logged in).  If there is not, the
   Session probably expired and I want to throw a NotLoggedInException on
   every one of these methods(but not in the method itself).  I would
   prefer this is reusable in an abstract class that implements
   RemoteServiceServlet and any GWT Servlet any team creates here will
   extend that and inherit this functionality since all the
   authentication stuff is the same for all our services.
 
   How do I do this in a common way?  It looks like the
   RemoteServiceServlet is kind of screwed up in not exposing a good
   method to override that I could use as the filter.
 
   Any ideas?
   thanks,
   Dean
 
  --
  Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
  dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
  comestible
   - proverbe indien Cri
 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Weird problem with shared code

2008-10-03 Thread Alex D

The type must be known for instanced objects, not generic object
passing to methods.
In GWT, I can't do the following:
Object o = new Object ();
Instead, I can do this:
Object o = new ListBox (false); (altough I surely would typecast again
to ListBox so that I can do something with that object).

What is that thing about honoring JavaBean? :)

I don't know how, but we have solved the problem, but just by
coincidence. Up until now, I couldn't find a reasonable explanation
for what happened or what the problem was.

On Oct 3, 3:52 pm, olivier nouguier [EMAIL PROTECTED]
wrote:
 Hi,

 Since GWT 1.4, IsSerializable is not necessary, Serializable is enough.

 1:) AFAIK the Type must be known at compile time so setObject(Object o) is
 out !
      You should have a base Serializable class (know at compile time)

 2:) The JavaBean contract must be honored : That getThat / setThat(That
 that).



 On Fri, Oct 3, 2008 at 1:07 PM, Alex D [EMAIL PROTECTED] wrote:

  Hello everybody, I have encountered a very weird problem with shared
  code between client and server.

  The client is GWT compatible Java code and the server is pure Java.

  We have created a serializable class, Request (public class Request
  implements IsSerializable) which we want to use to exchange data
  between client and server code. The class was included in the .rpc
  file generated by the compiler, so it's indeed serializable. Moreover,
  inside this class we have a method that sets the object for this
  request; inside this method, an encoding protocol is obtained via
  object's class name (if this is a list, we typecast it to List and get
  the first element's class name - if the size is != 0). The code for
  all protocols is compatible with GWT, since it compiles successfully,
  the request object arrives at the servlet and the response back.

  However, writing any of the following lines of code has no effect:
  request.setObject (o)
  or
  request.getObject ()

  It acts as if they don't exist, in either client/server code. I have
  print-lined before and after the request in servlet, and all prints
  BEFORE the request sets a list of objects work, BUT all after DON'T;
  this would indicate that setting an object is a problem, BUT then, the
  function exists successfully, since client code receives the request.
  You would ask 'if you get a new request back, what's the problem?'

  The problem is handling this request, since I have agents that handle
  the object inside this request,
  so ... request.getObject () - again, something breaks, because I used
  Window.alert(...) just before getting the object and again one just
  after. The second one doesn't get executed, but no errors, no
  exceptions!!

  I should mention that hosted mode works just fine and I am able to
  display the object (so it's handled correctly).

  Is there any problem if I use a shared package/classes (within same
  project) for both client and server code? How would I detect this
  problem since I don't get any errors?

  Sorry for the long post, I hope you have the patience to read it :)

 --
 Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
 dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
 comestible
      - proverbe indien Cri
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Weird problem with shared code

2008-10-03 Thread olivier nouguier
On Fri, Oct 3, 2008 at 3:33 PM, Alex D [EMAIL PROTECTED] wrote:


 The type must be known for instanced objects, not generic object
 passing to methods.
 In GWT, I can't do the following:
 Object o = new Object ();
 Instead, I can do this:
 Object o = new ListBox (false); (altough I surely would typecast again
 to ListBox so that I can do something with that object).


Sure, but if you write such code *only* on server side, the code will
compile, but GWT serialization won't works as ListBox (not a good example
...) will be unknown at GWT compile time.

PS: IMSHO ... ;)




 What is that thing about honoring JavaBean? :)


 I don't know how, but we have solved the problem, but just by
 coincidence. Up until now, I couldn't find a reasonable explanation
 for what happened or what the problem was.

 On Oct 3, 3:52 pm, olivier nouguier [EMAIL PROTECTED]
 wrote:
  Hi,
 
  Since GWT 1.4, IsSerializable is not necessary, Serializable is enough.
 
  1:) AFAIK the Type must be known at compile time so setObject(Object o)
 is
  out !
   You should have a base Serializable class (know at compile time)
 
  2:) The JavaBean contract must be honored : That getThat / setThat(That
  that).
 
 
 
  On Fri, Oct 3, 2008 at 1:07 PM, Alex D [EMAIL PROTECTED]
 wrote:
 
   Hello everybody, I have encountered a very weird problem with shared
   code between client and server.
 
   The client is GWT compatible Java code and the server is pure Java.
 
   We have created a serializable class, Request (public class Request
   implements IsSerializable) which we want to use to exchange data
   between client and server code. The class was included in the .rpc
   file generated by the compiler, so it's indeed serializable. Moreover,
   inside this class we have a method that sets the object for this
   request; inside this method, an encoding protocol is obtained via
   object's class name (if this is a list, we typecast it to List and get
   the first element's class name - if the size is != 0). The code for
   all protocols is compatible with GWT, since it compiles successfully,
   the request object arrives at the servlet and the response back.
 
   However, writing any of the following lines of code has no effect:
   request.setObject (o)
   or
   request.getObject ()
 
   It acts as if they don't exist, in either client/server code. I have
   print-lined before and after the request in servlet, and all prints
   BEFORE the request sets a list of objects work, BUT all after DON'T;
   this would indicate that setting an object is a problem, BUT then, the
   function exists successfully, since client code receives the request.
   You would ask 'if you get a new request back, what's the problem?'
 
   The problem is handling this request, since I have agents that handle
   the object inside this request,
   so ... request.getObject () - again, something breaks, because I used
   Window.alert(...) just before getting the object and again one just
   after. The second one doesn't get executed, but no errors, no
   exceptions!!
 
   I should mention that hosted mode works just fine and I am able to
   display the object (so it's handled correctly).
 
   Is there any problem if I use a shared package/classes (within same
   project) for both client and server code? How would I detect this
   problem since I don't get any errors?
 
   Sorry for the long post, I hope you have the patience to read it :)
 
  --
  Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
  dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
  comestible
   - proverbe indien Cri
 



-- 
Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
comestible
 - proverbe indien Cri

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Label + Hyperlink + Label

2008-10-03 Thread Brian

I'm wondering if this is really the best approach, of it I'm one
widget short of a better idea.

I'm just trying to write some text, a  gwt Hyperlink, and more text.
Basically trying to concatenate labels and Hyperlinks.

I can do this by creating a HorizontalPanel, adding the label, then
adding the Hyperlink, then adding more labels, more Hyperlinks, and so
on.  But is it really necessary for the HorizontalPanel to be there?
Is there something else that would be better?  Just off hand, I
thought of things like taking the Hyperlink's .getHTML() and
concatenating that with the label's text, but that isn't what I'm
after.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Ajax on a server that does not support servlet

2008-10-03 Thread Jason Essington

you need to read this explanation:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/faca1575f306ba0f

It talks specifically about RPC, but it is relevant to all  
Asynchronous calls.

-jason

On Oct 2, 2008, at 6:47 PM, slow wrote:


 Thank you Jason for your help. That was a bad mistake. Anywhere I used
 other code and it worked. The problem i have is that I have conficting
 results. One statement tells me I have the data and the other says the
 same data is null. Worse enough, if I call the same statement twice i
 get different results. for example, passing the same string to
 window.alert twice brings null and some correct string.  I want to
 later plot the received data using canvas. Here is the code.

 package com.daq.client;

 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.ClickListener;
 import com.google.gwt.user.client.ui.DialogBox;
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.RootPanel;
 import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.gwt.http.client.*;
 import com.google.gwt.user.client.ui.Label;
 import com.google.gwt.http.client.RequestCallback;
 import com.google.gwt.user.client.Window;



 /**
 * Entry point classes define codeonModuleLoad()/code.
 */
 public class thesis implements EntryPoint {

 public static final int STATUS_CODE_OK = 200;
 static String recvd_data;
 private VerticalPanel mainPanel = new VerticalPanel();
 DialogBox diagbox = new DialogBox();
 Button button = new Button(Click Me);
 Label testLabel = new Label();
 static String my_data;
 //String[] formated_data;

 public static String doGet(String url) {
   RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
 url);

   try {
 Request response = builder.sendRequest(null, new
 RequestCallback() {
   public void onError(Request request, Throwable exception) {
   recvd_data = Unable to reach the server;
   Window.alert(recvd_data);
   //responseText(recvd_data);
   }

   public void onResponseReceived(Request request, Response
 response) {
 // Code omitted for clarity
   //String recvd_data;
   if(response.getStatusCode() == STATUS_CODE_OK)
   {
   recvd_data = response.getText();
   }
   else
   recvd_data = response.getStatusText();
   recvd_data = recvd_data.trim();
   //responseText(recvd_data);
   //Window.alert(recvd_data);
   }
 });

   } catch (RequestException e) {
   recvd_data = Unresolved Error;
   //responseText(recvd_data);
   Window.alert(recvd_data);
   return recvd_data;
   }
 return recvd_data;
 }

 /**
  * get the string received from the http response
  */

 public static  void responseText(String resp_text)
 {
 my_data = resp_text;
 //Window.alert(my_data);
 }




 public void onModuleLoad() {

   recvd_data = doGet(sw.csv);   //it seems that null is 
 returned in
 this case
   /*line 82 *///Window.alert(recvd_data);

   /*if u uncomment line 82, it will print null on a window and the
 correct text will display by line 93
* however when u leave it commented, line 93 has no effect */

   mainPanel.setTitle(Main Panel);
   mainPanel.setBorderWidth(300);
   mainPanel.add(button);
   //mainPanel.setVisible(true);

   //formated_data = my_data.split(,);
  /* line 93*/ testLabel.setText(recvd_data);


   diagbox.setTitle(Dialog Box);
   diagbox.setWidth(100%);
   diagbox.setHeight(20%);
   diagbox.setText(recvd_data);

   RootPanel.get().add(testLabel);
   //RootPanel.get().add(diagbox);
   //RootPanel.get().add(mainPanel);
 }
   }



 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread Lothar Kimmeringer

deanhiller schrieb:

 BEFORE methods are even called, I want to chech if there is a User
 object in the Session(ie. user is logged in).  If there is not, the
 Session probably expired and I want to throw a NotLoggedInException on
 every one of these methods(but not in the method itself).

By looking into RemoteServiceServlet I see a couple of ways
that should be possible (I haven't tried, so I might be
wrong ;-)

/**
 * Override this method to examine the serialized version of the request
 * payload before it is deserialized into objects. The default implementation
 * does nothing and need not be called by subclasses.
 */
protected void onBeforeRequestDeserialized(String serializedRequest);

Overwriting this method allow you to throw the NotLoggedInException
for every method that is going to be called.

If you want to throw the execption only for a list of methods
(e.g. to allow the login without creating a second servlet),
you might overwrite processCall instead. Here an example of how I
think it should be possible:

public String processCall(String payload) throws SerializationException{
  try {
RPCRequest rpcRequest = RPC.decodeRequest(payload, this.getClass(), this);
if (!rpcRequest.getMethod().getName().equals(checkLogin)){
  if (!isValidSession){
throw new NotLoggedInException();
  }
}
  }
  catch(SerializationException se){
throw se;
  }
  catch(Exception e){}
  return super.processCall(payload);
}

NotLoggedInException must be derived from SerializableException

 I would
 prefer this is reusable in an abstract class that implements
 RemoteServiceServlet and any GWT Servlet any team creates here will
 extend that and inherit this functionality since all the
 authentication stuff is the same for all our services.

Above should be usable in an abstract way, you can define the
list of allowed methods by using e.g. annotations or a list
of strings being set in the init-method of the derived servlets.

The only thing missing is a class implemeting AsyncCallback that
overwrites onFailure and checks for the NotLoggedInException to
redirect to the login-panel automatically.


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Moderation policy back in effect: new members' messages moderated to prevent spam

2008-10-03 Thread TH Lim


Hi,

I am new to this group and cannot post new topics to this group. Is
this because of the spam policy in place? Thanks

/lim/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread Pavel Byles
GWTPHP looks really nice !!Is there a preview release I could try?

On Fri, Oct 3, 2008 at 5:23 AM, Andrej Harsani [EMAIL PROTECTED] wrote:


 check this out:
 http://www.demo.qualityunit.com/pax4/merchants/

 Andrej
 www.gwtphp.com
 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Label + Hyperlink + Label

2008-10-03 Thread Brian

Tricky, but doesn't quite work in my attempts.

Both HTMLPanel.add() and HTMLPanel.addAndReplaceElement() puts a
newline before the link, so I end up with:

blah blah
link
blah blah

instead of: blah blah link blah blah

I'm putting the HTMLPanel in a FlexTable's cell.


On Oct 3, 10:37 am, Ian Bambury [EMAIL PROTECTED] wrote:
 You could try

 HTMLPanel p = new HTMLPanel(Click span id='link'/span to go there);
 p.add(new Hyperlink(here, token), link);

 (I might have the parameters the wrong way around, but you get the idea.)

 Ian

 http://examples.roughian.com

 2008/10/3 Brian [EMAIL PROTECTED]



  I'm wondering if this is really the best approach, of it I'm one
  widget short of a better idea.

  I'm just trying to write some text, a  gwt Hyperlink, and more text.
  Basically trying to concatenate labels and Hyperlinks.

  I can do this by creating a HorizontalPanel, adding the label, then
  adding the Hyperlink, then adding more labels, more Hyperlinks, and so
  on.  But is it really necessary for the HorizontalPanel to be there?
  Is there something else that would be better?  Just off hand, I
  thought of things like taking the Hyperlink's .getHTML() and
  concatenating that with the label's text, but that isn't what I'm
  after.

  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread noon

Hi,

You can override the RemoteServiceServlet 'processCall' method, which
is invoked for every incoming call (this is how Hibernate4GWT works
seamlessly with input ou output parameters).

Regards
Bruno

On 3 oct, 16:16, walden [EMAIL PROTECTED] wrote:
 Dean,

 GWT RPC clearly does not have the security aspect designed in; it
 seems designed for use with an orthogonal security mechanism, such as
 found in the HTTP specs.

 A bit of a leap, but have you mentally walked through what would
 happen if you ditched SESSION-based security and went with Digest?  I
 think this approach would sidestep a huge amount of custom programming
 for you.  Question is, what would you be losing that you can't live
 without?

 In my application, if I start up a browser and type the URL of my RPC
 service (before authenticating), the JAAS system in JBoss issues a
 challenge from way down in the stack (my RPC code never sees it), and
 the browser puts up a login form.  This is pretty much what should
 happen when your logged in user encounters a session timeout.

 Walden

 On Oct 3, 3:42 am, olivier nouguier [EMAIL PROTECTED]
 wrote:

  Hi,
   If you don't want to give a try with Spring( or Guice), you could use
  AspectJ to weave your desired behaviour (handling security).
   But it might be more long  hard than to learn spring  spring security
  (I've just post a project that illustrate this).
  hih

  On Fri, Oct 3, 2008 at 7:23 AM, deanhiller [EMAIL PROTECTED] wrote:

   I saw someone talking about proxying all the methods to add code(like
   an aspect or filter) using spring and I am wondering how I can do
   this(hopefully without spring as I don't feel like learning that right
   now and just want a quick solution).

   Basically, if my GWT servlet has these methods
   public void doSomething(int i);
   public String doSomethingAgain(String s);
   public long increaseSomething(int i);

   BEFORE methods are even called, I want to chech if there is a User
   object in the Session(ie. user is logged in).  If there is not, the
   Session probably expired and I want to throw a NotLoggedInException on
   every one of these methods(but not in the method itself).  I would
   prefer this is reusable in an abstract class that implements
   RemoteServiceServlet and any GWT Servlet any team creates here will
   extend that and inherit this functionality since all the
   authentication stuff is the same for all our services.

   How do I do this in a common way?  It looks like the
   RemoteServiceServlet is kind of screwed up in not exposing a good
   method to override that I could use as the filter.

   Any ideas?
   thanks,
   Dean

  --
  Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
  dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
  comestible
       - proverbe indien Cri- Hide quoted text -

  - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Multiple *.gwt.xml in One Module

2008-10-03 Thread TH Lim

Hi,

I was following Solution #6 (Drag and Drop) example from the book
Google Web Toolkit Solutions: More Cool  Useful Stuff. I used
Intellij 7 with GWT 1.5 to compile the example but failed with the
errors reported.

I tried a few things unsuccessfully and finally I removed the line
inherits name='com.gwtsolutions.components.client.ui.Dnd'/ from /com/
gwtsolutions/DragAndDrop.gwt.xml (included below) and everything went
smoothly. My question is, should this line be removed since we already
inherited Components with this directive inherits
name='com.gwtsolutions.components.Components'/ in the previous line?
Both com.gwtsolutions.components.client.ui.Dnd and
com.gwtsolutions.components.Components are in the same module where
Dnd.gwt.xml is 2 level down drom Components.gwt.xml. Is it possible to
have 2 gwt.xml files in 1 module?

Thanks

/lim/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Label + Hyperlink + Label

2008-10-03 Thread Thomas Broyer



On 3 oct, 17:24, Brian [EMAIL PROTECTED] wrote:
 Tricky, but doesn't quite work in my attempts.

 Both HTMLPanel.add() and HTMLPanel.addAndReplaceElement() puts a
 newline before the link, so I end up with:

 blah blah
 link
 blah blah

 instead of: blah blah link blah blah

 I'm putting the HTMLPanel in a FlexTable's cell.

It has nothing to do with the HTMLPanel actually, but a problem with
the Hyperlink widget: it's made up of a DIV wrapping an A, that's this
DIV wrapper that's causing the line breaks, because a DIV is
display:block by default.

I'd suggest replacing the Hyperlink with an Anchor+ClickListener.
I'd also use a FlowPanel+InlineLabels but it's up to you, the
HTMLPanel should work like a charm too:

FlowPanel container = new FlowPanel();
container.add(new InlineLabel(some text );
Anchor link = new Anchor(link, #token);
link.addClickListener(new ClickListener() {
   public void onClick(Widget sender) {
  History.newItem(token);
  DOM.eventGetCurrentEvent().preventDefault();
   }
});
container.add(link);
container.add(new InlineLabel( some more text);

...and/or you could vote for (i.e. star) the issue 2901:
http://code.google.com/p/google-web-toolkit/issues/detail?id=2901


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Label + Hyperlink + Label

2008-10-03 Thread Brian

If it weren't such pita, it'd be sweet. But yeah, that worked great.

Since I'm doing this on a number of links in a bunch of text, I
wrapped up the click listener as such instead of new'ing one each
time.

ClickListener linkClickListener = new ClickListener() {
public void onClick(Widget sender) {
History.newItem(((Anchor)sender).getHref().substring(1));
 DOM.eventGetCurrentEvent().preventDefault();
}
};

Thanks much.


On Oct 3, 11:44 am, Thomas Broyer [EMAIL PROTECTED] wrote:
 On 3 oct, 17:24, Brian [EMAIL PROTECTED] wrote:

  Tricky, but doesn't quite work in my attempts.

  Both HTMLPanel.add() and HTMLPanel.addAndReplaceElement() puts a
  newline before the link, so I end up with:

  blah blah
  link
  blah blah

  instead of: blah blah link blah blah

  I'm putting the HTMLPanel in a FlexTable's cell.

 It has nothing to do with the HTMLPanel actually, but a problem with
 the Hyperlink widget: it's made up of a DIV wrapping an A, that's this
 DIV wrapper that's causing the line breaks, because a DIV is
 display:block by default.

 I'd suggest replacing the Hyperlink with an Anchor+ClickListener.
 I'd also use a FlowPanel+InlineLabels but it's up to you, the
 HTMLPanel should work like a charm too:

 FlowPanel container = new FlowPanel();
 container.add(new InlineLabel(some text );
 Anchor link = new Anchor(link, #token);
 link.addClickListener(new ClickListener() {
    public void onClick(Widget sender) {
       History.newItem(token);
       DOM.eventGetCurrentEvent().preventDefault();
    }});

 container.add(link);
 container.add(new InlineLabel( some more text);

 ...and/or you could vote for (i.e. star) the issue 
 2901:http://code.google.com/p/google-web-toolkit/issues/detail?id=2901
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread falafala

If go for non-spring solution, yes, you should override the
processCall().
Just take a look at the source, you should invoke the
RPC.encodeResponseForFailure(method, ex)
to encode the Exception and send back to client.

I didnt test. It may not compile, you may try anyway ... :)

public String processCall(String payload) throws
SerializationException {
try {
  RPCRequest rpcRequest = RPC.decodeRequest(payload,
this.getClass(), this);

  if (isValidSession())   // may add other conditions when should
check, when should not check..
  {
  return RPC.invokeAndEncodeResponse(this,
rpcRequest.getMethod(),
  rpcRequest.getParameters(),
rpcRequest.getSerializationPolicy());
  }
  else
  {
 return RPC.encodeResponseForFailure(rpcRequest.getMethod(),
new NotLoggedInException());
  }

} catch (IncompatibleRemoteServiceException ex) {
  getServletContext().log(
  An IncompatibleRemoteServiceException was thrown while
processing this call.,
  ex);
  return RPC.encodeResponseForFailure(null, ex);
}
  }

private boolean isValidSession()
{
//...
}
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to proxy all the methods in my RemoteServiceServlet

2008-10-03 Thread walden

Dean,

GWT RPC clearly does not have the security aspect designed in; it
seems designed for use with an orthogonal security mechanism, such as
found in the HTTP specs.

A bit of a leap, but have you mentally walked through what would
happen if you ditched SESSION-based security and went with Digest?  I
think this approach would sidestep a huge amount of custom programming
for you.  Question is, what would you be losing that you can't live
without?

In my application, if I start up a browser and type the URL of my RPC
service (before authenticating), the JAAS system in JBoss issues a
challenge from way down in the stack (my RPC code never sees it), and
the browser puts up a login form.  This is pretty much what should
happen when your logged in user encounters a session timeout.

Walden



On Oct 3, 3:42 am, olivier nouguier [EMAIL PROTECTED]
wrote:
 Hi,
  If you don't want to give a try with Spring( or Guice), you could use
 AspectJ to weave your desired behaviour (handling security).
  But it might be more long  hard than to learn spring  spring security
 (I've just post a project that illustrate this).
 hih





 On Fri, Oct 3, 2008 at 7:23 AM, deanhiller [EMAIL PROTECTED] wrote:

  I saw someone talking about proxying all the methods to add code(like
  an aspect or filter) using spring and I am wondering how I can do
  this(hopefully without spring as I don't feel like learning that right
  now and just want a quick solution).

  Basically, if my GWT servlet has these methods
  public void doSomething(int i);
  public String doSomethingAgain(String s);
  public long increaseSomething(int i);

  BEFORE methods are even called, I want to chech if there is a User
  object in the Session(ie. user is logged in).  If there is not, the
  Session probably expired and I want to throw a NotLoggedInException on
  every one of these methods(but not in the method itself).  I would
  prefer this is reusable in an abstract class that implements
  RemoteServiceServlet and any GWT Servlet any team creates here will
  extend that and inherit this functionality since all the
  authentication stuff is the same for all our services.

  How do I do this in a common way?  It looks like the
  RemoteServiceServlet is kind of screwed up in not exposing a good
  method to override that I could use as the filter.

  Any ideas?
  thanks,
  Dean

 --
 Quand le dernier arbre sera abattu, la dernière rivière asséchée, le
 dernier poisson péché, l'homme va s'apercevoir que l'argent n'est pas
 comestible
      - proverbe indien Cri- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread fsilva

I need applications makes with R1.5 + eclipse + cypal study

please, if anybody have this give me

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread askar

Check out Lombardi Blueprint at https://blueprint.lombardi.com or
Queplix (http://demo.queplix.com).
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



z-index or zIndex which is correct :?

2008-10-03 Thread darkflame

I had this problem earlier (http://groups.google.com/group/Google-Web-
Toolkit/browse_thread/thread/2955916fb09914d4/7613eb55206b2114?
lnk=gstq=zindex#7613eb55206b2114)

I fixed it by using zindex, but now looking at my code I'm getting
quite puzzled.
Just which is correct?
At the moment my code is a horrible fudge that uses both z-index and
zindex.
I'd like to clean it up.
According to css referances its z-index yet according to much gwt
code its zIndex.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: z-index or zIndex which is correct :?

2008-10-03 Thread Ian Bambury
If you are writing css it is z-index. If you are playing with the DOM, it's
zIndex.

Same with everything else.font-size / fontSize etc

Ian

http://examples.roughian.com


2008/10/3 darkflame [EMAIL PROTECTED]


 I had this problem earlier (http://groups.google.com/group/Google-Web-
 Toolkit/browse_thread/thread/2955916fb09914d4/7613eb55206b2114?
 lnk=gstq=zindex#7613eb55206b2114)

 I fixed it by using zindex, but now looking at my code I'm getting
 quite puzzled.
 Just which is correct?
 At the moment my code is a horrible fudge that uses both z-index and
 zindex.
 I'd like to clean it up.
 According to css referances its z-index yet according to much gwt
 code its zIndex.
 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread Junyang

This is full RIA based on GWT:- http://www.streetsine.com

On Oct 4, 1:25 am, Davsket [EMAIL PROTECTED] wrote:
 Hi, you should try this one: SonidoLocal -http://www.sonidolocal.com,
 it's the first portal in latam of legal music streaming... full GWT
 and GWT-EXT.

 On Oct 3, 3:42 am, rov.ciso [EMAIL PROTECTED] wrote:

  Good day! Do anybody know sites based on GWT? What is big project
  write with GWT? Please, give me url. 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Label + Hyperlink + Label

2008-10-03 Thread Ian Bambury
Why faff about with an anchor and clicklistener when you can just put this

.gwt-Hyperlink
{
display :   inline;
}

in your css?

You can then throw one lot of text at the HTMLPanel with span
placeholders.

Ian

http://examples.roughian.com

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT SITE? (example)

2008-10-03 Thread Davsket

Hi, you should try this one: SonidoLocal - http://www.sonidolocal.com,
it's the first portal in latam of legal music streaming... full GWT
and GWT-EXT.

On Oct 3, 3:42 am, rov.ciso [EMAIL PROTECTED] wrote:
 Good day! Do anybody know sites based on GWT? What is big project
 write with GWT? Please, give me url. 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Severe performance problem after upgrading to GWT 1.5.2 (final)

2008-10-03 Thread Manuel

We noticed a slow down by just switching from 1.5RC2 to 1.5.2  more
specifically on FireFox 3.  I recently tested on Chrome and Safari 3
and the performance there is significantly better it seems to be well
over 10x faster.  I think there might be a bug using the scripting
engine on FireFox and also IE.  Or it could be the java scripting
engine on Safari is really that much better.

The overall app is much faster on Safari, but i would say the biggest
issue is with RPC calls.


On Oct 3, 7:22 am, Sumit Chandel [EMAIL PROTECTED] wrote:
 Hi Manuel,
 It seems hbatista's slowdown in performance was related to a database
 change.

 In your case, are you still experiencing slowdowns on your RPC calls? Also,
 did these slowdowns occur when you went from 1.4.x to 1.5.2, or were you
 always facing slow RPC calls in your GWT application?

 Thanks,
 -Sumit Chandel

 On Tue, Sep 30, 2008 at 8:26 PM, Manuel [EMAIL PROTECTED] wrote:

  Has anyone figgured this out.  I am having sever performance problems
  with this.  accross the board all 1.5.2 compiled apps are a lot slower

  On Sep 18, 4:59 am, hbatista [EMAIL PROTECTED] wrote:
   Thanks for the suggestion, but changing data types didn't help.
   I did not profile my code, but the observed behavior is:
   1. RPC call is made
   2. server side method runs and returns (quickly!)
   3. ... huge delay with no CPU activity ...
   4. finally client side onSuccess() RPC callback runs

   What could be happening on step 3 ?

   I took a quick look at the serializer source code, but it's too
   different from 1.4.60 to compare side by side.

   On Sep 18, 2:06 am, Tim [EMAIL PROTECTED] wrote:

not sure, but maybe there are some datatype penalty issues (long vs
double etc). Did you profile your server side code?

On Sep 17, 10:28 am, hbatista [EMAIL PROTECTED] wrote:

 Hi,
 I've just upgraded one of my projects from 1.4.60 to1.5.2, and
 everything went very smoothly, but...
 when my application tries to fetch a large number of objects from the
 server (via RPC, returns HashMapInteger,xxx, about 6000 entries) it
 takes a very very long time!

 Before the upgrade this was very fast (at least in Firefox and
  Chrome,
 not in IE).

 Strangely, while waiting for the RPC call to return there is NO cpu
 activity...

 For me this seems related to some deep changes in the serialization
 code (taking a guess here), before the upgrade trying to fetch so
  many
 records from the server would crash IE with 'JavaScript SyntaxError
 exception: Out of memory', while now it works (good!) but is veryslow
 in all browsers (bad!).

 Can someone help me debug this problem?- Hide quoted text -

- Show quoted text -
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: any plans to offer java bean support in future?

2008-10-03 Thread Alex D

Why would you need this kind of code in GWT?

On Oct 3, 3:50 pm, mwaschkowski [EMAIL PROTECTED] wrote:
 Hi All,

 I've been using a 3rd party wysiwyg tool to create my gwt interface,
 and one thing I've run into is that gwt does not support java bean
 type customization. The following was suggested:
 General JavaBean support would be good which would include
 standardize support for property accessors, default constructors,
 custom editors, customizers, Beans.isDesignTime(), etc.

 see:http://www.instantiations.com/forum/viewtopic.php?f=11t=2174sid=301...

 The thing that I would need is custom editors. Would there be any
 plans in the future to support this kind of thing?

 Thanks very much,

 Mark
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



IE 6 doesn't finish load page

2008-10-03 Thread [EMAIL PROTECTED]

Hi people,

I have a serious problem I suggest to use the gwt technology for the
new projects of my company I use gwt 1.5.2 and gwt-ext 2.0.5 every
thing go fine but when I try to prove the app in IE 6 the page load
don't finish, my CPU get more than 50% for iexplorer.exe and don´t
finish never.

This usually happens the first time, then I kill process I try again
and wrko fine woth out error of js, but unexpectedly it happens again
and kill process and work fine ... and another time crash.

I navigate for many topics, forums, suggest but I can't fine the
exactly same problem, and suspect that is not for RPC calls because
the data some time appear but the loading doesn´t finish never.

IE version : 6.0.2900.2180
jscript.dll: 5.6.0.8834

Pls help.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: colorating a tab

2008-10-03 Thread Alex D

Does anybody know if it's possible to specify one or more CSS file(s)
(not styles, but rather files containing styles) from client code?
(currently I link them within HTML file).

On Oct 3, 4:01 pm, Thomas Broyer [EMAIL PROTECTED] wrote:
 On 3 oct, 12:12, Zied Hamdi [EMAIL PROTECTED] wrote:



  Hi folks,

  I'm new to GWT (but I read the tutorial). I need to give my tabs a
  different color, and this is what I see in my firebug:

  .gwt-TabBar .gwt-TabBarItem {standard.css (line 870)
  background:#D0E4F6 none repeat scroll 0%;
  color:black;
  cursor:pointer;
  font-weight:bold;
  margin-left:6px;
  padding:3px 6px;
  text-align:center;}

  .gwt-TabBar-Into .gwt-TabBarItem {main.css (line 55)
  background:#EE none repeat scroll 0%;
  color:#6F6F6F;

  }

  so the standard css background and color are overriding my locally
  defined attrs in main.css.

  Is it due to a bad configuration? or is it the way it is supposed to
  work?

 How is the main.css included? It might be a priority problem: if
 main.css is loaded before standard.css (which will probably be the
 case if main.css is not GWT-injected with a stylesheet in your
 module's gwt.xml), given that the two selectors have the same
 specificity [1], their rules are evaluated in the order they've been
 loaded, so the background and color set in standard.css will override
 the one set in your main.css.

 Try adding an !important to your rules and see if they're applied
 (with !important, the rules in standard.css won't override your own !
 important rules, even though they are evaluated after them).
 If that's the case, try to find a way for your stylesheet to be loaded
 after standard.css (and remove the !important, which is bad practice
 and recommended for user-stylesheets only [2]), either by getting your
 main.css injected by GWT, or by inheriting StandardResources (instead
 of Standard) and calling the standard.css by yourself...
 If I were you however, I'd file a bug to have the injected stylesheet
 come *before* the existing ones so that the ones already present in
 the page override the injected stylesheets...

 [1]http://www.w3.org/TR/CSS21/cascade.html#specificity
 [2]http://www.w3.org/TR/CSS21/cascade.html#important-rules
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT-Gadget same-origin security restriction

2008-10-03 Thread andi

Hello Jose,

The solution to send data with the request builder is to use a POST:

RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, url);

The difference of POST and GET ist:
GET: only the address line is sent to the server. If you want to
send data with a GET you must put it as a parameter into the URL:
http://www.xyz.dedata=thisisthedatata
POST: you can provide an URL and send additional data:
requestBuilder.sendRequest(data, new RequestCallback() {
...
}

OK, I have got a question, too:
What is this line doing?  url = intrinsics.getCachedUrl(url, 1);
What does it do with the URL and why can it avoid the same origin
problem?
I'm not using gadgets but I'm looking for a possibility how to call a
web service from GWT that is not on the same server as my GWT site.
(E.g. calling the amazon web service from my site (client) which is
built with GWT).

One solution of course is that I make a call to my server and the
servlet then calls the webservice and answers to the GWT client with
the response data from the web service. But I explicitly wnat to avoid
to make a call to my server.

If you have any idea please let me know.

Regards

Andreas

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: self-removing LoadListener

2008-10-03 Thread D L H

hmm that didn't work, but i managed to get it working with a
DeferredCommand.
here's an idea of how i've got it set up:

image.setUrl(theUrl);
DeferredCommand.addCommand(new Command() {
   public void execute() {
  //my resizing code
   }
});

On Oct 3, 2:39 am, mon3y [EMAIL PROTECTED] wrote:
 Hey

 Straight after you set the URL of the imageremove the listener.

 :)

 On Oct 2, 11:04 pm, D L H [EMAIL PROTECTED] wrote:

  Hello.

  I'm trying to create an Image LoadListener that will remove itself
  from the image once the image is finished loading. I tried using
  image.removeLoadListener(this); but that gave me a
  ConcurrentModificationException. Then I tried making the LoadListener
  a final and using image.removeLoadListener(myLoadListener); but
  myLoadListener was not yet initialized since it was called from inside
  it's own onLoad method. I also played around with DeferredCommand a
  bit, but I'm not sure how to get that to work.

  Thanks in advance for your help.

  -DLH
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Tab panel Css

2008-10-03 Thread Ananda Rao

Hi all,

i know how to create the tab panel. but not able to add the image and
add css to it..

my code is

final RootPanel rootPanel = RootPanel.get();

final TabPanel tabPanel = new TabPanel();
rootPanel.add(tabPanel, 0, 0);
tabPanel.setSize(747px, 355px);

final AbsolutePanel absolutePanel = new AbsolutePanel();
tabPanel.add(absolutePanel, Tab);
absolutePanel.setHeight(100px);

final AbsolutePanel absolutePanel_1 = new AbsolutePanel();
tabPanel.add(absolutePanel_1, Tab);
absolutePanel_1.setHeight(300px);

final AbsolutePanel absolutePanel_2 = new AbsolutePanel();
tabPanel.add(absolutePanel_2, Tab);
absolutePanel_2.setHeight(300px);
tabPanel.selectTab(0);
i want to give space between the tabs buttons and also i want add
image to the tab buttons..

can any one help me in this.
if possible please give me example along with code.

thanks in advance

Regards
Ananda

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



SocketTimeOutException

2008-10-03 Thread hanson

I am developing a GWT-based client that accesses a database frequently
to
display status information about an application. After receiving the
response of
the RPC-request, the client displays the status information fetched,
checks if the application
has ended; if not, the client will send another request... and the
whole game repeats.

Technology used:
- Tomcat 1.6.0.14
- Java 5
- GWT 1.5.2, RPC

After a while - the elapsed time is not always the same - I get the
following exception:

29.09.2008 14:54:26 org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at
org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:
716)
at org.apache.coyote.http11.InternalInputBuffer
$InputStreamInputBuffer.doRead(InternalInputBuffer.java:746)
at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:
116)
at
org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:
675)
at org.apache.coyote.Request.doRead(Request.java:428)
at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:
297)
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:
405)
at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:
312)
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:
193)
at
com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsUtf8(RPCServletUtils.java:
146)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.readContent(RemoteServiceServlet.java:
335)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

I have to add that this exception never occured in hosted mode.

Solution attempt: Catch the InvocationException in the onFailure-
Method in AsyncCallback and post the request again. This makes my
status display work fine without any failure in hosted mode and on my
local tomcat. As soon as it is deployed on our productive Tomcat,
the same exception is thrown.

Similar problems have been described in
1.
http://groups.google.com/group/Google-Web-Toolkit/tree/browse_frm/month/2007-01/3e03ad1af5d5a179?rnum=151_done=%2Fgroup%2FGoogle-Web-Toolkit%2Fbrowse_frm%2Fmonth%2F2007-01%3F

2. 
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/8f2bb3dc5e5f42f7

... but none of them has provided any solution.

Any help will 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Project bin directory

2008-10-03 Thread Thad

From what I can see, the bin directory gets created when you initially
import your project into Eclipse.  Once created, myproject-compile
updates the class files in this directory.

I just tried deleting it's contents ($ rm bin/*).  No amount of
running myproject-compile would recreate the contents.  I had to
close and delete the project (without deleting the files) and reimport
it for it to work.

Is this right?  What have others discovered?  There have been times in
the past when I've removed the contents and somehow they came back--
either auto-magically or by me retrieving them from my last backup.

On Sep 16, 10:00 am, Willis [EMAIL PROTECTED] wrote:
 Kind of a simple question, but I notice that some of my GWT projects
 have abindirectory. I understand it holds the compiled versions of
 my class files from src, but it is not created when aprojectis
 started (using theproject/application creators), so when is it
 created?  Also, what happens if I delete it?

 Thanks in advance for any clarifications!
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



erroneous call failed on server when servlet is successful

2008-10-03 Thread Thad

I have two GWT projects, call them ProjectA and ProjectB, that I would
like to keep separate.  When ProjectA.war file is created, I'm
integrating ProjectB as a subproject.  Eventually, there may be
multiple subprojects inside ProjectA, and ProjectB may also be used as
a subproject elsewhere.

In my integrated projects, anchors in ProjectA can now call ./
ProjectB.html?foo=bar without creating a new HttpSession, which is
grand because ProjectA already holds a login and license on a remote
application and database, and can share this seemlessly with
ProjectB.  That part works fine.

On load, a servlet call starts in ProjectB to attach to the database
and pull up a file.  It all works just like when ProjectB runs
standalone, EXCEPT I always get an alert with the message The call
failed on the server; see server log for details.  Tomcat's
localhost.log shows java.lang.IndexOutOfBoundsException: Index: 0,
Size: 0.  (The full trace is at the end of this message.)  This exact
same message occurs again when ProjectB makes a servlet call, although
otherwise the call is behaves correctly.

My distrib directory for ProjectA looks like a normal GWT distribution
directory.  I then insert ProjectB (using Robert Hanson's GWT in
Action Ch 16 as a guide).  I get this:

ProjectA
   --distrib
  --**.cache.html, etc
  --ProjectA.html
  --ProjectA.css
  --ProjectB.html
  --ProjectB.css
  --ProjectB
 --**.cache.html, etc
  --WEB-INF
 --classes
 --lib
 --web.xml

I have merged the web.xml files of both projects as well as the
classes and lib directories.  In web.xml, servlets from ProjectA look
like

servlet-mapping
servlet-nameaServices/servlet-name
url-pattern/servlet/aServices/url-pattern
/servlet-mapping

While ProjectB looks like

servlet-mapping
servlet-namebServices/servlet-name
url-pattern/ProjectB/servlet/bServices/url-pattern
/servlet-mapping

Any ideas what's happening?  You can see from the message below that
the error seems to be coming from GWT.

Oct 3, 2008 6:16:48 PM org.apache.catalina.core.ApplicationContext log
SEVERE: Exception while dispatching incoming RPC call
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.extract(ServerSerializationStreamReader.java:
617)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt(ServerSerializationStreamReader.java:
432)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.prepareToRead(AbstractSerializationStreamReader.java:
38)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:
383)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
163)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:
190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:
283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
697)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group 

Re: Running Windows-built GWTTestCase on Sparc/Solaris ??

2008-10-03 Thread dan

The error looks like the GWT tests are trying to use the Windows
development kit on your Linux machine.  To run tests on your Linux
build machine, you need to switch your build to use the GWT Linux
distribution.

What's happening is that the GWTTestCase tests are trying to start up
a headless hosted mode browser, which is different on each platform
(Mac, Windows, Linux).  Use the Windows dev kit on your laptop and the
Linux dev kit on your build machine.  To make this, you'll need to do
some per-OS switching in your build scripts -- in Ant, you may need to
use the os with a conditional tag to set the appropriate libraries.

See this thread for more information:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/ecebc719ec7d2a10

Dan

 Can't load library: .../libswt-win32-3235.so
 java.lang.UnsatisfiedLinkError: Can't load library: .../libswt-
 win32-3235.so
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT deployment to JBoss

2008-10-03 Thread Carlos Rafael Ramirez
Hello,

Use

extraJvmArgs-Xmx1024m/extraJvmArgs


Regards,
Carlos

On Thu, Oct 2, 2008 at 7:59 PM, Ronak Patel [EMAIL PROTECTED] wrote:


 Thanks,

 That did it.

 Another question for you...I am now getting OutOfMemoryErrors while
 trying to compile and build Google Web Toolkit from Maven. I tried
 setting my pom file to:

 plugin
groupIdcom.totsp.gwt/groupId
artifactIdmaven-googlewebtoolkit2-plugin/
 artifactId
configuration
forktrue/fork
logLevelINFO/logLevel

  runTargetcom.baesystems.grading.gwt/Main.html/runTarget
compileTargets

  valuecom.baesystems.canes.grading.gwt.Main/value
/compileTargets
gwtVersion${gwtVersion}/gwtVersion
/configuration
executions
execution
goals
goalmergewebxml/goal
goalcompile/goal
/goals
/execution
/executions
/plugin

 But there's no process fork going on. I also tried setting

 jvmArg-Xmx1024m/jvmArg but that doesn't help either.

 Has anyone come across this?

 Thanks.
 On Sep 27, 6:27 pm, Carlos Rafael Ramirez [EMAIL PROTECTED]
 wrote:
  Hi,
 
  I am using jboss, eclipse and ant (not maven) to deploy my web
 application
  using GWT 1.5 and no problem at all. Check your html host page. A simple
  check is trying to download the nocache file as is written in your
 webpage.
  If it can be found by the browser well at  least your web application is
  well configured.
 
  Regards,
  Carlos
 
 
 
  On Sat, Sep 27, 2008 at 8:19 PM, Ronak Patel [EMAIL PROTECTED]
 wrote:
 
   Hi all,
 
   I'm using Eclipse  Maven to deploy a GWT 1.5 web application to
   JBoss. When I run the application inside of the built in Application-
   shell.cmd program, I see my web application inside of the Google
   Browser Window.
 
   However, when I build the war file using Maven and the GWT Archetype,
   I am unable to visit the web application home page.
 
   Maven runs and bundles the outputs of the Application-compile.cmd
   file. This includes a WEB-INF complete with classes and lib folders
   along with the nocache and cache html and js files.
 
   Was anyone else ever able to deploy and view the outputs of a GWT
   application successfully?- Hide quoted text -
 
  - Show quoted text -
 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Using the hibernate4gwt?

2008-10-03 Thread ton

Hello, anyone of you this Using the hibernate4gwt?

it is worth?

it really solves the problem with many such relationships to a list?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: SOYC Correlation work

2008-10-03 Thread BobV

On Thu, Oct 2, 2008 at 4:56 PM, Lex Spoon [EMAIL PROTECTED] wrote:
 1. Is there any reason to store all correlates as strings?  The

  I agree that the final API provided by the Correlation type should
be more structured than just a String, but I don't think that it
should hang on to the AST node.  I was going to wait to expand the
Correlation API until I talked to Katherin next week about what
information would actually go into the visualizations, but I imagine
that it would have String getters for package, type, and field.

 2. Attaching a method to its overrider parent seems to mix two
 ...
 anyway, once runAsync is merged in.  Given this, is there any further
 reason to have method override imply ancestry?  It seems to dilute the
 information that SourceInfo ancestry can uniquely provide.

Will the type oracle still be available during the Link phase of the
compiler?  If so, I'll remove all of the override information from
SourceInfo.  If the oracle won't be available, I'll add an overrides
relationship to SourceInfo to clarify the meaning of ancestry.

 - Why are there synchronized methods in SourceInfo?  In particular,
 why are some synchronized but not others?

Reads and writes to mutable fields were made synchronous.  In
practice, with the current structure of the compiler, there's no
reason to make them thread-safe.  I'll remove the synchronization.

 - It would be really nice to have utility methods that find and return
 the primary and secondary correlates on a specified axis.  If I
 understand correctly, a caller must currently search through the
 return value of getCorrelations or getDerivedCorrelations.

Easy enough.


-- 
Bob Vawter
Google Web Toolkit Team

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] RR: making extracting and setting widget data easier

2008-10-03 Thread Arthur Kalmenson

Hello every,

Just a little backgrounder for this RR. For some time now, a coworker
and I have been working on and off on a library/framework to simplify
creation of GWT applications, specifically those that cover most of
our use cases. For the most part, the applications we build involve
filling out rather large forms, retrieving data, generating reports,
etc. Building these large forms by hand is very tedious, so we created
an open source project called Mount Sinai Hospital Application Builder
(mshab) which you can find here: http://code.google.com/p/mshab/.

I started to overhaul the project to make it easier to use and easier
to extend. As I started the overhaul, I noticed that the incubator
started to get populated with a lot of similar widgets and libraries
that I was redeveloping. I contacted Emily Crutcher about the
Validation aspect and we ended up talking a bit about the incubator. I
decided that it'll be best to try to commit back to the incubator so
we could avoid having to throw away our code after the incubator
implemented the same ideas. I'll start making RRs about the various
parts that we were working on to get feedback and hopefully
incorporate it into the incubator.

Now, to the meat of the post. Right now, extracting data from widgets
is very different depending on the widget. From a TextBox, you call
textBox.getText(). For a ListBox you call
listBox.getValue(listBox.getSelectedItem()). Setting the data is
different too, and sometimes pretty complex (ListBox involves a
loop, etc). Therefore, I'm proposing a common interface that wraps
around core GWT widgets and provides one way to extract and set data
to widgets. There are a number of use cases where this can be applied.
Some good examples are validation and simple data binding.

The interface is a straight forward generic interface that works with
a generic widget and a generic data type (comments removed):

public interface DataManagerT, S {

public S getData(T widget);

public void setData(T widget, S data);
}

Here's an example of how it would be used to manage TextBoxBase
widgets.

public class TextBoxBaseDataManager implements
DataManagerTextBoxBase, String {

public String getData(TextBoxBase widget) {
return widget.getText();
}

public void setData(TextBoxBase widget, String data) {
widget.setText(data);
}
}

To help developers easily get the appropriate DataManager for a
specific widget, I created a DataManagerCollection interface where you
can get the specific DataManager for a given widget and then start
working with it. The developer can either use existing
DataManagerCollection implementations or wire their own.

public interface DataManagerCollection {

public boolean hasDataManager(Widget widget);

public DataManager?, ? getDataManager(Widget widget);

public void setDataManager(Widget widget, DataManager?, ?
dataManager);
}

We're currently working on creating wrappers for all the core GWT
widgets and the incubator ones. Feedback would be much appreciated.
Thank you for your time.

Best regards,
Arthur Kalmenson
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Isaac Truett

Why wrappers? Why not have the widgets simply implement a HasData interface?

public interface HasDataT {
public T getData();
public void setData(T data);
}

Maybe I'm just not seeing your use case.



On Fri, Oct 3, 2008 at 10:55 AM, Arthur Kalmenson [EMAIL PROTECTED] wrote:

 Hello every,

 Just a little backgrounder for this RR. For some time now, a coworker
 and I have been working on and off on a library/framework to simplify
 creation of GWT applications, specifically those that cover most of
 our use cases. For the most part, the applications we build involve
 filling out rather large forms, retrieving data, generating reports,
 etc. Building these large forms by hand is very tedious, so we created
 an open source project called Mount Sinai Hospital Application Builder
 (mshab) which you can find here: http://code.google.com/p/mshab/.

 I started to overhaul the project to make it easier to use and easier
 to extend. As I started the overhaul, I noticed that the incubator
 started to get populated with a lot of similar widgets and libraries
 that I was redeveloping. I contacted Emily Crutcher about the
 Validation aspect and we ended up talking a bit about the incubator. I
 decided that it'll be best to try to commit back to the incubator so
 we could avoid having to throw away our code after the incubator
 implemented the same ideas. I'll start making RRs about the various
 parts that we were working on to get feedback and hopefully
 incorporate it into the incubator.

 Now, to the meat of the post. Right now, extracting data from widgets
 is very different depending on the widget. From a TextBox, you call
 textBox.getText(). For a ListBox you call
 listBox.getValue(listBox.getSelectedItem()). Setting the data is
 different too, and sometimes pretty complex (ListBox involves a
 loop, etc). Therefore, I'm proposing a common interface that wraps
 around core GWT widgets and provides one way to extract and set data
 to widgets. There are a number of use cases where this can be applied.
 Some good examples are validation and simple data binding.

 The interface is a straight forward generic interface that works with
 a generic widget and a generic data type (comments removed):

 public interface DataManagerT, S {

public S getData(T widget);

public void setData(T widget, S data);
 }

 Here's an example of how it would be used to manage TextBoxBase
 widgets.

 public class TextBoxBaseDataManager implements
 DataManagerTextBoxBase, String {

public String getData(TextBoxBase widget) {
return widget.getText();
}

public void setData(TextBoxBase widget, String data) {
widget.setText(data);
}
 }

 To help developers easily get the appropriate DataManager for a
 specific widget, I created a DataManagerCollection interface where you
 can get the specific DataManager for a given widget and then start
 working with it. The developer can either use existing
 DataManagerCollection implementations or wire their own.

 public interface DataManagerCollection {

public boolean hasDataManager(Widget widget);

public DataManager?, ? getDataManager(Widget widget);

public void setDataManager(Widget widget, DataManager?, ?
 dataManager);
 }

 We're currently working on creating wrappers for all the core GWT
 widgets and the incubator ones. Feedback would be much appreciated.
 Thank you for your time.

 Best regards,
 Arthur Kalmenson
 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r3705 - changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl

2008-10-03 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Fri Oct  3 08:31:38 2008
New Revision: 3705

Modified:
 
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
 
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

Log:
Renames AsyncLoadern.load to AsyncLoadern.runAsync, to more clearly
reflect what it does.

Modified:  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
==
---  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
   
(original)
+++  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
   
Fri Oct  3 08:31:38 2008
@@ -73,9 +73,9 @@
  }

  generateLoaderFields(loaderWriter);
-generateLoadMethod(loaderWriter);
  generateOnErrorMethod(loaderWriter);
  generateOnLoadMethod(loaderWriter);
+generateRunAsyncMethod(loaderWriter);
  generateRunCallbacksMethod(loaderWriter);
  generateRunCallbackOnFailuresMethod(loaderWriter);

@@ -112,13 +112,11 @@
}

/**
-   * Generate the codeload/code method. Calls to  
codeGWT.runAsync/code
+   * Generate the coderunAsync/code method. Calls to  
codeGWT.runAsync/code
 * are replaced by calls to this method.
-   *
-   * TODO(spoon): rename to runAsync
 */
-  private void generateLoadMethod(PrintWriter srcWriter) {
-srcWriter.println(public static void load(RunAsyncCallback callback)  
{);
+  private void generateRunAsyncMethod(PrintWriter srcWriter) {
+srcWriter.println(public static void runAsync(RunAsyncCallback  
callback) {);
  srcWriter.println(getCallbackListSimpleName() +  newCallbackList =  
new 
  + getCallbackListSimpleName() + (););
  srcWriter.println(newCallbackList.callback = callback;);

Modified:  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
==
---  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

(original)
+++  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

Fri Oct  3 08:31:38 2008
@@ -45,7 +45,7 @@
  +  in method  + currentMethod);

  JClassType rebound = getFragmentLoader(islandNumber);
-JMethod loadMethod = getLoadMethod(rebound);
+JMethod loadMethod = getRunAsyncMethod(rebound);
  assert loadMethod != null;

  JMethodCall methodCall = new JMethodCall(program,  
x.getSourceInfo(),
@@ -94,11 +94,11 @@
  return (JClassType) result;
}

-  private JMethod getLoadMethod(JClassType loaderType) {
+  private JMethod getRunAsyncMethod(JClassType loaderType) {
  assert loaderType != null;
  assert loaderType.methods != null;
  for (JMethod method : loaderType.methods) {
-  if (method.getName().equals(load)) {
+  if (method.getName().equals(runAsync)) {
  assert (method.isStatic());
  assert (method.params.size() == 1);
  assert  
(method.params.get(0).getType().getName().equals(FragmentLoaderCreator.RUN_ASYNC_CALLBACK));

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r3706 - changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl

2008-10-03 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Fri Oct  3 08:32:40 2008
New Revision: 3706

Modified:
 
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
 
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

Log:
Sort and format.

Modified:  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
==
---  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
   
(original)
+++  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/FragmentLoaderCreator.java
   
Fri Oct  3 08:32:40 2008
@@ -38,11 +38,11 @@
   * handled by TypeTightener and LivenessAnalyzer.
   */
  public class FragmentLoaderCreator {
-  private static final String PROP_RUN_ASYNC_NEVER_RUNS  
= gwt.jjs.runAsyncNeverRuns;
+  public static final String ASYNC_FRAGMENT_LOADER  
= com.google.gwt.core.client.AsyncFragmentLoader;
public static final String ASYNC_LOADER_CLASS_PREFIX = AsyncLoader;
public static final String ASYNC_LOADER_PACKAGE  
= com.google.gwt.lang.asyncloaders;
-  public static final String ASYNC_FRAGMENT_LOADER  
= com.google.gwt.core.client.AsyncFragmentLoader;
public static final String RUN_ASYNC_CALLBACK  
= com.google.gwt.core.client.RunAsyncCallback;
+  private static final String PROP_RUN_ASYNC_NEVER_RUNS  
= gwt.jjs.runAsyncNeverRuns;

private final ArtifactSet artifactSet;
private final CompilationState compilationState;
@@ -111,28 +111,6 @@
  +  callbacks = null;);
}

-  /**
-   * Generate the coderunAsync/code method. Calls to  
codeGWT.runAsync/code
-   * are replaced by calls to this method.
-   */
-  private void generateRunAsyncMethod(PrintWriter srcWriter) {
-srcWriter.println(public static void runAsync(RunAsyncCallback  
callback) {);
-srcWriter.println(getCallbackListSimpleName() +  newCallbackList =  
new 
-+ getCallbackListSimpleName() + (););
-srcWriter.println(newCallbackList.callback = callback;);
-srcWriter.println(newCallbackList.next = callbacks;);
-srcWriter.println(callbacks = newCallbackList;);
-srcWriter.println(if (loaded) {);
-srcWriter.println(instance.runCallbacks(););
-srcWriter.println(return;);
-srcWriter.println(});
-srcWriter.println(if (!loading) {);
-srcWriter.println(loading = true;);
-srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + ););
-srcWriter.println(});
-srcWriter.println(});
-  }
-
private void generateOnErrorMethod(PrintWriter srcWriter) {
  srcWriter.println(public static void onError(Throwable e) {);
  srcWriter.println(loading = false;);
@@ -151,6 +129,28 @@
  srcWriter.println(instance.runCallbacks(););
  srcWriter.println(ASYNC_FRAGMENT_LOADER
  + .logEventProgress(\runCallbacks + entryNumber + \,  
\end\););
+srcWriter.println(});
+  }
+
+  /**
+   * Generate the coderunAsync/code method. Calls to
+   * codeGWT.runAsync/code are replaced by calls to this method.
+   */
+  private void generateRunAsyncMethod(PrintWriter srcWriter) {
+srcWriter.println(public static void runAsync(RunAsyncCallback  
callback) {);
+srcWriter.println(getCallbackListSimpleName() +  newCallbackList =  
new 
++ getCallbackListSimpleName() + (););
+srcWriter.println(newCallbackList.callback = callback;);
+srcWriter.println(newCallbackList.next = callbacks;);
+srcWriter.println(callbacks = newCallbackList;);
+srcWriter.println(if (loaded) {);
+srcWriter.println(instance.runCallbacks(););
+srcWriter.println(return;);
+srcWriter.println(});
+srcWriter.println(if (!loading) {);
+srcWriter.println(loading = true;);
+srcWriter.println(AsyncFragmentLoader.inject( + entryNumber + ););
+srcWriter.println(});
  srcWriter.println(});
}


Modified:  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java
==
---  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

(original)
+++  
changes/spoon/runAsync/dev/core/src/com/google/gwt/dev/jjs/impl/ReplaceRunAsyncs.java

Fri Oct  3 08:32:40 2008
@@ -30,8 +30,8 @@
   */
  public class ReplaceRunAsyncs {
private class AsyncCreateVisitor extends JModVisitor {
-private int entryCount = 1;
  private JMethod currentMethod;
+private int entryCount = 1;

  @Override
  public void endVisit(JMethodCall x, Context ctx) {
@@ -94,31 +94,31 @@
  return (JClassType) result;
}

-  private JMethod getRunAsyncMethod(JClassType loaderType) {
+  private JMethod getOnLoadMethod(JClassType loaderType) {
  assert loaderType != null;
  assert loaderType.methods != null;
  for (JMethod method : loaderType.methods) {
-  if 

[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Ian Petersen

On Fri, Oct 3, 2008 at 12:07 PM, Ray Ryan [EMAIL PROTECTED] wrote:
 I'm with Isaac. I think the case for teaching our Widgets to implement
 HasDataT is really clear cut (especially if they also accept DataChange
 listeners). The DataManager is a bit harder to justify, and anyway trivial
 for folks to implement on their own.

I'm not with Isaac.  My first experience working with data binding was
as a co-op student working on the UI team on the Eclipse project at
OTI.  That was a very educational co-op term!  Eclipse, at least in
version 2--I've lost track since then, has a very clear separation
between SWT, the widget kit, and JFace, the data binding library
that sits on top of SWT.

In my mind, a Widget has a specific job to do--get displayed in an
application and, when appropriate, react to user manipulation.
Teaching basic widgets to know about data is a bad idea, IMO,
because it makes basic widgets too complicated.  It also puts a lot of
pressure on programmers to use the data binding model that's baked
into the widgets, even if that model doesn't really suit a given
application.  In fact, I think Isaac's comments may be an example of
this--he's built himself a model for doing data binding and, at first
blush, it looks like it doesn't match with Arthur's.  It also seems
like neither Arthur's nor Isaac's model fits with the model that I
built and am frantically documenting in preparation for releasing
here.  If any of our models is chosen as The GWT Way and baked into
the basic widgets, the others are probably out of luck.  Instead, I
think a data binding library should be built on top of a widget
library for two main reasons: you can switch data binding libraries
more easily and, perhaps more importantly, you don't have to use any
data binding library at all.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Ray Ryan
I think you're reading too much into the word data. All I'm after is a
uniform way to find out what value a widget is showing, without my
controller having to know specifically what widget it is. I think that can
be done in a minimalist, low level way that doesn't conflict with various
data binding approaches.
Suppose that you could already rely on TextField implements
HasValueString, CheckBox implements HasValueBoolean. How would that
interfere with the work you're doing now? Might it simplify it any?

rjrjr

On Fri, Oct 3, 2008 at 9:27 AM, Ian Petersen [EMAIL PROTECTED] wrote:


 On Fri, Oct 3, 2008 at 12:07 PM, Ray Ryan [EMAIL PROTECTED] wrote:
  I'm with Isaac. I think the case for teaching our Widgets to implement
  HasDataT is really clear cut (especially if they also accept DataChange
  listeners). The DataManager is a bit harder to justify, and anyway
 trivial
  for folks to implement on their own.

 I'm not with Isaac.  My first experience working with data binding was
 as a co-op student working on the UI team on the Eclipse project at
 OTI.  That was a very educational co-op term!  Eclipse, at least in
 version 2--I've lost track since then, has a very clear separation
 between SWT, the widget kit, and JFace, the data binding library
 that sits on top of SWT.

 In my mind, a Widget has a specific job to do--get displayed in an
 application and, when appropriate, react to user manipulation.
 Teaching basic widgets to know about data is a bad idea, IMO,
 because it makes basic widgets too complicated.  It also puts a lot of
 pressure on programmers to use the data binding model that's baked
 into the widgets, even if that model doesn't really suit a given
 application.  In fact, I think Isaac's comments may be an example of
 this--he's built himself a model for doing data binding and, at first
 blush, it looks like it doesn't match with Arthur's.  It also seems
 like neither Arthur's nor Isaac's model fits with the model that I
 built and am frantically documenting in preparation for releasing
 here.  If any of our models is chosen as The GWT Way and baked into
 the basic widgets, the others are probably out of luck.  Instead, I
 think a data binding library should be built on top of a widget
 library for two main reasons: you can switch data binding libraries
 more easily and, perhaps more importantly, you don't have to use any
 data binding library at all.

 Ian

 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Emily Crutcher
I was thinking of a slightly more complex use case where you might have full
model objects.

public class ListBoxModel implements HasValueListItem{
  ...
}


public class ListBoxDataManager implements DataManagerListBox,
ListBoxModel{
  ...
}


public class MyListBox extends Composite  implements HasValueListItem{
  private ListBox wrappedWidget = new ListBox();
  private ListBoxModel model =
ListBoxDataManager().getCurrentManager().get(this);

  ListItem getValue() {
model.getValue();
}
}



public void setData(ListBox widget, String data) {

// go through the list of
for (int i = 0; i  widget.getItemCount(); i++) {
if (widget.getValue(i).equals(data)) {
widget.setSelectedIndex(i);
break;
}
}
}
 }

On Fri, Oct 3, 2008 at 11:59 AM, Arthur Kalmenson [EMAIL PROTECTED]wrote:


   Why wrappers? Why not have the widgets simply implement a HasData
   interface?

 As Emily pointed out, this helps separate presentation logic from the
 data model. Furthermore, there are cases when you want to get data out
 of the same widget in different ways. A good example is a DataManager
 for ListBoxes. A simple implementation would look something like this:

 public class ListBoxDataManager implements DataManagerListBox,
 String {
public String getData(ListBox widget) {
String result = null;
if (widget.getSelectedIndex()  -1) {
result = widget.getValue(widget.getSelectedIndex());
}
return result;
}

public void setData(ListBox widget, String data) {

// go through the list of
for (int i = 0; i  widget.getItemCount(); i++) {
if (widget.getValue(i).equals(data)) {
widget.setSelectedIndex(i);
break;
}
}
}
 }

 However, if you're working with a lot of ListBoxes that have a default
 value set at index 0, you might create a different DataManager to
 handle that particular use case and return null if the first index is
 selected.

  The same widgets might be used to get/set different data types and it
  separates the presentation logic from the data model, so separating the
 two
  seems to make some sense. On the other hand, it means that there is no
  simple interface that can be used when you actually do have data model
  objects:
 
  So what if we combined the two:
 
  public interface HasDataT {
 public T getData();
 public void setData(T data);
 
  }
 
  then:
 
  public interface DataManagerT, S extends HasData   {
   public HasData getData(T widget);
   public void setData(T widget, S data);

 That's a good point but I'm not sure I really understand the sample
 code. Is the idea that if I have a data model Widget, it would
 implement the HasData interface? It seems that S would end up being
 the same as T in the generic implementation. I'll try to implement
 this to get an idea what you mean.

 Best regards,
 Arthur Kalmenson

 On Oct 3, 11:25 am, Emily Crutcher [EMAIL PROTECTED] wrote:
  Having worked on similar projects, I am very enthusiastic about the idea
 of
  creating a full gwt forms module,  as apart from it being a true pain in
 the
  neck to create them by hand, improving the overall quality of such forms
  will, in the long term, save lives, so I'm looking forward to this work.
 
  ---
 
  The same widgets might be used to get/set different data types and it
  separates the presentation logic from the data model, so separating the
 two
  seems to make some sense. On the other hand, it means that there is no
  simple interface that can be used when you actually do have data model
  objects:
 
  So what if we combined the two:
 
  public interface HasDataT {
 public T getData();
 public void setData(T data);
 
  }
 
  then:
 
  public interface DataManagerT, S extends HasData   {
   public HasData getData(T widget);
   public void setData(T widget, S data);
 
 
 
  }
  On Fri, Oct 3, 2008 at 11:06 AM, Isaac Truett [EMAIL PROTECTED] wrote:
 
   Why wrappers? Why not have the widgets simply implement a HasData
   interface?
 
   public interface HasDataT {
  public T getData();
  public void setData(T data);
   }
 
   Maybe I'm just not seeing your use case.
 
   On Fri, Oct 3, 2008 at 10:55 AM, Arthur Kalmenson 
 [EMAIL PROTECTED]
   wrote:
 
Hello every,
 
Just a little backgrounder for this RR. For some time now, a coworker
and I have been working on and off on a library/framework to simplify
creation of GWT applications, specifically those that cover most of
our use cases. For the most part, the applications we build involve
filling out 

[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Isaac Truett

I agree with Ian about the benefits of having data binding libraries
independent of the GWT widget library. I'm not trying to push my own
data binding scheme. My proposal of a HasData interface was to address
this point from Arthur's original post:

 Right now, extracting data from widgets is very different depending on the 
 widget.

Most of the Widgets could implement HasDataString and solve this
problem (See Ray's post while I was writing this). DataManagers and
complex but separated Model/View schemes could be based on that.
HasData is a tool for normalizing APIs which would make building data
binding, validation, and other libraries easier.



On Fri, Oct 3, 2008 at 12:27 PM, Ian Petersen [EMAIL PROTECTED] wrote:

 On Fri, Oct 3, 2008 at 12:07 PM, Ray Ryan [EMAIL PROTECTED] wrote:
 I'm with Isaac. I think the case for teaching our Widgets to implement
 HasDataT is really clear cut (especially if they also accept DataChange
 listeners). The DataManager is a bit harder to justify, and anyway trivial
 for folks to implement on their own.

 I'm not with Isaac.  My first experience working with data binding was
 as a co-op student working on the UI team on the Eclipse project at
 OTI.  That was a very educational co-op term!  Eclipse, at least in
 version 2--I've lost track since then, has a very clear separation
 between SWT, the widget kit, and JFace, the data binding library
 that sits on top of SWT.

 In my mind, a Widget has a specific job to do--get displayed in an
 application and, when appropriate, react to user manipulation.
 Teaching basic widgets to know about data is a bad idea, IMO,
 because it makes basic widgets too complicated.  It also puts a lot of
 pressure on programmers to use the data binding model that's baked
 into the widgets, even if that model doesn't really suit a given
 application.  In fact, I think Isaac's comments may be an example of
 this--he's built himself a model for doing data binding and, at first
 blush, it looks like it doesn't match with Arthur's.  It also seems
 like neither Arthur's nor Isaac's model fits with the model that I
 built and am frantically documenting in preparation for releasing
 here.  If any of our models is chosen as The GWT Way and baked into
 the basic widgets, the others are probably out of luck.  Instead, I
 think a data binding library should be built on top of a widget
 library for two main reasons: you can switch data binding libraries
 more easily and, perhaps more importantly, you don't have to use any
 data binding library at all.

 Ian

 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Ian Petersen

Isaac has also replied while I'm writing this.  I now see that Isaac's
and Ray's suggestions are not as all-encompassing as I originally
interpreted them.  I'm just stepping out for lunch now, though, so I
don't really have time to think about this properly or reply with the
thoughtfulness that's due.  Maybe after lunch I'll extend what
follows.

On Fri, Oct 3, 2008 at 12:38 PM, Ray Ryan [EMAIL PROTECTED] wrote:
 I think you're reading too much into the word data.

That might be true

 Suppose that you could already rely on TextField implements
 HasValueString, CheckBox implements HasValueBoolean. How would that
 interfere with the work you're doing now? Might it simplify it any?

Perhaps.  What would ListBox implement?  HasDataString or
HasDataListString (ie. do we assume single-select or
multi-select)?  Would Label implement HasDataString?  Does
HasDataT imply SourcesChangeEvents (or the gen2 equivalent)?  Would
it be useful to do something like the following? (I've done
essentially this in my library)

public interface DisplaysDataT {

  void setData(T data);
}

public interface HasDataT extends DisplaysDataT {

  T getData();
}

Maybe Label would implement DisplaysDataString while TextBox would
implement HasDataString.  DisplaysDataT wouldn't imply
SourcesChangeEvents but HasDataT might.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Isaac Truett

 Perhaps.  What would ListBox implement?  HasDataString or
 HasDataListString (ie. do we assume single-select or
 multi-select)?

  /**
   * Gets the currently-selected item. If multiple items are selected, this
   * method will return the first selected item ([EMAIL PROTECTED] 
#isItemSelected(int)}
   * can be used to query individual items).
   *
   * @return the selected index, or code-1/code if none is selected
   */
  public int getSelectedIndex() {
return getSelectElement().getSelectedIndex();
  }

To me, this indicates an existing single-select bias. On that basis, I
would say that ListBox implements HasValueString. Or...

interface HasValueT {
  T getValue();
  void setValue(T value);
}

interface HasValuesCollectionsT extends HasValueT {
  CollectionT getValues();
  void setValues(CollectionT values);
}

I'm shooting from the hip there, but at first glance it makes sense.
Then ListBox implements HasValuesString and you get singular methods
which return the first selected item or set the only selected
(removing any other selections) item. The plural methods obviously get
and set all selected items.

 Would Label implement HasDataString?

Yes. HasDataString would essentially replace HasText, wouldn't it?



On Fri, Oct 3, 2008 at 12:52 PM, Ian Petersen [EMAIL PROTECTED] wrote:

 Isaac has also replied while I'm writing this.  I now see that Isaac's
 and Ray's suggestions are not as all-encompassing as I originally
 interpreted them.  I'm just stepping out for lunch now, though, so I
 don't really have time to think about this properly or reply with the
 thoughtfulness that's due.  Maybe after lunch I'll extend what
 follows.

 On Fri, Oct 3, 2008 at 12:38 PM, Ray Ryan [EMAIL PROTECTED] wrote:
 I think you're reading too much into the word data.

 That might be true

 Suppose that you could already rely on TextField implements
 HasValueString, CheckBox implements HasValueBoolean. How would that
 interfere with the work you're doing now? Might it simplify it any?

 Perhaps.  What would ListBox implement?  HasDataString or
 HasDataListString (ie. do we assume single-select or
 multi-select)?  Would Label implement HasDataString?  Does
 HasDataT imply SourcesChangeEvents (or the gen2 equivalent)?  Would
 it be useful to do something like the following? (I've done
 essentially this in my library)

 public interface DisplaysDataT {

  void setData(T data);
 }

 public interface HasDataT extends DisplaysDataT {

  T getData();
 }

 Maybe Label would implement DisplaysDataString while TextBox would
 implement HasDataString.  DisplaysDataT wouldn't imply
 SourcesChangeEvents but HasDataT might.

 Ian

 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Emily Crutcher
I think this basic idea makes sense, though I might argue that we might want
to create a DropDownListBox and a MultiSelectListBox  and deprecate list
box, as the API for ListBox is hard to normalize this way.

However, at the same time, a more complex data binding API seems like it
could be very useful as well. Maybe the trick is we should treat the two
discusions seperately.

a) Create a HasValueT, potencially extending a HasReadOnlyValueT
interface which is used even for base ui widgets. This one might make into
1.6 even.

b) Create a data binding framework that  binds widgets to more complex
data.  It will probably not be ready for several months and should be very
flexible.






On Fri, Oct 3, 2008 at 1:09 PM, Isaac Truett [EMAIL PROTECTED] wrote:


  Perhaps.  What would ListBox implement?  HasDataString or
  HasDataListString (ie. do we assume single-select or
  multi-select)?

   /**
   * Gets the currently-selected item. If multiple items are selected, this
   * method will return the first selected item ([EMAIL PROTECTED]
 #isItemSelected(int)}
   * can be used to query individual items).
   *
   * @return the selected index, or code-1/code if none is selected
   */
  public int getSelectedIndex() {
return getSelectElement().getSelectedIndex();
  }

 To me, this indicates an existing single-select bias. On that basis, I
 would say that ListBox implements HasValueString. Or...

 interface HasValueT {
  T getValue();
  void setValue(T value);
 }

 interface HasValuesCollectionsT extends HasValueT {
  CollectionT getValues();
  void setValues(CollectionT values);
 }

 I'm shooting from the hip there, but at first glance it makes sense.
 Then ListBox implements HasValuesString and you get singular methods
 which return the first selected item or set the only selected
 (removing any other selections) item. The plural methods obviously get
 and set all selected items.

  Would Label implement HasDataString?

 Yes. HasDataString would essentially replace HasText, wouldn't it?



 On Fri, Oct 3, 2008 at 12:52 PM, Ian Petersen [EMAIL PROTECTED] wrote:
 
  Isaac has also replied while I'm writing this.  I now see that Isaac's
  and Ray's suggestions are not as all-encompassing as I originally
  interpreted them.  I'm just stepping out for lunch now, though, so I
  don't really have time to think about this properly or reply with the
  thoughtfulness that's due.  Maybe after lunch I'll extend what
  follows.
 
  On Fri, Oct 3, 2008 at 12:38 PM, Ray Ryan [EMAIL PROTECTED] wrote:
  I think you're reading too much into the word data.
 
  That might be true
 
  Suppose that you could already rely on TextField implements
  HasValueString, CheckBox implements HasValueBoolean. How would that
  interfere with the work you're doing now? Might it simplify it any?
 
  Perhaps.  What would ListBox implement?  HasDataString or
  HasDataListString (ie. do we assume single-select or
  multi-select)?  Would Label implement HasDataString?  Does
  HasDataT imply SourcesChangeEvents (or the gen2 equivalent)?  Would
  it be useful to do something like the following? (I've done
  essentially this in my library)
 
  public interface DisplaysDataT {
 
   void setData(T data);
  }
 
  public interface HasDataT extends DisplaysDataT {
 
   T getData();
  }
 
  Maybe Label would implement DisplaysDataString while TextBox would
  implement HasDataString.  DisplaysDataT wouldn't imply
  SourcesChangeEvents but HasDataT might.
 
  Ian
 
  
 

 



-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Arthur Kalmenson

 If you buy my argument that HasDataT needs to imply
 SourcesDataChangeEventsT, then I think it follows that Label should
 not implement HasDataT.  Something like HasReadOnlyDataT (like
 Emily suggested) would be necessary to bridge the gap between
 editors and viewers.

I agree 100%, the hasText interface is very confusing. Sometimes it's
used to represent text set by users (TextBox) as well as text set by
the application (Label). I think that a HasDataT and
HasReadOnlyDataT is a great idea. Implementing some
SourcesDataChangeEventsT interface will make it easier to do
validation and help make efficient data binding where the target bean
will only receive changed widgets.

 On a completely different note, I just noticed that RadioButton
 inherits from CheckBox.  Does it make sense for RadioButton to
 implement HasDataBoolean?  To me, a collection of RadioButtons is
 roughly equivalent to a single-select ListBox and, as such,
 RadioButton implementing HasDataBoolean is somewhat nonsensical,
 whereas a collection of RadioButtons should probably implement
 HasDataString, or something similar.

I agree, it should be HasDataString, but I think that RadioButton
should not be a single entity that's linked by a String group name (at
least not from the GWT side, I understand the JS side has to be like
that). I think that RadioButton should be RadioButtons and should act
more like ListBox where you can add additional choices. The current
RadioButton implementation is pretty low level and is rather close to
the way it's done in Javascript.

Regards,
Arthur Kalmenson

On Oct 3, 2:33 pm, Ian Petersen [EMAIL PROTECTED] wrote:
 On Fri, Oct 3, 2008 at 1:09 PM, Isaac Truett [EMAIL PROTECTED] wrote:
  Would Label implement HasDataString?

  Yes. HasDataString would essentially replace HasText, wouldn't it?

 (As an aside, if HasDataString replaces HasText, perhaps HasText
 should be redefined to extend HasDataString.)

 Ray talked about creating a uniform way to find out what value a
 widget is showing and Isaac described HasDataT as a tool for
 normalizing API.  I think those are key ideas.  As such, I think we
 need to go one step further.  HasDataT should imply
 SourcesChangeEvents, or maybe SourcesDataChangeEventsT.  A TextBox
 certainly HasDataString, but I think it's equally important that the
 user can change the data in the text box.  Any data binding library is
 going to have to listen for updates from the widgets that are capable
 of editing a value, and I think normalizing the notification of those
 changes is at least as useful as normalizing the display of values.
 In particular, I think CheckBox would benefit from
 SourcesDataChangeEventsBoolean.

 If you buy my argument that HasDataT needs to imply
 SourcesDataChangeEventsT, then I think it follows that Label should
 not implement HasDataT.  Something like HasReadOnlyDataT (like
 Emily suggested) would be necessary to bridge the gap between
 editors and viewers.

 On a completely different note, I just noticed that RadioButton
 inherits from CheckBox.  Does it make sense for RadioButton to
 implement HasDataBoolean?  To me, a collection of RadioButtons is
 roughly equivalent to a single-select ListBox and, as such,
 RadioButton implementing HasDataBoolean is somewhat nonsensical,
 whereas a collection of RadioButtons should probably implement
 HasDataString, or something similar.

 Ian
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: RR: making extracting and setting widget data easier

2008-10-03 Thread Ian Petersen

On Fri, Oct 3, 2008 at 1:09 PM, Isaac Truett [EMAIL PROTECTED] wrote:
 Would Label implement HasDataString?

 Yes. HasDataString would essentially replace HasText, wouldn't it?

(As an aside, if HasDataString replaces HasText, perhaps HasText
should be redefined to extend HasDataString.)

Ray talked about creating a uniform way to find out what value a
widget is showing and Isaac described HasDataT as a tool for
normalizing API.  I think those are key ideas.  As such, I think we
need to go one step further.  HasDataT should imply
SourcesChangeEvents, or maybe SourcesDataChangeEventsT.  A TextBox
certainly HasDataString, but I think it's equally important that the
user can change the data in the text box.  Any data binding library is
going to have to listen for updates from the widgets that are capable
of editing a value, and I think normalizing the notification of those
changes is at least as useful as normalizing the display of values.
In particular, I think CheckBox would benefit from
SourcesDataChangeEventsBoolean.

If you buy my argument that HasDataT needs to imply
SourcesDataChangeEventsT, then I think it follows that Label should
not implement HasDataT.  Something like HasReadOnlyDataT (like
Emily suggested) would be necessary to bridge the gap between
editors and viewers.

On a completely different note, I just noticed that RadioButton
inherits from CheckBox.  Does it make sense for RadioButton to
implement HasDataBoolean?  To me, a collection of RadioButtons is
roughly equivalent to a single-select ListBox and, as such,
RadioButton implementing HasDataBoolean is somewhat nonsensical,
whereas a collection of RadioButtons should probably implement
HasDataString, or something similar.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r3704 - trunk/user/src/com/google/gwt/dom/client

2008-10-03 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Fri Oct  3 06:51:42 2008
New Revision: 3704

Modified:
trunk/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java

Log:
Using fall back text content for old Mozilla.
Desk check by jgw.

Modified: trunk/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java
==
--- trunk/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java  
(original)
+++ trunk/user/src/com/google/gwt/dom/client/DOMImplMozillaOld.java Fri  
Oct  3 06:51:42 2008
@@ -63,4 +63,34 @@
  return top +
 
@com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollTop;
}-*/;
+
+  @Override
+  public native String getInnerText(Element node) /*-{
+// To mimic IE's 'innerText' property in the W3C DOM, we need to  
recursively
+// concatenate all child text nodes (depth first).
+var text = '', child = node.firstChild;
+while (child) {
+  // 1 == Element node
+  if (child.nodeType == 1) {
+text +=  
[EMAIL PROTECTED]::getInnerText(Lcom/google/gwt/dom/client/Element;)(child);
+  } else if (child.nodeValue) {
+text += child.nodeValue;
+  }
+  child = child.nextSibling;
+}
+return text;
+  }-*/;
+
+  @Override
+  public native void setInnerText(Element elem, String text) /*-{
+// Remove all children first.
+while (elem.firstChild) {
+  elem.removeChild(elem.firstChild);
+}
+// Add a new text node.
+if (text != null) {
+  elem.appendChild($doc.createTextNode(text));
+}
+  }-*/;
+
  }

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: data binding framework for GWT

2008-10-03 Thread Ian Petersen

On Fri, Oct 3, 2008 at 5:12 PM, Ian Petersen [EMAIL PROTECTED] wrote:
 I just realized I should work up an example project that uses the
 library.  I'll get to that and post it shortly.

I've started a pretty thorough example, but the office is closing and
I don't have a key so I have leave now.  I'll probably post something
tonight, or maybe tomorrow.

Ian

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit commit] r3708 - trunk/dev/core/src/com/google/gwt/dev/jdt

2008-10-03 Thread codesite-noreply

Author: [EMAIL PROTECTED]
Date: Fri Oct  3 17:26:30 2008
New Revision: 3708

Modified:
trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java

Log:
This is a better way to find the appropriate no arg constructor; in some  
circumstances the original code would erroneously return a superclass  
constructor.

Review by: spoon (TBR)


Modified:  
trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java
==
--- trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java  
 
(original)
+++ trunk/dev/core/src/com/google/gwt/dev/jdt/WebModeCompilerFrontEnd.java  
 
Fri Oct  3 17:26:30 2008
@@ -165,9 +165,7 @@
  continue;
}
// Look for a noArg ctor.
-  MethodBinding noArgCtor =  
type.getExactMethod(init.toCharArray(),
-  TypeBinding.NO_PARAMETERS, cud.scope);
-
+  MethodBinding noArgCtor =  
type.getExactConstructor(TypeBinding.NO_PARAMETERS);
if (noArgCtor == null) {
  FindDeferredBindingSitesVisitor.reportRebindProblem(site,
  Rebind result ' + typeName

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Patch: Build File Fix

2008-10-03 Thread Freeland Abbott
The format for gwt.svnrev is [EMAIL PROTECTED], and if a real answer can't
be determined it's set to [EMAIL PROTECTED], so I'd rather keep that pattern
consistent instead of the 0 here.
As a bigger change, though, I'd actually suggest pushing the test for .svn
into SvnInfo.java; that already handles error conditions like the svn or
svnversion binaries not being available, so it's a reasonable fit to check
for workspace configuration there, and it makes the build file itself
cleaner.

General concept is fine, of course, but can we make those changes?



On Fri, Oct 3, 2008 at 8:28 PM, Scott Blum [EMAIL PROTECTED] wrote:

 Freeland, it's all you. :)

 On Fri, Oct 3, 2008 at 8:23 PM, Mike Aizatsky [EMAIL PROTECTED]wrote:

 Hi!

 I've fixed build file to support working in non-svn workdir (e.g. git
 :). Can you please get this in?

 --
 Regards,
 Mike




--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---