Re: Why can I not extend java.util.Date?

2016-03-24 Thread Thomas Broyer


On Thursday, March 24, 2016 at 2:25:09 PM UTC+1, Stefan Falk wrote:
>
> My main problem here is that on the server side everything is following 
> the ISO standard MONDAY = 1, TUESDAY = 2, .. etc and since we only got Date 
> on he client things can get mixed up. This is why I thought I could 
> wrap/extend Date and just override the getDay() method in order to
>
>- have the mapping exactly where I need it and
>
>
You're breaking the Liskov substitution principle. This is not good OOP, 
don't do it.


>- get rid of all the deprecation warnings in my code as I use only 
>MyDate
>
> How about using a MyDate that can do whatever you want it to do by 
wrapping a JsDate or Date (or just a double), possibly providing a toDate() 
returning a java.util.Date for those places where you need it (formatting, 
etc.)
That MyDate can still be serializable (assuming your problem here is 
GWT-RPC serialization), either directly (if wrapping a Date or double) or 
through a CustomFieldSerializer.

Or you could *add* a new method to your subclass to avoid changing the 
java.util.Date contract. As for GWT-RPC serialization, if extending 
java.util.Date, you'll have to provide a CustomFieldSerializer (just copy 
the 
com.google.gwt.user.client.rpc.core.java.util.Date_CustomFieldSerializer 
and use your own class instead)

Speaking of Date .. will there actually be support for all of the fancy 
> Date/Time stuff that came with Java 8? Again, like you said, working with 
> Dates is very hard sometimes so imho it would be very important to get 
> there with GWT. But I understand that this might also not be that easy and 
> it must have a particular reason why it's not yet there.
>

Reason number 1 is “it's a whole lot of work”.
I suppose ThreeTen or ThreeTenBP can be used as a starting point (friendly 
licensing), but there'd still be a lot of code that'd need to be deleted 
and/or adapted.
It's more important to get java.util.function and java.util.stream in 
(ongoing work) than java.time.

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


Re: Why can I not extend java.util.Date?

2016-03-24 Thread Chad Vincent
If you do extend Date, I would not use any 3rd party library calls that 
take a Date and may use Day of Week, as they might well explode on Sundays. 
 And that has the same problem as a util class, you may forget and make the 
call somewhere.  It's really a lose-lose situation.

You're not really saying what you're doing with the ISO DOW, but you do 
know that SimpleDateFormat supports the ISO enumeration, right?  Looks like 
"u" is the Monday = 1, Sunday = 7 version, though "F" may also work.

As for the Java 8 java.time support, it appears it is planned but not yet 
in-progress: https://github.com/gwtproject/gwt/issues/611

On Thursday, March 24, 2016 at 8:25:09 AM UTC-5, Stefan Falk wrote:
>
> My main problem here is that on the server side everything is following 
> the ISO standard MONDAY = 1, TUESDAY = 2, .. etc and since we only got Date 
> on he client things can get mixed up. This is why I thought I could 
> wrap/extend Date and just override the getDay() method in order to
>
>- have the mapping exactly where I need it and
>- get rid of all the deprecation warnings in my code as I use only 
>MyDate
>
> I agree with you.. Dates are very hard to handle and I really hate it 
> actually ^^ That is even more a reason for me to get things straight with 
> my client and server. Having to call another method from another util class 
> is also just not what I am looking for - it can also be forgotten somewhere.
>
> Speaking of Date .. will there actually be support for all of the fancy 
> Date/Time stuff that came with Java 8? Again, like you said, working with 
> Dates is very hard sometimes so imho it would be very important to get 
> there with GWT. But I understand that this might also not be that easy and 
> it must have a particular reason why it's not yet there.
>
>
>
>
> On Tuesday, 22 March 2016 16:01:11 UTC+1, Chad Vincent wrote:
>>
>> 1) Dates are very, very, very hard.  Calendar idiosyncrasies, time zones, 
>> leap seconds...  Be 100% sure you need to actually extend Date before 
>> messing with it.
>> 2) You are probably better off putting your method (presuming this is the 
>> only one) in a custom utility class instead of extending Date so you don't 
>> alter the functionality of any other libraries you use that aren't 
>> expecting DOW to be non-standard.
>> getCustomDay(Date date) {
>>   if (date.getDay() == 0)
>> return 7;
>>   return date.getDay();
>> }
>>
>>
>>
>> On Sunday, March 20, 2016 at 12:24:09 PM UTC-5, Stefan Falk wrote:
>>>
>>> Working with Date is a nightmare.. so beforehand: Any advice regarding 
>>> work with time and date in GWT are very welcome!
>>>
>>> Why do my requests silently fail if I do this:
>>>
>>> public class AwesomeDate extends java.util.Date {
>>>
>>>   public final static int MONDAY = 1; 
>>>   public final static int TUESDAY = 2; 
>>>   public final static int WEDNESDAY = 3; 
>>>   public final static int THURSDAY = 4; 
>>>   public final static int FRIDAY = 5; 
>>>   public final static int SATURDAY = 6; 
>>>   public final static int SUNDAY = 7;
>>>
>>>   @Override
>>>   public int getDay() { 
>>> switch(super.getDay()) { 
>>> case 1:
>>>   return MONDAY;
>>> case 2:
>>>   return TUESDAY;
>>> case 3:
>>>   return WEDNESDAY;
>>> case 4:
>>>   return THURSDAY;
>>> case 5:
>>>   return FRIDAY;
>>> case 6:
>>> return SATURDAY;
>>>   case 0:
>>>   return SUNDAY;
>>> } 
>>> throw new RuntimeException();
>>>   }
>>> }
>>>
>>>
>>> and then
>>>
>>> AwesomeDate fromDate = ..
>>> AwesomeDate toDate = ..
>>>
>>> myObjectEnter.request(fromDate, toDate, onSuccess, onFailure);
>>>
>>>
>>> where
>>>
>>> MyObject#request(Date from, Date to, OnSuccess success, 
>>> OnFailure failure);
>>>
>>>
>>> Because if I do that my request does simply nothing. It's not even 
>>> getting sent off.. I have an object that takes care for parallel requests
>>>
>>>  for (ParallelizableRequest parallelizableRequest : this.
>>> childRequests) {
>>>parallelizableRequest.request();
>>>  }
>>>
>>> but that request that is using AwesomeDate is simply not being executed. 
>>> In the JavaScript debugger I see that the list childRequests contains two 
>>> elements but that's all I can tell.
>>>
>>> Any ideas?
>>>
>>

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


Re: Why can I not extend java.util.Date?

2016-03-24 Thread Stefan Falk
My main problem here is that on the server side everything is following the 
ISO standard MONDAY = 1, TUESDAY = 2, .. etc and since we only got Date on 
he client things can get mixed up. This is why I thought I could 
wrap/extend Date and just override the getDay() method in order to

   - have the mapping exactly where I need it and
   - get rid of all the deprecation warnings in my code as I use only MyDate

I agree with you.. Dates are very hard to handle and I really hate it 
actually ^^ That is even more a reason for me to get things straight with 
my client and server. Having to call another method from another util class 
is also just not what I am looking for - it can also be forgotten somewhere.

Speaking of Date .. will there actually be support for all of the fancy 
Date/Time stuff that came with Java 8? Again, like you said, working with 
Dates is very hard sometimes so imho it would be very important to get 
there with GWT. But I understand that this might also not be that easy and 
it must have a particular reason why it's not yet there.




On Tuesday, 22 March 2016 16:01:11 UTC+1, Chad Vincent wrote:
>
> 1) Dates are very, very, very hard.  Calendar idiosyncrasies, time zones, 
> leap seconds...  Be 100% sure you need to actually extend Date before 
> messing with it.
> 2) You are probably better off putting your method (presuming this is the 
> only one) in a custom utility class instead of extending Date so you don't 
> alter the functionality of any other libraries you use that aren't 
> expecting DOW to be non-standard.
> getCustomDay(Date date) {
>   if (date.getDay() == 0)
> return 7;
>   return date.getDay();
> }
>
>
>
> On Sunday, March 20, 2016 at 12:24:09 PM UTC-5, Stefan Falk wrote:
>>
>> Working with Date is a nightmare.. so beforehand: Any advice regarding 
>> work with time and date in GWT are very welcome!
>>
>> Why do my requests silently fail if I do this:
>>
>> public class AwesomeDate extends java.util.Date {
>>
>>   public final static int MONDAY = 1; 
>>   public final static int TUESDAY = 2; 
>>   public final static int WEDNESDAY = 3; 
>>   public final static int THURSDAY = 4; 
>>   public final static int FRIDAY = 5; 
>>   public final static int SATURDAY = 6; 
>>   public final static int SUNDAY = 7;
>>
>>   @Override
>>   public int getDay() { 
>> switch(super.getDay()) { 
>> case 1:
>>   return MONDAY;
>> case 2:
>>   return TUESDAY;
>> case 3:
>>   return WEDNESDAY;
>> case 4:
>>   return THURSDAY;
>> case 5:
>>   return FRIDAY;
>> case 6:
>> return SATURDAY;
>>   case 0:
>>   return SUNDAY;
>> } 
>> throw new RuntimeException();
>>   }
>> }
>>
>>
>> and then
>>
>> AwesomeDate fromDate = ..
>> AwesomeDate toDate = ..
>>
>> myObjectEnter.request(fromDate, toDate, onSuccess, onFailure);
>>
>>
>> where
>>
>> MyObject#request(Date from, Date to, OnSuccess success, 
>> OnFailure failure);
>>
>>
>> Because if I do that my request does simply nothing. It's not even 
>> getting sent off.. I have an object that takes care for parallel requests
>>
>>  for (ParallelizableRequest parallelizableRequest : this.childRequests
>> ) {
>>parallelizableRequest.request();
>>  }
>>
>> but that request that is using AwesomeDate is simply not being executed. 
>> In the JavaScript debugger I see that the list childRequests contains two 
>> elements but that's all I can tell.
>>
>> Any ideas?
>>
>

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


Re: Why can I not extend java.util.Date?

2016-03-22 Thread Chad Vincent
1) Dates are very, very, very hard.  Calendar idiosyncrasies, time zones, 
leap seconds...  Be 100% sure you need to actually extend Date before 
messing with it.
2) You are probably better off putting your method (presuming this is the 
only one) in a custom utility class instead of extending Date so you don't 
alter the functionality of any other libraries you use that aren't 
expecting DOW to be non-standard.
getCustomDay(Date date) {
  if (date.getDay() == 0)
return 7;
  return date.getDay();
}



On Sunday, March 20, 2016 at 12:24:09 PM UTC-5, Stefan Falk wrote:
>
> Working with Date is a nightmare.. so beforehand: Any advice regarding 
> work with time and date in GWT are very welcome!
>
> Why do my requests silently fail if I do this:
>
> public class AwesomeDate extends java.util.Date {
>
>   public final static int MONDAY = 1; 
>   public final static int TUESDAY = 2; 
>   public final static int WEDNESDAY = 3; 
>   public final static int THURSDAY = 4; 
>   public final static int FRIDAY = 5; 
>   public final static int SATURDAY = 6; 
>   public final static int SUNDAY = 7;
>
>   @Override
>   public int getDay() { 
> switch(super.getDay()) { 
> case 1:
>   return MONDAY;
> case 2:
>   return TUESDAY;
> case 3:
>   return WEDNESDAY;
> case 4:
>   return THURSDAY;
> case 5:
>   return FRIDAY;
> case 6:
> return SATURDAY;
>   case 0:
>   return SUNDAY;
> } 
> throw new RuntimeException();
>   }
> }
>
>
> and then
>
> AwesomeDate fromDate = ..
> AwesomeDate toDate = ..
>
> myObjectEnter.request(fromDate, toDate, onSuccess, onFailure);
>
>
> where
>
> MyObject#request(Date from, Date to, OnSuccess success, 
> OnFailure failure);
>
>
> Because if I do that my request does simply nothing. It's not even getting 
> sent off.. I have an object that takes care for parallel requests
>
>  for (ParallelizableRequest parallelizableRequest : this.childRequests) 
> {
>parallelizableRequest.request();
>  }
>
> but that request that is using AwesomeDate is simply not being executed. 
> In the JavaScript debugger I see that the list childRequests contains two 
> elements but that's all I can tell.
>
> Any ideas?
>

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


Why can I not extend java.util.Date?

2016-03-20 Thread Stefan Falk
Working with Date is a nightmare.. so beforehand: Any advice regarding work 
with time and date in GWT are very welcome!

Why do my requests silently fail if I do this:

public class AwesomeDate extends java.util.Date {

  public final static int MONDAY = 1; 
  public final static int TUESDAY = 2; 
  public final static int WEDNESDAY = 3; 
  public final static int THURSDAY = 4; 
  public final static int FRIDAY = 5; 
  public final static int SATURDAY = 6; 
  public final static int SUNDAY = 7;

  @Override
  public int getDay() { 
switch(super.getDay()) { 
case 1:
  return MONDAY;
case 2:
  return TUESDAY;
case 3:
  return WEDNESDAY;
case 4:
  return THURSDAY;
case 5:
  return FRIDAY;
case 6:
return SATURDAY;
  case 0:
  return SUNDAY;
} 
throw new RuntimeException();
  }
}


and then

AwesomeDate fromDate = ..
AwesomeDate toDate = ..

myObjectEnter.request(fromDate, toDate, onSuccess, onFailure);


where

MyObject#request(Date from, Date to, OnSuccess success, 
OnFailure failure);


Because if I do that my request does simply nothing. It's not even getting 
sent off.. I have an object that takes care for parallel requests

 for (ParallelizableRequest parallelizableRequest : this.childRequests) {
   parallelizableRequest.request();
 }

but that request that is using AwesomeDate is simply not being executed. In 
the JavaScript debugger I see that the list childRequests contains two 
elements but that's all I can tell.

Any ideas?

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


DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory after using GWT's XML parser

2014-10-14 Thread Petros Petrosyan
I have an application which uses xml parser library - XOM ( www.xom.nu ). 
The parser works without any issues until I do parsing on GWT side via  

com.google.gwt.xml.client.XMLParser.

After the parsing is done on GWT client side, when I try to do another 
parsing with XOM, I get the following exception:

org.apache.xerces.impl.dv.DVFactoryException: *DTD factory **class 
org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from 
DTDDVFactory.*
at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)

