Re: RequestBuilder, safely send data to server

2017-03-02 Thread Chad Vincent
Seconded.  One of the best bits of advise I ever got is, "if you have a 
validation on the client, re-validate on the server".

The JSR validation makes it easy to be sure validation is consistent, but 
I've not tried it now that the validation is a library.

On Thursday, March 2, 2017 at 5:27:59 AM UTC-6, salk31 wrote:
>
> Basically you can't trust the client or the client code... If that is what 
> you mean?
>
> Unless all clients and network access is tied down by you (very rare) then 
> you must not trust anything coming in... need parse carefully, check 
> permissions..
>
>
>
> On Thursday, March 2, 2017 at 7:01:18 AM UTC, gitzzz wrote:
>>
>> Hi! I use RequestBuilder for client-server communication. And I have some 
>> questions:
>>
>> For example we make http request to ".../get.php"(function(), select some 
>> data from DB and send it back).  Response is an array[1,2,3,4,5]
>>
>> On client side onTheButtonClick we can change the data, the 
>> new_array[1,3,6,8,9], and now we need to send this changes to DB. And 
>> onSaveButtonClick() we make http post request to ".../set.php" with 
>> parameters = new_array
>>
>> The question is: does it safe? Is it possible that anybody authed user 
>> can make this call by creating JS script with http post request and send 
>> his own(fake) data?(e.g. fake_array[10,20,30,23,12]) without clicking a 
>> button. How can I send change data from client side to a server safely?
>>
>

-- 
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: GWT RPC in GWT 3.0+

2016-07-11 Thread Chad Vincent
Hey, speak for yourself.  ;)

RMI is awesome for prototyping or when the networking aspects are a 
secondary feature where performance isn't an issue.  Maybe better off as a 
library, but still useful.

On Saturday, July 9, 2016 at 6:02:23 PM UTC-5, Hristo Stoyanov wrote:
>
> Gwt-rpc had siMilar fate as RMI in java - it was cute idea at first, but 
> we wish it was not in modern java...

-- 
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: How to make my app more secure. URL token

2016-06-07 Thread Chad Vincent
Your GUI needs a check, then.  I handle this by having every Place (and 
even some sub-forms) check for a user on display and display a logged out 
UI if there is no current valid user.

Of course, I'm using a login dialog instead of a Place, so if someone's 
session times out they can re-authenticate without losing any data...

On Monday, June 6, 2016 at 9:37:01 AM UTC-5, Olar Andrei wrote:
>
> Velusamy Velu:
>
> I'm alredy know that link. I implemented my password reset based on your 
> workflow.
>
> But there again is the same Problem (for me actually, perhaps due to my 
> implementation). If a letter is removed from the hashed token standing in 
> the URL, and then just hit ENTER, the exact page reloads ( with the prompt 
> for new password and retype new password ). In that case when submitting, 
> nothing happens, because the token does not match the Token already stored 
> in the DB, but like I said before, the page reloads, displaying the GUI, 
> and it shoudn't do that.
>
> luni, 6 iunie 2016, 14:47:47 UTC+3, Olar Andrei a scris:
>>
>> Hello,
>>
>> For now my aplication (MVP) has a login page, and 2 other palces, the 
>> AdminPlace and the UserPlace.
>> My URL looks like this:
>>
>> http://127.0.0.1:/AdministrareBloc.html#AdminPlace:Admin
>>
>> The login form consists of username and password, where the username is 
>> passed as a token to the next Place.
>> A user can't connect if he does not know the password, but let's say I'm 
>> logged in like in the link above. If I change the Admin to Admin2 or 
>> whatever, I still can see the page content. I don't want this. How can I 
>> avoid this ?
>>
>> Thanks in advance
>>
>>

-- 
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: Getting username from url only works after refresh

2016-06-01 Thread Chad Vincent
For some reason, passing the username around via the URL seems like a code 
smell to me.

I'm not sure if it's actually better or not, but I store the User object 
from the server (less password hash) in a singleton (and the session, in 
case of a full refresh).  I also have all my Place content setup so I just 
change it within a Panel (TabLayoutPanel, though Dock or Stack would work, 
too) while leaving navigation and header alone.

This removes putting user information in the URL, so people can share 
deep-links to content without sharing usernames by default.

On Wednesday, June 1, 2016 at 7:09:20 AM UTC-5, Olar Andrei wrote:
>
> Hello,
>
> I've tried a little trick today, because I still belive the browser 
> downloads code he does not need before he actually needs it.
>
> I placed this:
> Window.Location.reload();
> inside my *UserViewImpl, *so it would reload after the login.
>
> The problem is that when the application starts with the *LoginViewImpl *the 
> page refreshes every second. So I'm not even in the UserViewImpl, so I 
> didn't log in, and the page gets the code from the UserViewImpl and starts 
> refreshing.
> The thing is I've used code splitting in my application like this:
>
> *Login Button*
>
> loginButton.setHTML(LoginFormConstants.LOGIN_BUTTON);
> loginButton.addClickHandler(new ClickHandler() {
>
> @Override
> public void onClick(ClickEvent event) {
> final String username = usernameBox.getText();
> final String password = passwordBox.getText();
>
> // Is this good code splitting ?
> GWT.runAsync(new RunAsyncCallback() {
>
> @Override
> public void onSuccess() {
> performUserConnection(username, password);
> }
>
> @Override
> public void onFailure(Throwable reason) {
> // TODO Auto-generated method stub
> }
> });
> }
> });
>
>  and *performUserConnection()*
>
> private static void performUserConnection(String username, String 
> password) {
> DBConnectionAsync rpcService = (DBConnectionAsync) 
> GWT.create(DBConnection.class);
> ServiceDefTarget target = (ServiceDefTarget) rpcService;
> String moduleRelativeURL = GWT.getModuleBaseURL() + "DBConnectionImpl";
> target.setServiceEntryPoint(moduleRelativeURL);
>
> rpcService.authenticateUser(username, password, new AsyncCallback() {
>
> @Override
> public void onSuccess(User user) {
>
> if (user.getType().equals("User")) {
> String username = user.getUsername();
> presenter.goTo(new UserPlace(username));
> } else if (user.getType().equals("Admin")) {
> String username = user.getUsername();
> presenter.goTo(new AdminPlace(username));
> }
> }
>
> @Override
> public void onFailure(Throwable caught) {
> DialogBox dialogBox = createDialogBox();
> dialogBox.setGlassEnabled(true);
> dialogBox.setAnimationEnabled(true);
> dialogBox.center();
> dialogBox.show();
> }
>   });
>   }
>
> So the page should wait to see if connection was successful, and then 
> download the code, right ? Why isn't this happening ?
>
> Thanks in advance
>
>
> marți, 31 mai 2016, 01:25:10 UTC+3, Olar Andrei a scris:
>>
>> My login based application, requires to always know the username of the 
>> logged in user. (MVP) . So I'm getting the username from the url, but when 
>> the page opens after the login succeeded, I can't get the username from the 
>> url, because it does not appear to exists, but it is there. It only works 
>> after a refresh. Then I'm able to get the username.
>>
>>
>> The URL is in the form 
>> *http://127.0.0.1:/AdministrareBloc.html#AdminPlace:admin 
>> *, where 
>> I'm splitting the String to only get the admin part. 
>>
>>
>> I thought this is because it downloads the code before verifying the 
>> user. So I placed a split point in my code like this: (I don't know if I 
>> placed it correctly)
>>
>>
>> loginButton.addClickHandler(new ClickHandler() {
>>
>> @Override
>> public void onClick(ClickEvent event) {
>> final String username = usernameBox.getText();
>> final String password = passwordBox.getText();
>> GWT.runAsync(new RunAsyncCallback() {
>>
>> @Override
>> public void onSuccess() {
>> performUserConnection(username, password);
>> }
>>
>> @Override
>>  
>> *Introduceți aici codul...*   public void onFailure(Throwable 
>> reason) {
>>
>> // TODO Auto-generated method stub
>> }
>> });
>> }
>> });
>>
>> private static void performUserConnection(String username, String password) {
>> DBConnectionAsync rpcService = (DBConnectionAsync) 
>> GWT.create(DBConnection.class);
>> ServiceDefTarget target = (ServiceDefTarget) rpcService;
>> String moduleRelativeURL = GWT.getModuleBaseURL() + "DBConnectionImpl";
>> target.setServiceEntryPoint(moduleRelativeURL);
>>
>> rpcService.authenticateUser(username, password, 

Re: window.showModelDialog replacement

2016-05-24 Thread Chad Vincent
I normally use a custom DialogBox 
( 
http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/DialogBox.html
 
), since it is within-document, I can do whatever I need to in it 
(validation, Widgets, prompt for input using a custom widget, etc.), and it 
doesn't block other tabs.

On Tuesday, May 24, 2016 at 4:02:52 AM UTC-5, David wrote:
>
> I am using GWT to improve an existing web site written in ASP. This site 
> has a lot of window.showModalDialog. It needs to run in Android phones too. 
> The window.showModalDialog has been disabled by Chrome it is giving me 
> error as "undefined is not a function". I can use window.open to replace 
> it. But I can not get a return value from window.open. 
> Can anyone please tell me what is the alternative for the 
> window.showModelDialog or how to get a return value from window.open?
>
> Thanks,
>
> David
>

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


Re: Third Party Library for GWT validation

2015-05-20 Thread Chad Vincent
Huh.  It's been a few years since I was in the raw serialization bits.  I
must've got things confused.

Actually, that serialization format looks like what I remember seeing of
HL7.

On Wed, May 20, 2015 at 10:05 AM Thomas Broyer t.bro...@gmail.com wrote:



 On Wednesday, May 20, 2015 at 4:40:17 PM UTC+2, Chad Vincent wrote:

 (GWT responses use GSON, a Google-modified JSON, and are converted to
 POJO post-receive.)


 Huh!?!?!?!

 GWT-RPC uses its own serialization formats (plural: server-to-client is
 based on JS object literals –there's a patch to move to pure JSON, but it
 hasn't been merged yet IIRC– whereas client-to-server is completely custom;
 anyway, those are custom formats:
 https://drive.google.com/open?id=1eG0YocsYYbNAtivkLtcaiEE5IOF5u4LUol8-LL0TIKUauthuser=0
 )
 RequestFactory uses JSON, but with a custom structure; so let's call it a
 custom format as well.

 GSON is an open-source Java library, by Google, for working with JSON;
 nothing to do with a Google-modified JSON:
 https://github.com/google/gson

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Web Toolkit group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-web-toolkit/neqUQmNGcBg/unsubscribe
 .
 To unsubscribe from this group and all its topics, 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.


-- 
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: Third Party Library for GWT validation

2015-05-20 Thread Chad Vincent
So you never convert the JSON to a POJO client side?  (GWT responses use 
GSON, a Google-modified JSON, and are converted to POJO post-receive.)

My best suggestion then is to just walk the JSON as a Map and use a custom 
validator interface...

On Tuesday, May 19, 2015 at 1:07:15 AM UTC-5, Mohammed Sameen wrote:

 Yes Chad,I can't use GWT Validation(my application response is in the JSON 
 format not in POJO)..

 On Monday, May 18, 2015 at 5:36:11 PM UTC+5:30, abdul wrote:

 I want to validate the gwt field like (Email,Text Length,Phone 
 Number,Date  SSN,etc..) Is there any proven JS or Library Available for 
 Validating this fields with GWT.

- I Can't use GWT Validation FrameworkorGWT Errai for my application 
since i am getting response as JSON not DTO.
- 

Even I tried Parsley JS(http://parsleyjs.org/ ) which is not possible 
(Reason:GWT have {key,value} pair to set the attribute but parsley have 
only value.)

Any suggestion?



-- 
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: Third Party Library for GWT validation

2015-05-18 Thread Chad Vincent
Are you not marshalling the response into a POJO?  GWT Validation can be 
done (with most validators, though not all) client-side.

On Monday, May 18, 2015 at 7:06:11 AM UTC-5, abdul wrote:

 I want to validate the gwt field like (Email,Text Length,Phone Number,Date 
  SSN,etc..) Is there any proven JS or Library Available for Validating 
 this fields with GWT.

- I Can't use GWT Validation FrameworkorGWT Errai for my application 
since i am getting response as JSON not DTO.
- 

Even I tried Parsley JS(http://parsleyjs.org/ ) which is not possible 
(Reason:GWT have {key,value} pair to set the attribute but parsley have 
only value.)

Any suggestion?



-- 
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: Exception whit the GWT 2.7

2015-05-07 Thread Chad Vincent
My understanding is that the Eclipse Android GUI tool is likewise 
discontinued/deprecated.  If you want Android GUI tools that will continue 
to be officially supported, you have to move to IntelliJ/Android Studio or 
code the GUI manually.

On Wednesday, May 6, 2015 at 3:11:18 PM UTC-5, Marcin Kurzawa wrote:

 Excuse me for being totally ticked off. There has got to be a better way. 
 For example, developing for Android, we get a nice visual layout building 
 tool for eclipse, and we don't for web applications? I couldn't even 
 imagine handing all the gui layouts manually in xml, it would be a 
 nightmare. I think this is moving backwards and a significant setback!

 Marcin

 On Wed, May 6, 2015 at 2:23 PM, Vassilis Virvilis vas...@gmail.com 
 javascript: wrote:

 uibinder is pretty nice. You right XML that is mapped automatically to 
 HTML+GWT code

 I never trusted GUI editors anyway... Even the best (qt-designer) has 
 weird corners or at least it had 10 years ago...

  Vassilis

 On Wed, May 6, 2015 at 7:56 PM, Marcin Kurzawa mkur...@gmail.com 
 javascript: wrote:

 What is the preferred way to graphically design GWT gui (developing in 
 eclipse) when GWT Designer is phased out? Does that mean we'll have to do 
 all that tedious work all manually typing out the code for gui layouts?



 On Monday, March 2, 2015 at 10:48:05 AM UTC-5, Thomas Broyer wrote:



 On Monday, March 2, 2015 at 4:22:57 PM UTC+1, Meryem Alay wrote:

 Why doesn't you supoort GWT designer anymore?


 You're asking the wrong people actually.
 GWT Designer is (was?) a Google product, maintained by Google (after 
 they bought Instantiations), with a stripped-down version shipped with the 
 Google Plugin for Eclipse. It's Google all the way down, and maintained by 
 a different team inside Google than the one building GWT.
 There was a need to change some internal API of GWT, and it happens 
 that GWT Designer calls that API (hence the error); and nobody is actually 
 actively maintaining GWT Designer. In 2.6.0, another change broke GWT 
 Designer already, and we reintroduced the legacy code in 2.6.1 hoping GWT 
 Designer would be fixed. It didn't happen (as far as I know). Because the 
 GWT Team wants to move forward, even if that means breaking GWT Designer, 
 we thought we had to mention the breaking change in GWT's release notes, 
 but the reality is that the team behind GWT Designer don't actively 
 maintain it anymore, and that team is not affiliated with GWT (besides 
 many 
 developers working in the same company).

 BTW, if you're looking for GWT Designer's source code, it's there: 
 https://code.google.com/p/gwt-designer/

  -- 
 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 
 javascript:.
 To post to this group, send email to google-we...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Vassilis Virvilis
  
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups Google Web Toolkit group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/google-web-toolkit/SRCpvbmkmTA/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 google-web-toolkit+unsubscr...@googlegroups.com javascript:.
 To post to this group, send email to google-we...@googlegroups.com 
 javascript:.
 Visit this group at http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.




-- 
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: Synchronized code after a service call

2015-05-04 Thread Chad Vincent
You can also use a ParallelCallback...  Like this:

http://www.summa-tech.com/blog/2010/11/29/parallel-asynchronous-calls-in-gwt

I'm not super stoked about that implementation (if you have 1 failure, the 
parent isn't notified, and if you override onSuccess() to do something 
per-callback like increment a progress bar, you have to remember to poke 
the parent yourself.), but it's a good starting place.

On Sunday, May 3, 2015 at 8:35:49 AM UTC-5, Jens wrote:


 Do you mean to have a counter in the for loop? 


 Yeah, if you know you ask 10 times the server you must wait for 10 
 onsuccess/failures before continuing. So in each callback method increment 
 the counter and check if its 10. If so, call finalize.

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


Chrome prompts me to install GWT Developer Plugin even though the plugin is already installed

2015-04-17 Thread Chad Baker
I've been working with this plugin, using Dev Mode Classic for several 
weeks without issues. All of a sudden, this morning, it now continually 
prompts me to install the plugin, even though it already has been. I have 
rebooted, uninstalled/re-installed first the plugin, then Chrome itself. Is 
it possible a recent plugin update broke the plugin? Does anyone have any 
ideas? Thank you in advance!

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


Re: Unable to use memcacheservice in gwt module

2015-01-28 Thread Chad Vincent
Not directly.  You'll have to write a service/servlet to provide Memcache 
access to the client.

Alternately, HashMap can be used in GWT as a Cache, as can some of the 
Guava Caches.

On Wednesday, January 28, 2015 at 11:07 AM UTC-6, Gautam Priya wrote:

 Chad - I figured that out and have moved the code around. I was wondering 
 if there was a gwt module that supported memcache use on the client side 
 directly - out of curiosity. I am guessing that answer is no!


On Tuesday, January 27, 2015 at 4:14:02 PM UTC-6, Gautam Priya wrote:

 Is there a memcache gwt module that I could inherit from to avoid 
 compilation errors of the kind below - 

 [ERROR] Line 58: No source code is available for type 
 com.google.appengine.api.memcache.AsyncMemcacheService; did you forget to 
 inherit a required module?

  [ERROR] Line 58: No source code is available for type 
 com.google.appengine.api.memcache.MemcacheServiceFactory; did you forget to 
 inherit a required module?

  [ERROR] Line 83: No source code is available for type 
 com.google.appengine.api.memcache.ErrorHandlers; did you forget to inherit 
 a required module?

  [ERROR] Line 98: No source code is available for type 
 java.util.concurrent.FutureV; did you forget to inherit a required module?

  [ERROR] Line 133: No source code is available for type 
 java.lang.InterruptedException; did you forget to inherit a required module?

  [ERROR] Line 133: No source code is available for type 
 java.util.concurrent.ExecutionException; did you forget to inherit a 
 required module?


 If no such module(s) exist; what would be the best workaround.

 I would like to cache some data post a successful login

 Thanks,

 gautam


-- 
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: Unable to use memcacheservice in gwt module

2015-01-28 Thread Chad Vincent
The problem is that you've put server-side code in your GWT.

Whatever is asking for the memcache needs to be moved out of your client or 
shared packages.

On Tuesday, January 27, 2015 at 4:14:02 PM UTC-6, Gautam Priya wrote:

 Is there a memcache gwt module that I could inherit from to avoid 
 compilation errors of the kind below - 

 [ERROR] Line 58: No source code is available for type 
 com.google.appengine.api.memcache.AsyncMemcacheService; did you forget to 
 inherit a required module?

  [ERROR] Line 58: No source code is available for type 
 com.google.appengine.api.memcache.MemcacheServiceFactory; did you forget to 
 inherit a required module?

  [ERROR] Line 83: No source code is available for type 
 com.google.appengine.api.memcache.ErrorHandlers; did you forget to inherit 
 a required module?

  [ERROR] Line 98: No source code is available for type 
 java.util.concurrent.FutureV; did you forget to inherit a required module?

  [ERROR] Line 133: No source code is available for type 
 java.lang.InterruptedException; did you forget to inherit a required module?

  [ERROR] Line 133: No source code is available for type 
 java.util.concurrent.ExecutionException; did you forget to inherit a 
 required module?


 If no such module(s) exist; what would be the best workaround.

 I would like to cache some data post a successful login

 Thanks,

 gautam


-- 
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: Chrome GWT Plugin required but is already installed

2015-01-12 Thread Chad Vincent
Plugin also still works in 32-bit Chrome 39.0.2171.95 m on Windows.

On Sunday, January 11, 2015 at 5:10:24 AM UTC-6, Thomas Broyer wrote:



 On Friday, January 9, 2015 at 11:55:54 PM UTC+1, SHANKAR REDDY wrote:

 I was using GWT one year back and returned here to work on new 
 development. I still lot of issue while installing/Launching with various 
 reasons. Do  we have any matrix to work on supported versions.


 Use SuperDevMode http://www.gwtproject.org/articles/superdevmode.html 
 it should work in all supported browsers.
 You can still use classic DevMode in Internet Explorer AFAIK, but it's 
 broken almost everywhere else.
  


 Kind Regards,
 Sankara Telukutla

 On Friday, November 28, 2014 at 1:26:08 PM UTC-8, Alex wrote:

 This just suddenly started happening to me. I'm developing using the 
 Maven gwt plugin on OS X against Google Chrome. I've been using it for many 
 months with no problem. Now I get prompted to download the plugin again 
 with the message:
 Development Mode requires the GWT Developer Plugin

 But I already have it installed. I've tried removing it and 
 re-installing but I still get this message. 

 Any help would be greatly appreciated!

 Thanks,

 Alex



-- 
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: GWT + GAE : how to handle communication failure...

2014-12-27 Thread Chad Vincent
Reduce the size of SaveBarterItemResult.  If the whole 3MB of data is 
required, but causes disconnects frequently, return a smaller/lighter 
object from the save call, and then retrieve the full data set in a more 
resilient manner.

On Friday, December 26, 2014 8:06:35 PM UTC-6, Clement Boret wrote:

 Hello.

 I have a question concerning: how to handle communication failure...

 The best way to explain my problem is to give an exemple:


 In my app, the user has a gwt UI page where he creates an item when he 
 has finished to fill all the requested information, he clics on a save 
 button which is going to call the server using RPC:


 serverService.saveBarterItem(saveItemRequest, new 
 AsyncCallbackSaveBarterItemResult() {
 public void onSuccess(SaveBarterItemResult result) {}
 public void onFailure(Throwable caught) {}
 });

 in my exemple, when everything is going ok, the server returns an object 
 SaveBarterItemResult.


 imagine that the object that should be returned is very big in size (for 
 exemple 3 MB).
 NOW imagine the following scenario:

 the client (the browser of the user) successfully reach the server.
 the server (which is a GAE) save the item in the DB and starts returning 
 the result.
 then the internet of the client is lost
 --
 the onFailure function is called in the browser...
 which makes the user  think that the item has not been send 
 successfully... (whereas in fact it has been send successfully and it has 
 also been saved successfully)
  



 THE PROBLEM THAT I HAVE is that I have no way to know that the item has 
 been saved successfully on the server.
 (so the normal way for my gwt app to behave would be to let the user click 
 on the save button again... but if he does, then his item will be saved two 
 times...)

 HOW  DO YOU USUALLY HANDLE THIS?



-- 
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: check wallet garden / internet connection

2014-12-22 Thread Chad Vincent
1) Walled Garden
2) Any attempt to contact a different server in the javascript will trigger 
a security warning in most browsers, if not be blocked.  You certainly can 
try and perform an HTTP request via RequestBuilder, but I wouldn't count on 
it being reliable.