at org.apache.xerces.impl.dv.DTDDVFactory.getInstance(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.createDatatypeValidatorFactory
(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.(Unknown Source)

at org.apache.xerces.parsers.DTDConfiguration.(Unknown Source)

at nu.xom.XML1_0Parser.(Unknown Source)

at nu.xom.Builder.findParser(Unknown Source)

at nu.xom.Builder.(Unknown Source)

at nu.xom.Builder.(Unknown Source)

at XMLParser.tryParse(XMLParser.java:42)


I have googled this issue and found different suggestions ( including 
http://stackoverflow.com/questions/4730103/xerces-error-org-apache-xerces-impl-dv-dtd-dtddvfactoryimpl)
 
, however none of them helped me. 


What I found is that gwt-dev.jar and XOM they both use Xerces, so when 
gwt-dev.jar uses Xerces, the DTD class somehow changes and afterwards XOM's 
Xerces instance does not recognize the DVFactoryException as it is from 
another package. 

I also tried to use the java.endorsed.dirs but it didn't help.

Has anyone had similar issue? If so, please give me hint what is going on 
here.

Thanks,

Petros



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


Re: extend UiBinder engine

2014-06-03 Thread Zied Hamdi OneView

>
> Hi Thomas,
>

Yes it's funny you wrote that the proposed solution isn't convenient as an 
answer to my proposal :-p

Then I don't get why you answered "no" for me patching GWT uiBinder even 
though you were saying:
"So let's move to PatchesWelcome as a signal that we're not opposed to 
enhancing UiBinder 
 but it's not 
in the roadmap. What do you think?"


I didn't have the need to do that until now, but when this came I 
independently concluded to the same solution. Now when I tried, I figured 
out I cannot have an "outer" factory because GWT.create() needs to have a 
ClassName.class as a parameter, it cannot take a Class clazz parameter 
since it cannot bind it to the real implementation on GWT compile (because 
the value would be a runtime value). So I had to keep the generator write 
the code GWT.create( TheWidget.class ), and I'm passing after that creation 
and some inits (xml specified css and handlers) to my own central init for 
all widgets. A subscription mechanism allows to subscribe for different 
kinds of patterns (widget class, widget context, and special widgets that 
implement an interface for a smarter @UiFactory fonctionality since the 
method receives an environement (connected user rules, application state, 
etc..) parameter and initializes against those values


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


Re: extend UiBinder engine

2014-06-03 Thread Steve C
That's what I figured :)

On Tuesday, June 3, 2014 4:22:57 AM UTC-4, Thomas Broyer wrote:
>
>
> What I meant is that the factory you give to UiBinder would work the same 
> as a @UiFactory in your class: no need for a @UiField/ui:field; if you have 
> a  in your ui.xml, whether it has a ui:field or not, it'll 
> be created by the factory. My proposal was just to be able to move 
> @UiFactory methods into a class that could be shared by several UiBinder 
> instances; i.e. exactly what you asked for ;-)
> I should have answered: “you're right, it's not possible, but I proposed 
> the exact same thing in issue 6151” ;-)
>  
>

I've been contemplating other avenues of UI generation, like HTMLPanel.  
I've tried using a JSP to generate a block of HTML dynamically, usually 
including looping, and retrieve that using RequestBuilder, and putting that 
into an HTMLPanel.  The only difficult part is managing the id's of various 
elements.  And of course, having half the code in src, and the other half 
under war - but I could use a generator class under src to get around that.

It seems that a dynamic version of UiBinder or UiRenderer would be 
possible, since GWT has client runtime XML processing capabilities.  And 
the set of available tags could be expanded to include some analogs to the 
JSP core tags, like c:forEach.  The Java class would have to be created in 
advance, so either there would need to be fields for all possible widgets, 
with nulls legal, or the widgets could be entries in a map instead of class 
properties.  Widgets resulting from a loop would be in an array or List.  
Maybe someday in my copious free time, I'll play around with that.

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


Re: extend UiBinder engine

2014-06-03 Thread Thomas Broyer


On Monday, June 2, 2014 8:29:14 PM UTC+2, Steve C wrote:
>
> Yeah, that would be useful.
>
> I'm kind of curious about the part: "I'd like to see something a bit more 
> advanced where you don't need to declare the @UiFields".  I may be 
> misinterpreting that, since I don't see how you could use the Java class 
> without the fields.  Or you just talking about assuming the presence of the 
> annotation, since the Java field names have to match the ui:field 
> attributes in the xml anyway?
>

What I meant is that the factory you give to UiBinder would work the same 
as a @UiFactory in your class: no need for a @UiField/ui:field; if you have 
a  in your ui.xml, whether it has a ui:field or not, it'll 
be created by the factory. My proposal was just to be able to move 
@UiFactory methods into a class that could be shared by several UiBinder 
instances; i.e. exactly what you asked for ;-)
I should have answered: “you're right, it's not possible, but I proposed 
the exact same thing in issue 6151” ;-)
 

>
> On Monday, June 2, 2014 12:21:33 PM UTC-4, Thomas Broyer wrote:
>>
>>
>>
>> On Monday, June 2, 2014 3:32:41 PM UTC+2, Steve C wrote:
>>>
>>> It would be nice if the UiFactory methods could somehow be separated out 
>>> into their own class for reuse, but I don't think that's possible.
>>>
>>
>> Cf. the discussion in 
>> https://code.google.com/p/google-web-toolkit/issues/detail?id=6151 
>>
>

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


Re: extend UiBinder engine

2014-06-02 Thread Zied Hamdi OneView
Hi Steve,

I published an answer about the part you're curious about: 
A UiBinder fork that does the job and a factory here 
 @ http://ziedhamdi.github.io/UiBinderAutho/

(more details in the issue discussion)

Le lundi 2 juin 2014 19:29:14 UTC+1, Steve C a écrit :
>
> Yeah, that would be useful.
>
> I'm kind of curious about the part: "I'd like to see something a bit more 
> advanced where you don't need to declare the @UiFields".  I may be 
> misinterpreting that, since I don't see how you could use the Java class 
> without the fields.  Or you just talking about assuming the presence of the 
> annotation, since the Java field names have to match the ui:field 
> attributes in the xml anyway?
>
> On Monday, June 2, 2014 12:21:33 PM UTC-4, Thomas Broyer wrote:
>>
>>
>>
>> On Monday, June 2, 2014 3:32:41 PM UTC+2, Steve C wrote:
>>>
>>> It would be nice if the UiFactory methods could somehow be separated out 
>>> into their own class for reuse, but I don't think that's possible.
>>>
>>
>> Cf. the discussion in 
>> https://code.google.com/p/google-web-toolkit/issues/detail?id=6151 
>>
>

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


Re: extend UiBinder engine

2014-06-02 Thread Steve C
Yeah, that would be useful.

I'm kind of curious about the part: "I'd like to see something a bit more 
advanced where you don't need to declare the @UiFields".  I may be 
misinterpreting that, since I don't see how you could use the Java class 
without the fields.  Or you just talking about assuming the presence of the 
annotation, since the Java field names have to match the ui:field 
attributes in the xml anyway?

On Monday, June 2, 2014 12:21:33 PM UTC-4, Thomas Broyer wrote:
>
>
>
> On Monday, June 2, 2014 3:32:41 PM UTC+2, Steve C wrote:
>>
>> It would be nice if the UiFactory methods could somehow be separated out 
>> into their own class for reuse, but I don't think that's possible.
>>
>
> Cf. the discussion in 
> https://code.google.com/p/google-web-toolkit/issues/detail?id=6151 
>

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


Re: extend UiBinder engine

2014-06-02 Thread Thomas Broyer


On Monday, June 2, 2014 3:32:41 PM UTC+2, Steve C wrote:
>
> It would be nice if the UiFactory methods could somehow be separated out 
> into their own class for reuse, but I don't think that's possible.
>

Cf. the discussion in 
https://code.google.com/p/google-web-toolkit/issues/detail?id=6151 

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


Re: extend UiBinder engine

2014-06-02 Thread Steve C
For those us that might encounter this need for somewhat simple situations, 
why not use a @UiFactory?  That provides a reasonably clean solution that 
separates the security aspects.

Provide a parameter like "roles" to the create method, which could parse a 
comma-separated list of roles in a string to determine whether to show or 
hide.






@UiFactory
public TextBox create(String roles) {
TextBox txtBox = new TextBox();
txtBox.setVisible(Roles.hasAccess(roles));
return txtBox;
}
}

Roles would know the current user role(s) and determine if one of the roles 
in the user matches one of the valid roles for the widget.

It would be nice if the UiFactory methods could somehow be separated out 
into their own class for reuse, but I don't think that's possible.


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


Re: extend UiBinder engine

2014-05-20 Thread Zied Hamdi OneView


What I was wondering is, if you do that permission thing inside GWT's 
FieldWriter then isn't it annoying that you now must assume that all 
security relevant @UiFields may be null? So you must do quite a bit of null 
checks and deal with the fact that GWT developers normally think that a 
@UiField is never null and maybe tend to forget about that? 


Sure that having null widgets might need more checks, but it's a good way 
to check that all is working as expected: it's somehow a runtime compiler

In other terms: If you have a field that shouldn't display and you do 
processing on it thinking that it's there, you never get a chance to 
realize that you can't do that for a given profile. A null pointer warns 
you that the field is not available and that you have to consider that 
situation in your program. Sure a more evolved way would be to have a 
"ghost Widget" that has a flag to warn the developer (throw an exception, 
write to error log or do another action in a global setting). This would 
imply to create a mechanism to populate the @UiField with a non dom 
lightweight instance of his object. I think it's over engineering for, at 
the end, a very similar result: warn the developer with a more developer 
friendly message than the NPE. I think it's not worth it, but I could 
definitely change my mind if we discuss the subject more deeply and find 
other advantages to it

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


Re: extend UiBinder engine

2014-05-20 Thread Jens

>
> I didn't have the time to answer to your comments yesterday. 
>  *Instead of @RequireRole("superAdmin") you would then use 
> @RequirePermission("canMakePersonToAdmin") . *
>
> It's pretty the same: my issue is that I cannot group widgets under the 
> same umbrella : nothing says that is a profile "pizzayolo" will have access 
> to button A and B in a given solution implementation, the buttons A and B 
> will not be able to be accessed by the same profile for a second 
> implementation, each will require an independent condition. So I need a per 
> widget granularity of permissions.
>

So its a shared/common widget used by other views and depending on which 
view uses it the permissions are different? That might be a bit more 
complicated in an annotation based solution but should also be possible.

What I was wondering is, if you do that permission thing inside GWT's 
FieldWriter then isn't it annoying that you now must assume that all 
security relevant @UiFields may be null? So you must do quite a bit of null 
checks and deal with the fact that GWT developers normally think that a 
@UiField is never null and maybe tend to forget about that? 

-- J.

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


Re: extend UiBinder engine

2014-05-20 Thread Zied Hamdi OneView
Hi Joseph and Jens,

I didn't have the time to answer to your comments yesterday. 
 *Instead of @RequireRole("superAdmin") you would then use 
@RequirePermission("canMakePersonToAdmin") . *

It's pretty the same: my issue is that I cannot group widgets under the 
same umbrella : nothing says that is a profile "pizzayolo" will have access 
to button A and B in a given solution implementation, the buttons A and B 
will not be able to be accessed by the same profile for a second 
implementation, each will require an independent condition. So I need a per 
widget granularity of permissions.

Hi Joseph, 
* the same widget is retained in the DOM and reused many times for the sake 
of speed and conserving memory.*

this is not an issue since a user who doesn't have rights will consume less 
resources anyway. If he loggs in as a different profile with more 
permissions, the widgets will be created eagerly and conserved (this is the 
job of the ClientFactory which indirectly delegates the call to the 
UiBinder, so it is easy to invalidate widgets on logout, or completely 
reload the page)

Thanks again for your answers

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-19 Thread Zied Hamdi OneView
Hi Joseph and Jens,

Thanks again for your analysis and contributions. See you soon on this 
forum I hope :-)


Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-19 Thread Joseph Lust
Zied,

My apologies that my post was less than cogent. From you example, I thought 
you wanted some compile time enforcement of roles. Given your example 
UiBinder XML attribute:  *visible={roles.admin} *, that would imply 
foreknowledge of the roles at compile time given that *with* pulls in 
constant values/accessors into the Ui template. However, given your 
clarified need for a dynamic set of roles from your CMS, the roles wouldn't 
be known at compile time for inlining into that UI template. 

you should not forget GWT is a View technology, it is an HTML templating 
> engine. From this point of view, Jsp and GWT do the same: they create 
> HTML/js/css for the user's pleasure

GWT does indeed include a view framework, but very unlike JSP, there are 
many things GWT does not know at runtime that JSP does know. Given this, it 
is difficult to compile this knowledge ahead of time into the view, which 
is why I would suggest such logic be in the presenter.

To this end, I'm a fan of *dumb views*. All the GWT widgets have visibility 
methods and enable/disable methods where appropriate. Authorization is not 
one of their concerns. The view itself should not necessarily contain the 
logic for authorization and (IMHO) not the widget since is (typically) just 
a simple HTML element wrapper with the simple responsibility of putting 
tags in the DOM. For my applications this logic resides at the Presenter 
layer (using GWT Platform) and the presenter can take the proper action to 
secure the UI as needed, keeping the views simple.

the preferred solution is to work at the factory level: decide before 
> creating a widget if it will be useful or not: that's why I chose this 
> approach

For many GWT implementations such as single page applications with 
simulated browser history like GWTP (which may not apply to your case), the 
same widget is retained in the DOM and reused many times for the sake of 
speed and conserving memory. In that case, the fact that the widget was 
enabled/disabled at instantiation would prevent it's effective reuse for 
another user/use case. However, if your presenter had a *secureView( 
UserObj user)* or similar, your security delegate could properly secure the 
UI as needed on demand and not have to rerender the entire view.

mixing authorization inside the code is creating spaghetti code

You could have a central class, say* ViewAuthorizationProcessor* which 
presenters would delegate to and which could take the proper steps to 
secure a view, say *ViewAuthorizationProcessor* *#secureView( SecureView 
view, UserObj user)*. This would not be spaghetti code and would result in 
a minimum amount of classes and wouldn't need to change the core GWT 
generators or widgets. Using a simple authorization annotation, as Jen's 
mentioned, you would just mark those widgets in your your UiBinder Java 
file and everything else should work. Since your dynamic user roles would 
presumably be groups of existing authorizations (i.e. *canEditCMSPost*), 
this should work well as those could just be enum constants that are known 
at compile time.

Anyway, my code will work, I raised a bug only to complain that I had to 
> copy 20 classes instead of extending 1 class and overriding 1 method for 
> the job to get done.

I'm certain your code will work and will realize the desired business 
value. You're obviously a competent developer given your progress so far. 
There are many ways for you to skin this cat and I'm sure you'll find one.


Thanks again for you question and comments. I'm sure everyone's proposed 
solutions will be beneficial to others pursuing similar goals. I hope the 
above helps.


Sincerely,
Joseph

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


Re: extend UiBinder engine

2014-05-19 Thread Jens

>
> *@RequiresRole("superAdmin")*
> *@UiField*
> *CheckBox makeAdmin *
>
> this code is too specific for me: I'm creating a CMS and I cannot attach 
> hardcoded roles to my fields: each solution will make its own decision on 
> what fields are allowed for which profile.
>

Well ok. A CMS is permission based because users of your CMS can create 
their own roles. Instead of @RequireRole("superAdmin") you would then use 
@RequirePermission("canMakePersonToAdmin") . Then you check if a user has 
the permission.

We do the same for one of our apps. All permissions (the effective 
permissions as a user can have multiple roles defined by our customers) are 
embedded in our index.html file as JSON. The app loads this JSON and then 
has a userSession.hasPermission() to get the information. 
Then you only have to generate the glue code for configuring the view.

So this approach is possible for both situations: static roles or dynamic 
roles that pull in permissions of a static set of permissions defined by 
the app.

-- J.

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


Re: extend UiBinder engine

2014-05-19 Thread Zied Hamdi OneView
Just for other people who will visit this post:

Another less verbose way than you proposed Jens is to use the UiBinder 
 functionality with a regular pojo instance, then use
. this lets the view related aspects tied 
to the view template instead of mixing it in the code logic

This is the approach  I mentioned in the very first mail where I said I 
wouldn't use that approach

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-19 Thread Zied Hamdi OneView
Hi Jens and Joseph,

Thanks for your interest in the post.


Jens, I didn't comment your solution because it doesn't fulfill my needs: 

*@RequiresRole("superAdmin")*
*@UiField*
*CheckBox makeAdmin *

this code is too specific for me: I'm creating a CMS and I cannot attach 
hardcoded roles to my fields: each solution will make its own decision on 
what fields are allowed for which profile. In addition, I believe all 
security aspects should be kept outside of the main code: AOP is ideal 
because you don't want to add logic to the app, you only want to intercept 
a widget and say if it can be Viewed and/or Edited and maybe add some 
design hack, but you won't change the action that is tied to it or the 
information it displays. That's why I don't consider your proposition 
adequate for my needs

Joseph *"**GWT is not JSP"* really? :-p (joking :-) )
I understand your point of view but you should not forget GWT is a View 
technology, it is an HTML templating engine. From this point of view, Jsp 
and GWT do the same: they create HTML/js/css for the user's pleasure.
*"**However GWT code is compiled down before runtime, so there is no 
foreknowledge of whether a user will meet the needed security roles at that 
time"* : yes that's why the check has to be done in the generated code 
(where is exactly the issue?: it's always at render time that the security 
is evaluated, so in GWT I have to generate code that checks the security 
rules when executed: that's why I'm changing the Generator)

*"The proper way to do this is to have an initializer in your presenter 
that will take a user object and properly show/hide or enable/disable the 
components of interest at runtime display of your widget. "*
I don't agree with this statement neither since as I told before: mixing 
authorization inside the code is creating spaghetti code, it is better to 
either 

   - extend standard Widgets to include security checks and ask a central 
   engine if they can display (which I don't like since the widgets must be 
   created to check if they done well to exist at all)
   - the preferred solution is to work at the factory level: decide before 
   creating a widget if it will be useful or not: that's why I chose this 
   approach

Anyway, my code will work, I raised a bug only to complain that I had to 
copy 20 classes instead of extending 1 class and overriding 1 method for 
the job to get done. I'm thinking about compiling GWT locally for the 
project needs to have a cleaner solution's source code, publish my patch to 
GWT and wait until the next release to get back to the official version...

Anyway, thanks a lot for your interventions, this discussion is good to 
motivate the adoption of the patch (as I mentioned, there's an open bug for 
the purpose)


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


Re: extend UiBinder engine

2014-05-19 Thread Joseph Lust
Zied,

GWT is not JSP. In JSP you're rendering tiles/facets/pages on demand, so it 
makes sense to add authorization restrictions directly into the tags. 
However GWT code is compiled down before runtime, so there is no 
foreknowledge of whether a user will meet the needed security roles at that 
time.

The proper way to do this is to have an initializer in your presenter that 
will take a user object and properly show/hide or enable/disable the 
components of interest at runtime display of your widget. If you want 
something similar to to Spring's @Secured annotation drive approach, see 
what Jen's has proffered. I've done this for various clients and it works 
well. Otherwise, you'll be reinventing the wheel for no good reason.

Sincerely,
Joseph

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


Re: extend UiBinder engine

2014-05-19 Thread Jens

>
> Yeah thanks, I was too tired yesterday (after midnight), I didn't realize 
> I don't need to use initializer but rather add my code so that I can 
> dynamically decide whether I want the field to be created or not. I have my 
> answer thanks. I just thought more poeple had to deal with this 
> authorization issue and someone surely tried to solve it centrally. 
> Obviously it's not that common. When I'll have some time for fun I'll do 
> yet another open source for this purpose :)
>

As already said, it is far better do solve that problem without "hacking" 
GWT. In fact UiBinder is pretty strict and not really designed to be 
extendable because GWT does not want to stick itself to an API that is 
maybe not fully thought out. Thats why I said you probably have to replace 
the whole UiBinderGenerator class.

Personally I would use the setVisible() approach and generate code that 
handles that centrally for a given view, e.g. you could do:

@RequiresRole("superAdmin")
@UiField
CheckBox makeAdmin 

Then you generate a class MyView_Security next to your MyView UiBinder java 
file. That MyView_Security would have a method like

void secureView(MyView view, UserRolesRegistry userRoles) {
  if(! userRoles.hasRole("superAdmin") {
 view.makeAdmin.setVisible(false);
 // additional UiFields that require superAdmin role.
  }
}

Then MyView can call that method to "secure" itself based on user roles. 
That way you only need to add annotations to your @UiFields and the code 
needed will be generated either by a GWT generator or by using Java 
annotation processing.

-- J.

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


Re: extend UiBinder engine

2014-05-19 Thread Zied Hamdi OneView
https://code.google.com/p/google-web-toolkit/issues/detail?id=8727&thanks=8727&ts=1400490147

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-18 Thread Zied Hamdi OneView
Hi Jens,

Yeah thanks, I was too tired yesterday (after midnight), I didn't realize I 
don't need to use initializer but rather add my code so that I can 
dynamically decide whether I want the field to be created or not. I have my 
answer thanks. I just thought more poeple had to deal with this 
authorization issue and someone surely tried to solve it centrally. 
Obviously it's not that common. When I'll have some time for fun I'll do 
yet another open source for this purpose :)

thanks anyway

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-18 Thread Jens

>
> I visibly don't need to rewrite the UiBinderGenerator, there's space left 
> for non generating a field in com.google.gwt.uibinder.rebind.FieldWriter : 
> it's specified in the javadoc
>
> The weired thing is that I don't understand from the comment  *(In the 
> rare case that** you need a field not to be initialized, initialize it to 
> "null".)*
>
> what they want me to initialize to null: it's clearly visible in the 
> implementation 
> *com.google.gwt.uibinder.rebind.AbstractFieldWriter.write(IndentedWriter)*  
> that if initializer is null, the code generation defalts to GWT.create
>

The code always wants a field initializer. If you don't specify one then 
GWT.create() will be used to initialize a field. In some cases GWT.create() 
won't work because you don't have or don't want to use the default 
constructor, so you can define your own field initializer. Do a reference 
search on setInitializer to see who is doing so. 
The JavaDoc now says if you want to initialize a field to null, you must 
define an initializer and that initializer should init that field to null 
(e.g. setInitializer("null"))

-- J.

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


Re: extend UiBinder engine

2014-05-18 Thread Zied Hamdi OneView
Hi Jens,

Thanks for your answer, I didn't see you did.

I visibly don't need to rewrite the UiBinderGenerator, there's space left 
for non generating a field in com.google.gwt.uibinder.rebind.FieldWriter : 
it's specified in the javadoc

The weired thing is that I don't understand from the comment  *(In the rare 
case that** you need a field not to be initialized, initialize it to 
"null".)*