On Monday, December 22, 2014 3:37:59 AM UTC-6, marian lux wrote:

 I need to check if my GWT application is inside a wallet garden (wifi 
 hotspot without internet connection). How to handle this in an easy way on 
 client side?
 Is there a way to ping e.g. google.com and return true/false in a method 
 like boolean isInWalletGarden(); ? Can anyone post such a method?

 THX Marian


-- 
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: [gwt-contrib] Selection Cell Option value vs Display Value

2013-11-03 Thread Chad Vincent
I realize it's 3 years later, but since nobody had made the issue:

https://code.google.com/p/google-web-toolkit/issues/detail?id=8417

On Wednesday, October 13, 2010 1:02:20 PM UTC-4, John LaBanca wrote:

 Users will probably want to set the ordering of the values.  Letting users 
 define the type would be more useful.

 A while back I started working on a ListBoxCell, which is a custom drop 
 box of options.  It allows selection of typed values, and you can render 
 custom options.  Hopefully we'll get it into a future GWT version.

 Thanks,
 John LaBanca
 jlab...@google.com javascript:


 On Wed, Oct 13, 2010 at 12:22 PM, John Tamplin j...@google.comjavascript:
  wrote:

 On Wed, Oct 13, 2010 at 12:10 PM, John LaBanca 
 jlab...@google.comjavascript: 
 wrote:
  Sound reasonable.  Can you open an issue to create a ValueSelectionCell 
 that
  takes an arbitrary type T and a SafeHtmlRenderer to convert the type T 
 to a
  String.

 A simpler option would be to accept MapString,String with the key
 the select value and the value what is displayed.

 --
 John A. Tamplin
 Software Engineer (GWT), Google

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




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


RequestFactoryServlet import problem with AppEngine Connected Android Project

2011-06-01 Thread Chad
I created a new AppEngine Connected Android Project but the files
created with the wizard using GPE 2.4beta had a bunch of errors. I was
able to resolve all but one.

The following import statement is bad:

import
com.google.web.bindery.requestfactory.server.RequestFactoryServlet;

Any ideas how/where to import RequestFactoryServlet?

Thanks,
Chad

-- 
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: RequestFactoryServlet import problem with AppEngine Connected Android Project

2011-06-01 Thread Chad
Turns out you need to configure SDK version as referenced here (the
instructions of course :-)): 
http://code.google.com/eclipse/docs/appengine_connected_android.html

-- 
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: Overriding panel's iterator() prevents clickHandler from being called.

2011-03-31 Thread Chad
Olivier,

The way I'd do it if I were you (and the way I've done many custom
controls) is use create your class and have it extend Composite. In
your class, you would have your ScrollPanel and VerticalPanel. Then,
expose whatever add, remove, iterator methods you want and have them
relay to your VerticalPanel, bypassing your ScrollPanel.

HTH,
Chad

On Mar 31, 1:55 pm, Vhann3000 vhann3...@gmail.com wrote:
 On 31 mar, 14:30, Ben Imp benlee...@gmail.com wrote: Correct.  You weren't 
 abusing the iterator itself, you were abusing
  the iterator method, which other things used.

  You can still extend ScrollPanel, but just add your own bit of
  interface on top of it.  Like this bit of pseudocode.

 Ok, thanks for the help.

  This is all a very view-centric way of doing it, however.  I might
  suggest reading up on the MVP pattern, which would help abstract away
  the details of the panels entirely.

 I see. Thanks again, off to reading on MVP I guess.

 Regards,
 Olivier

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



Tutorial: Using the HTML5 Canvas Element with the Google Web Toolkit (GWT)

2011-03-07 Thread Chad Lung

For anyone thats interested I have a couple new articles on using the
HTML5 Canvas element with GWT 2.2.

Using the HTML5 Canvas Element with the Google Web Toolkit (GWT)
http://www.giantflyingsaucer.com/blog/?p=2338

Using the Google Web Toolkit (GWT) to create an HTML5 Canvas that uses
(almost) all available space
http://www.giantflyingsaucer.com/blog/?p=2350

I hope this can help some people out.

Chad Lung

-- 
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: Load/Display KML file in GWT Google Maps

2011-02-08 Thread Chad
Irene,

I don't have a tutorial for you, but it is rather simple and
straightforward. The process goes like this:

pre
GeoXmlOverlay.load(key, new GeoXmlLoadCallback() {
  @Override
  public void onSuccess(String url, GeoXmlOverlay overlay) {
map.addOverlay(overlay);
overlay.gotoDefaultViewport(map);
  }

  @Override
  public void onFailure(String url, Throwable caught) {
Window.alert(Retrieving data for the overlay caused the 
+
following error:\n\n + caught.getMessage());
  }
});
/pre

It's a simple call to the static load method of GeoXmlOverlay. It
takes the url of the KML/KMZ file (must be a public location) and a
callback. The callback will contain an actual GeoXmlOverlay object
that can be added to your map via addOverlay. It also has a method
that lets you recenter the map to the overlay itself so in the example
above, I add the overlay to the map and then make sure the new overlay
is visible to the user.

HTH,
Chad Bourque
www.milamade.com


On Feb 8, 4:30 am, Irene irenegarciaima...@gmail.com wrote:
 Hi all,

 I am developing a small project using GWT with embedded Google Maps. I
 have a KML file representing some 2D elements such as polylines and
 markers, so I would like to know if there is any way of loading these
 data from the GWT project and display it on runtime.

 I have found a Demo project called KmlOverlayDemo.java but as it is
 part of a bigger example, I do not understand properly the execution
 flow so I can't reproduce this behaviour on my own project. I was
 expecting a more simple case to extend it step by step, does any one
 know any?

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



Re: Manipulate localized date on the server side

2010-12-14 Thread Chad
Sydney,

I don't know if it's the best approach or not, but keep all dates and
times in GMT on the server side. I simply add or subtract the local
offset on the client. In places where the user enters a date/time, I
offset it to GMT before passing it to the server. The conversion is
very fast and I never have to worry about any conversions on the
server side. I do the conversion on the client only when I want to
show it in the local time zone (which is all the time at this point).
For reports/exports, I let the user choose to export the data in their
local time or GMT.

HTH,
Chad
www.milamade.com

On Dec 14, 7:47 pm, Sydney sydney.henr...@gmail.com wrote:
 Well not much response on that topic, so let me explain in a better way my
 problem. I have the class Facility in shared folder (client and server).

 public class Facility {
   private ListLog logs;
   // getter, setter

 }

 public class Log {
   private Date date;
   // getter, setter

 }

 I would like to run this method server side. Right now it does not take
 account for locale and is a method of Facility:

 public MapString, Integer countAccess() {
   SimpleDateFormat smf = new SimpleDateFormat(M);
   MapString, Integer mapAccess = new HashMapString, Integer();
   for(Log log: logs) {
     String currentMonth = smf.format(log.getDate());
     Integer count = mapAccess.get(currentMonth);
     if(count == null) {
       count = 1;
     }
     mapAccess.put(currentMonth, count);
   }
   return mapAccess;

 }

 The facility has been accessed only once on 12/01/10 at 1:30 GMT, several
 users would have different report:
 locale en-US: November 1, December 0
 locale fr-FR: Novembre 0, Decembre 1

 1/ I understand that to use this algorithm it needs to be executed on the
 server side, but the method is part of an object Facility that can be shared
 client and server side. Where should I put this method to be able to run it
 on the server side? Also this version does not use any locale, so how can I
 get the client locale?

 2/ Another solution is to return the list of date and run the algorithm on
 the client side by using DateTimeFormat but I am wondering if it's a good
 solution since you have to send a lot of data over the wire.

 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: Get a PDF from the Server

2010-11-30 Thread Chad
Sean,

The way I do it (and this may not be the best way) is to use RPC to
send the user requests to the server. Then, I store the request data
in a table on the server, generating a unique id for that data. The
unique id is returned to the user via the RPC callback. Then, a new
window is opened with the url set to the servlet address and the
unique id as the token in the url. In the servlet, I use that token to
look up the request data, build the PDF, delete the request data, and
return the PDF. This method allows me to send as much data as I want
via RPC and then I only need to send a single parameter with the url
to the servlet.

HTH,
Chad Bourque
www.milamade.com

On Nov 30, 3:52 pm, Sean slough...@gmail.com wrote:
 Hi, I apologize in advance, I am extremely new to HttpServelet and
 RequestBuilders, so if this is a dumb question, I apologize. I
 typically just work with RPC's, but I don't think this will work in
 this case.

 I have the user select a bunch of options from the website, then I hit
 publish, and it sends the data to the server (using serializable
 objects, not Strings) and on the server a PDF is generated, and I want
 to return the PDF. I can send the objects, make the PDF, but I can't
 return it using RPC's.

 After googling a bunch, it seems I should be using a RequestBuilder
 with an HttpServlet on the Server side. However, it seems you really
 can't send much data with the request, just a single string. Am I
 supposed to encode all the data into one string and then decode it on
 the other side? That seems like a huge hassle, one I will have to re-
 do for every Servlet, compared to RPC's.

 For example, I am sending a bunch of SoftballGame objects. Each with
 their home team, away Team, time and which team is selected to win. I
 don't want to have to encode the team names, as well as the time and
 selection into a string, and then do that for all the games.

 What's the proper way to attack this?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: All I Want for Christmas is a powerful Widget Library from Google !

2010-11-16 Thread Chad
I completely agree with Thomas on this one. Just look at GXT apps for
another example. By GWT not having slick looking widgets, it forces a
developer to create a look and feel for their own apps. I'd much
prefer the GWT team to keep pumping out more function over form.

Chad Bourque
www.milamade.com

On Nov 16, 11:28 am, Thomas Broyer t.bro...@gmail.com wrote:
 On 16 nov, 17:33, har_shan harsha...@gmail.com wrote:

  This should be there in almost all developer's wish list who are using
  GWT.

 Er, absolutely not. I'm more than happy with a widget set that gives
 me a total latitude towards how my app will look like. That's one of
 the biggest issues of Sencha: more than half the sites/apps in their
 spotlight series [1] feels Sencha, tates Sencha, smells
 Sencha (well that's also because their developers are not creative
 enough: half the apps I've seen using Sencha copy their Explorer
 sample and even its awful and unintuitive UX! but Sencha full-
 featured widgets are, before all, recognizable amongst all); and
 that's definitely NOT something I want!

 [1]http://www.sencha.com/blog/category/spotlight/

-- 
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: Deploying GWT project on Tomcat

2010-11-09 Thread Chad
After you compile your project, go into the war folder and zip up the
contents of that folder. Name the zip file something.war where
something will be what you want your url to be. So, if you are
deploying to www.milamade.com, and named your war file dtrac.war, your
app would be available at www.milamade.com/dtrac. Now, copy your war
file to the webapps folder of your Tomcat server. The first time you
do that, Tomcat will automatically extract it and create the necessary
folder for you. When redeploying, you will still copy the new war file
to the same location (overwriting the old one), but then you will need
to run Tomcat manager and choose to reload the app.

HTH,
Chad Bourque
www.milamade.com

On Nov 9, 5:52 am, Pablo G.F blay...@gmail.com wrote:
 Hello:

 I want to deploy a GWT project on a Tomcat server. As I´ve read, all I
 have to do is compile the GWT project (by the option in Eclipse, for
 example) and then (the app name is menutemplate):

 - Create a directory on webapps (in the Tomcat path) with name, for
 example, myapp.
 - Copy war/menutemplate directory (output of compilation) into myapp.
 - Copy menutemplate.html and menutemplate.css into my app.

 Doing this, my app works, but If i add a service with a rpc call it
 doesn´t. I suppouse I have to specify the servlets in the web.xml
 which is on WEB-INF, but when I copy the WEB-INF into myapp directory,
 then I cannot run the application.

 Have I made any mistake during the process? or have I forgotten any
 step?

 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: Handling ClickEvents with custom composite widgets

2010-11-05 Thread Chad
nathan,

When building composite widgets, it is up to you, within the composite
widget, to handle and/or expose whatever events you want. So, if you
want to be able to expose click events for multiple buttons in a
composite, you may be best off doing one of two things:

1) Create a public enum that contains an entry for each of the
buttons. Then, provide a method to get which button was clicked so
that when someone handles the click event, they can query for the most
recently clicked button.

2) Create custom events for each action that can be taken by the
composite widget and you other classes would handle those custom
events rather than a click event.

Option 2 is better, but more complicated. Generally, when you create a
composite widget, the internal widgets are all handled by the
composite. If you want access to all the internals, then you aren't
really wanting a composite widget at all.