what they want me to initialize to null: it's clearly visible in the 
implementation 
*com.google.gwt.uibinder.rebind.AbstractFieldWriter.write(IndentedWriter)*  
that if initializer is null, the code generation defalts to GWT.create

 public void write(IndentedWriter w) throws UnableToCompleteException {
if (written) {
  return;
}

for (FieldWriter f : needs) {
  f.write(w);
}

if (initializer == null) {
  JClassType type = getInstantiableType();
  if (type != null) {
if ((type.isInterface() == null)
&& (type.findConstructor(new JType[0]) == null)) {
  logger.die(NO_DEFAULT_CTOR_ERROR, type.getQualifiedSourceName(),
  type.getName());
}
  }
}

if (null == initializer) {
  initializer = String.format("(%1$s) GWT.create(%1$s.class)",
  getQualifiedSourceName());
}


Le dimanche 18 mai 2014 23:22:23 UTC+1, Jens a écrit :
>
> You would need to extend (or even replace) UiBinderGenerator and then use 
> deferred binding like in UiBinder.gwt.xml to use your custom 
> UiBinderGenerator.
>
> However I would find it a lot easier to write an annotation processor that 
> generates a class next to your UiBinder java file and that contains the 
> code to setVisible(true/false) your UiFields.
>
> -- J.
>

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


Re: extend UiBinder engine

2014-05-18 Thread Zied Hamdi OneView
I also need to understand what means this part of the javadoc 
com.google.gwt.uibinder.rebind.FieldWriter:

 * A field can have a custom initialization statement, set via
 * {@link #setInitializer}. Without one it will be initialized via a
 * {@link com.google.gwt.core.client.GWT#create} call. (In the rare case 
that
 * you need a field not to be initialized, initialize it to "null".)

do I have to call setInitializer() with a null value param from 
com.google.gwt.uibinder.rebind.FieldManager.registerField(String, 
FieldWriter) ???

Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


Re: extend UiBinder engine

2014-05-18 Thread Jens
You would need to extend (or even replace) UiBinderGenerator and then use 
deferred binding like in UiBinder.gwt.xml to use your custom 
UiBinderGenerator.

However I would find it a lot easier to write an annotation processor that 
generates a class next to your UiBinder java file and that contains the 
code to setVisible(true/false) your UiFields.

-- J.

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


Re: extend UiBinder engine

2014-05-18 Thread Zied Hamdi OneView
Ok I found that I have to override the code of 
com.google.gwt.uibinder.rebind.AbstractFieldWriter.writeFieldDefinition(IndentedWriter,
 
TypeOracle, OwnerField, DesignTimeUtils, int, boolean)

I still have to investigate on how to replace the implementation class 
for com.google.gwt.uibinder.rebind.FieldWriter in the module xml file...



Le dimanche 18 mai 2014 22:01:33 UTC+1, Zied Hamdi OneView a écrit :
>
> Hi all,
>
> I have a special need in authorization where I want to control if UiBinder 
> will create or not a widget (I could use visibility visible={roles.admin} 
> in my widgets but I want a smarter solution).
>
> I'd like to use the info in ui:field at template parsing and decide 
> whether the field should be created or not: a central singleton will say if 
> yes or no, that element should be created.
>
> So is there an extension point where I can centrally intercept the 
> internal widget factory?
>
> If the idea is not clear, I'd like to extend a GWT class where I could 
> have a method somehow like
>
>  public  void createWidget( Class widgetClass, Widget parent, String 
> uiField ) 
>
> then rebind the default factory interface with mine in the module 
> definition.
>
>
>

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


extend UiBinder engine

2014-05-18 Thread Zied Hamdi OneView
Hi all,

I have a special need in authorization where I want to control if UiBinder 
will create or not a widget (I could use visibility visible={roles.admin} 
in my widgets but I want a smarter solution).

I'd like to use the info in ui:field at template parsing and decide whether 
the field should be created or not: a central singleton will say if yes or 
no, that element should be created.

So is there an extension point where I can centrally intercept the internal 
widget factory?

If the idea is not clear, I'd like to extend a GWT class where I could have 
a method somehow like

 public  void createWidget( Class widgetClass, Widget parent, String uiField
 ) 

then rebind the default factory interface with mine in the module 
definition.


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


Re: How to extend GWT Widgets and use them with Ui-Binder?

2013-01-03 Thread Andy Stevko
First step - need to add an import declaration for your CustomTree package







On Thu, Jan 3, 2013 at 4:18 AM, membersound  wrote:

> I'm creating a custom Tree component which extends the GWT Tree.
> But how can I use my custom tree with ui:binder??
>
> I tried the following which did not work:
>
> my custom tree:
> public class CustomTree extends Tree {
> public CustomTree() {
> //...
> }
> }
>
>
> MyPanel.ui.xml:
> 
> 
> 
>
>
> MyPanel.java:
> public class MyPanel extends Composite {
> @UiField
> CustomTree tree;
>
> public MyPanel() {
> initWidget(binder.createAndBindUi(this));
> //...
> }
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/KLwtm8XUaV8J.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
-- A. Stevko
===
"If everything seems under control, you're just not going fast enough." M.
Andretti

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



How to extend GWT Widgets and use them with Ui-Binder?

2013-01-03 Thread membersound
I'm creating a custom Tree component which extends the GWT Tree.
But how can I use my custom tree with ui:binder??

I tried the following which did not work:

my custom tree:
public class CustomTree extends Tree {
public CustomTree() {
//...
}
}


MyPanel.ui.xml:





MyPanel.java:
public class MyPanel extends Composite {
@UiField
CustomTree tree;

public MyPanel() {
initWidget(binder.createAndBindUi(this));
//...
}
}

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



Re: Extend GWT app without recompile

2012-11-18 Thread Joseph Lust
Sidney,

Yes, this is possible as I did with an application this year. I have a 
landing page (GWT) that has links to other available GWT applications 
(dynamic list loaded from server). This landing page acts as a frame 
(header/footer). The sub applications (each individually compiled as a 
separate GWT app) are loading into an iframe positioned in the middle of 
the page. Calls are made between the out and inner GWT applications using 
window.postMessage and JSON serializations and an interface.

Hope that helps.


Sincerely,
Joseph

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



Extend GWT app without recompile

2012-11-17 Thread sidney3172
Hello!

I've googled this question for some time with no luck.
The problem:
I have compiled gwt app. Is there any way to extend this application 
without recompile? Probably I can manually inject some ***.nocache.js 
script into running gwt page.
For example I have a launcher with some number of links/buttons (something 
like iCloud web interface start page). Each link refers to independent gwt 
application. But when user clicks some of the icons i want to load 
application within the same html file. Also I need to do some data exchange 
between these modules ( I mean I want pass some data from "launcher" to 
newly loaded module). Is this possible?

Thanks in advance!

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



Re: Extend RequestFactory to Make Use of None Primitive Types

2011-11-11 Thread hkropp
Thanks for your detailed explanation. It helped me understand RF and GWT a 
little better.

I ended up with a EmplyeeGWT class, which extends the MongoDB model but 
returns the ObjectId as String and parse the returned String to ObjectId. 
This seems to work. One restriction to our problem is also, that the model 
gets generated. The thing that bugs me is that I have an extra model and 
also an extra service just for GWT. We are thinking about making GWT use 
the JERSEY Service over RPC, but than we cant use the Objects on the client 
side. 
So far many thanks for the help.


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



Re: Extend RequestFactory to Make Use of None Primitive Types

2011-11-08 Thread Thomas Broyer
Yes; and no.

RF can use any object as the entity ID (returned by the getId method on 
your entity or locator) on the server side.
You cannot use ObjectId on the client-side, but you could map it as a 
ValueProxy; the only issue is that ObjectId is immutable, so you won't be 
able to pass an "ObjectIdProxy" to a method (as RF would have to 
reconstruct it on the server-side, which assumes the object is mutable), be 
it a setter on a proxy or a service method; but a getter or a 
service-method return value should be an issue.
If you do want to "set" an ObjectId on the client-side, your best bet would 
be to either marshall your ObjectId to a String (and yes, this has to be 
done "manually" everywhere you need it), or use a builder-pattern around an 
ObjectId on the server-side (mapped on the client-side as a ValueProxy; and 
yes, that also means using that ObjectIdBuilder everywhere instead of 
ObjectId).

Something like:

abstract class AbstractObjectId {
   public abstract int getTime();
   public abstract int getMachine();
   public abstract int getInc();
   public abstract void setTime(int time);
   public abstract void setMachine(int machine);
   public abstract void setInc(int inc);

   public abstract ObjectId asObjectId();
}

@ProxyFor(value=AbstractObjectId.class, locator=ObjectIdLocator.class)
interface ObjectIdProxy extends ValueProxy {
   // getters and setters for time, machine and inc
}

public class ObjectIdLocator extends Locator {
   public AbstractObjectId create(Class clazz) {
  return new ObjectIdBuilder();
   }
   
   public AbstractObjectId find(Class clazz, 
Void id) {
  throw new UnsupportedOperationException("should never be called for a 
ValueProxy");
   }
   // do the same as find() for all the other methods; only entities have 
ID and version.
}

class ObjectIdBuilder extends AbstractObjectId {
   private ObjectId objectId;
   private int time;
   private int machine;
   private int inc;

   // getters and setters, as usual

   public ObjectId asObjectId() {
  if (objectId == null) {
 objectId = new ObjectId(time, machine, inc);
  }
  return objectId;
   }
}

// use this on the server-side, to wrap an ObjectId so it can be sent to 
the client.
class ObjectIdWrapper extends AbstractObjectId {
   private final ObjectId objectId;
   public ObjectIdWrapper(ObjectId objectId) {
   this.objectId = objectId;
   }
   public int getTime() { return objectId.getTime(); }
   public void setTime(int time) { throw new 
UnsupportedOperationException(); }
   // similar for machine and inc

   public ObjectId asObjectId() { return objectId; }
}

Alternatively, you could use a single String property instead of the three 
'int' ones.

This approach is completely untested though. It'd IMO be much easier to add 
a pair of String-based accessors to the ID and map those in your proxies 
(leaving ObjectId entirely on the server side).

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



Re: Extend RequestFactory to Make Use of None Primitive Types

2011-11-08 Thread hkropp
Maybe describing my current problem with RF helps make things clear.

I want to use MongoDB for the Employee example. Now MongoDB is using 
org.bson.ObjectId as the PK instead of the primitive type Long for its 
objects.

So the question is, can I make RF use ObjectId?

thx

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



Re: Extend RequestFactory to Make Use of None Primitive Types

2011-11-07 Thread hkropp
Yes, but you cannot use only use primitive types with RF. See. 
http://code.google.com/intl/en-US/webtoolkit/doc/latest/DevGuideRequestFactory.html#transportable

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



Re: Extend RequestFactory to Make Use of None Primitive Types

2011-11-07 Thread Patrick Julien
RequestFactory is already over http.

If you're looking to shoot over a String, just use a String.  You can use, 
but don't recommend, DefaultProxyStore for this purpose which you can 
obtain from RequestFactory.

but again, RF is already over http

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



Extend RequestFactory to Make Use of None Primitive Types

2011-11-07 Thread hkropp
Hi,

is there a way to extend the RequestFactory to support none primitive 
types? For example a way to write modules which tell the RequestFactory how 
to de-/serialize the specific none primitive type to a String and vis 
versa, so it can be use over HTTP?

kind regards

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



Extend GWT-RPC protocol to support external protocols

2011-10-17 Thread Don Rudo
Hello, I'd like to extend GWT protocol in order be able the RPC
services to be reused by currently existing applications while
rewritting the front end applications.

Is this possible?

will this still keep the GAE server support for the GWT application?
(I would like to be using the google application servers)

where should I start from?

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



Why doesn't HasScrollHandlers extend HasHandlers?

2011-09-01 Thread Jim Douglas
This feels like a dumb question.  Is this an oversight, or is there a
reason why HasScrollHandlers is the only Has.*Handlers interface that
does not extend HasHandlers?

http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/event/dom/client/HasScrollHandlers.html
http://www.google.com/codesearch#A1edwVHBClQ/user/src/com/google/gwt/event/dom/client/HasScrollHandlers.java

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



Re: Extend GWT-RPC protocol to support AMF3 protocol

2011-08-22 Thread Alain Ekambi
Like Don said  the Flex module in the gwt4air project is not ment  for
existing Flex projects written in Action Script.
It s  for new Flex projects and for Java Developers willing to use Flex as
the UI technology of their projects.
By leveraging GWT there is no need to use stuff like BlaseDS, GraniteDS
etc...  because one can directly use the powerfull GWT backend APIs (RF,
RPC, Requestbuildere, etc..)

2011/8/21 Don Rudo 

> Thanks for the suggestion; I think gwt4air is for the client side;
> what we need is actually a way to make GWT RPC understand AMF3
> requests from already implemented clients, the actual JEE
> implementation is done at GraniteDS but it would make no sense to have
> it running for GWT adding all this extra overhead just for the AMF
> compatibility, the another solution would be to leave JEE and go for
> AMFPHP.
>
> But a good chance would be to extend the GWT protocol in order to have
> an RPC which understands the AMF3 requests without adding extra
> complexity to the project itself.
>
> Best regards,
> Carlos.
>
> On Aug 16, 1:27 pm, Juan Pablo Gardella 
> wrote:
> > Are you look gwt4air?
> >
> > 2011/8/16 Don Rudo 
> >
> >
> >
> >
> >
> >
> >
> > > Hello I'm looking for a way to extend the GWT-RPC protocol in order to
> > > make the RPC service able to be used from more products (more specific
> > > flex and flash products).
> >
> > > The intention is to be able to use GWT RPC for applications using the
> > > Action Message Format (AMF 3) which specification is open source and
> > > according to this benchmarks (
> > >http://www.jamesward.com/2007/04/30/ajax-and-flex-data-loading-benchm.
> ..
> > > )  it's a very efficient RPC protocol.
> >
> > > Best regards,
> >
> > > Carlos.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-toolkit@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 

GWT API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.appspot.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 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Extend GWT-RPC protocol to support AMF3 protocol

2011-08-21 Thread Don Rudo
Thanks for the suggestion; I think gwt4air is for the client side;
what we need is actually a way to make GWT RPC understand AMF3
requests from already implemented clients, the actual JEE
implementation is done at GraniteDS but it would make no sense to have
it running for GWT adding all this extra overhead just for the AMF
compatibility, the another solution would be to leave JEE and go for
AMFPHP.

But a good chance would be to extend the GWT protocol in order to have
an RPC which understands the AMF3 requests without adding extra
complexity to the project itself.

Best regards,
Carlos.

On Aug 16, 1:27 pm, Juan Pablo Gardella 
wrote:
> Are you look gwt4air?
>
> 2011/8/16 Don Rudo 
>
>
>
>
>
>
>
> > Hello I'm looking for a way to extend the GWT-RPC protocol in order to
> > make the RPC service able to be used from more products (more specific
> > flex and flash products).
>
> > The intention is to be able to use GWT RPC for applications using the
> > Action Message Format (AMF 3) which specification is open source and
> > according to this benchmarks (
> >http://www.jamesward.com/2007/04/30/ajax-and-flex-data-loading-benchm...
> > )  it's a very efficient RPC protocol.
>
> > Best regards,
>
> > Carlos.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: Extend GWT-RPC protocol to support AMF3 protocol

2011-08-16 Thread Juan Pablo Gardella
Are you look gwt4air?

2011/8/16 Don Rudo 

> Hello I'm looking for a way to extend the GWT-RPC protocol in order to
> make the RPC service able to be used from more products (more specific
> flex and flash products).
>
> The intention is to be able to use GWT RPC for applications using the
> Action Message Format (AMF 3) which specification is open source and
> according to this benchmarks (
> http://www.jamesward.com/2007/04/30/ajax-and-flex-data-loading-benchmarks/
> )  it's a very efficient RPC protocol.
>
> Best regards,
>
> Carlos.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Extend GWT-RPC protocol to support AMF3 protocol

2011-08-16 Thread Don Rudo
Hello I'm looking for a way to extend the GWT-RPC protocol in order to
make the RPC service able to be used from more products (more specific
flex and flash products).

The intention is to be able to use GWT RPC for applications using the
Action Message Format (AMF 3) which specification is open source and
according to this benchmarks ( 
http://www.jamesward.com/2007/04/30/ajax-and-flex-data-loading-benchmarks/
)  it's a very efficient RPC protocol.

Best regards,

Carlos.

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



Re: How to extend GWT Module to Dynamic Web Module with Maven?

2011-05-04 Thread sipungora
Thank you David.

But I'm not so smart to understand, how it help me
additionalProjectFacets with Maven to create. Can you explain me a
little bit more?

Thank you in advance.
Best Regards.
-sipungora

On 2 Mai, 20:52, David Chandler  wrote:
> Hi sipungora,
>
> This info is pretty outdated. With Google Plugin for Eclipse 2.x, you can
> simply Import | Existing maven project, point it to your POM, and the
> project will be configured correctly.
>
> Provided you have the correct POM, of course. Here are several you can look
> at:
>
> http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl...
> Maven project maintained by the GWT 
> team)http://code.google.com/p/listwidget/source/browse/trunk/pom.xml(simpler 
> POM
> for one of my own GWT+GAE projects not using Spring)
>
> /dmc
>
> There are several example POMs you can look at
>
>
>
>
>
>
>
>
>
> On Mon, May 2, 2011 at 2:11 PM, sipungora  wrote:
> > Hi,
>
> > My problem:
>
> > on the page:
>
> >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> > one explains how gwt-module can be extended to Dynamic Web Module in
> > order to be deploybar into eclipse tomcat. I've configured my pom so,
> > that item 3 will be done by maven.
>
> > 
> > 3. insert the following natures into your .project file (inside the
> > natures node):
>
> > org.eclipse.wst.common.modulecore.ModuleCoreNature
>
> > org.eclipse.wst.common.project.facet.core.nature
> >                org.eclipse.wst.jsdt.core.jsNature
>
> > 
> > But how can I configure pom for 7 and 8 items?
>
> > 
> > 6. right-click the project and select Properties -> Project Facets
> > 7. Check  'Java' and 'Dynamic Web Project'
> > 8. Click 'further configuration available' and change the Content
> > Directory to 'war', to align with GWT's output
>
> > 
>
> > This is my configuration:
>
> >                        
> >                                org.apache.maven.plugins > groupId>
> >                                maven-eclipse-plugin > artifactId>
> >                                2.8
> >                                
> >                                        
>
> > org.eclipse.jdt.core.javabuilder
> >                                                
>
> > com.google.gdt.eclipse.core.webAppProjectValidator
> >                                                
>
> > com.google.gwt.eclipse.core.gwtProjectValidator
> >                                                
> >                                        
> >                                        
>
> > org.eclipse.jdt.core.javanature
> >                                                
>
> > com.google.gwt.eclipse.core.gwtNature
> >                                                
>
> > org.eclipse.wst.common.modulecore.ModuleCoreNature
> >                                                
>
> > org.eclipse.wst.common.project.facet.core.nature
> >                                                
>
> > org.eclipse.wst.jsdt.core.jsNature
> >                                                
> >                                        
>
> >                                        
>
> > com.google.gwt.eclipse.core.GWT_CONTAINER
> >                                                
>
> > org.eclipse.jdt.launching.JRE_CONTAINER
> >                                                
> >                                        
> >                                        
> >                                                6.0 > jst.java>
> >                                                2.4
> >                                        additionalProjectFacets>
>
> >                                
> >                        
>
> > But additionalProjectFacets have no effect.
> > If I do items 7 and 8 manually as it was described, the file
> > org.eclipse.wst.common.project.facet.core.xml will be created. Its
> > content is
>
> > 
> > 
> >  
> >  
> > 
>
> > But unfortunately this file will not be created by maven (I build with
> > "mvn eclipse:eclipse").
>
> > This was item 7.
>
> > About item 8 I have no ideas yet (I mean the build with maven).
>
> > Thanks in advance.
> > Best Regards.
> > -sipungora
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> David Chandler
> Developer Programs Engineer, Google Web Toolkit
> w:http://code.google.com/
> b:http://googlewebtoo

Re: How to extend GWT Module to Dynamic Web Module with Maven?

2011-05-02 Thread David Chandler
Hi sipungora,

This info is pretty outdated. With Google Plugin for Eclipse 2.x, you can
simply Import | Existing maven project, point it to your POM, and the
project will be configured correctly.

Provided you have the correct POM, of course. Here are several you can look
at:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/expenses/pom.xml(GWT+GAE
Maven project maintained by the GWT team)
http://code.google.com/p/listwidget/source/browse/trunk/pom.xml (simpler POM
for one of my own GWT+GAE projects not using Spring)

/dmc

There are several example POMs you can look at

On Mon, May 2, 2011 at 2:11 PM, sipungora  wrote:

> Hi,
>
> My problem:
>
> on the page:
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910?pli=1
>
> one explains how gwt-module can be extended to Dynamic Web Module in
> order to be deploybar into eclipse tomcat. I've configured my pom so,
> that item 3 will be done by maven.
>
>
> 
> 3. insert the following natures into your .project file (inside the
> natures node):
>
> org.eclipse.wst.common.modulecore.ModuleCoreNature
>
> org.eclipse.wst.common.project.facet.core.nature
>org.eclipse.wst.jsdt.core.jsNature
>
> 
> But how can I configure pom for 7 and 8 items?
>
>
> 
> 6. right-click the project and select Properties -> Project Facets
> 7. Check  'Java' and 'Dynamic Web Project'
> 8. Click 'further configuration available' and change the Content
> Directory to 'war', to align with GWT's output
>
> 
>
> This is my configuration:
>
>
>
>org.apache.maven.plugins groupId>
>maven-eclipse-plugin artifactId>
>2.8
>
>
>
> org.eclipse.jdt.core.javabuilder
>
>
> com.google.gdt.eclipse.core.webAppProjectValidator
>
>
> com.google.gwt.eclipse.core.gwtProjectValidator
>
>
>
>
> org.eclipse.jdt.core.javanature
>
>
> com.google.gwt.eclipse.core.gwtNature
>
>
> org.eclipse.wst.common.modulecore.ModuleCoreNature
>
>
> org.eclipse.wst.common.project.facet.core.nature
>
>
> org.eclipse.wst.jsdt.core.jsNature
>
>
>
>
>
> com.google.gwt.eclipse.core.GWT_CONTAINER
>
>
> org.eclipse.jdt.launching.JRE_CONTAINER
>
>
>
>6.0 jst.java>
>2.4
>additionalProjectFacets>
>
>
>
>
> But additionalProjectFacets have no effect.
> If I do items 7 and 8 manually as it was described, the file
> org.eclipse.wst.common.project.facet.core.xml will be created. Its
> content is
>
> 
> 
>  
>  
> 
>
> But unfortunately this file will not be created by maven (I build with
> "mvn eclipse:eclipse").
>
> This was item 7.
>
> About item 8 I have no ideas yet (I mean the build with maven).
>
> Thanks in advance.
> Best Regards.
> -sipungora
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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

How to extend GWT Module to Dynamic Web Module with Maven?

2011-05-02 Thread sipungora
Hi,

My problem:

on the page:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910?pli=1

one explains how gwt-module can be extended to Dynamic Web Module in
order to be deploybar into eclipse tomcat. I've configured my pom so,
that item 3 will be done by maven.


3. insert the following natures into your .project file (inside the
natures node):
 
org.eclipse.wst.common.modulecore.ModuleCoreNature
 
org.eclipse.wst.common.project.facet.core.nature
org.eclipse.wst.jsdt.core.jsNature

But how can I configure pom for 7 and 8 items?


6. right-click the project and select Properties -> Project Facets
7. Check  'Java' and 'Dynamic Web Project'
8. Click 'further configuration available' and change the Content
Directory to 'war', to align with GWT's output


This is my configuration:



org.apache.maven.plugins
maven-eclipse-plugin
2.8


 
org.eclipse.jdt.core.javabuilder

 
com.google.gdt.eclipse.core.webAppProjectValidator

 
com.google.gwt.eclipse.core.gwtProjectValidator



 
org.eclipse.jdt.core.javanature

 
com.google.gwt.eclipse.core.gwtNature

 
org.eclipse.wst.common.modulecore.ModuleCoreNature

 
org.eclipse.wst.common.project.facet.core.nature

 
org.eclipse.wst.jsdt.core.jsNature




 
com.google.gwt.eclipse.core.GWT_CONTAINER

 
org.eclipse.jdt.launching.JRE_CONTAINER



6.0
2.4
additionalProjectFacets>




But additionalProjectFacets have no effect.
If I do items 7 and 8 manually as it was described, the file
org.eclipse.wst.common.project.facet.core.xml will be created. Its
content is



  
  


But unfortunately this file will not be created by maven (I build with
"mvn eclipse:eclipse").

This was item 7.

About item 8 I have no ideas yet (I mean the build with maven).

Thanks in advance.
Best Regards.
-sipungora

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



Re: How to extend gwt designer

2011-03-17 Thread Eric Clayberg
The core of GWT Designer is an Eclipse open source project called
"WindowBuilder". Source for WindowBuilder is available at Eclipse.org,
if you want to look at any of the extension points in detail.

You should also look at the following two PDF files in the docs...

http://code.google.com/webtoolkit/tools/gwtdesigner/NewComponentsTutorial.pdf

http://code.google.com/webtoolkit/tools/gwtdesigner/DesignerCustomizationAPI.pdf

On Mar 16, 8:00 am, Oussema Gabtni  wrote:
> Hello :)
> I'm working in a project to create an eclipse plugin which extend the
> gwt designer plugin.
> I learned how to manipulate eclipse plugin but i don't know how to use
> extension points of gwt designer
> How can i do that? What are the steps to follow?
> Is gwt designer open source?
> Thanks for all
>
> --
> Oussema GABTNI
> Étudiant ingénieur à la Faculté des Sciences de Tunis

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



How to extend gwt designer

2011-03-16 Thread Oussema Gabtni
Hello :)
I'm working in a project to create an eclipse plugin which extend the
gwt designer plugin.
I learned how to manipulate eclipse plugin but i don't know how to use
extension points of gwt designer
How can i do that? What are the steps to follow?
Is gwt designer open source?
Thanks for all

-- 
Oussema GABTNI
Étudiant ingénieur à la Faculté des Sciences de Tunis

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



Re: Sending Generic Parameters (that extend Serializable Interface) in Rpc methods

2011-03-07 Thread Ali Jalal
I should correct my post:

This problem does not occur accidentally. It occurs when IdClass is
String and does not occur when IdClass is Long.


On Mar 7, 3:07 pm, Ali Jalal  wrote:
> Hi,
>
> I see a problem twice in my project. I have these three base
> interfaces and class:
>
> public interface BaseModelServiceAsync,
> IdClass extends Serializable> {
>
>         public void load(IdClass id, AsyncCallback callback);
>
> }
>
> public interface BaseModelService,
> IdClass extends Serializable> extends RemoteService {
>
>         public M load(IdClass id);
>
> }
>
> public class BaseModelServiceImpl,
> IdClass extends Serializable> extends RemoteServiceServlet
>                 implements BaseModelService {
>
>         public M load(IdClass id) {
>                 M model = 
>                 return model;
>         }
>
> }
>
> and I have these three sub-interfaces and sub-class:
>
> public interface AuthorServiceAsync extends
> BaseModelServiceAsync {
>
> }
>
> public interface AuthorService extends BaseModelService String> {
>
> }
>
> public class AuthorServiceImpl extends
> BaseModelServiceImpl implements AuthorService {
>
> }
>
> You can see that IdClass is a Generic parameter that extends
> java.io.Serializable and I use this Genetic parameter as first
> parameter of load method.
>
> Now, in some ambiguous (!) situations when I call load method for id
> '12' in client side, I get this error:
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
> java.lang.ClassNotFoundException: 12 at
> com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:308)
> .
> Caused by: com.google.gwt.user.client.rpc.SerializationException:
> java.lang.ClassNotFoundException: 12 at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
> 567)
>         at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
> 119)
> .
> Caused by: java.lang.ClassNotFoundException: 12
>
> It seems that GWT serialization mechanism "fails" when we use generic
> parameters in rpc method's arguments and generic parameters extends an
> interface (like java.io.Serializable). In previous errors,
> serialization mechanism considers '12' (first argumant of load method)
> as Class name of first argument of load method.
>
> Note that this errors will not always occur (for example if we change
> 'Author' to 'Book' in above sub-interfaces and sub-class, errors will
> disappeared (!)).
>
> A simple solution for this problem is that we override load method in
> sub-interfaces and sub-class and ignore generic advantages, but it is
> not so good.
>
> I want to now that it is some bugs in GWT or it is some mis-usage of
> GWT?
>
> With many thanks.
> Ali Jalal

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



Sending Generic Parameters (that extend Serializable Interface) in Rpc methods

2011-03-07 Thread Ali Jalal
Hi,

I see a problem twice in my project. I have these three base
interfaces and class:

public interface BaseModelServiceAsync,
IdClass extends Serializable> {

public void load(IdClass id, AsyncCallback callback);

}

public interface BaseModelService,
IdClass extends Serializable> extends RemoteService {

public M load(IdClass id);
}

public class BaseModelServiceImpl,
IdClass extends Serializable> extends RemoteServiceServlet
implements BaseModelService {

public M load(IdClass id) {
M model = 
return model;
}

}

and I have these three sub-interfaces and sub-class:

public interface AuthorServiceAsync extends
BaseModelServiceAsync {
}

public interface AuthorService extends BaseModelService {
}

public class AuthorServiceImpl extends
BaseModelServiceImpl implements AuthorService {
}

You can see that IdClass is a Generic parameter that extends
java.io.Serializable and I use this Genetic parameter as first
parameter of load method.

Now, in some ambiguous (!) situations when I call load method for id
'12' in client side, I get this error:
com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
java.lang.ClassNotFoundException: 12 at
com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:308)
.
Caused by: com.google.gwt.user.client.rpc.SerializationException:
java.lang.ClassNotFoundException: 12 at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
567)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
119)
.
Caused by: java.lang.ClassNotFoundException: 12

It seems that GWT serialization mechanism "fails" when we use generic
parameters in rpc method's arguments and generic parameters extends an
interface (like java.io.Serializable). In previous errors,
serialization mechanism considers '12' (first argumant of load method)
as Class name of first argument of load method.

Note that this errors will not always occur (for example if we change
'Author' to 'Book' in above sub-interfaces and sub-class, errors will
disappeared (!)).

A simple solution for this problem is that we override load method in
sub-interfaces and sub-class and ignore generic advantages, but it is
not so good.

I want to now that it is some bugs in GWT or it is some mis-usage of
GWT?

With many thanks.
Ali Jalal

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



How to extend the gwt designer plugin ?

2011-02-24 Thread Oussema Gabtni
Hello :)
I'm working in a project to create an eclipse plugin which extend the
gwt designer plugin.
I learned how to manipulate eclipse plugin but i don't know how to use
extension points of gwt designer
How can i do that? What are the steps to follow?
Thanks for all

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



Server-side Code and extend problem..

2011-01-23 Thread jhpark
sorry I can't write English..


-- server side code
A_ServiceImpl implements A_NetworkService

A_ServiceImle total line : 1200line..


so..

I want..

B_ServiceImple exends A_SerivceImpl.


But.
rpc call.  invoke Error..


 [ERROR] [bakew] Invoke Error
com.google.gwt.user.client.rpc.StatusCodeException: 500 


Error 500 INTERNAL_SERVER_ERROR

HTTP ERROR: 500INTERNAL_SERVER_ERROR
RequestURI=/bakew/windupCaused by:java.lang.InstantiationException
at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown
Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:
339)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
463)


~~
~~
~~

at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
192)
at
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
287)
at com.google.gwt.http.client.RequestBuilder
$1.onReadyStateChange(RequestBuilder.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

~~
~~
~~



impossible ???

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



Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-15 Thread Jeff Schwartz
Done!

Just a side note and slightly off topic and I hope you forgive me but every
time I have to do one of these large, multi file code changes in a Web
application I break into a sweat. I can't even begin to count the number of
times I thought I had captured all the places in my html, javascript and css
files where I needed to make changes and only found during testing that I
missed a lot. Refactoring traditional web apps is, well it's a nightmare to
put it mildly. However, implementing this multi file change to my GWT
project was nothing like that and in fact it was the total opposite. Eclipse
Java refactoring support is really quite excellent and this really drove
home the point of how convenient GWT makes Web development. So my thanks
goes out to Google and all the GWT team members for creating and maintaining
an awesome product. IMHO GWT isn't evolutionary, it is revolutionary.

Jeff

On Fri, Jan 14, 2011 at 5:23 PM, Jeff Schwartz wrote:

> I made up my mind and did that hurt lol :).
>
> Even though extending ServiceInterfaceProxyGenerator is rather trivial it
> might be overkill for my initial needs which extending AsyncCallback can
> easily provide and I can alway extend ServiceInterfaceProxyGenerator at some
> later point anyway.
>
> So my AsyncCallback will not only handle common exceptions in onFailure but
> it will also allow me to eliminate having to override onFailure 99.99% of
> the time making the code much more concise and readable.
>
> Thanks,
> Jeff
>
>
> On Fri, Jan 14, 2011 at 3:48 PM, Jeff Schwartz wrote:
>
>> Hi David,
>>
>> So far I have 146 and I am no where even nearly having a fully implemented
>> application.
>>
>> Eclipse's refactoring definitely would ease the pain if I go with
>> extending AsyncCallback :)
>>
>> Regarding extending ServiceInterfaceProxyGenerator, I've looked at the
>> code and it doesn't appear to be that big of a deal to implement the
>> generator which just outputs strings. One drawback to it though is if the
>> api changes but I guess the same thing can be said for extending
>> AsyncCallback as well.
>>
>> Gee, I am still on the fence over which way to go. I gather from your
>> feedback then that if it were your decision to make you'd go with
>> AsyncCallback.
>>
>> Jeff
>>
>>
>> On Fri, Jan 14, 2011 at 2:17 PM, David Chandler 
>> wrote:
>>
>>> Hi Jeff,
>>>
>>> You must have a LOT of AsyncCallbacks in order to make it worth the pain
>>> of modifying generator code :-) Extending AsyncCallback is the technique
>>> most people use and makes sense as it's clearly application code.
>>>
>>> Perhaps one of the Eclipse refactoring tools can ease the pain?
>>>
>>> /dmc
>>>
>>> On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz >> > wrote:
>>>
>>>> I want to implement common error handling in all of my RPC onFailure
>>>> methods. Excluding repeating the error handling code in every invocation I
>>>> can either 1) extend AsyncCallback and use it in all my invocations or I 
>>>> can
>>>> 2) extend ServiceInterfaceProxyGenerator and have it generate an
>>>> implementation of AsyncCallback for me that would include my common error
>>>> handling. As I already have a lot of RPC calls using the normal
>>>> AsyncCallback so using option 1 would obviously require refactoring a lot 
>>>> of
>>>> code. In contrast, were I to use option 2 there would be no refactoring
>>>> required.
>>>>
>>>> Perhaps the solution seems obvious, which is to use option 2, but I am
>>>> hoping that you can provide feedback on both of these options and perhaps
>>>> illuminate any potential problems with either before I commit to one or the
>>>> other.
>>>>
>>>> Thanks a lot for your feedback.
>>>>
>>>> --
>>>> *Jeff Schwartz*
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google Web Toolkit" group.
>>>> To post to this group, send email to
>>>> google-web-toolkit@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> google-web-toolkit+unsubscr...@googlegroups.com
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> David Chandler
>>> Developer 

Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread Jeff Schwartz
You must have been reading my mind because your reply arrived as soon as I
posted my decision. I am a devout believer in Karma and as we know it is
nothing to sneeze at; my luck, I'd get hit in the head by a 600 page hard
covered book dedicated to DotNot web development falling from an elevated
train station.