HTH,
Chad Bourque
www.milamade.com


On Nov 5, 1:14 pm, nathan nsll...@gmail.com wrote:
 I tried event.getSource() but since I created a custom widget, called
 CompositeWidget, and I'm listening for a click in the LeftPanel, I
 believe event.getSource() is returning LeftPanel, not the
 CompositeWidget. So the contents of the CompositeWidget are not
 available from event.getSource(). I could be way off on this.

 I think it could have something to do with Event Bubbling. Mentioned
 here:http://code.google.com/webtoolkit/doc/1.6/FAQ_UI.html#How_can_I_effic...,
 but I don't know how to implement that.

 I should mention that I'm new to GWT, so if I'm just doing something
 completely wrong or inefficient, please let me know.

 I put an example of what I'm trying to do 
 here:https://code.google.com/p/gwtcustomwidgeteventhandling/source/browse/

 When the Remove button is clicked, I want that CompositeWidget to be
 removed from the LeftPanel, and it's contents removed from the
 RightPanel.

 I understand I'm probably not explaining myself well, and what I put
 up may not be the best example, but thanks for any help.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Route animation in google maps with GWT

2010-10-11 Thread Chad
Jan,

You can do it all with GWT. You can see a partial example of it here:

http://www.dtrac.us/hmr.html

I say partial because that page is setup for a race that takes place
in the future so there aren't any position reports to show yet. But,
even without that, you can see how the time line and animation works.
There is a time line (slider control) that can be manipulated
manually. There is a spinner control to allow user control over the
speed (forwards and backwards). There are also overlays that can be
turned on and off (and zoomed into). And the main race course can be
zoomed to (target images). We will also be tracking Marco Nannini in
the Route du Rhum next month. You can see the tracking page for his
race on his site:

http://www.marconannini.com/tracking

You'll notice the sites look very similar. The fact is, I did this
data driven. This way, I can just add a few rows to a few tables to
create a new event. It also supports multiple devices (boats, cars,
people, whatever) in a single event. It's not hard to do. Brian pretty
much hit it on the head when he said to use an array and a timer. Mine
was a little more complex since I keep the slider, the polyline, and
the position reports all in sync.

Have fun,
Chad
www.milamade.com


On Oct 9, 7:53 am, Jan jan.widm...@gmx.ch wrote:
 Hi all,

 For an actual project, we need to evaluate movements of motor-ships.
 The position datas are sent from a gps router on the ships and are
 saved in a database on our server. One of our goals is to show the
 driven way of one or more ships between a specified time as an
 animation. Our Application is written in Java with GWT. What we have
 already is, that the driven way get's drafted like a normal route in
 google maps. What we want is, to show for example all ship movements
 for one day in fast motion.

 My actual problem is, how to animate the driven way. Is it possible to
 do the animation in GWT, or do we need to use javascript?

 I hope, someone can give me some ideas.

 Thanks a lot.

 Jan

-- 
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: Sending mails from GWT-App

2010-09-28 Thread Chad
He meant it isn't a GWT issue. The code you are trying to make work
has nothing to do with GWT other than it is being referenced from the
server-side code compiled by your GWT app. That said, here's some code
I use to send emails:

pre
try {
  Session mailSession =
Session.getDefaultInstance(getProperties(hostRow));

  Transport transport = mailSession.getTransport();

  MimeMessage message = new MimeMessage(mailSession);

  String body = emailRow.getBodyText();

  message.setSubject(emailRow.getTheme());
  message.setContent(body, text/plain);

  message.addRecipient(RecipientType.TO,
  new InternetAddress(userRow.getEmail()));

  transport.connect(hostRow.getHostName(), hostRow.getHostPort(),
  hostRow.getAuthUser(), hostRow.getAuthPass());

  transport.sendMessage(message,
message.getRecipients(RecipientType.TO));

  transport.close();
} catch (Throwable caught) {
  throw new Exception(caught.getMessage());
}
/pre

HTH,
Chad

On Sep 28, 8:20 am, newnoise tommmuel...@googlemail.com wrote:
 What does that mean?

 On 28 Sep., 15:12, Paul Grenyer paul.gren...@gmail.com wrote:



  Hi

  This isn't a GET issue

  Paul

  On Tue, Sep 28, 2010 at 1:46 PM, newnoise tommmuel...@googlemail.comwrote:

   Hi,

   I'm trying to send an email from my GWT-App. I found the following
   code using google:
   protected void sendMessage(String smtpHost, String fromAddress, String
   fromName, String to, String subject, String text) {
   // Get system properties Properties
   props = System.getProperties();
   // Setup mail server
   props.put(mail.smtp.host, smtpHost);
   // Get session
   Session session = Session.getDefaultInstance(props, null);
   // Define message
   MimeMessage message = new MimeMessage(session);
   // Set the from address
   message.setFrom(new InternetAddress(fromAddress, fromName));
   // Set the to address
   message.addRecipient(Message.RecipientType.TO, new
   InternetAddress(to));
   // Set the subject
   message.setSubject(subject);
   // Set the content
   message.setContent(text, text/html);
   // Send message
   Transport.send(message);
   }

   But I'm getting a java.lang.AssertionError: null.

   I was wondering why I do not have to enter a password for the smtp-
   server, and what to enter at String smtpHost, as I have to enter my
   Smtp-Host at props.put() again ...

   Thanks!
   Tom

   --
   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.comgoogle-web-toolkit%2Bunsubs
cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

  --
  Thanks
  Paul

  Paul Grenyer
  e: paul.gren...@gmail.com
  b: paulgrenyer.blogspot.com
  t: pjgrenyer

-- 
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: Crop a photo stored locally

2010-09-23 Thread Chad
Josh,

If I were doing it, I think I'd start off with a route something like
this:

- User uploads photo
- Servlet saves the photo somewhere (database or file system)
- Client page displays the image (using Image widget)
- User can drag and drop to create a cropping rectangle over the image
- When user is done, use RPC to send the size and location (relative
to the Image widget) to the server
- Server side code crops the image based on that size and location and
saves to database or file system

HTH,
Chad

On Sep 22, 10:02 pm, Josh Tinkham unitin...@gmail.com wrote:
 I'm building a costume database program for a local high school.  I
 want the kids to be able to take a picture of a costume, load the
 memory stick on a PC and upload the pic via a FileUpload widget, then
 present them with a photo cropping gui to cut down the picture.  From
 there the post-cropped pic goes back to the server and into a
 database.

 There's lots of stuff on this forum saying I can't read the JPG
 directly from the client browser, so I think that means I have to use
 the form widget with an HTML servlet (right?).  Once its on the
 server, I need to get the pic back to the client (how do i do that)?
 Then present it with a cropping mechanism.

 There are some really slick looking croppers on the web, but haven't
 found anything on how to pull them into GWT:
 Yahoo 
 ImageCropper:http://developer.yahoo.com/yui/examples/imagecropper/simple_crop.html
 Kroppr:http://kroppr.rborn.info/
 Jcrop:http://deepliquid.com/content/Jcrop.html

 How can I get these overlaid on my picture, then get the results after
 the user has accepted their crop operation so the numbers can be sent
 back to the server to actually crop the pic?

-- 
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 tell when a text box loses focus

2010-09-21 Thread Chad
Brett,

You are looking for the BlurHandler / onBlur.

HTH,
Chad

On Sep 21, 3:23 pm, Brett Thomas brettptho...@gmail.com wrote:
 Hey, basic question here that I can't find the answer to. Is there any way
 to do something to a TextBox when it loses focus in GWT 2.0?

 The FocusListener interface, which has an onLostFocus method, was deprecated
 in favor of FocusHandler, which does not. Can't find anything comparable.

 Use case: I want to submit a field to the server without a submit button. I
 don't want to do it after every character change, though, so can't just use
 addValueChangeHandler().

 Thanks,
 Brett

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



An Updated GWT Designer Tutorial

2010-09-17 Thread Chad Lung

I'm posting this in the GWT Group simply because not everyone is aware
of the GWT Designer forum yet ( 
http://forums.instantiations.com/viewforum.php?f=11
).

I have written an updated version of my prior tutorial using the GWT
Designer, you can find it here:

http://giantflyingsaucer.com/blog/?p=1606

Hopefully this will help out the people whom are new to the GWT
Designer.

Chad Lung

-- 
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 block click event?

2010-09-07 Thread Chad
Instead of trying to block the event, why not just eat it. In your
widget, on the click event, check the state of the widget. If the
state is enable, only then fire the click event to any registered
listeners.

HTH,
Chad

On Sep 6, 10:06 am, ulgerang ulger...@gmail.com wrote:
 Hi,

 I am making 'ImageButton' that extends 'Image' and implemented
 'HasEnabled' interface.
 I made 3 state, disable,mouseover, enable.
 When I was making disable,  I have to block the click event  from the
 widget.
 but  I couldn't find the way.

 Is there any way to block the click event?

-- 
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 add a widget as a Panel on top of the MapPanel

2010-08-30 Thread Chad
Kiarash,

What are you trying to accomplish? You want to cover the map with a
panel, but still have the map work? If the panel contains an image
that you are simply trying to overlay on the map, use the
map.addOverlay method. With that, you can put images or just about
anything else you want right on the map and it becomes part of the map
so that the map keeps all of its functionality. If that's not what
you're after, please try to explain what you want a bit more clearly.

HTH,
Chad

On Aug 29, 8:37 am, Kiarash email@gmail.com wrote:
 I successfully have been implementing the gwt google maps. I am trying
 to add a Panel on the top of the Map, but when I add a panel on top of
 the Map so the map loose its functionality... I cannot move the map or
 zoom etc... What I do is that adding the map to the LayoutPanel
 myMapPanel, next myMapPanel.add(googleMap), next
 myMapPanel.add(mySmalPanelOnTop)... and the map loose its
 functionality. Is there a way working around this??? Thanx!!!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Runtime.exec on sever side

2010-08-27 Thread Chad
Andrew,

That is not the case. Disabling GAE has no effect on being able to
debug in that manner. None of my projects use GAE and all are tested
and debugged via Eclipse - Debug As - Web Application.

HTH,
Chad

On Aug 27, 11:37 am, Andrew McCann andrewjmcc...@gmail.com wrote:
  I should have added --  Disable GAE, and delete all GAE related jar files
  from you classpath.
  Disabling GAE doesn't automatically remove the jars, and they kind of
  interfere with the inbuilt server.

 Is it not the case that if I disable the GAE I cannot run
 Eclipes-Debug As-Web application?

 Cheers

 Andrew

-- 
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: Returning values, next try. Sending was too fast for me

2010-06-09 Thread Chad
When you call loginUser, you will create an instance of
XGENgwtModelCallback (I'm assuming that's what you called
LoginCallback). In that instantiation, you will need to define the
onLogin method:

loginModel.loginUser(user, passwd, false, new XGENgwtModelCallback() {
  @Override
  public void onLogin(int feedback) {
// Decide what to do using the feedback parameter which contains
your value
  });

If you want to use the same interface for multiple callback types, you
can add methods, but then you'll have to implement them in every case.
So, you will end up implementing methods that won't get called. It's
better to create a specific interface for each type of callback you
need.

HTH,
Chad

On Jun 9, 3:57 am, uwi_u uwe.chris...@gad.de wrote:
 Thanks a lot,

 but I've got further questions  ;)

 I'm using gwt-mvc. So, the described Method is located in the Model.
 What to do in the Controller exactly? After calling loginUser, my
 program decides which way to go by taking the feedback.
 So should I do the following?

 loginModel.loginUser(user, passwd, false, new XGENgwtModelCallback(
    /*  Decide what to do, but how to get the loginFeedback */

 ));

 Thinking Async almost drives my crazy :-(

 BTW: I've got other methods, which return DB2-SQL-Queries as a
 VectorVectorString I guess, I should rename LoginCallback to
 ModelCallback and add another Method public void
 onSQLQuery(VectorVectorString vec) as well, should I?

 On 9 Jun., 00:15, Chad chad...@gmail.com wrote:



  Oh, BTW, you would need to move your call to logToServer into the
  onSuccess as well. I didn't notice that one at first.

  HTH,
  Chad

  On Jun 8, 2:28 pm, Chad chad...@gmail.com wrote:

   You don't want to block the UI with a while loop. Instead, consider
   creating an interface with a single method:

   public interface LoginCallback {
     void onLogin(int feedback);

   }

   Then, alter your loginUser method to return void and take as an
   addition parameter a LoginCallback:

   public void loginUser(String user, String passwd, boolean override,
   final LoginCallback cb) {
     XGENgwt.loginUser(user, passwd, override, new AsyncCallback() {
       public void onSuccess(Object result) {
         cb.onLogin(Integer.parseInt(result.toString()));
       }

       public void onFailure (Throwable caught) {
         Window.alert(Unable to login: +caught.toString());
       }
     });

     logToServer(Bei der Zuweisung: +loginFeedback);

   }

   You could also call the onLogin from the onFailure if you wanted to.
   Or create an addition method in your LoginCallback to call from the
   onFailure.

   Take the code that currently follows the call to your loginUser method
   and move it into the onLogin method of an instance of LoginCallback
   that gets passed to the new loginUser method. Think Async! ;-)

   HTH,
   Chad

   On Jun 8, 8:07 am, uwi_u uwe.chris...@gad.de wrote:

Hi there,

I'm currently writing an Application with GWT, and am Stuck at one
position:

When I call my RPC, the value which is to be returned, will be passed
to an global variable. Unfortunately, the returning of this global
variable out of the method happens before the onSuccess comes
back.

the only way to block which I see is to do a while until 
loginFeedback  0

Heres some Code (loginFeedback shall get a value from 0 to 2):

public int loginUser(String user, String passwd, boolean override){
          loginFeedback = -1;
          XGENgwt.loginUser(user, passwd, override, new AsyncCallback(){
                public void onSuccess(Object result){
                  loginFeedback = Integer.parseInt(result.toString());
                }
                public void onFailure (Throwable caught){
                  Window.alert(Unable to login: +caught.toString());
                }
          });
          logToServer(Bei der Zuweisung: +loginFeedback);
          return loginFeedback;
        }

Is there a better way? I hope so

-- 
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: Returning values, next try. Sending was too fast for me

2010-06-08 Thread Chad
You don't want to block the UI with a while loop. Instead, consider
creating an interface with a single method:

public interface LoginCallback {
  void onLogin(int feedback);
}

Then, alter your loginUser method to return void and take as an
addition parameter a LoginCallback:

public void loginUser(String user, String passwd, boolean override,
final LoginCallback cb) {
  XGENgwt.loginUser(user, passwd, override, new AsyncCallback() {
public void onSuccess(Object result) {
  cb.onLogin(Integer.parseInt(result.toString()));
}

public void onFailure (Throwable caught) {
  Window.alert(Unable to login: +caught.toString());
}
  });

  logToServer(Bei der Zuweisung: +loginFeedback);
}

You could also call the onLogin from the onFailure if you wanted to.
Or create an addition method in your LoginCallback to call from the
onFailure.

Take the code that currently follows the call to your loginUser method
and move it into the onLogin method of an instance of LoginCallback
that gets passed to the new loginUser method. Think Async! ;-)

HTH,
Chad


On Jun 8, 8:07 am, uwi_u uwe.chris...@gad.de wrote:
 Hi there,

 I'm currently writing an Application with GWT, and am Stuck at one
 position:

 When I call my RPC, the value which is to be returned, will be passed
 to an global variable. Unfortunately, the returning of this global
 variable out of the method happens before the onSuccess comes
 back.

 the only way to block which I see is to do a while until 
 loginFeedback  0

 Heres some Code (loginFeedback shall get a value from 0 to 2):

 public int loginUser(String user, String passwd, boolean override){
           loginFeedback = -1;
           XGENgwt.loginUser(user, passwd, override, new AsyncCallback(){
                 public void onSuccess(Object result){
                   loginFeedback = Integer.parseInt(result.toString());
                 }
                 public void onFailure (Throwable caught){
                   Window.alert(Unable to login: +caught.toString());
                 }
           });
           logToServer(Bei der Zuweisung: +loginFeedback);
           return loginFeedback;
         }

 Is there a better way? I hope so

-- 
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: Returning values, next try. Sending was too fast for me

2010-06-08 Thread Chad
Oh, BTW, you would need to move your call to logToServer into the
onSuccess as well. I didn't notice that one at first.

HTH,
Chad

On Jun 8, 2:28 pm, Chad chad...@gmail.com wrote:
 You don't want to block the UI with a while loop. Instead, consider
 creating an interface with a single method:

 public interface LoginCallback {
   void onLogin(int feedback);

 }

 Then, alter your loginUser method to return void and take as an
 addition parameter a LoginCallback:

 public void loginUser(String user, String passwd, boolean override,
 final LoginCallback cb) {
   XGENgwt.loginUser(user, passwd, override, new AsyncCallback() {
     public void onSuccess(Object result) {
       cb.onLogin(Integer.parseInt(result.toString()));
     }

     public void onFailure (Throwable caught) {
       Window.alert(Unable to login: +caught.toString());
     }
   });

   logToServer(Bei der Zuweisung: +loginFeedback);

 }

 You could also call the onLogin from the onFailure if you wanted to.
 Or create an addition method in your LoginCallback to call from the
 onFailure.

 Take the code that currently follows the call to your loginUser method
 and move it into the onLogin method of an instance of LoginCallback
 that gets passed to the new loginUser method. Think Async! ;-)

 HTH,
 Chad

 On Jun 8, 8:07 am, uwi_u uwe.chris...@gad.de wrote:



  Hi there,

  I'm currently writing an Application with GWT, and am Stuck at one
  position:

  When I call my RPC, the value which is to be returned, will be passed
  to an global variable. Unfortunately, the returning of this global
  variable out of the method happens before the onSuccess comes
  back.

  the only way to block which I see is to do a while until 
  loginFeedback  0

  Heres some Code (loginFeedback shall get a value from 0 to 2):

  public int loginUser(String user, String passwd, boolean override){
            loginFeedback = -1;
            XGENgwt.loginUser(user, passwd, override, new AsyncCallback(){
                  public void onSuccess(Object result){
                    loginFeedback = Integer.parseInt(result.toString());
                  }
                  public void onFailure (Throwable caught){
                    Window.alert(Unable to login: +caught.toString());
                  }
            });
            logToServer(Bei der Zuweisung: +loginFeedback);
            return loginFeedback;
          }

  Is there a better way? I hope so