Thanks, Ben.

Jeff

On Fri, Jan 14, 2011 at 5:20 PM, Ben Imp  wrote:

> I'd recommend simply extending the AsyncCallback.  Its undoubtedly
> more work up front, but its also not a hack, which is a Good Thing.
> Its easy to understand, and future maintainers of the program will
> thank you for that.  Also, karma will likely stab you in the eye if
> you don't.
>
> -Ben
>
> On Jan 14, 2:48 pm, Jeff Schwartz  wrote:
> > Hi David,
> >
> > So far I have 146 and I am no where even nearly having a fully
> implemented
> > application.
> >
> > Eclipse's refactoring definitely would ease the pain if I go with
> extending
> > AsyncCallback :)
> >
> > Regarding extending ServiceInterfaceProxyGenerator, I've looked at the
> code
> > and it doesn't appear to be that big of a deal to implement the generator
> > which just outputs strings. One drawback to it though is if the api
> changes
> > but I guess the same thing can be said for extending AsyncCallback as
> well.
> >
> > Gee, I am still on the fence over which way to go. I gather from your
> > feedback then that if it were your decision to make you'd go with
> > AsyncCallback.
> >
> > Jeff
> >
> > On Fri, Jan 14, 2011 at 2:17 PM, David Chandler  >wrote:
> >
> >
> >
> > > Hi Jeff,
> >
> > > You must have a LOT of AsyncCallbacks in order to make it worth the
> pain of
> > > modifying generator code :-) Extending AsyncCallback is the technique
> most
> > > people use and makes sense as it's clearly application code.
> >
> > > Perhaps one of the Eclipse refactoring tools can ease the pain?
> >
> > > /dmc
> >
> > > On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz <
> jefftschwa...@gmail.com>wrote:
> >
> > >> I want to implement common error handling in all of my RPC onFailure
> > >> methods. Excluding repeating the error handling code in every
> invocation I
> > >> can either 1) extend AsyncCallback and use it in all my invocations or
> I can
> > >> 2) extend ServiceInterfaceProxyGenerator and have it generate an
> > >> implementation of AsyncCallback for me that would include my common
> error
> > >> handling. As I already have a lot of RPC calls using the normal
> > >> AsyncCallback so using option 1 would obviously require refactoring a
> lot of
> > >> code. In contrast, were I to use option 2 there would be no
> refactoring
> > >> required.
> >
> > >> Perhaps the solution seems obvious, which is to use option 2, but I am
> > >> hoping that you can provide feedback on both of these options and
> perhaps
> > >> illuminate any potential problems with either before I commit to one
> or the
> > >> other.
> >
> > >> Thanks a lot for your feedback.
> >
> > >> --
> > >> *Jeff Schwartz*
> >
> > >>  --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Google Web Toolkit" group.
> > >> To post to this group, send email to
> google-web-toolkit@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> google-web-toolkit+unsubscr...@googlegroups.com
> 
> >
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> > > --
> > > David Chandler
> > > Developer Programs Engineer, Google Web Toolkit
> > > w:http://code.google.com/
> > > b:http://googlewebtoolkit.blogspot.com/
> > > t: @googledevtools
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-toolkit@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> > --
> > *Jeff Schwartz*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
*Jeff Schwartz*

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



Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread Jeff Schwartz
I made up my mind and did that hurt lol :).

Even though extending ServiceInterfaceProxyGenerator is rather trivial it
might be overkill for my initial needs which extending AsyncCallback can
easily provide and I can alway extend ServiceInterfaceProxyGenerator at some
later point anyway.

So my AsyncCallback will not only handle common exceptions in onFailure but
it will also allow me to eliminate having to override onFailure 99.99% of
the time making the code much more concise and readable.

Thanks,
Jeff

On Fri, Jan 14, 2011 at 3:48 PM, Jeff Schwartz wrote:

> Hi David,
>
> So far I have 146 and I am no where even nearly having a fully implemented
> application.
>
> Eclipse's refactoring definitely would ease the pain if I go with extending
> AsyncCallback :)
>
> Regarding extending ServiceInterfaceProxyGenerator, I've looked at the code
> and it doesn't appear to be that big of a deal to implement the generator
> which just outputs strings. One drawback to it though is if the api changes
> but I guess the same thing can be said for extending AsyncCallback as well.
>
> Gee, I am still on the fence over which way to go. I gather from your
> feedback then that if it were your decision to make you'd go with
> AsyncCallback.
>
> Jeff
>
>
> On Fri, Jan 14, 2011 at 2:17 PM, David Chandler wrote:
>
>> Hi Jeff,
>>
>> You must have a LOT of AsyncCallbacks in order to make it worth the pain
>> of modifying generator code :-) Extending AsyncCallback is the technique
>> most people use and makes sense as it's clearly application code.
>>
>> Perhaps one of the Eclipse refactoring tools can ease the pain?
>>
>> /dmc
>>
>> On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz 
>> wrote:
>>
>>> I want to implement common error handling in all of my RPC onFailure
>>> methods. Excluding repeating the error handling code in every invocation I
>>> can either 1) extend AsyncCallback and use it in all my invocations or I can
>>> 2) extend ServiceInterfaceProxyGenerator and have it generate an
>>> implementation of AsyncCallback for me that would include my common error
>>> handling. As I already have a lot of RPC calls using the normal
>>> AsyncCallback so using option 1 would obviously require refactoring a lot of
>>> code. In contrast, were I to use option 2 there would be no refactoring
>>> required.
>>>
>>> Perhaps the solution seems obvious, which is to use option 2, but I am
>>> hoping that you can provide feedback on both of these options and perhaps
>>> illuminate any potential problems with either before I commit to one or the
>>> other.
>>>
>>> Thanks a lot for your feedback.
>>>
>>> --
>>> *Jeff Schwartz*
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to google-web-toolkit@googlegroups.com
>>> .
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>
>>
>>
>> --
>> David Chandler
>> Developer Programs Engineer, Google Web Toolkit
>> w: http://code.google.com/
>> b: http://googlewebtoolkit.blogspot.com/
>> t: @googledevtools
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>
>
> --
> *Jeff Schwartz*
>
>


-- 
*Jeff Schwartz*

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



Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread Ben Imp
I'd recommend simply extending the AsyncCallback.  Its undoubtedly
more work up front, but its also not a hack, which is a Good Thing.
Its easy to understand, and future maintainers of the program will
thank you for that.  Also, karma will likely stab you in the eye if
you don't.

-Ben

On Jan 14, 2:48 pm, Jeff Schwartz  wrote:
> Hi David,
>
> So far I have 146 and I am no where even nearly having a fully implemented
> application.
>
> Eclipse's refactoring definitely would ease the pain if I go with extending
> AsyncCallback :)
>
> Regarding extending ServiceInterfaceProxyGenerator, I've looked at the code
> and it doesn't appear to be that big of a deal to implement the generator
> which just outputs strings. One drawback to it though is if the api changes
> but I guess the same thing can be said for extending AsyncCallback as well.
>
> Gee, I am still on the fence over which way to go. I gather from your
> feedback then that if it were your decision to make you'd go with
> AsyncCallback.
>
> Jeff
>
> On Fri, Jan 14, 2011 at 2:17 PM, David Chandler wrote:
>
>
>
> > Hi Jeff,
>
> > You must have a LOT of AsyncCallbacks in order to make it worth the pain of
> > modifying generator code :-) Extending AsyncCallback is the technique most
> > people use and makes sense as it's clearly application code.
>
> > Perhaps one of the Eclipse refactoring tools can ease the pain?
>
> > /dmc
>
> > On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz 
> > wrote:
>
> >> I want to implement common error handling in all of my RPC onFailure
> >> methods. Excluding repeating the error handling code in every invocation I
> >> can either 1) extend AsyncCallback and use it in all my invocations or I 
> >> can
> >> 2) extend ServiceInterfaceProxyGenerator and have it generate an
> >> implementation of AsyncCallback for me that would include my common error
> >> handling. As I already have a lot of RPC calls using the normal
> >> AsyncCallback so using option 1 would obviously require refactoring a lot 
> >> of
> >> code. In contrast, were I to use option 2 there would be no refactoring
> >> required.
>
> >> Perhaps the solution seems obvious, which is to use option 2, but I am
> >> hoping that you can provide feedback on both of these options and perhaps
> >> illuminate any potential problems with either before I commit to one or the
> >> other.
>
> >> Thanks a lot for your feedback.
>
> >> --
> >> *Jeff Schwartz*
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" group.
> >> To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-web-toolkit+unsubscr...@googlegroups.com
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > David Chandler
> > Developer Programs Engineer, Google Web Toolkit
> > w:http://code.google.com/
> > b:http://googlewebtoolkit.blogspot.com/
> > t: @googledevtools
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> *Jeff Schwartz*

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



Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread Jeff Schwartz
Hi David,

So far I have 146 and I am no where even nearly having a fully implemented
application.

Eclipse's refactoring definitely would ease the pain if I go with extending
AsyncCallback :)

Regarding extending ServiceInterfaceProxyGenerator, I've looked at the code
and it doesn't appear to be that big of a deal to implement the generator
which just outputs strings. One drawback to it though is if the api changes
but I guess the same thing can be said for extending AsyncCallback as well.

Gee, I am still on the fence over which way to go. I gather from your
feedback then that if it were your decision to make you'd go with
AsyncCallback.

Jeff

On Fri, Jan 14, 2011 at 2:17 PM, David Chandler wrote:

> Hi Jeff,
>
> You must have a LOT of AsyncCallbacks in order to make it worth the pain of
> modifying generator code :-) Extending AsyncCallback is the technique most
> people use and makes sense as it's clearly application code.
>
> Perhaps one of the Eclipse refactoring tools can ease the pain?
>
> /dmc
>
> On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz 
> wrote:
>
>> I want to implement common error handling in all of my RPC onFailure
>> methods. Excluding repeating the error handling code in every invocation I
>> can either 1) extend AsyncCallback and use it in all my invocations or I can
>> 2) extend ServiceInterfaceProxyGenerator and have it generate an
>> implementation of AsyncCallback for me that would include my common error
>> handling. As I already have a lot of RPC calls using the normal
>> AsyncCallback so using option 1 would obviously require refactoring a lot of
>> code. In contrast, were I to use option 2 there would be no refactoring
>> required.
>>
>> Perhaps the solution seems obvious, which is to use option 2, but I am
>> hoping that you can provide feedback on both of these options and perhaps
>> illuminate any potential problems with either before I commit to one or the
>> other.
>>
>> Thanks a lot for your feedback.
>>
>> --
>> *Jeff Schwartz*
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>
>
> --
> David Chandler
> Developer Programs Engineer, Google Web Toolkit
> w: http://code.google.com/
> b: http://googlewebtoolkit.blogspot.com/
> t: @googledevtools
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
*Jeff Schwartz*

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



Re: Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread David Chandler
Hi Jeff,

You must have a LOT of AsyncCallbacks in order to make it worth the pain of
modifying generator code :-) Extending AsyncCallback is the technique most
people use and makes sense as it's clearly application code.

Perhaps one of the Eclipse refactoring tools can ease the pain?

/dmc

On Fri, Jan 14, 2011 at 10:08 AM, Jeff Schwartz wrote:

> I want to implement common error handling in all of my RPC onFailure
> methods. Excluding repeating the error handling code in every invocation I
> can either 1) extend AsyncCallback and use it in all my invocations or I can
> 2) extend ServiceInterfaceProxyGenerator and have it generate an
> implementation of AsyncCallback for me that would include my common error
> handling. As I already have a lot of RPC calls using the normal
> AsyncCallback so using option 1 would obviously require refactoring a lot of
> code. In contrast, were I to use option 2 there would be no refactoring
> required.
>
> Perhaps the solution seems obvious, which is to use option 2, but I am
> hoping that you can provide feedback on both of these options and perhaps
> illuminate any potential problems with either before I commit to one or the
> other.
>
> Thanks a lot for your feedback.
>
> --
> *Jeff Schwartz*
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



Extend AsyncCallback or ServiceInterfaceProxyGenerator

2011-01-14 Thread Jeff Schwartz
I want to implement common error handling in all of my RPC onFailure
methods. Excluding repeating the error handling code in every invocation I
can either 1) extend AsyncCallback and use it in all my invocations or I can
2) extend ServiceInterfaceProxyGenerator and have it generate an
implementation of AsyncCallback for me that would include my common error
handling. As I already have a lot of RPC calls using the normal
AsyncCallback so using option 1 would obviously require refactoring a lot of
code. In contrast, were I to use option 2 there would be no refactoring
required.

Perhaps the solution seems obvious, which is to use option 2, but I am
hoping that you can provide feedback on both of these options and perhaps
illuminate any potential problems with either before I commit to one or the
other.

Thanks a lot for your feedback.

-- 
*Jeff Schwartz*

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread Mike Guo
it's already in a docklayoutpanle:












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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread nino ekambi
found it
thx

2010/12/25 zixzigma 

> nino,
> its to the right side of the main page.
>
> see here: http://oi53.tinypic.com/2hnvwno.jpg
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread zixzigma
nino,
its to the right side of the main page.

see here: http://oi53.tinypic.com/2hnvwno.jpg

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread nino ekambi
Off topic question guys :)
How  do i access the new google group ?

Greets,

Alain

2010/12/25 Matthew Hill 

> Oops, sorry.
>
> Maybe try putting it in a dock layout panel?
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread Matthew Hill
Oops, sorry.

Maybe try putting it in a dock layout panel?

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread Mike Guo
yes i said in my question i followed the cellList example, but they are 
different: cellList has a fixed height which make it scroll. my question is 
how to make the table *occupy the center page* just like google group center 
view does, rather than a fixed height. 
do i make it clear?

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



Re: how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread Matthew Hill
You could use a CellList. 

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

That example has the exact behavior that you're looking for.

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



how to make table auto-extend, just like new google group UI 's content view?

2010-12-25 Thread Mike
hi all:
 if you are using the new version of google group now, you must be feeling 
that it's much much more comfortable than the old ones, it's just like a 
desktop app with wonderful user experience.
i'm more interested in the auto-extend cellList, i.e. if  the scrollbar hit 
the end it display more content automatically, i'm trying to add this 
feature to my own application, now i can impl the auto-extend function 
follow by the cellList example, but stuck at the UI layout: 

.scrollable {
height: 100%;
width: 100%;
border: 0px solid #ccc;
text-align: left;
position:relative;
}





the HTMLPanel still has outer HTMLPanel which wrap it, it's style is:
.content {
position: relative;
border: 1px solid #ddf;
overflow-y: auto;
overflow-x: hidden;
}

public class ShowMorePagerPanel extends AbstractPager
{

  ...
private final ScrollPanel scrollable = new ScrollPanel();

/**
 * Construct a new {...@link ShowMorePagerPanel}.
 */
public ShowMorePagerPanel()
{
scrollable.addScrollHandler(...);
 }

public void setDisplay( HasRows display )
{
assert display instanceof Widget: "display must extend Widget";
scrollable.setWidget( ( Widget ) display );
super.setDisplay( display );
}
   ...
}




but seems there are two scrollbar, the outer one and inner one, the outer 
one can scroll but the inner one can not.
 my question is how to set the style, and let it behaves like google group?
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How To Extend Entities For Use In RequestFactory

2010-12-08 Thread David Chandler
Daniel,

Hang tight. GWT 2.1.1 has new Locator and ServiceLocator interfaces that
will allow you to move all such methods out of entities into DAOs.

See http://code.google.com/p/google-web-toolkit/issues/detail?id=5680
Also http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1

/dmc

On Wed, Dec 8, 2010 at 3:00 PM, Daniel Simons wrote:

> I have several entities which are automatically generated using hibernate
> tools.  I would like to make use of RequestFactory by extending these
> entities, but am running into a number of issues in doing so.  It seems that
> the current design of RequestFactory requires that all DAO methods be
> defined in the Entity itself.  Are there any simple ways around this?
>
> Thanks,
> Daniel
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How To Extend Entities For Use In RequestFactory

2010-12-08 Thread Daniel Simons
I have several entities which are automatically generated using hibernate
tools.  I would like to make use of RequestFactory by extending these
entities, but am running into a number of issues in doing so.  It seems that
the current design of RequestFactory requires that all DAO methods be
defined in the Entity itself.  Are there any simple ways around this?

Thanks,
Daniel

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



Extend GOverlay from the Maps API

2010-11-03 Thread Patrick Tucker
Is it possible to write a GWT JavaScriptObject that extends GOverlay
from the Google Maps API?

I don't have the luxury of using any of the GWT wrappers that are out
there because none of them are compatible with the GFusionMap object
from the enterprise version of the API.  If this statement is not
correct please enlighten me, I would be excited to hear otherwise.

Thanks,
Pat

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



Almost impossible to extend CellTable

2010-09-07 Thread legion
Hi all

I checked out the code for gwt 2.1, i wanted to see the last changes
in the CellTable component. A nice addition is the SafeHtmlTemplate.
But one drawback of the current implementation of the CellTable
component is that you cannot reuse the code from the CellTable by
extending it. For example i would like to benefit from the rowspan and
colspan parameters of the tag , or to build a more customizable
table. From my point of view this is impossible as the columns are
defined as private, and I wouldn’t be able to use them from my
subclass or somehow to change the table template.  It would be great
if I would be able to reuse the code, otherwise i would need to copy
the same functionality.

What is your opinion?

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



Extend

2010-05-17 Thread laurent
hello,

is it possible to resize a flextable.For example,if i have a column of
15 px size and i want with my mouse resizable.

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



How do you extend a TreeItem's selected background?

2010-02-25 Thread Chris
I'm building a basic UiBinder application with the DockLayoutPanel
with a Tree for navigation in the west region.  The standard.css
applies a background image to the TreeItems when selected.  The image
is bound within the div containing class="gwt-TreeItem".

I would like the background image to extend to the right all the way
to the edge of the west region.
I've tried changing the width of the TreeItem through css styles.
I've also tried to removeStyleName/addStyleName to the element.

I can get the effect I'm looking for by editing the HTML directly in
Firebug to remove the style="display:inline;" value.  However, as soon
as I refresh the page the style="display:inline;" is put back and
restoring the standard appearance.

Has anyone learned how to manipulate the underlying TreeItem styles?

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



Re: Extend or withdraw the set of compileable Java classes

2009-10-28 Thread Max Zhu
Yes of course. As long as you well configured your EntryPoint class in
module xml.

On Tue, Oct 27, 2009 at 6:09 PM, Sean  wrote:

>
> Hi together,
>
> I'm new to GWT and I'm looking for a way to use the GWTCompiler for
> another set of Java classes.
> Basically I would like to write my own set of classes for the compiler
> and define what code the compiler is generating out of them.
> Also I would like to add an compiler argument so that the compiler
> knows if the original or my set of classes should be used for
> compiling.
>
> For example:
>
> public class Hello implements EntryPoint {
>
>  ...some cool stuff...
>
> }
>
> should look like:
>
> public class Hello implements MyOwnObject {
>
>  ...some cool stuff...
>
> }
>
> and the compiler should know what code has to be generated out of
> that.
>
> Is this possible?
>
> Greetings, Sean
>
> >
>

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



Extend or withdraw the set of compileable Java classes

2009-10-27 Thread Sean

Hi together,

I'm new to GWT and I'm looking for a way to use the GWTCompiler for
another set of Java classes.
Basically I would like to write my own set of classes for the compiler
and define what code the compiler is generating out of them.
Also I would like to add an compiler argument so that the compiler
knows if the original or my set of classes should be used for
compiling.

For example:

public class Hello implements EntryPoint {

  ...some cool stuff...

}

should look like:

public class Hello implements MyOwnObject {

  ...some cool stuff...

}

and the compiler should know what code has to be generated out of
that.

Is this possible?

Greetings, Sean

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



problems with "extend-property" when non-host-mode server running

2009-08-01 Thread Michael Shantzis

Greetings,

I have a feeling that the problem I'm running into is pretty obvious,
but
I'm still wondering if anyone is running into a similar issue.  I have
a GWT
app (well, actually  it's a SmartGWT app) that I'm connecting with a
rails
server instead of one that is running in hosted mode. In other words,
from
within the run configuration of eclipse, I've unchecked the "Run built-
in server"
button, and instead my rails server is running.

This was working just great until I tried to use the i18n framework
which requires
me to put this in my run.xml file:
 

Once I did this, I started getting strange results: in certain
scenarios it hangs,
in others it throws an exception.  I traced it down to there not being
a call to
_gwt_getProperty() defined in javascript, as I see its definition is
framed in
a call to inHostedMode().

My question is how can I both run off of a rails server AND have the
system
think it's in hosted mode? The only solutions I've been able to come
up with is
to have two servers running (one in hosted, one rails) and have one
serve as proxy
for the other. This would be very difficult.

Any ideas or enlightenment would be great.

Thanks...

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



When to extend base class vs and when to extend composite?

2009-06-14 Thread Dalla

I had some issues earlier when trying to extend Composite and using a
Dialog Box as the base panel.
Got errors saying that the parent class didn´t implement the
HasWidgets interface.
Directly extending the Dialog Box worked fine however.

I have no problem using ScrollTable as a base panel in a composite,
which is also a sub class of SimplePanel.

So why could´t I use the Dialog Box as a base panel?
It´s not that I really really want to, I just want to understand
why...

Are there any rules one should follow when deciding wheter to extend a
base class or to extend Composite when creating UI-widgets?

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



Re: Is it possible to extend a Popup or DialogBox to detect when its moved?

2009-04-16 Thread Thomas Wrobel

Thanks :)
I had to change the MouseDownEvents to MouseMove and MouseUp, but it
worked a charm, cheers :)

~~
Reviews of anything, by anyone;
www.rateoholic.co.uk
Please try out my new site and give feedback :)



2009/4/16 Vitali Lovich :
> Sorry, was looking at the 1.5 doc.
>
> protected void beginDragging(MouseDownEvent event)
> {
>    super.beginDragging(event);
>
>   // my code goes here
> }
>
>
> protected void continueDragging(MouseDownEvent event)
> {
>    super.continueDragging(event);
>
>   // my code goes here
> }
>
>
> protected void endDragging(MouseDownEvent event)
> {
>    super.endDragging(event);
>
>   // my code goes here
> }
>
>
> On Wed, Apr 15, 2009 at 4:32 PM, Darkflame  wrote:
>>
>> I'm not sure precisely how to override in this case though.
>>
>> I see the onMouseUp event in the class, and I try putting this into my
>> widget (which extends DialogBox).
>>
>>       �...@override
>>        public void onMouseUp(Widget sender, int x, int y) {
>>            dragging = false;
>>            DOM.releaseCapture(getElement());
>>          }
>>
>> (basicaly an exact copy of whats in the class's over mouseup event).
>>
>> However;
>> a) dragging is not visible error
>> b) It says onMouseUp is depreciated anyway and to use endDragging.
>>
>> (Looking at enddragging;
>>
>> protected void endDragging(MouseUpEvent event) {
>>    onMouseUp(caption, event.getX(), event.getY());
>>  }
>>
>> )
>>
>>
>>
>> On Apr 15, 10:19 pm, Vitali Lovich  wrote:
>> > id
>> > *onMouseDown
>> >
>> > *(Widget
>> > sender,
>> > int x, int y)
>> >           Fired when the user depresses the mouse button over a widget.
>> >  void
>> > *onMouseEnter
>> >
>> > *(Widget
>> >  sender)
>> >           Fired when the mouse enters a widget's area.   void
>> >
>> > *onMouseLeave
>> >
>> > *(Widget
>> >  sender)
>> >           Fired when the mouse leaves a widget's area.   void
>> >
>> > *onMouseMove
>> >
>> > *(Widget
>> > sender,
>> > int x, int y)
>> >           Fired when the user moves the mouse over a widget.
>> > You have to override them yourself seeing as how it doesn't have support
>> > for
>> > this.
>> >
>> >
>> >
>> > On Wed, Apr 15, 2009 at 4:08 PM, darkflame  wrote:
>> >
>> > > umm..what the title says  ;)
>> >
>> > > I just want to trigger some realignment of stuff when the user stops
>> > > dragging.
>>
>
>
> >
>

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



Re: Is it possible to extend a Popup or DialogBox to detect when its moved?

2009-04-15 Thread Vitali Lovich
Sorry, was looking at the 1.5 doc.

protected void beginDragging(MouseDownEvent event)
{
   super.beginDragging(event);

  // my code goes here
}


protected void continueDragging(MouseDownEvent event)
{
   super.continueDragging(event);

  // my code goes here
}


protected void endDragging(MouseDownEvent event)
{
   super.endDragging(event);

  // my code goes here
}


On Wed, Apr 15, 2009 at 4:32 PM, Darkflame  wrote:

>
> I'm not sure precisely how to override in this case though.
>
> I see the onMouseUp event in the class, and I try putting this into my
> widget (which extends DialogBox).
>
>@Override
>public void onMouseUp(Widget sender, int x, int y) {
>dragging = false;
>DOM.releaseCapture(getElement());
>  }
>
> (basicaly an exact copy of whats in the class's over mouseup event).
>
> However;
> a) dragging is not visible error
> b) It says onMouseUp is depreciated anyway and to use endDragging.
>
> (Looking at enddragging;
>
> protected void endDragging(MouseUpEvent event) {
>onMouseUp(caption, event.getX(), event.getY());
>  }
>
> )
>
>
>
> On Apr 15, 10:19 pm, Vitali Lovich  wrote:
> > id *onMouseDown<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > *(Widget<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > sender,
> > int x, int y)
> >   Fired when the user depresses the mouse button over a widget.
> >  void *onMouseEnter<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > *(Widget<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> >  sender)
> >   Fired when the mouse enters a widget's area.   void
> > *onMouseLeave<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > *(Widget<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> >  sender)
> >   Fired when the mouse leaves a widget's area.   void
> > *onMouseMove<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > *(Widget<
> http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/g...>
> > sender,
> > int x, int y)
> >   Fired when the user moves the mouse over a widget.
> > You have to override them yourself seeing as how it doesn't have support
> for
> > this.
> >
> >
> >
> > On Wed, Apr 15, 2009 at 4:08 PM, darkflame  wrote:
> >
> > > umm..what the title says  ;)
> >
> > > I just want to trigger some realignment of stuff when the user stops
> > > dragging.
> >
>

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



Re: Is it possible to extend a Popup or DialogBox to detect when its moved?

2009-04-15 Thread Darkflame

I'm not sure precisely how to override in this case though.

I see the onMouseUp event in the class, and I try putting this into my
widget (which extends DialogBox).

@Override
public void onMouseUp(Widget sender, int x, int y) {
dragging = false;
DOM.releaseCapture(getElement());
  }

(basicaly an exact copy of whats in the class's over mouseup event).

However;
a) dragging is not visible error
b) It says onMouseUp is depreciated anyway and to use endDragging.

(Looking at enddragging;

protected void endDragging(MouseUpEvent event) {
onMouseUp(caption, event.getX(), event.getY());
  }

)



On Apr 15, 10:19 pm, Vitali Lovich  wrote:
> id 
> *onMouseDown
> *(Widget
> sender,
> int x, int y)
>           Fired when the user depresses the mouse button over a widget.
>  void 
> *onMouseEnter
> *(Widget
>  sender)
>           Fired when the mouse enters a widget's area.   void
> *onMouseLeave
> *(Widget
>  sender)
>           Fired when the mouse leaves a widget's area.   void
> *onMouseMove
> *(Widget
> sender,
> int x, int y)
>           Fired when the user moves the mouse over a widget.
> You have to override them yourself seeing as how it doesn't have support for
> this.
>
>
>
> On Wed, Apr 15, 2009 at 4:08 PM, darkflame  wrote:
>
> > umm..what the title says  ;)
>
> > I just want to trigger some realignment of stuff when the user stops
> > dragging.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Is it possible to extend a Popup or DialogBox to detect when its moved?