-- 
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: Dialog is hidden behind Earth Map

2010-05-05 Thread Chad
Thanks,

I'll most likely play around with this solution.

Chad

On May 4, 9:24 pm, El Mentecato Mayor rogelio.flo...@gmail.com
wrote:
 A solution (kind of the third option you mentioned, but you don't have
 to hide the map completely unless you want to move the dialog around--
 on top of the map) is to use a shimmer. Read it in this old thread,
 I use this method to get around this limitation with a Java applet:

 http://groups.google.com/group/google-web-toolkit/browse_thread/threa...

 On Apr 26, 8:36 pm, Chad chad...@gmail.com wrote:





  Eric,

  Thanks. So I guess I'm out of luck unless:

   * I change my UI layout so that the dialogs don't cover the map (or
  get covered by the map in this case)
   * I swap map types before displaying any dialogs and change it back
  after (when the Earth map type is being used)
   * I hide the map completely when I need to show a dialog (could be
  done with no regard to map type)

  Are there any other possible routes I haven't thought of here?

  Thanks,
  Chad

  On Apr 26, 3:16 pm, Eric Ayers zun...@google.com wrote:

   Hmm.  I think this is because the Earth map type is actually a Flash 
   plugin.

   On Mon, Apr 26, 2010 at 3:40 PM, Chad chad...@gmail.com wrote:
I was able to find the earth div, but even setting the z-index on it
down seems to have no effect.

Anyone?
Chad

On Apr 26, 1:27 pm, Chad chad...@gmail.com wrote:
Hi all,

I have an application written in GWT 2.0.3 using GWT Maps 1.0.4. At
times, I display a modal dialog (with the glass panel enabled). This
works as expected if the map is displaying a normal map type (Map,
Satellite, Hybrid, Terrain), but if the map is displaying an Earth
map, the map stays on top of the dialog. The map is still usable, but
the rest of the browser client area is grayed out (due to the glass
panel) and the dialog itself is behind the map (the map covers most of
the client area). I've tried setting the z-index of the map widget
down and I've tried setting the z-index of the dialog up, but neither
seem to make any difference.

I tried to debug it in FF, but Firebug can't even select anything to
do with the map as far as I can tell.

Any Ideas?

TIA,
Chad

--
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 
athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

   --
   Eric Z. Ayers
   Google Web Toolkit, Atlanta, GA USA

   --
   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 
   athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

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

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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.



Dialog is hidden behind Earth Map

2010-04-26 Thread Chad
Hi all,

I have an application written in GWT 2.0.3 using GWT Maps 1.0.4. At
times, I display a modal dialog (with the glass panel enabled). This
works as expected if the map is displaying a normal map type (Map,
Satellite, Hybrid, Terrain), but if the map is displaying an Earth
map, the map stays on top of the dialog. The map is still usable, but
the rest of the browser client area is grayed out (due to the glass
panel) and the dialog itself is behind the map (the map covers most of
the client area). I've tried setting the z-index of the map widget
down and I've tried setting the z-index of the dialog up, but neither
seem to make any difference.

I tried to debug it in FF, but Firebug can't even select anything to
do with the map as far as I can tell.

Any Ideas?

TIA,
Chad

-- 
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: Dialog is hidden behind Earth Map

2010-04-26 Thread Chad
Eric,

Thanks. So I guess I'm out of luck unless:

 * I change my UI layout so that the dialogs don't cover the map (or
get covered by the map in this case)
 * I swap map types before displaying any dialogs and change it back
after (when the Earth map type is being used)
 * I hide the map completely when I need to show a dialog (could be
done with no regard to map type)

Are there any other possible routes I haven't thought of here?

Thanks,
Chad


On Apr 26, 3:16 pm, Eric Ayers zun...@google.com wrote:
 Hmm.  I think this is because the Earth map type is actually a Flash plugin.





 On Mon, Apr 26, 2010 at 3:40 PM, Chad chad...@gmail.com wrote:
  I was able to find the earth div, but even setting the z-index on it
  down seems to have no effect.

  Anyone?
  Chad

  On Apr 26, 1:27 pm, Chad chad...@gmail.com wrote:
  Hi all,

  I have an application written in GWT 2.0.3 using GWT Maps 1.0.4. At
  times, I display a modal dialog (with the glass panel enabled). This
  works as expected if the map is displaying a normal map type (Map,
  Satellite, Hybrid, Terrain), but if the map is displaying an Earth
  map, the map stays on top of the dialog. The map is still usable, but
  the rest of the browser client area is grayed out (due to the glass
  panel) and the dialog itself is behind the map (the map covers most of
  the client area). I've tried setting the z-index of the map widget
  down and I've tried setting the z-index of the dialog up, but neither
  seem to make any difference.

  I tried to debug it in FF, but Firebug can't even select anything to
  do with the map as far as I can tell.

  Any Ideas?

  TIA,
  Chad

  --
  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 
  athttp://groups.google.com/group/google-web-toolkit?hl=en.

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

 --
 Eric Z. Ayers
 Google Web Toolkit, Atlanta, GA USA

 --
 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 
 athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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.



Learning to develop Custom Widgets :: onAttach

2010-04-18 Thread Chad
I am working on developing a few custom widgets in order to learn how
GWT works. One of these widgets is a custom scrollbar similar to that
used by Google Wave. I have most of the widget working using nested
DIV elements to display the visual elements. However, I am having
difficulty getting the controls Up Button, Down Button and the Drag
handle to provide events to my widget instance. These elements were
created using nested DIVs as well.

This scrollbar is not nested in a parent widget, but scrollbar itself
is attached to the root of the DOM and is positioned dynamically. I
cannot receive the events on the nested DIV elements unless I call the
onAttach method in my constructor. I see the operation of this widget
being similar to that of the DialogBox, but I cannot figure out where
the onAttach method is called on the dialog boxes?

Can anyone give me some input or ideas on where to start reading?

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 to get OnMouseOver Event on DIV Element

2010-04-11 Thread Chad
I have a custom widget that extends SimplePanel. This widget consists
of a few extra DIV tags and for one I would like to receive the
onmouseover and onmouseout events. What is the proper method for
getting these events for a specific DOM element within a custom
Widget?

Thanks,
-- Chad

-- 
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 put same widget under multiple tabs in TabLayoutPanel?

2010-04-10 Thread Chad
One option would be to add a selection handler to the TabPanel and
when the tab changes remove the controls from the display and attach
them to the new tabs content.

On Apr 8, 11:49 pm, enjoylife youwe...@gmail.com wrote:
 I have a TabLayoutPanel with 3 tabs, each tab contain a table.  I need
 to place a control panel above and  below  tables.  All 3 tables will
 share same control panel. (panel is for selecting all rows in a table)

 I am having problem getting this to work.

 Here is code for tablayoutpanel with one tab.  Anyone kow how I can
 have same control appear in 3 different tabs under a table?

                 g:TabLayoutPanel barUnit='EM' barHeight='3'
 ui:field='tabPanel'
                   g:tab
                     g:header size='3'/
                     g:FlowPanel
                       g:ScrollPanel
                         g:FlexTable ui:field='table'
 styleName='{style.table}'/
                       /g:ScrollPanel
                     /g:FlowPanel
                   /g:tab

 control panel

           g:FlowPanel
             g:Button ui:field='selectAll'/
             g:Button ui:field='selectNone'/
           /g:FlowPanel

 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.



theming CssResourse and ClientBundle

2010-04-08 Thread Chad
I am working on creating a number of custom widgets and would like to
enable the user of my modules jar to customize the appearance of these
widgets. In the process of creating the widgets I have used a
ClientBundle to hold the ImageResources and an embedded CssResource.
Is it possible for the end user to override style properties and/or
provide alternate images for these widgets?

What is the best practice for creating a theme-able widget library?

Thanks,
-- Chad

-- 
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: load content of directory server side Options

2010-03-28 Thread Chad
On the server, you can use Java (or whatever else you want). So, make
an RPC call from the client to the server to get the file names. You
could return a string array. On the server, it could be as easy as:

public String[] getImageNames() {
  return new File('images').list();
}

Obviously, you would want to throw in some error checking and such.

HTH,
Chad

On Mar 28, 9:21 pm, sc3sc3 . sc3...@gmail.com wrote:
 Jeff Chimene wrote:
  On 03/28/2010 11:19 AM, sc3sc3 . wrote:
  hi
  i have directory with images im my war file:
  /war/images
  how can i iterate over the contents of this directory
  when my application starts
  i have to build: ListString imageNames
  thanks for your time
  sc3*2

  Can you define the images using a client bundle? See
 http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html

 if i understand it right
 using the above i have to manually define all the images

 i would prefer reading the content of the directory 'on the fly'
 there can be a lot of images

 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: Multi-tenancy in GWT

2010-03-23 Thread Chad
Kyle,

While you *may* be able to do that, the general GWT way would be to
have your urls look more like this:

mysite.com/myapp.html#/acmeHairSalon
mysite.com/myapp.html#/genericDogCollars

And you can easily access the tokens via the History class (the
getToken method).

HTH,
Chad

On Mar 23, 8:24 pm, Kyle Baley kyle.ba...@gmail.com wrote:
 Not sure I understand. I plan to filter data on the server side of
 things. But I don't know how to configure GWT to allow me to navigate
 to specific client for the entire app.

 For example, Acme Hair Salon would navigate to mysite.com/
 acmeHairSalon/myapp.html and Generic Dog Collars would navigate to
 mysite.com/genericDogCollars/myapp.html. Both URLs should map to the
 same instance of the application but in it, I'd check the URL to see
 which company was being used and filter all the data in it
 accordingly. I know how to do the filtering and can probably figure
 out how to check the URL for a company token. But I don't know how to
 configure GWT and/or GAE to use a single instance of the application
 for multiple (generic) URLs that aren't pre-defined. It sounds to me
 like something that should be done in web.xml but again, I don't know
 how.

 On Mar 23, 1:01 pm, dolcra...@gmail.com dolcra...@gmail.com wrote:



  So you can just built the ui once and always include it in the login
  page for which ever client as the server should be where you filter/
  prevent access to data that's not for the current client.

  On Mar 22, 10:41 am, Kyle Baley kyle.ba...@gmail.com wrote:

   I'm new to GWT and the Java world having been in the .NET space for
   about 10 years. Our application will be a multi-tenant one (at least,
   to the degree that I understand the definition). We'd like customers
   to be able to navigate towww.mysite.com/customerName, then log in
   from there. I think I have a handle on how to manage this from the GAE
   datastore side but am wondering how to manage this URL mapping in
   web.xml for GWT.

   Also, would like to get some opinions on how to manage the
   authentication once it's set up. Here's how I see it working:
   - User navigates towww.mysite.com/customerName
   - System retrieves company data and stores in session and displays
   login page
   - User logs in. System authenticates user
   - For all RPC calls, system verifies user is logged in *and* checks
   that the URL matches the company info in the session

   Basically, I want to guard against a user logging into one client
   site, then navigating to another.

   Thanks
   Kyle

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



New GWT 2.0 tutorials

2010-03-12 Thread Chad Lung

For those that are interested I've posted two easy to follow tutorials
based on GWT 2.0:

Tutorial: Learning GWT 2.0 and RPC:
http://giantflyingsaucer.com/blog/?p=1017

Tutorial: Using UiBinder in Google Web Toolkit 2.0 (GWT):
http://giantflyingsaucer.com/blog/?p=978

Any feedback can be left on my blog, thanks.

Chad Lung

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



Earth Map won't load

2010-03-11 Thread Chad
Hi all,

I have an app that has been working fine (in development and on the
web) with the map integrated. Now, I want to add the Google Earth plug-
in as a map type. When I first added the code to set the current map
type to the earth map, it didn't work in Chrome, but it did work in IE
and FF. This was in development only. Then, it stopped working in all
browsers. I would just the the page that says my key isn't right.
After searching the web, I found that this is a generic error message
and not representative of the actual error that is likely occurring.
My map setup code is as follows:

  private void setupMap() {
map = new MapWidget();
map.setStyleName(mm-Map);

map.getEarthInstance(this);

map.addMapType(MapType.getPhysicalMap());
map.addMapType(MapType.getEarthMap());

setInitialMapType();

map.setScrollWheelZoomEnabled(true);
map.addControl(new LargeMapControl3D());
map.addControl(new MenuMapTypeControl());
map.addMapClickHandler(this);
map.addMapMouseMoveHandler(this);
map.addMapMouseOutHandler(this);
map.addMapTypeChangedHandler(this);
  }

At first, I didn't have the getEarthInstance call, but I added it
trying to get it to work. Right now, when the callback from
getEarthInstance fails, I remove the earth map type from the map to
keep users from seeing the error page.

What should I have to do to be able to have the earth view in the map?

TIA,
Chad

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

2010-03-04 Thread Chad
Fran,

Try putting an L after at least one of the numbers in parentheses:

nowLong = nowLong + (1000L * 60 * 60 * 24 * 30); // 30 dias

HTH,
Chad

On Mar 4, 4:25 pm, Fran fra...@gmail.com wrote:
 I cant write a cookie in GWT.

 This is the code:

                         String ckValue = Cookies.getCookie(nameCookie);
                         if(ckValue == null){
                                 Date now = new Date();
                                 long nowLong = now.getTime();
                                 nowLong = nowLong + (1000 * 60 * 60 * 24 * 
 30);// 30 dias
                                 now.setTime(nowLong);

                                 Cookies.setCookie(nameCookie, 
 valueCookie, now);
                         }

 Always ckValue is null.

 Anybody know this problem?
 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.



GWT RPC behind an Apache Proxy

2010-02-24 Thread Chad
I have setup a Proxy in apache to forward all request from
http://www.myserver.com/apps to the glassfish server 
http://www.myserver.com:8080/.
This appears to work for everything, but requests to the GWT RPC
service which throws an NPE. If I change the proxy from
http://www.myserver.com/myApplication to forward to
http://www.myserver.com:8080/myApplication. Does anyone know how to
make this work so that I don't have to setup a proxy for each
application?

This is a similar if not the same problems as
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c4f6f320eb441fa8

I guess my question is what is the reason for requiring exactly the
same path. Is there a way around this. Finally, is there a security
issue that this is supposed to prevent?

Thanks,
-- Chad

-- 
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: GWT Developer Plugin not working IE8

2009-12-15 Thread Chad
I run Vista 64 bit and I have the debugger plug-in for both FF and
IE8. I'm not having any problems with it. For IE, it only works in IE8
32 bit, not IE8 64 bit. But it is on a 64 bit OS.

HTH,
Chad

On Dec 15, 3:26 pm, Sekhar Ravinutala sek...@allurefx.com wrote:
 But you didn't try Vista 64, which is where we're having trouble. If you
 have access to that OS, could you check?

 On Tue, Dec 15, 2009 at 1:21 PM, Sorinel C scristescu...@hotmail.comwrote:





  I've tried on all OS, vista-x86, windows7-x64, xp-x86 ... and it's
  working fine, better than chrome :)

  download it from here:
 http://ui-programming.blogspot.com/2009/12/update-your-application-to...

  and have fun!

  Cheers.

  --

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

 --
 AllureFX LLChttp://www.allurefx.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.




Re: NT User name

2009-11-19 Thread Chad
Ben,

You can use NTLM, LDAP, or Kerberos for that. The easiest (for both
you and your users) is NTLM. You'll want to use the Jespa library
(http://www.ioplex.com/). I am not affiliated with them in any way,
but I do use the product. With that, all you need to do is add some
settings to your web.xml file and you will be able to get the username
from your server-side code. Everything you will need is in their
documentation and they have a 60-day trial. After that it is limited
to 25 users. If you have 25 or fewer users, you can use their product
for free.

HTH,
Chad

On Nov 19, 10:13 am, Benjamin bsaut...@gmail.com wrote:
 A little stuck on this today, there are some posts on the subject but
 the seem outdated.

 I'm building a web app using GWT the is running internally on a JBOSS
 Server. I need to get the user name of the current user logged into
 the XP Workstation (via Active Directory) who is viewing the web
 site.

 In ASP.NET i would have set IIS to NT authentication and used
 request.servervaraibles(LOGON_USER) to get it

 I'm having trouble finding out the equivilitent in this framework. Any
 guidence would be much appreciated. I just need their user name and
 don't need to pass on any security tokens etc)

 Ben

--

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




Re: Connection with DB

2009-10-11 Thread Chad

You can't use your own database with Google App Engine (GAE). You can
either use GAE for all of your storage or turn GAE off in your project
and use your own database for all of your storage.

HTH,
Chad

On Oct 10, 10:19 pm, luciocamilo luciocam...@gmail.com wrote:
 I am having one problem, when I try to make my connection with the DB,
 I alredy try to use Berkeley and get the same problem.
 In debug mode, I can see that the problem occurs at method
 DriverManager.getConnection, but the same method with the same
 parameters works in another project that I dont use GWT.
 I already put the mysqlconnector.jar at the buildpath, and manually at
 the web-inf/lib.
 this is my problem:
 11/10/2009 03:08:48
 com.google.appengine.tools.development.ApiProxyLocalImpl log
 SEVERE: [125523052830] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract com.teste.cge.client.beans.PlanoBean
 com.teste.cge.client.GreetingService.greetServerPlano()' threw an
 unexpected exception: java.lang.ExceptionInInitializerError
         at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
 (RPC.java:360)
         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:546)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
 (RemoteServiceServlet.java:166)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
 (RemoteServiceServlet.java:86)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:121)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
         at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
 Caused by: java.lang.ExceptionInInitializerError
         at com.mysql.jdbc.NonRegisteringDriver.connect
 (NonRegisteringDriver.java:282)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at com.teste.cge.server.Conexao.getConnection(Conexao.java:13)
         at com.teste.cge.server.dao.PlanoDao.init(PlanoDao.java:18)
         at com.teste.cge.server.GreetingServiceImpl.greetServerPlano
 (GreetingServiceImpl.java:23)
         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)
         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:527)
         ... 27 more
 Caused by: java.security.AccessControlException: access denied
 (java.lang.RuntimePermission modifyThreadGroup)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source