2009-04-15 Thread Vitali Lovich
id 
*onMouseDown
*(Widget
sender,
int x, int y)
  Fired when the user depresses the mouse button over a widget.
 void 
*onMouseEnter
*(Widget
 sender)
  Fired when the mouse enters a widget's area.   void
*onMouseLeave
*(Widget
 sender)
  Fired when the mouse leaves a widget's area.   void
*onMouseMove
*(Widget
sender,
int x, int y)
  Fired when the user moves the mouse over a widget.
You have to override them yourself seeing as how it doesn't have support for
this.

On Wed, Apr 15, 2009 at 4:08 PM, darkflame  wrote:

>
> umm..what the title says  ;)
>
> I just want to trigger some realignment of stuff when the user stops
> dragging.
>
>
>
> >
>

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



Is it possible to extend a Popup or DialogBox to detect when its moved?

2009-04-15 Thread darkflame

umm..what the title says  ;)

I just want to trigger some realignment of stuff when the user stops
dragging.



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



Unable to extend TreeItem because of package level access

2009-04-06 Thread smiletolead

Hi all,
  I am trying to extend TreeItem class in the package
com.google.gwt.user.client.ui. When I try to override the method
setTree(Tree tree), I observe that the children instance variable is
not accessible and some of the methods its calling on Tree instance
are package access restricted. For example, tree.adopt(child) and
tree.orphan(child). Can anyone please tell me why these functions are
having package level access?

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



extend GWt with JavaFX syntax

2009-03-25 Thread xavier.meh...@gmail.com

GWT is built uppon a subset of Java 1.5/1.6... but it is not
mandatory , as a java2js translator, to be only compliant with Java...
We see in many concurrent solutions like Flex, Silverlight,
Wickets, ..., that these solutions abuse of XML (mxml, xaml, ...) to
describe declaratively their interface... It corresponds surely to a
need to clerly decorrelate UI definition from the background logic. We
don't have up to now such a thing in gwt... but I personnaly don't
want this in the ways taken by the previous mentionned
technologies...
I would prefer a more homogeneous way, ie an extension of the java
language enabling to describe declaratively a GUI, but by the way
enabling to integrate smoothly java code for the logic concern.
We could use for instance groovy if GWT would start from the bytecode
instead of the source code... But we also could , and it is my
preferred way, extend the java syntax in the gwt parser to rake into
account a subset of JavaFX, ie only the way how javafx describe a GUI
in a declarative manner... I think it is more cleaner than xml ,and
more powerful too. It is also a discriminant wrt to the other
solutions.

Example  of JavaFX syntax (we don't need the vectorial stuff) :
Group {
content:
[View {
content: Button {
cursor: DEFAULT
text: "Browse"
action: operation() {
var fc = new JFileChooser();
var filter = new FileNameExtensionFilter("Images",
["jpg", "gif", "png"]);
fc.setFileFilter(filter);
var returnVal = fc.showOpenDialog(null);
if(returnVal == JFileChooser.APPROVE_OPTION) {
url = fc.getSelectedFile().toURL().toString();
}
}
}
},
View {
transform: translate(68, 2)
content: TextField {
columns: 30
value: bind url
}
},
ImageView {
transform: translate(0, 25)
image: Image { url: bind url }
}]
};

Canvas {
content: ImageLoadNode { url: "http://blogs.sun.com/chrisoliver/
resource/tesla.PNG" }
}

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



Re: NodeList does not extend Iterator

2009-03-10 Thread thobel

It's pretty easy to add in the functionality anyway, if you really
want it:

import java.util.AbstractList;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;

/**
 * An immutable list view of NodeList
 * @author thobel
 *
 */
public class NodeListWrapper extends AbstractList {
private NodeList nodeList;

public NodeListWrapper(NodeList nodeList){
this.nodeList = nodeList;
}

@Override
public T get(int n) {
return nodeList.getItem(n);
}

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



On Feb 2, 6:04 am, Simon B  wrote:
> Thanks Lothar for your reply,
>
> Sorry, you're right, I meant why doesn't it support java.lang.Iterable
> (and implement a method iterator()) that can be used in a for each
> loop,
>
> Cheers for your suggestion about looking in the forums for the same
> question regarding the java.awt.List / java.swing.JList, I'll check
> that out
>
> Simon
>
> On Feb 2, 6:38 am, Lothar Kimmeringer  wrote:
>
> > Simon B schrieb:
>
> > > I apologise if this is a stupid question, or If I'm missing something,
> > > but why doesn't
> > > com.google.gwt.xml.client.NodeList
> > > extend
> > > java.util.Iterator
>
> > Because no List (java.util.List or java.awt.List) do.
>
> > > it would be handy as thenNodeListcould be used with the shortened
> > > for each block a la:
> > > for (Node aNode :nodeList) {
>
> > So you mean java.util.Iterable as being described e.g. 
> > inhttp://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html
>
> > > Rather than
> > > for (int i = 0; i  > >      Node aNode =nodeList.item(i);
> > >      
> > > }
> > > It seems a really obvious oversight, so I'm sure that there's a good
> > > reason, I'd just like to know what it is.
>
> > I don't know the reason but you might ask SUN, why they don't do
> > the same for their GUI-elements 
> > likehttp://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html
> > orhttp://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html
>
> > 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: NodeList does not extend Iterator

2009-02-02 Thread Fred Janon
I posted a few days ago a DomIterator project (search for [ANN]PickerPanel,
ColorPicker and DomIterator (getAllElementsByClass) components in this
forum) where I implemented Iterator and Iterable over the DOM to avoid using
the Node list.

Fred

On Mon, Feb 2, 2009 at 19:04, Simon B  wrote:

>
> Thanks Lothar for your reply,
>
> Sorry, you're right, I meant why doesn't it support java.lang.Iterable
> (and implement a method iterator()) that can be used in a for each
> loop,
>
> Cheers for your suggestion about looking in the forums for the same
> question regarding the java.awt.List / java.swing.JList, I'll check
> that out
>
> Simon
>
> On Feb 2, 6:38 am, Lothar Kimmeringer  wrote:
> > Simon B schrieb:
> >
> > > I apologise if this is a stupid question, or If I'm missing something,
> > > but why doesn't
> > > com.google.gwt.xml.client.NodeList
> > > extend
> > > java.util.Iterator
> >
> > Because no List (java.util.List or java.awt.List) do.
> >
> > > it would be handy as then NodeList could be used with the shortened
> > > for each block a la:
> > > for (Node aNode : nodeList) {
> >
> > So you mean java.util.Iterable as being described e.g. inhttp://
> java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html
> >
> > > Rather than
> > > for (int i = 0; i < nodeList.length(); i++) {
> > >  Node aNode = nodeList.item(i);
> > >  
> > > }
> > > It seems a really obvious oversight, so I'm sure that there's a good
> > > reason, I'd just like to know what it is.
> >
> > I don't know the reason but you might ask SUN, why they don't do
> > the same for their GUI-elements likehttp://
> java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html
> > orhttp://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html
> >
> > 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: NodeList does not extend Iterator

2009-02-02 Thread Simon B

Thanks Lothar for your reply,

Sorry, you're right, I meant why doesn't it support java.lang.Iterable
(and implement a method iterator()) that can be used in a for each
loop,

Cheers for your suggestion about looking in the forums for the same
question regarding the java.awt.List / java.swing.JList, I'll check
that out

Simon

On Feb 2, 6:38 am, Lothar Kimmeringer  wrote:
> Simon B schrieb:
>
> > I apologise if this is a stupid question, or If I'm missing something,
> > but why doesn't
> > com.google.gwt.xml.client.NodeList
> > extend
> > java.util.Iterator
>
> Because no List (java.util.List or java.awt.List) do.
>
> > it would be handy as then NodeList could be used with the shortened
> > for each block a la:
> > for (Node aNode : nodeList) {
>
> So you mean java.util.Iterable as being described e.g. 
> inhttp://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html
>
> > Rather than
> > for (int i = 0; i < nodeList.length(); i++) {
> >      Node aNode = nodeList.item(i);
> >      
> > }
> > It seems a really obvious oversight, so I'm sure that there's a good
> > reason, I'd just like to know what it is.
>
> I don't know the reason but you might ask SUN, why they don't do
> the same for their GUI-elements 
> likehttp://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html
> orhttp://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html
>
> 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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: NodeList does not extend Iterator

2009-02-02 Thread Lothar Kimmeringer

Simon B schrieb:

> I apologise if this is a stupid question, or If I'm missing something,
> but why doesn't
> com.google.gwt.xml.client.NodeList
> extend
> java.util.Iterator

Because no List (java.util.List or java.awt.List) do.

> it would be handy as then NodeList could be used with the shortened
> for each block a la:
> for (Node aNode : nodeList) {

So you mean java.util.Iterable as being described e.g. in
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html

> Rather than
> for (int i = 0; i < nodeList.length(); i++) {
>  Node aNode = nodeList.item(i);
>  
> }
> It seems a really obvious oversight, so I'm sure that there's a good
> reason, I'd just like to know what it is.

I don't know the reason but you might ask SUN, why they don't do
the same for their GUI-elements like
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/List.html
or
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JList.html


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 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



NodeList does not extend Iterator

2009-02-01 Thread Simon B

Hi,

I apologise if this is a stupid question, or If I'm missing something,
but why doesn't
com.google.gwt.xml.client.NodeList
extend
java.util.Iterator


it would be handy as then NodeList could be used with the shortened
for each block a la:
for (Node aNode : nodeList) {

}

Rather than
for (int i = 0; i < nodeList.length(); i++) {
 Node aNode = nodeList.item(i);
 
}
It seems a really obvious oversight, so I'm sure that there's a good
reason, I'd just like to know what it is.  I thought it may be to do
with the fact that gwt recently added support for java 1.5 (generics
enhanced for loop etc)

Any answers very much appreciated
Cheers
Simon



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



Re: Extend Observable

2009-01-02 Thread todd.sei...@gmail.com

You should probably first read this
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=RefJreEmulation

GWT is not intended to translate a Java application to the web. Things
like AWT and objects like Dimensions do not translate.

On Jan 2, 1:13 pm, flanneur  wrote:
> I have a java application constituted of a set of classes. One of the
> classes extends "Observable". I am including the class below -- it is
> very short. Will somebody please help me use it in GWT? Or help me
> find something equivalent. I am very very new to GWT.  Thanks,
> Everyone.
>
> /**SOURCE CODE
> BELOW***/
> import java.awt.*;
> import java.util.*;
>
> public class ContactPoint extends Observable
> {
>    private Coordinates _coord;
>    private Dimensions _dim;
>
>    public ContactPoint()
>    {
>       _coord = new Coordinates(0, 0);
>       _dim = new Dimensions(5, 5);
>    }
>
>    public ContactPoint(Coordinates coord)
>    {
>       _coord = new Coordinates(coord);
>       _dim = new Dimensions(5, 5);
>    }
>
>    public ContactPoint(Coordinates coord, Dimensions dim)
>    {
>       _coord = new Coordinates(coord);
>       _dim = new Dimensions(dim);
>    }
>
>    public Coordinates getCoordinates()
>    {
>       return new Coordinates(_coord);
>    }
>
>    public void setCoordinates(Coordinates coord)
>    {
>       _coord = new Coordinates(coord);
>
>       setChanged();
>    }
>    public void setCoordinates(Coordinates coord, Dimensions dim)
>    {
>       _coord = new Coordinates(coord);
>       _dim = new Dimensions(dim);
>
>       setChanged();
>    }
>    public Dimensions getDimensions()
>    {
>       return new Dimensions(_dim);
>    }
>
>    public void setDimensions(Dimensions dim)
>    {
>       _dim = new Dimensions(dim);
>
>       setChanged();
>    }
>
>    public void paint(Graphics g)
>    {
>       g.fillRect(_coord.x - _dim.w / 2,
>                  _coord.y - _dim.h / 2,
>                  _dim.w - 1,
>                  _dim.h - 1);
>    }
>
>    public boolean isAt(Coordinates coord)
>    {
>       if ((coord.x >= _coord.x - _dim.w / 2) &&
>           (coord.x <= _coord.x + (_dim.w - 1) / 2) &&
>           (coord.y >= _coord.y - _dim.h / 2) &&
>           (coord.y <= _coord.y + (_dim.h - 1) / 2))
>       {
>          return true;
>       }
>
>       return false;
>    }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Extend Observable

2009-01-02 Thread flanneur

I have a java application constituted of a set of classes. One of the
classes extends "Observable". I am including the class below -- it is
very short. Will somebody please help me use it in GWT? Or help me
find something equivalent. I am very very new to GWT.  Thanks,
Everyone.


/**SOURCE CODE
BELOW***/
import java.awt.*;
import java.util.*;

public class ContactPoint extends Observable
{
   private Coordinates _coord;
   private Dimensions _dim;

   public ContactPoint()
   {
  _coord = new Coordinates(0, 0);
  _dim = new Dimensions(5, 5);
   }

   public ContactPoint(Coordinates coord)
   {
  _coord = new Coordinates(coord);
  _dim = new Dimensions(5, 5);
   }

   public ContactPoint(Coordinates coord, Dimensions dim)
   {
  _coord = new Coordinates(coord);
  _dim = new Dimensions(dim);
   }

   public Coordinates getCoordinates()
   {
  return new Coordinates(_coord);
   }

   public void setCoordinates(Coordinates coord)
   {
  _coord = new Coordinates(coord);

  setChanged();
   }
   public void setCoordinates(Coordinates coord, Dimensions dim)
   {
  _coord = new Coordinates(coord);
  _dim = new Dimensions(dim);

  setChanged();
   }
   public Dimensions getDimensions()
   {
  return new Dimensions(_dim);
   }

   public void setDimensions(Dimensions dim)
   {
  _dim = new Dimensions(dim);

  setChanged();
   }

   public void paint(Graphics g)
   {
  g.fillRect(_coord.x - _dim.w / 2,
 _coord.y - _dim.h / 2,
 _dim.w - 1,
 _dim.h - 1);
   }

   public boolean isAt(Coordinates coord)
   {
  if ((coord.x >= _coord.x - _dim.w / 2) &&
  (coord.x <= _coord.x + (_dim.w - 1) / 2) &&
  (coord.y >= _coord.y - _dim.h / 2) &&
  (coord.y <= _coord.y + (_dim.h - 1) / 2))
  {
 return true;
  }

  return false;
   }
}

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