Re: How to listen events for stack panel?

2009-09-25 Thread Chad

Jie,

Subclass the StackPanel and override the showStack method:

  @Override
  public void showStack(int index) {
super.showStack(index);
// display your information
  }

You could also add more methods to allow adding handlers/listeners if
you want.

HTH,
Chad

On Sep 24, 9:00 pm, Jie kgds...@tianya.cn wrote:
 Hi all, I created a stack panel, and I'd like to display some
 information when user clicks each header of the stack panel, but I can
 not find addListener() method for the stack panel, do you know how to
 add the listner for such events?

 Best Regards,
 Jie
--~--~-~--~~~---~--~~
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: scrollable panel without scrollbars - scroll controlled with buttons?

2009-09-16 Thread Chad

Glad it helped. :)

Chad

On Sep 16, 10:56 am, John (Eric) Hamacher badgerd...@gmail.com
wrote:
 Never mind!

 On Sep 16, 10:49 am, John (Eric) Hamacher badgerd...@gmail.com
 wrote:



  Thanks Chad,

  How do prevent the AbsolutePanel from stretching to fit the inner
  panel?

  On Sep 16, 12:48 am, Chad chad...@gmail.com wrote:

   Eric,

   Not that I've ever done this, but something like this should work. Put
   one panel inside of another panel. The outer panel would likely be an
   AbsolutePanel. Obviously, the inner panel will be wider than the outer
   panel. On your button clicks, adjust the horizontal position of the
   inner panel (it can be negative). You'll probably want to keep track
   of when the inner panel is all the way on either end and maybe disable
   the buttons. It seems simple enough.

   HTH,
   Chad

   On Sep 15, 4:11 pm, badgerduke badgerd...@gmail.com wrote:

Hello:

I have a panel whose contents I want to scroll horizontally, but I
don't want scroll bars.  I want the scrolling to be controlled by
buttons on either end of the panel.  I haven't been able to find a
solution.  Does anybody know how this can be done?

Thanks
Eric
--~--~-~--~~~---~--~~
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: Panel whose which can expand past the dimensions of the screen

2009-09-16 Thread Chad

Perhaps a different approach may work better (and more efficiently).
What if you only add the child widgets that were visible (or maybe one
or two extra)? Then, as you press the buttons to scroll, just add and
remove the child widgets as needed. You could probably do that with a
single panel instead of two. You could keep a List of child widgets.
Keep an index of the one in focus and load and unload as needed.
Otherwise, I suspect you will need to add the getOffsetWidth of each
child plus the width of whatever margin you have between each and set
the inner panel size directly. It sounds like you already tried that,
but I'm not sure why it wouldn't be an exact thing for you.

HTH,
Chad

On Sep 16, 4:18 pm, badgerduke badgerd...@gmail.com wrote:
 Hello:

 I have a HorizontalPanel whose parent of an AbsolutePanel.  The
 AbsolutePanel has a fixed with of 800px but the HorizontalPanel is
 potentailly much longer, as long as it needs to be to house all of the
 needed child widgets which is variable.  I slide the HorizontalPanel
 under the AbsolutePanel using navigation buttons so that only part of
 the HorizontalPanel is visible at one time.  The problem is this:
 Upon populating the HorizontalPanel, it will expand up to a certain
 width, maybe 1200-1300px, then it will stop and squish together and
 clip the child widgets.  I can sort of solve the problem by
 dynamically increasing the width based on the width of each child but
 this is inexact and looks bad. Is there a certain type of panel I can
 use which can automatically resize itself beyond the 1200px-1300px
 limit?

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



Re: scrollable panel without scrollbars - scroll controlled with buttons?

2009-09-15 Thread Chad

Eric,

Not that I've ever done this, but something like this should work. Put
one panel inside of another panel. The outer panel would likely be an
AbsolutePanel. Obviously, the inner panel will be wider than the outer
panel. On your button clicks, adjust the horizontal position of the
inner panel (it can be negative). You'll probably want to keep track
of when the inner panel is all the way on either end and maybe disable
the buttons. It seems simple enough.

HTH,
Chad

On Sep 15, 4:11 pm, badgerduke badgerd...@gmail.com wrote:
 Hello:

 I have a panel whose contents I want to scroll horizontally, but I
 don't want scroll bars.  I want the scrolling to be controlled by
 buttons on either end of the panel.  I haven't been able to find a
 solution.  Does anybody know how this can be done?

 Thanks
 Eric
--~--~-~--~~~---~--~~
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: GWT application running in Firefox sidebar

2009-09-08 Thread Chad

Gordon,

My guess is that you'd have to use JSNI and the window object (not the
$wnd object). In GWT, for JSNI purposes, the $wnd object is set to the
GWT frame, but the window object should still refer to the main
browser window.

HTH,
Chad

On Sep 8, 6:38 am, Gordon goschlech...@googlemail.com wrote:
 Hallo,

 I have a problem. My application is running on a site, which is opened
 in the sidebar of my browser. Now I need the URL of the website, that
 is displayed in the browser. When I use Window.Location, I only get
 the URL of my application in the sidebar.

 I hope somebody can help me with my problem.
--~--~-~--~~~---~--~~
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: MySql Driver not found

2009-09-07 Thread Chad

Since you are trying to use MySQL as your database, you can't use
Google's App Engine. It is its own data store. So, look at the
properties of your project. There should be a Google section. The App
Engine will be checked. Uncheck it. You can't use App Engine and your
own database.

HTH,
Chad

On Sep 7, 2:41 am, GumbyGWTBeginner stephan.gump...@gmail.com wrote:
 OK

 I got ot to work now using a solution I found on this site.

 Can anyone tellme what this means and how this will effect further
 works?

 if you are using eclipse,
 try to go under Project-properties-google-App Engine
 and disable Use Google App Engine checkbox .

 With the above turn ON the CONNECTION wont work.

 The server is running athttp://localhost:8080/
 Sep 7, 2009 7:39:24 AM
 com.google.appengine.tools.development.ApiProxyLocalImpl log
 SEVERE: [1252309164265000] javax.servlet.ServletContext log: Exception
 while dispatching incoming RPC call
 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract java.lang.String
 com.ddd.client.GreetingService.greetServer(java.lang.String)' threw an
 unexpected exception: java.lang.NullPointerException
         at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure
 (RPC.java:360)
         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:546)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
 (RemoteServiceServlet.java:166)
         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
 (RemoteServiceServlet.java:86)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1093)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
 (TransactionCleanupFilter.java:43)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at com.google.appengine.tools.development.StaticFileFilter.doFilter
 (StaticFileFilter.java:124)
         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
 (ServletHandler.java:1084)
         at org.mortbay.jetty.servlet.ServletHandler.handle
 (ServletHandler.java:360)
         at org.mortbay.jetty.security.SecurityHandler.handle
 (SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle
 (SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle
 (ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
         at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
 (DevAppEngineWebAppContext.java:54)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:313)
         at org.mortbay.jetty.handler.HandlerWrapper.handle
 (HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.content
 (HttpConnection.java:844)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run
 (SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run
 (BoundedThreadPool.java:442)
 Caused by: java.lang.NullPointerException
         at com.ddd.server.GreetingServiceImpl.greetServer
 (GreetingServiceImpl.java:29)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke
 (NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke
 (DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
 (RPC.java:527)
         ... 27 more

 On Sep 7, 9:48 am, GumbyGWTBeginner stephan.gump...@gmail.com wrote:



  Found the Quick Fix.

  But still not sure on how to include the code on Server Side or how
  this Qucik Fix applies to my problem.

  Stephan

  On Sep 7, 9:18 am, GumbyGWTBeginner stephan.gump...@gmail.com wrote:

   How would do this Quick Fix.  Not really sure how you would do this.

   Stephan

   On Sep 6, 11:15 pm, Christian Goudreau goudreau.christ...@gmail.com
   wrote:

Just do a quick fix and the message will desapear. You need this on 
server
side, so you need to do it.

Christian

On Sun, Sep 6, 2009

Re: @SuppressWarnings(serial)

2009-09-03 Thread Chad

Andy,

If you are using Eclipse (I assume you are since you are using the
GEP), just delete that and you will see the warning:

The serializable class DataServiceImpl does not declare a static final
serialVersionUID field of type long

You will also get 3 quick fix options:
  - Add default serial version ID
  - Add generated serial version ID
  - Add @SuppressWarnings 'serial' to 'GreetingServiceImpl'

Any of those three options would work. Just take your pick.

HTH,
Chad


On Sep 3, 11:37 am, Andy antonvonpil...@gmail.com wrote:
 Does anyone know why does the GreetingServiceImpl Servlet in the
 project created by the GWT Eclipse plugin have a @SuppressWarnings
 (serial) annotation?
--~--~-~--~~~---~--~~
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: question from a novice in GWT

2009-09-02 Thread Chad

@nyankov: Simple, really. Leave your current (non-GWT) site intact.
Then, create a separate application (GWT) with a vertical panel
containing a frame and the toolbar. Disable the window scroll bars.
Add a window resize handler to keep your vertical panel sized full
page (or maybe just set the vertical panel height and width to 100%).
Make sure the toolbar height is set absolutely. Set the url of your
frame to that of your original site (relative path should work being
on the same server). The frame will have scroll bars if needed. That
should do it, I think.

If you don't like that idea, you could always use frame sets (yuck)
and create two frames (vertically). Just put your current site in the
top frame and your GWT site (toolbar) in the bottom frame. Assuming
you want to change pages via the toolbar, you'd be better off with the
solution above over frame set.

@Ian: I think that's what the OP was doing originally, but was unhappy
with the jumpiness on scrolling and resizing.

On Sep 2, 5:08 am, Ian Bambury ianbamb...@gmail.com wrote:
 Why not just add your toolbar and use a window resize handler to put it at
 the bottom of the page?
 Ian

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



Re: how to determine when StackPanel index changes?

2009-08-28 Thread Chad

Phineas Gage,

I haven't tried it, but you could probably override either the
showStack or onBrowserEvent method. Probably showStack, something like
this:

  @Override
  public void showStack(int index) {
super.showStack(index);

if (index == getSelectedIndex()) {
  onShowStack();
}
  }

And, of course, create an onShowStack method that would only be called
when the stack is changed.

HTH,
Chad

On Aug 28, 1:26 am, Phineas Gage phineas...@gmail.com wrote:
 When using a StackPanel, is there any way to listen for when the
 selected index of the StackPanel changes?

 I see that it can be retrieved with getSelectedIndex() and set with
 showStack(index), but there is no apparent way to be called when
 someone clicks to set the current index. I'd like to do this so that I
 can set a history token and restore the StackPanel to its original
 state when the back button is pressed or an external link is used...
--~--~-~--~~~---~--~~
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: Question about app context.

2009-08-22 Thread Chad

David,

You don't have to do all that. Just reference your images as:

images/status.png

Notice the lack of the slash before images. If your images folder is
in your war folder, it should work in both hosted mode and web mode.
That slash would force a non-relative path requiring you to go through
the extra hoops you found.

HTH,
Chad

On Aug 21, 4:35 pm, David C. Hicks dhi...@i-hicks.org wrote:
 Found it.
 GWT.getHostPageBaseURL().



 David C. Hicks wrote:
  To *almost* answer my own question, I think this comes down to knowing
  what the web context root is to be pre-pended to URLs.  So, now I'm
  looking for a way to get that context root.
--~--~-~--~~~---~--~~
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: Refresh page on loading

2009-08-19 Thread Chad

Rahul,

Instead of trying to refresh the page, you should probably defer the
loading of your buttons, labels, and tabs. Use a DeferredCommand for
making the call to the method(s) for creating those widgets. It sounds
like they are loading before something that they rely on loads.
Although, this may have no effect whatsoever. :-/

HTH,
Chad

On Aug 18, 9:32 am, Rahul coolrahul18...@gmail.com wrote:
 Hi,
 I am loading buttons in individual tabs of a tab panel. In the tab
 panel i have some labels in order and also some cascading tabs in
 order.
 The first time the page is loaded, the buttons (which i want at the
 bottom) are at the top of each tab and the cascading tabs which i want
 in order are at the bottom of each tab. But whenever i refresh the
 page once, everything comes to the place i want. So i figured that if
 i refresh the page once it has been loaded, i can get the widgets
 where i want them

 is this the right approach or theres a better way to do this ?

 On Aug 17, 11:06 pm, Ian Bambury ianbamb...@gmail.com wrote:



  Why do you want to reload the page as soon as it has just loaded?
  Can't you just get it right the first time?

  What do you want to happen the second time that didn't happen the first
  time?

  Ian

 http://examples.roughian.com

  2009/8/18 Rahul coolrahul18...@gmail.com

   HI Ian,
   thanks for replying
   i have started looking at some tutorials for javascript
   but i have some more confusion.

   all coding i did in gwt was in java in the client class, so for this
   functionality also i need to code in the client class? or not? i need
   to do javascript for tht. and if i can do in java, what is the function
   ( because when searched it always shows me how to do with javascript
   and not in java)

   On Aug 17, 6:00 pm, Ian Bambury ianbamb...@gmail.com wrote:
2009/8/17 Rahul coolrahul18...@gmail.com

 Hi
 I want to refresh my webpage once after loading completely. I am using
 this code for this

    script language= JavaScript 
        function MyReload()
        {
                window.location.reload();
        }
        /SCRIPT

 and calling
 Body onLoad= MyReload()   on body part of my html file

 but this is not working
 can anyone tell me where am i going wrong?

First problem is that you are asking a JavaScript question in a GWT 
group
:-)

Second problem is that your webpage will loop, endlessly loading and
reloading. This a pretty basic a mistake, so maybe it would be a good
   idea
to search for some JavaScript tutorials or sign up to a JavaScript
beginners' group.
--~--~-~--~~~---~--~~
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: question from a novice in GWT

2009-08-17 Thread Chad

Well, you could still use the method I outlined by using a Frame
(iFrame) and load your site in it. So, you would have a GWT shell.

HTH,
Chad

On Aug 17, 12:42 am, nyankov nikola.yan...@gmail.com wrote:
 Well my page is regular HTML page, and till now doesn't use GWT.

 Now I want to place a toolbar in it which I want to write with GWT.

 On 16 Авг, 22:40, Chad chad...@gmail.com wrote:



  Well, you could use a VerticalPanel added to the RootPanel. Put a
  ScrollPanel into the VerticalPanel, then put your toolbar into the
  VerticalPanel. Allow the VerticalPanel to take up the full size of the
  browser and adjust itself on browser resizing. Set the toolbar to the
  height you need and set the ScrollPanel to take up the rest of the
  space. Put the rest of your application in the ScrollPanel. This way,
  your toolbar wouldn't move when scrolling the application. You could
  also turn off the browser scroll bars if you needed to just to make
  sure they never appear as you'd never want them to appear.

  HTH,
  Chad

  On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote:

   sure.

   position: fixed

   but this doesn't work well enough

   I red about frame (iframe) simulation somehow.

   I looked and in gmail (there opened chat popup is fixed to window
   bottom right).

   I saw that there are several iframes - but I didn't investigate in
   depth.

   On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote:

Hmm, maybe you think this before.. Have you ever tried CSS?

On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote:

 With other words I want to do workaround of position: fixed

 On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote:

  Hello,

  I am wondering. What is the way to implement toolbar in browser
  window. I want the toolbar to be fixed on window bottom always (even
  on scrolling and resize). Also I want the toolbar to be just a 
  widget.

  Here what I already did, but on scrolling the panal flickering

  package com.mycompany.project.client;

  import com.google.gwt.core.client.EntryPoint;
  import com.google.gwt.event.logical.shared.ResizeEvent;
  import com.google.gwt.event.logical.shared.ResizeHandler;
  import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.Window;
  import com.google.gwt.user.client.Window.ScrollEvent;
  import com.google.gwt.user.client.Window.ScrollHandler;
  import com.google.gwt.user.client.ui.RootPanel;
  import com.google.gwt.user.client.ui.Button;
  import com.google.gwt.user.client.ui.AbsolutePanel;

  public class GwtTest implements EntryPoint {
          public void onModuleLoad() {
                  RootPanel rootPanel = RootPanel.get();
                  final AbsolutePanel absolutePanel = new 
  AbsolutePanel();
                  rootPanel.add(absolutePanel, 0, 244);
                  absolutePanel.setSize(100%, 51px);
                  Button button1 = new Button(New button);
                  Button button2 = new Button(New button);
                  Button button3 = new Button(New button);
                  absolutePanel.add(button1);
                  absolutePanel.add(button2);
                  absolutePanel.add(button3);

                  com.google.gwt.user.client.Element h = 
  absolutePanel.getElement();
                  DOM.setStyleAttribute(h, top, 
  (Window.getClientHeight()-51)+px);

                  Window.addWindowScrollHandler(new ScrollHandler() {
                          @Override
                          public void onWindowScroll(ScrollEvent 
  event) {
                                  com.google.gwt.user.client.Element 
  h = absolutePanel.getElement();
                                  DOM.setStyleAttribute(h, top, 
  (Window.getClientHeight()
  +event.getScrollTop()-51)+px);
                          }
                  });

                  Window.addResizeHandler(new ResizeHandler() {
                          @Override
                          public void onResize(ResizeEvent event) {
                                  com.google.gwt.user.client.Element 
  h = absolutePanel.getElement();
                                  DOM.setStyleAttribute(h, top, 
  (event.getHeight()-51)+px);
                          }
                  });
          }

  }

  Thank you in advance- Hide quoted text -

- Show quoted text -- Скриване на цитирания текст -

  - Показване на цитирания текст -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit

Re: question from a novice in GWT

2009-08-16 Thread Chad

Well, you could use a VerticalPanel added to the RootPanel. Put a
ScrollPanel into the VerticalPanel, then put your toolbar into the
VerticalPanel. Allow the VerticalPanel to take up the full size of the
browser and adjust itself on browser resizing. Set the toolbar to the
height you need and set the ScrollPanel to take up the rest of the
space. Put the rest of your application in the ScrollPanel. This way,
your toolbar wouldn't move when scrolling the application. You could
also turn off the browser scroll bars if you needed to just to make
sure they never appear as you'd never want them to appear.

HTH,
Chad

On Aug 16, 11:40 am, nyankov nikola.yan...@gmail.com wrote:
 sure.

 position: fixed

 but this doesn't work well enough

 I red about frame (iframe) simulation somehow.

 I looked and in gmail (there opened chat popup is fixed to window
 bottom right).

 I saw that there are several iframes - but I didn't investigate in
 depth.

 On Aug 16, 7:15 pm, tolga ozdemir tka...@gmail.com wrote:



  Hmm, maybe you think this before.. Have you ever tried CSS?

  On Aug 16, 3:58 pm, nyankov nikola.yan...@gmail.com wrote:

   With other words I want to do workaround of position: fixed

   On Aug 15, 11:01 pm, nyankov nikola.yan...@gmail.com wrote:

Hello,

I am wondering. What is the way to implement toolbar in browser
window. I want the toolbar to be fixed on window bottom always (even
on scrolling and resize). Also I want the toolbar to be just a widget.

Here what I already did, but on scrolling the panal flickering

package com.mycompany.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.Window.ScrollEvent;
import com.google.gwt.user.client.Window.ScrollHandler;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.AbsolutePanel;

public class GwtTest implements EntryPoint {
        public void onModuleLoad() {
                RootPanel rootPanel = RootPanel.get();
                final AbsolutePanel absolutePanel = new AbsolutePanel();
                rootPanel.add(absolutePanel, 0, 244);
                absolutePanel.setSize(100%, 51px);
                Button button1 = new Button(New button);
                Button button2 = new Button(New button);
                Button button3 = new Button(New button);
                absolutePanel.add(button1);
                absolutePanel.add(button2);
                absolutePanel.add(button3);

                com.google.gwt.user.client.Element h = 
absolutePanel.getElement();
                DOM.setStyleAttribute(h, top, 
(Window.getClientHeight()-51)+px);

                Window.addWindowScrollHandler(new ScrollHandler() {
                        @Override
                        public void onWindowScroll(ScrollEvent event) {
                                com.google.gwt.user.client.Element h = 
absolutePanel.getElement();
                                DOM.setStyleAttribute(h, top, 
(Window.getClientHeight()
+event.getScrollTop()-51)+px);
                        }
                });

                Window.addResizeHandler(new ResizeHandler() {
                        @Override
                        public void onResize(ResizeEvent event) {
                                com.google.gwt.user.client.Element h = 
absolutePanel.getElement();
                                DOM.setStyleAttribute(h, top, 
(event.getHeight()-51)+px);
                        }
                });
        }

}

Thank you in advance- Hide quoted text -

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



Re: Selected style do not apply when using widget for treeItem

2009-08-04 Thread Chad

shahid,

When I look at the CSS (via Firebug) on my tree with custom widgets, I
see a hierarchy like this:

gwt-TreeItem
  mm-ResultBar

gwt-TreeItem gwtTreeItem-selected
  mm-ResultBar

In my case, the widget I'm adding to the tree has its own style name
(mm-ResultBar). Make sure you don't set the background of your inner
widget or it will cover up the gwtTreeItem-selected background.

HTH,
Chad

On Aug 4, 5:57 am, shahid shahidza...@gmail.com wrote:
 I have a GWT tree. When I use the tree.addItem(Widget) to add the tree
 items as Widgets to the tree, the gwt-treeitem-selected style do not
 apply to the tree items any more when items are selected. I have
 checked in Firebug.Does any one know how to get round this ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Displaying a loading image while waiting on RPC

2009-08-01 Thread Chad

Nick,

Obviously, that works, too. You can also show/hide your image with the
RootPanel instead of the DOM class (I don't know which would be better
-- someone else may be able to chime in on that) by doing:

  RootPanel.get(ajaxloader).setVisible(true); // or false as needed

I just took a look at your site. I like it. You may want to fetch
listings on map resizing as well. If you zoom out, you still have to
move the map before listings load into view. Zooming in wouldn't be a
problem. Overall, I think it's very nice.

Good work,
Chad

On Jul 31, 8:34 pm, Nick_Zaillian nzaill...@gmail.com wrote:
 Chad and Daniel,
 Thanks!  You got me on the right track.  I ended up embedding an
 animated loading icon (there are thousands of them out there --
 can't even remember where I found mine) in the html file for my main
 page.

 I put the following at the beginning of my onModuleLoad():

            final Element ajaxloader = DOM.getElementById(ajaxloader);
            DOM.setStyleAttribute(ajaxloader, display, none);

 (where ajaxloader is the id of the loading icon in my HTML file)
 and then, as you two suggested, I exposed the icon at the beginning of
 my click handler (in my case, calling DOM.setStyleAttribute
 (ajaxloader, display, block);) before doing the RPC and then hid
 it in both the onSuccess() and onFailure() of my AsyncCallback (in my
 case, by calling DOM.setStyleAttribute(ajaxloader, display,
 none);).  The result can be seen at nicksmap.org (still very much a
 work in progress!).  That ought to be sufficient to help anyone else
 trying to do the same thing with GWT.
 Thanks again,
 Nick Zaillian

 On Jul 31, 5:43 pm, Daniel Jue teamp...@gmail.com wrote:



  I agree with Chad, I have this in my click handler:

          display.getButton().addClickHandler(new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                  display.getButton().disable();
                  display.setStatusText(Please wait while your connection is
  verified...);
                  doAuthorize(); //rpc called in this method, and status
  updated with pass/fail messages, button re-enabled

              }
          });

  On Fri, Jul 31, 2009 at 10:31 AM, Chad chad...@gmail.com wrote:

   Nick,

   Create your message however you want (DecoratedPopupPanel, GlassPanel,
   Highlighted text, whatever). Just before you call your RPC, display
   your message. Then, in both the onFailure and onSuccess methods of
   your AsyncCallback, hide your message.

   HTH,
   Chad

   On Jul 30, 8:21 pm, Nick_Zaillian nzaill...@gmail.com wrote:
Hey all.  This is my first post to the group.  I've got a little GWT/
App Engine web app (at nicksmap.org) I've whipped up that maps New
York area craigslist rental listings (yeah, I know, others have done
it already, but all of the other implementations miss A LOT of
listings and have no flagging features...so I thought there was room
for me to go ahead and try to do it right).  I've got an RPC that gets
called every time a user drags a map.  This function (ermethod)
provides data that is then used to populate the map with markers and
correspnding infowindow content.  Because of the sheer number of
listings I am dealing with, the RPC can often take a few seconds to
deliver all of its data, during which time it looks to the user like
nothing is happening.  I would like to be able to display a loading
icon during this time.  I'm sure that this is a pretty trivial thing
to do -- I'm just not sure how to do it, so thought I should ask the
group.
Thanks,
Nick Zaillian
--~--~-~--~~~---~--~~
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: Changing a GWT css default

2009-08-01 Thread Chad

Charlie,

Look in the GWT SDK in your project. Look into
com.google.gwt.user.theme.standard (or dark or chrome if you are using
those instead). Drill down into the public/gwt/standard folders and
you will find the standard.css. You can open it and find the gwt-
DialogBox css classes that are used for the dialog box. Copy all of
those classes into your project's css file and replace all of the gwt-
DialogBox with whatever you want to call them (gwt-DialogBoxCustom or
charlie-DialogBox or whatever). Make sure you only replace the primary
style name, not the dependent style names. Then, make the few little
changes you need. In your code, call setStylePrimaryName(charlie-
DialogBox) on your custom dialog box. That should get you what you
want.

HTH,
Chad

On Aug 1, 9:26 am, Charlie codeboo...@gmail.com wrote:
 Hey

 I want to create a new CSS property style for dialog box but I want to
 change only certain things and when I try to do it I lose all the
 properties I'm not defining which were defined in the dialog box
 defaults.
 The only two things I want to change is the caption width (gwt-
 DialogBoxCustom .Caption) and the width of the dialog box itself (gwt-
 DialogBoxCustom) and like I said when I try to set those I lose all
 the other defaults which I want to keep.
 BTW just changing the default (gwt-DialogBox) isn't an option because
 I'm already using it for something else.

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



Re: Changing a GWT css default

2009-08-01 Thread Chad

Charlie,

Here's what I see in the standard css file from GWT 1.7.0:

.gwt-DialogBox .Caption {
  background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px;
  padding: 4px 4px 4px 8px;
  cursor: default;
  border-bottom: 1px solid #bb;
  border-top: 5px solid #d0e4f6;
}
.gwt-DialogBox .dialogContent {
}
.gwt-DialogBox .dialogMiddleCenter {
  padding: 3px;
  background: white;
}
.gwt-DialogBox .dialogBottomCenter {
  background: url(images/hborder.png) repeat-x 0px -4px;
  -background: url(images/hborder_ie6.png) repeat-x 0px -4px;
}
.gwt-DialogBox .dialogMiddleLeft {
  background: url(images/vborder.png) repeat-y;
}
.gwt-DialogBox .dialogMiddleRight {
  background: url(images/vborder.png) repeat-y -4px 0px;
  -background: url(images/vborder_ie6.png) repeat-y -4px 0px;
}
.gwt-DialogBox .dialogTopLeftInner {
  width: 5px;
  zoom: 1;
}
.gwt-DialogBox .dialogTopRightInner {
  width: 8px;
  zoom: 1;
}
.gwt-DialogBox .dialogBottomLeftInner {
  width: 5px;
  height: 8px;
  zoom: 1;
}
.gwt-DialogBox .dialogBottomRightInner {
  width: 5px;
  height: 8px;
  zoom: 1;
}
.gwt-DialogBox .dialogTopLeft {
  background: url(images/corner.png) no-repeat -13px 0px;
  -background: url(images/corner_ie6.png) no-repeat -13px 0px;
}
.gwt-DialogBox .dialogTopRight {
  background: url(images/corner.png) no-repeat -18px 0px;
  -background: url(images/corner_ie6.png) no-repeat -18px 0px;
}
.gwt-DialogBox .dialogBottomLeft {
  background: url(images/corner.png) no-repeat 0px -15px;
  -background: url(images/corner_ie6.png) no-repeat 0px -15px;
}
.gwt-DialogBox .dialogBottomRight {
  background: url(images/corner.png) no-repeat -5px -15px;
  -background: url(images/corner_ie6.png) no-repeat -5px -15px;
}
* html .gwt-DialogBox .dialogTopLeftInner {
  width: 5px;
  overflow: hidden;
}
* html .gwt-DialogBox .dialogTopRightInner {
  width: 8px;
  overflow: hidden;
}
* html .gwt-DialogBox .dialogBottomLeftInner {
  width: 5px;
  height: 8px;
  overflow: hidden;
}
* html .gwt-DialogBox .dialogBottomRightInner {
  width: 8px;
  height: 8px;
  overflow: hidden;
}

So, for the caption style class, it has this:

.gwt-DialogBox .Caption {
  background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px;
  padding: 4px 4px 4px 8px;
  cursor: default;
  border-bottom: 1px solid #bb;
  border-top: 5px solid #d0e4f6;
}

If you want to call your class styling my-DialogBox, you would change
the above to this:

.my-DialogBox .Caption {
  background: #e3e8f3 url(images/hborder.png) repeat-x 0px -2003px;
  padding: 4px 4px 4px 8px;
  cursor: default;
  border-bottom: 1px solid #bb;
  border-top: 5px solid #d0e4f6;
}

Notice, I only changed the primary style name (gwt-DialogBox), not the
dependent style name (Caption). So, once you have the entire section
of the css copied into your css file, you should be able to do a Find/
Replace on gwt-DialogBox with whatever you want to call it. Again, you
would only need to do this if you wanted to use both the default GWT
styling on some controls and custom styling on other controls (which
is what you are wanting).

What you may want to do is copy the needed css into your project's css
file, do the Find/Replace on the primary style class name, then test
your app. It should look just like the default dialog box at this
point since it's an exact copy. Then, make your changes to your css
file and test again to see the changes reflected.

HTH,
Chad

On Aug 1, 3:17 pm, Charlie codeboo...@gmail.com wrote:
 Hey I copied everything which had DialogBox and changed all of them to
 a custom name but the dialogbox didn't look like it should by default,
 not sure what I did wrong , what do you mean by primary and dependent
 style names

 On Aug 1, 8:13 pm, Chad chad...@gmail.com wrote:



  Charlie,

  Look in the GWT SDK in your project. Look into
  com.google.gwt.user.theme.standard (or dark or chrome if you are using
  those instead). Drill down into the public/gwt/standard folders and
  you will find the standard.css. You can open it and find the gwt-
  DialogBox css classes that are used for the dialog box. Copy all of
  those classes into your project's css file and replace all of the gwt-
  DialogBox with whatever you want to call them (gwt-DialogBoxCustom or
  charlie-DialogBox or whatever). Make sure you only replace the primary
  style name, not the dependent style names. Then, make the few little
  changes you need. In your code, call setStylePrimaryName(charlie-
  DialogBox) on your custom dialog box. That should get you what you
  want.

  HTH,
  Chad

  On Aug 1, 9:26 am, Charlie codeboo...@gmail.com wrote:

   Hey

   I want to create a new CSS property style for dialog box but I want to
   change only certain things and when I try to do it I lose all the
   properties I'm not defining which were defined in the dialog box
   defaults.
   The only two things I want to change is the caption width (gwt-
   DialogBoxCustom .Caption) and the width of the dialog box itself (gwt

Re: Modelling framework

2009-08-01 Thread Chad

Kaspar,

While you probably can find the kind of tool you are looking for (I
don't know of any since I don't have a need for them), I would
question your data design. You should be able to design your data so
that users can add questions without changing the data structure, just
the data content. Then, you can build your app with a set data
structure, but the data can be completely dynamic. This would result
in the same experience for the user, but a lot less work for you and
most likely less fragility for your data.

HTH,
Chad

On Aug 1, 9:30 am, Kaspar Fischer kaspar.fisc...@dreizak.com wrote:
 Hi everybody,

 I am looking for a Java library that allows me to define the data  
 model for my GWT application. Among other things, my app allows the  
 user to define different types of questionnaires and for this I need a  
 flexible data model - where the user can add fields (questions, for  
 instance) at runtime.

 JCR first looked like a good candidate but it has lots of additional  
 features and I was running into performance problems, at least with  
 the few implementations I tried.

 Do you know of a library, on top of Hibernate for example, that allows  
 me to define types (entities) with properities and relations in a  
 dynamic way? I suppose frameworks like this exist but I could not find  
 any.

 Many thanks,
 Kaspar
--~--~-~--~~~---~--~~
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: Displaying a loading image while waiting on RPC

2009-07-31 Thread Chad

Nick,

Create your message however you want (DecoratedPopupPanel, GlassPanel,
Highlighted text, whatever). Just before you call your RPC, display
your message. Then, in both the onFailure and onSuccess methods of
your AsyncCallback, hide your message.

HTH,
Chad

On Jul 30, 8:21 pm, Nick_Zaillian nzaill...@gmail.com wrote:
 Hey all.  This is my first post to the group.  I've got a little GWT/
 App Engine web app (at nicksmap.org) I've whipped up that maps New
 York area craigslist rental listings (yeah, I know, others have done
 it already, but all of the other implementations miss A LOT of
 listings and have no flagging features...so I thought there was room
 for me to go ahead and try to do it right).  I've got an RPC that gets
 called every time a user drags a map.  This function (ermethod)
 provides data that is then used to populate the map with markers and
 correspnding infowindow content.  Because of the sheer number of
 listings I am dealing with, the RPC can often take a few seconds to
 deliver all of its data, during which time it looks to the user like
 nothing is happening.  I would like to be able to display a loading
 icon during this time.  I'm sure that this is a pretty trivial thing
 to do -- I'm just not sure how to do it, so thought I should ask the
 group.
 Thanks,
 Nick Zaillian
--~--~-~--~~~---~--~~
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: CSS-ToolBar

2009-07-29 Thread Chad

Muhannad,

Take a look at the CSS that is provided by the GWT team. They have 3
themes available. You can look at the rules they setup for the type
button you are using (or want to model after). Look at the rules for
the button-up-hover (or something similar to that). There you will
find how the GWT team puts the borders on the buttons. Copy that to
your button-up class and you should be all set.

HTH,
Chad

On Jul 29, 3:47 am, Muhannad Nasser muhannadna...@gmail.com wrote:
 hi all

 the buttons in the grid panel does not have frame when the mouse is
 not over them, but when we put the mouse over the button the frame
 appears. i need to make the frame visible all the time even if the
 mouse is not over the button like the regular button.

 does anybody have an idea and can help me...

 thanks

 Muhannad
--~--~-~--~~~---~--~~
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: Export GWT app as WAR file - EASY tutorial for this?

2009-07-20 Thread Chad

Martin,

It can depend on your version of GWT. If you are using the GWT-Eclipse
Plugin (GEP), you can just click the GWT Compile button from the
toolbar. After it compiles successfully, open your project folder
(outside of Eclipse). You will see a war folder inside your project
folder. Open that war folder. You will see a few files and folders.
Select everything and create a zip file (this should be a right-click
action). Name the zip file something.war and that's it. When you drop
that war file into your Tomcat webapps folder, it will get
automatically expanded into a folder named the same as the war file
name (without the extension).

If you are using an older version of GWT, then the manual steps I
outlined a while back may help and can be found:

http://milamade.com/code/gwt/createwar.htm

HTH,
Chad

On Jul 20, 8:01 am, martinhansen martin.hanse...@googlemail.com
wrote:
 Hi,

 I want to export my GWT app as a WAR file and deploy it on a tomcat
 server. I've read dozens of threads about this topic, and I understood
 nothing. I do not know anything about WAR files, ANT build scripts or
 tomcat server, I'm totally new to that stuff. I tried to figure it out
 by myself, but I couldn't get past the first few steps. When I right-
 click my GWT project in eclipse and select export/web/WAR file, it
 always says Module name is invalid when it asks for a web project
 name. What to do now? Can someone give me a really basic instruction
 for this, or a good link to a tutorial? I'm really confused by this, I
 need to know the very basics.

 Thanks a lot in advance!
--~--~-~--~~~---~--~~
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: Copying from Result Set to Array List

2009-07-15 Thread Chad

Rahul,

Based on your query (select SourceTableName from SourceTables), I
would guess that your result set would contain a single column with
string data (char or varchar in SQL). If that's correct, then your
loop should look more like this:

while (rs.next()) {
  rowArray.add(rs.getString(1));
}

You can also use the column name, as in:

while (rs.next()) {
  rowArray.add(rs.getString(SourceTableName));
}

Your code would only work if the SourceTableName column in the
SourceTables table is of an integer type.

HTH,
Chad

On Jul 15, 9:58 am, Rahul coolrahul18...@gmail.com wrote:
 Hi,
 I apologize because this topic is again n again asked on the forum,
 but after reading the topics I was not able to get an answer to my
 problem.

 I am connecting to a server and trying to display an sql query on the
 browser. Here is my server side code:

 public class GreetingServiceImpl extends RemoteServiceServlet
 implements
                 GreetingService {
         private Connection conn = null;
         private String status;
         private String connString = Initial value;
         private String url = jdbc:sqlserver:;database;
         private String user = ;
         private String pass = ;
         public ResultSet rs;
         public Statement stm;
         ArrayList rowArray = new ArrayList();
         String name;
 public ArrayList greetServer(String input) {
                 String serverInfo = getServletContext().getServerInfo();
                 String userAgent = 
 getThreadLocalRequest().getHeader(User-Agent);
 //              String s1 = Select * from Patient;
                 try {
                 Class.forName
 (com.microsoft.sqlserver.jdbc.SQLServerDriver).newInstance();
 //              conn = DriverManager.getConnection(url,user,pass);
                 conn = DriverManager.getConnection
 (jdbc:sqlserver:;database,username,password);
                 connString = We connected;
                 stm = conn.createStatement();
                 String query1;
                 rs = stm.executeQuery(select SourceTableName from 
 SourceTables);

                 while (rs.next()) {
                            rowArray.add(String.valueOf(rs.getInt(1)));

                 }

                 } catch (Exception e) { connString = e.getMessage();}

 //              if (conn != null)
 //                      connString = We connected;
 //              else
 //                      connString = We failed to connect;

         return rowArray;
         }

 }

 I am confused in the following areas:
 1) My sql query contains 4 values (string) is while(rs.next()) loop
 the correct way to copy into from ResultSet to Arraylist?
 2) I have made my return type to Arraylist, so in the default gwt
 application when the user clicks the send button would it show the
 four values of my sql query or not?

 If anyone has some tutorials over how to do this plz tell the links
 that would be very helpful
 thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Copying from Result Set to Array List

2009-07-15 Thread Chad

Well, just that. The code you originally posted showed you trying to
retrieve integer data from your result set, but your table contains
string type data so your code wouldn't have worked. Now, the error you
posted looks like you are trying to cast your result to a String in
your onSuccess method. Your result will be an ArrayList. You need to
iterate it and read each string in it.

HTH,
Chad

On Jul 15, 10:54 am, Rahul coolrahul18...@gmail.com wrote:
 Hi Sean,
 Thanks for replying.
 I understood what you are trying to say.

 @Chad can you elborate on Your code would only work if the
 SourceTableName column in the
 SourceTables table is of an integer type.  My column name is
 presently an varchar type

 On Jul 15, 11:49 am, Rahul coolrahul18...@gmail.com wrote:



  Hi,
  Thanks for replying
  I am getting the following error

  [ERROR] Uncaught exception escaped
  java.lang.ClassCastException: java.util.ArrayList cannot be cast to
  java.lang.String
          at com.example.test7.client.Test7$1MyHandler$1.onSuccess(Test7.java:
  1)
          at
  com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceiv 
  ed
  (RequestCallbackAdapter.java:215)
          at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl
  (Request.java:264)
          at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch
  (Request.java:236)
          at com.google.gwt.http.client.Request.fireOnResponseReceived
  (Request.java:227)
          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)
          at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
  103)
          at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod
  (IDispatchImpl.java:126)
          at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke
  (IDispatchProxy.java:155)
          at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
  (IDispatchImpl.java:294)
          at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
  (IDispatchImpl.java:194)
          at org.eclipse.swt.internal.ole.win32.COMObject.callback6
  (COMObject.java:117)
          at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
          at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
          at 
  org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
          at com.google.gwt.dev.SwtHostedModeBase.processEvents
  (SwtHostedModeBase.java:235)
          at com.google.gwt.dev.HostedModeBase.pumpEventLoop
  (HostedModeBase.java:558)
          at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
          at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

  any suggestions where am i going wrong ?

  On Jul 15, 11:44 am, Chad chad...@gmail.com wrote:

   Rahul,

   Based on your query (select SourceTableName from SourceTables), I
   would guess that your result set would contain a single column with
   string data (char or varchar in SQL). If that's correct, then your
   loop should look more like this:

   while (rs.next()) {
     rowArray.add(rs.getString(1));

   }

   You can also use the column name, as in:

   while (rs.next()) {
     rowArray.add(rs.getString(SourceTableName));

   }

   Your code would only work if the SourceTableName column in the
   SourceTables table is of an integer type.

   HTH,
   Chad

   On Jul 15, 9:58 am, Rahul coolrahul18...@gmail.com wrote:

Hi,
I apologize because this topic is again n again asked on the forum,
but after reading the topics I was not able to get an answer to my
problem.

I am connecting to a server and trying to display an sql query on the
browser. Here is my server side code:

public class GreetingServiceImpl extends RemoteServiceServlet
implements
                GreetingService {
        private Connection conn = null;
        private String status;
        private String connString = Initial value;
        private String url = jdbc:sqlserver:;database;
        private String user = ;
        private String pass = ;
        public ResultSet rs;
        public Statement stm;
        ArrayList rowArray = new ArrayList();
        String name;
public ArrayList greetServer(String input) {
                String serverInfo = getServletContext().getServerInfo();
                String userAgent = 
getThreadLocalRequest().getHeader(User-Agent);
//              String s1 = Select * from Patient;
                try {
                Class.forName
(com.microsoft.sqlserver.jdbc.SQLServerDriver).newInstance();
//              conn = DriverManager.getConnection(url,user,pass);
                conn = DriverManager.getConnection
(jdbc:sqlserver:;database,username,password

Re: Display tables of database in tree fashion

2009-07-09 Thread Chad

Rahul,

That should be relatively simple to do. Use RPC for your client-server
communication. On the server side, query your database for table names
and send a ListString back to the client. Iterate the list, adding
each item to the root of the tree and give each a child node with the
text of Loading... (or something of your choosing). On the expand of
the tree nodes, check the text of the first child node. If it is your
stub text, make another call to the server for the columns of that
table. When that call returns (callback onSuccess), remove the child
node and add each item in the list returned. That will give you a
dynamically loaded tree with table and column names. If you don't want
it done dynamically, you can create a slightly more complex object to
pass from the server to client with all of the table and column names
and just the entire tree at once.

As far as getting the table and column names, that will be specific to
your database product, but it should be supported by all products.

The drag and drop stuff isn't very hard either. You may want to use
the dnd library from the incubator if you're not comfortable coding it
yourself. When doing the drag and drop, you generally have a reference
to the object being dragged, which in your case would likely be the
TreeItem. Once the drop happens on the target, your TextBox, you just
set the text to the value from the TreeItem.

I know this is all very generic, but that describes how I'd implement
it. Oh, I usually go the dynamic loading route when dealing with
trees.

HTH,
Chad

On Jul 9, 9:21 am, Rahul Mukhedkar coolrahul18...@gmail.com wrote:
 any suggestions anyone?

 On Jul 7, 1:43 pm, Rahul coolrahul18...@gmail.com wrote:



  Hi,
  I would like to display the tables on my UI in a tree fashion. The
  tables should open to show the columns names.
  Also I would like to have drag and drop of the column name to a blank
  text field.

  Does anyone has any idea how to implement this ?
  Thanks in advance
--~--~-~--~~~---~--~~
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: Get Object from ScrollTable

2009-07-05 Thread Chad

Maksim,

You can do as you suggest and store a reference to the object on the
row or if you prefer to not extend the row objects, you could simply
keep an array or list of the objects. You could get the proper object
from the array or list with the index you are getting from the event
now.

HTH,
Chad

On Jul 5, 10:43 pm, Maksim Ustinov maks...@gmail.com wrote:
 Right now I'm playing with ScrollTable from GWT Incubator. I'm trying
 to make functionality when user select one row then click on Edit
 button and then he will be able to edit that particular Object. Right
 now I have to check what row has been selected

 Integer secRowPosition = e.getSelectedRows().iterator().next
 ().getRowIndex();

 then query my dataTable for row and column to select unique id and
 then query my database for that object:

 myObject = getObjectFromDBbyID(dataTable.getText(secRowPosition, 0));

 This method works fine for me, but is it possible to get that object
 straight from the table and not form database so I can save some time
 without querying my database.

 I assume i need to assign each object to the row in ScrollTable in
 order to do that. Any ideas?
--~--~-~--~~~---~--~~
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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-30 Thread Chad

Yes. That's the same type of bug reports I found when I first saw this
error (when I installed Eclipse 3.4 on Windows Vista x64). I tried
creating the registry key the error complains about, but it didn't
resolve the problem, so I just ignore it. It doesn't appear to hurt
anything and after a short while, I stopped noticing it altogether. :)
I imagine it will be corrected sooner or later and one day with an
upgrade, the error will just go away the same way it came.

Chad

On Jun 29, 9:11 am, Miguel Méndez mmen...@google.com wrote:
 Thanks Chad.  I must admit that I have never encountered that one.
 However, I did find the following bug in Java's bug 
 tracker:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4479451.





 On Mon, Jun 29, 2009 at 9:58 AM, Chad chad...@gmail.com wrote:

  Miguel,

  I get the same error. It's generated from Eclipse and shows in the
  Console of Eclipse. It appears every time I run or compile an
  application. I don't think it's a GWT issue. I searched around when I
  first saw and IIRC, it's an issue within Eclipse itself. Trying to
  write to the wrong registry root or something like that.

  HTH,
  Chad

  On Jun 29, 7:46 am, Miguel Méndez mmen...@google.com wrote:
   What was going on when the error was reported?  How was it reported?  Was
   there a stack trace?

   On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:

The subject has it all.

Eclipse 3.4.2
GWT Eclipse Plugin
Windows 7

Thanks in advance for the help.

   --
   Miguel

 --
 Miguel
--~--~-~--~~~---~--~~
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: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

2009-06-29 Thread Chad

Miguel,

I get the same error. It's generated from Eclipse and shows in the
Console of Eclipse. It appears every time I run or compile an
application. I don't think it's a GWT issue. I searched around when I
first saw and IIRC, it's an issue within Eclipse itself. Trying to
write to the wrong registry root or something like that.

HTH,
Chad

On Jun 29, 7:46 am, Miguel Méndez mmen...@google.com wrote:
 What was going on when the error was reported?  How was it reported?  Was
 there a stack trace?

 On Sat, Jun 27, 2009 at 3:03 PM, Farinha fari...@gmail.com wrote:

  The subject has it all.

  Eclipse 3.4.2
  GWT Eclipse Plugin
  Windows 7

  Thanks in advance for the help.

 --
 Miguel
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



RichTextArea insert entity or custom span element

2009-06-26 Thread Chad

I am working on a project where a number of Greek characters are used
to indicate requirements with a text field. Is there an easy way to
create a button on the RichTextToolbar that will insert the
appropriate html entities?

As is it possible to create a custom span element around highlighted
text?

Details: The system is for tracking a school district's curriculum and
some of the text in the text fields indicates items that appear on
standardized tests. I would like to be able to either allow them to
put the Greek characters in front of this text or highlight the
specified text and select a button that would insert a span with the
classname indicating what test it appears on. Then I can use CSS to
insert the appropriate indicator. I believe I like the span
class=testItem approach better, but need suggestions.

Thanks,
Chad
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



RichTextArea insert entity or custom span element

2009-06-26 Thread Chad

I am working on a project where a number of Greek characters are used
to indicate requirements with a text field. Is there an easy way to
create a button on the RichTextToolbar that will insert the
appropriate html entities?

As is it possible to create a custom span element around highlighted
text?

Details: The system is for tracking a school district's curriculum and
some of the text in the text fields indicates items that appear on
standardized tests. I would like to be able to either allow them to
put the Greek characters in front of this text or highlight the
specified text and select a button that would insert a span with the
classname indicating what test it appears on. Then I can use CSS to
insert the appropriate indicator. I believe I like the span
class=testItem approach better, but need suggestions.

Thanks,
Chad
--~--~-~--~~~---~--~~
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: show/hide widget based on user's credentials

2009-06-23 Thread Chad

Permissions aren't really checked on the server. I have tables in a
database for users, roles, and rights. And I have tables that link
them together users_roles and roles_rights. When the user logs in, and
authentication is complete, the user data is retrieved along with the
roles the user belongs to and the rights that belong to each role. The
roles and rights are added to the user and sent back to the client.
From that point on, the application can just query the user object for
everything that it needs to know about the user.

HTH,
Chad

On Jun 23, 3:28 pm, ailinykh ailin...@gmail.com wrote:
 I see. How do you check user permissions on server side?

 Andrey

 On Jun 23, 2:47 pm, Chad chad...@gmail.com wrote:



  Andrey,

  RPC is the way I do it. I have a User object that can be passed
  between the client and server. It's kept on the client after login so
  the entire UI can easily refer to it. My security scheme contains
  roles that are a collection of rights. On the server side, at the time
  of login, the roles and rights are retrieved from the database for the
  user and added to the user object. The user object is only retrieved
  from the server once since it is not stored anywhere (other than in
  memory) on the client side. When the app is first entered, the user
  object won't exist and therefore require a login. On the client side,
  the UI can use the existence (or non-existence) of rights to determine
  what to display:
--~--~-~--~~~---~--~~
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: show/hide widget based on user's credentials

2009-06-23 Thread Chad

Well, my current application is an intranet application and uses NTLM
authentication and that's what I was referring to. It's constantly
authenticating the user I believe. On internet apps (and even some
intranet apps), I generate a session id on the server side
(something like a guid from the database), and store it in the user
object and a session table in the database. Then, with all requests,
I pass either the session id or the user object to the server with the
request (depending on what data is needed for the request). The server
will check the session table to make sure the session id is valid. I
also sometimes store this session id in a cookie valid for a couple
weeks to allow user's to stay logged in in some apps. If I'm not
mistaken (which I very well may be), aren't these methods secure? I
grant you, I'm by no means a security expert.

Chad


On Jun 23, 5:55 pm, ailinykh ailin...@gmail.com wrote:
 I understand that. But you can't trust the client. If someone who has
 read only access tries to write, server has to reject such request.
 In other words how do you implement authorization?

 Thank you,
   Andrey
 On Jun 23, 4:42 pm, Chad chad...@gmail.com wrote:



  Permissions aren't really checked on the server. I have tables in a
  database for users, roles, and rights. And I have tables that link
  them together users_roles and roles_rights. When the user logs in, and
  authentication is complete, the user data is retrieved along with the
  roles the user belongs to and the rights that belong to each role. The
  roles and rights are added to the user and sent back to the client.
  From that point on, the application can just query the user object for
  everything that it needs to know about the user.

  HTH,
  Chad

  On Jun 23, 3:28 pm, ailinykh ailin...@gmail.com wrote:

   I see. How do you check user permissions on server side?

   Andrey

   On Jun 23, 2:47 pm, Chad chad...@gmail.com wrote:

Andrey,

RPC is the way I do it. I have a User object that can be passed
between the client and server. It's kept on the client after login so
the entire UI can easily refer to it. My security scheme contains
roles that are a collection of rights. On the server side, at the time
of login, the roles and rights are retrieved from the database for the
user and added to the user object. The user object is only retrieved
from the server once since it is not stored anywhere (other than in
memory) on the client side. When the app is first entered, the user
object won't exist and therefore require a login. On the client side,
the UI can use the existence (or non-existence) of rights to determine
what to display:
--~--~-~--~~~---~--~~
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: Very basic LoginSecurityFAQ and GWT-RPC questions

2009-06-09 Thread Chad

eags,

In my apps, I generally keep a reference to the User object within the
app. Since, my current app works with browser history and can be
called with various urls, I check for the existence of a User object
after I parse the url, but before I load and show the content
referenced by the url. If there is no User object, I know the user is
just coming in and I can force a login.

HTH,
Chad

On Jun 9, 1:09 pm, eags eagsala...@gmail.com wrote:
 Someone I talked to in person (who otherwise didn't know about GWT
 RPC) suggested I also store the role as in
 {username,sessionID,timeout,role} so that I don't have to fetch and
 otherwise mess with the user object every request.  Does that seem
 sane?  I suppose I could also store a reference to the User object
 since that is likely to get referenced pretty regularly.  Any issues
 with that scheme? (again assuming that storing the sessionID manually
 is what I'm supposed to do at all).

 On Jun 8, 11:27 pm, eags eagsala...@gmail.com wrote:



  So I read the LoginSecurityFAQ (http://code.google.com/p/google-web-
  toolkit-incubator/wiki/LoginSecurityFAQ) and I plan on implementing
  logins exactly as in the FAQ.  At a high level I believe I get it but
  need help on the specifics so please be as detailed and specific as
  possible in your responses.  A link to an actual implementation of the
  LoginSecurityFAQ's method would be ideal.

  So here is my notion of what I need to do with some questions about
  details:

  1. I'm planning on using the google app engine's JDO implementation to
  store all data.  For each User object I intend to store the userID and
  the jBCrypt hash of the password along with whatever other user data
  in the same object.  When a new user registers, I'll create a new User
  object and store it.
  2. When a user tries to log in the server uses the username to fetch
  the User object and the associated hash to check if the supplied
  password is validated by the hash.

  Here is where I get confused and am not sure but here is my best
  notion of what I should do:

  I return a sessionID to the client.  I have seen people mention in
  other posts that a sessionID can be fetched by doing:
  getThreadLocalRequest().getSession(); on the server.  (Also do I want
  to return the  HttpSession or the use getSession.getID()???) Or can I
  use any random number?? (sounds wrong).  However I generate it, Is
  this session ID something I need to store using JDO along with the
  username and a timeout value so that I can subsequently validate that
  the session exists and is still active?  Or is the session and
  sessionID something that just exists on the server and I just need to
  get a reference to?

  Either way I'm still fuzzy on details.  If I do store
  {username,sessionID,timeout} in a DB, do I then need to periodically
  clear stuff out of there??  If they explicitly log out I can see
  removing the object but if they just close their browser it would just
  grow and grow right?  I guess if don't duplicate usernames when adding
  new sessionID at worst this table would contain all my users all the
  time and have a bunch of timed out sessions.

  Also, How do I invalidate a session ID right when they close their
  browser?  I guess I could first check for the existing session ID and
  if the timeout indicates it shouldn't persist over browser restarts or
  page closing then I can compare to getThreadLocalRequest().getSession
  () and see if they are the same (will subsequent calls result in the
  same sessionID iff the browser window hasn't been closed)??  Also how
  do I know there are no duplicate sessionIDs handed out over time where
  more than one might be active at once (if I wanted to allow users to
  stay logged in perpetually?).  I'm trying to answer some of my own
  questions but I'm very fuzzy here.

  If I don't store {username,sessionID,timeout} in a DB (and always just
  use getSession().getID() to compare what the client sends me), how
  then can sessions remain active for weeks even across closed browsers,
  etc (assuming I do the thing where I store the sessionID in a cookie
  and retrieve and try it before trying a new login).

  Also, I never saw any mention of sending the username along with the
  sessionID.  Is that right?

  Anyway, moving on to more confusion:

  The FAQ mentions specifically that the sessionID should be included in
  the *payload* of every subsequent RPC request.  Does payload just
  mean an additional argument in the interface methods in the service
  like (from the GWT StockWatcher tutorial):

          StockPrice[] getPrices(String[] symbols,String sessionID) throws
  DelistedException;

  Or are we talking about some other way to pass this to the server?

  OK.  Now on to a couple related GWT RPC questions.

  So I have a few things the server will be handling for me, for
  example:

  String sessionID login(username,password);
  String sessionID register(username,password);
  bool isLoggedIn

Phantom Code Running

2009-06-07 Thread Chad

Hi all,

I recently removed a column from a database. And, in turn, I removed
references to it from my Java code (both client and server sides).
Now, when I run my project, one of my RPCs throws an exception from
SQL stating that the column doesn't exist. This exception is expected
if I try to access a column in a result set that doesn't exist, but
I'm no longer referencing that column. I deleted all references to it.
I've done full text searches across my whole project. That column name
isn't found. I've done a clean on the project. I've compiled the
project. I changed obfuscation level and compiled again. I've exited
Eclipse and gone back in. This exception keeps getting thrown. I even
added a new method to my server side implementation class where the
reference was just to make sure it should have to be recompiled.
Nothing seems to help. I rebooted my machine and that didn't make a
difference either.

Any ideas how to make this deleted code not run?

TIA,
Chad
--~--~-~--~~~---~--~~
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: Phantom Code Running

2009-06-07 Thread Chad

Ok, I figured it out. There was a reference to the field in SQL. I had
removed the reference from 3 other stored procedures, but I missed one
and that was causing the problem. If only T-SQL was as easy to search
as Java...

Sorry for the disturbance. :)
Chad

On Jun 7, 12:09 pm, Chad chad...@gmail.com wrote:
 Hi all,

 I recently removed a column from a database. And, in turn, I removed
 references to it from my Java code (both client and server sides).
 Now, when I run my project, one of my RPCs throws an exception from
 SQL stating that the column doesn't exist. This exception is expected
 if I try to access a column in a result set that doesn't exist, but
 I'm no longer referencing that column. I deleted all references to it.
 I've done full text searches across my whole project. That column name
 isn't found. I've done a clean on the project. I've compiled the
 project. I changed obfuscation level and compiled again. I've exited
 Eclipse and gone back in. This exception keeps getting thrown. I even
 added a new method to my server side implementation class where the
 reference was just to make sure it should have to be recompiled.
 Nothing seems to help. I rebooted my machine and that didn't make a
 difference either.

 Any ideas how to make this deleted code not run?

 TIA,
 Chad
--~--~-~--~~~---~--~~
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: PushButton w/ image: How to avoid grey background

2009-06-05 Thread Chad

Glad I could help.

Chad

On Jun 4, 5:33 am, dduck anders.johansen.a...@gmail.com wrote:
 On 3 Jun., 21:23, Chad chad...@gmail.com wrote:

  Anders,

  I do this in my app. I call it an InvisibleButton.

 Chad,

 That worked like a charm. Much obliged!

 Regards,
   Anders
--~--~-~--~~~---~--~~
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: Create widgets in the onSuccess()

2009-06-05 Thread Chad

Adil,

Are you attaching your buttons to anything or keeping any reference to
them so they aren't garbage collected after the onSuccess is done?

HTH,
Chad

On Jun 5, 10:52 am, Adil BENHAMID enst.de.breta...@gmail.com wrote:
 Hello,

 I would like to create some components like buttons in the onSuccess()
 method. But nothing happens.

 Any help?

 --
 ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°
 Adil BENHAMID
 º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø
--~--~-~--~~~---~--~~
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: PushButton w/ image: How to avoid grey background

2009-06-03 Thread Chad

Anders,

I do this in my app. I call it an InvisibleButton. All you need to do
is alter the CSS. I copied the CSS from GWT's PushButton and renamed
the gwt-PushButton part to mm-InvisibleButton. You don't even need to
do that if you want that behavior for all of your push buttons. Simply
alter the gwt-PushButton CSS. Here's the CSS I use for my
InvisibleButton:

.mm-InvisibleButton-up,
.mm-InvisibleButton-up-hovering,
.mm-InvisibleButton-up-disabled,
.mm-InvisibleButton-down,
.mm-InvisibleButton-down-hovering,
.mm-InvisibleButton-down-disabled {
  margin: 0;
  text-decoration: none;
}
.mm-InvisibleButton-up,
.mm-InvisibleButton-up-hovering,
.mm-InvisibleButton-up-disabled {
  padding: 3px 5px 3px 5px;
}
.mm-InvisibleButton-up {
  cursor: pointer;
  cursor: hand;
}
.mm-InvisibleButton-up-hovering {
  cursor: pointer;
  cursor: hand;
}
.mm-InvisibleButton-up-disabled {
  cursor: default;
  opacity: .5;
  filter: alpha(opacity=40);
  zoom: 1;
}
.mm-InvisibleButton-down,
.mm-InvisibleButton-down-hovering,
.mm-InvisibleButton-down-disabled {
  padding: 4px 4px 2px 6px;
}
.mm-InvisibleButton-down {
  cursor: pointer;
  cursor: hand;
}
.mm-InvisibleButton-down-hovering {
  cursor: pointer;
  cursor: hand;
}
.mm-InvisibleButton-down-disabled {
  cursor: default;
  opacity: 0.5;
  filter: alpha(opacity=40);
  zoom: 1;
}


HTH,
Chad

On Jun 2, 2:40 pm, dduck anders.johansen.a...@gmail.com wrote:
 Hi,

 I would live to create a button that works just like a pushbutton, but
 without the grey background. Is there an easy way to just remove th
 egrey button outline, or will I have to roll my own component?

 Regards,
   Anders S. Johansen, ange.dk
--~--~-~--~~~---~--~~
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: Composite - can click on one widget inside look like click on the Composite itself?

2009-06-02 Thread Chad

I do something similar with other events, so I would imagine it should
work the same way. I have a class extending Composite that contains,
among other things, a button. When that button is clicked, a
CloseEvent is raised by the class. This is accomplished by having my
class (extending Composite) implement ClickHandler (to receive the
button clicks) and HasCloseHandlersBoolean (so other classes can
receive the CloseEvent being raised). In my onClick method, I issue a
statement like this (this statement exactly to be precise):

CloseEvent.fire(this, true);

I also do something similar with ValueChangeHandler and
HasValueChangeHandlers to allow this class to raise ValueChangeEvent
caused by internal controls. In your case, you will need to create a
ClickEvent with the class as the source and fire it.

HTH,
Chad

On Jun 2, 3:47 am, romant roman.te...@gmail.com wrote:
 Hi men,
 I am trying to implement my own Composite named MenuItem composing of
 a Grid with 3 cells next to each other and a Label placed in the
 middle cell. I call initWidget(the Grid).

 The issue now is that I register a click handler for the Label which
 should determine if the MenuItem was clicked or not. The Grid should
 not react on clicks, thus I do not register click handler for it.

 Now, naturally, the source of the click event will be always the
 Label. But in my application I need to get as the source of the event
 the MenuItem object, not the Label which composes just a part of the
 MenuItem Composite.

 Is there any smooth way to do that? My only idea is not to extend
 Composite class, but the Label itself and add it in a Grid. Is this a
 correct solution?

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



Re: how to overlay one grid over the other?

2009-05-14 Thread Chad

Suren,

You could just put two grids in a HorizontalSplitPanel and set the
splitter bar so that only the left column is visible. Or create two
grids where the first grid only has one column and the second grid has
all but the first column and put them side by side. You would have
better control over the second scenario. Of course, in either
scenario, the trick will be getting them to scroll together, but I'll
leave that small detail to you. ;)

HTH,
Chad

On May 14, 3:38 am, Suren nsurendi...@gmail.com wrote:
 Hi All,

 I want to overlay one grid over the other, so that I can create an
 impression that the first column can be a fixed/freeze when scrolling
 right.

 An anyone has any other solution for keeping the first column as fixed/
 freeze when we scroll right the grid?

 Thanks
 Suren
--~--~-~--~~~---~--~~
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: Setting DataSource (JNDI) in GWT 1.6 (hosted mode - Jetty)

2009-05-07 Thread Chad

You can do this by configuring a jetty-web.xml file. I blogged what
worked for us at:

http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html

On Mar 11, 11:16 pm, wiltonj wilt...@gmail.com wrote:
 Hi,
 How to setting DataSource in GWT 1.6 (Hosted mode - Jetty)?

 Hoping for some guidance.

 Thanks  Regards,
 Wilton
--~--~-~--~~~---~--~~
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: Fire a MouseOutEvent

2009-05-05 Thread Chad

Thomas,

Thanks for the information. I had already been snooping around the
DomEvent and fireNativeEvent stuff. I guess I can go ahead and
subclass PushButton for my ToolButton like I've been putting off. ;)

Chad

On May 5, 5:58 am, Thomas Broyer t.bro...@gmail.com wrote:
 On 5 mai, 00:04, Chad chad...@gmail.com wrote:

  Hi all,

  I need to fire a MouseOutEvent on a PushButton and can't figure out
  the right way to do it. I have a couple different scenarios where I
  need this. One is when I click the button, it gets hidden (while the
  mouse is still over it). Then, when it is shown again, it has the
  appearance of the mouse hover until I move the mouse over it and off
  of it. Another scenario is when the button is clicked, a modal popup
  is shown so the button doesn't receive the MouseOutEvent as the mouse
  moves off the button. I'm using these buttons as toolbar buttons and I
  would like to fire a MouseOutEvent in the ClickHandler.

 Have a look at com.google.gwt.dom.client.Document::createMouseOutEvent
 and com.google.gwt.event.dom.client.DomEvent::fireNativeEvent
 (note that this is document in MouseOutEvent's constructor's JavaDoc)

 Or you could use JSNI to call CustomButton::setDown with a 'false'
 argument.

 Or eventually subclass PushButton to make setDown public.

  Am I going
  about this all wrong? What's the best way to accomplish what I want
  (have the button appear that the mouse moved out of it)?

 Check if there's an issue already open, and eventually file one ;-)
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Fire a MouseOutEvent

2009-05-04 Thread Chad

Hi all,

I need to fire a MouseOutEvent on a PushButton and can't figure out
the right way to do it. I have a couple different scenarios where I
need this. One is when I click the button, it gets hidden (while the
mouse is still over it). Then, when it is shown again, it has the
appearance of the mouse hover until I move the mouse over it and off
of it. Another scenario is when the button is clicked, a modal popup
is shown so the button doesn't receive the MouseOutEvent as the mouse
moves off the button. I'm using these buttons as toolbar buttons and I
would like to fire a MouseOutEvent in the ClickHandler. Am I going
about this all wrong? What's the best way to accomplish what I want
(have the button appear that the mouse moved out of it)?

TIA,
Chad
--~--~-~--~~~---~--~~
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: Getting User Credential from IE

2008-10-23 Thread Chad

Julian,

I did that here this way. I used jcifs (1.2.13 to be exact). You can
find it at this website:

http://jcifs.samba.org/

You'll need to add a filter to your web.xml file to specify your
domain controller. An example (the file I created) can be seen here:

http://www.milamade.com/code/gwt/web.xml.htm

You will have to change the ip address of the domain controller to
suit your needs. You will need to include the jcifs jar file in your
war when you deploy. To access the network alias, I added this method
to my server implementation class:

pre
package com.tuesdaymorning.datawarehouse.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class RPCsuperImpl extends RemoteServiceServlet {
private static final long serialVersionUID = 200611201219L;

protected String domain = TM\\;

public String getUserName() {
String user = getThreadLocalRequest().getRemoteUser();

if (user == null) {
return default;
}

if (!user.toLowerCase().startsWith(domain.toLowerCase())) {
user = domain + user;
}

return user;
}
}
/pre

One thing to note, if you are using IE, you will be signed in
automatically as IE does this invisibly. If you are using any other
browser, you will prompted with a browser dialog asking for your
username and password, IIRC.

HTH,
Chad

On Oct 22, 4:15 pm, Julian [EMAIL PROTECTED] wrote:
 I realized that when we use our corporate Seibel page using IE, it
 knows the Logon User Name.  I like IE to pass GWT the User Name that
 is already authenticated into Windows.

 I'm new to front end programming, can someone give me some concept
 that I need to go and figure this out.

 TIA
 -Julian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: problem of gwt deployment

2008-10-22 Thread Chad

Arnaud,

I have a guide for manually creating a war file from Eclipse that can
be found:

http://www.milamade.com/code/gwt/createwar.htm

This is the new home of the tutorial that was located on
charisacademy.com.

HTH,
Chad

On Oct 22, 6:38 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hello everyone,
 I've  built a gwt project and for it's deployment i create a dynamic
 web project that  i call workplaceDeploy.
 -I copy the servlet.jar for the old in the folder lib of the new.

 -I copy all the content of the folder www othe old project in the
 folder webcontent of the new project

 -I right click on the new project -property-J2EE module dependences
 and i select the module the module which are depended with my project.

 i modify the web.xml and this my new web.xml

 web-app
         display-nameworkplaceDeploy/display-name
         servlet
                 servlet-nameEimServicesImpl/servlet-name
                 servlet-
 classcom.atosorigin.eimservices.workplace.server.EimServicesImpl/
 servlet-class
         /servlet
         servlet-mapping
                 servlet-nameEimServicesImpl/servlet-name
                 url-pattern/workplace/url-pattern
         /servlet-mapping
         welcome-file-list
         welcome-filehome.html/welcome-file
         /welcome-file-list
 /web-app

 -i generate the war file by right click export war file that i put in
 the folder webapp of tomcat 6
 i start tomcat and it has detected the deployment of workplaceDeploy
 and in the  tomcat manager i have the  filed fonctionnant which is
 true but the field session is 0.For me the deployment to tomcat has
 succeed

 when i try to lauch  the application by 
 enterringhttp://localhost:8080/workplaceDeploy
 i have ths error

 Rapport d' tat

 message /workplaceDeploy/

 description La ressource demand e (/workplaceDeploy/) n'est pas
 disponible.

 Can help me please?
 Arnaud
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



  1   2   >