Re: Project Structure in GWT-2.0

2009-09-29 Thread Michał Sędzielewski

and what is the opinion of Googlers?

On 29 Wrz, 20:37, Daniel Jue  wrote:
> +1 for Maven nested module friendliness.
>
>
>
> On Tue, Sep 29, 2009 at 12:25 PM, Iain Shigeoka  
> wrote:
>
> > +1 Maven friendly is ideal. Less ideal but better than current is
> > separation of source and compiled code as the original poster mentioned.
>
> > -iain
>
> > On Sep 29, 2009, at 9:02 AM, Michał Sędzielewski wrote:
>
> >> I agree, it would be nice to have maven structure in GWT 2.0
>
> >> On 28 Wrz, 15:45, logicpeters  wrote:
> >>> Can anyone tell me if there are plans to rework the way the
> >>> currentGWTproject structure is configured for2.0?  Mxing the source
> >>> and
> >>> compiled code in the /war folder has been a real pain in the butt for
> >>> build scripts and source control.  I've been trying to "mavenize" our
> >>> project, and find the various solutions to be un-elegant hacks that
> >>> wind up confusing the structure even more.
--~--~-~--~~~---~--~~
You received 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: File Upload not working after migrating to GWT1.7

2009-09-29 Thread abhiram wuntakal
Hi All,

  Can someone please suggest something about this? Any possible approach to
get the fileUpload working?

Thanks,
Abhiram

On Tue, Sep 29, 2009 at 3:35 PM, abhiram  wrote:

> Hi All,
>
>   I had my File Upload module working properly in 1.5.3. But it has
> not been working after I migrated to GWT 1.7.
> I realised that "addFormHandler" is deprecated in 1.7 and so I changed
> it to "addSubmitHandler". Earlier the setAction was set as
>
>   form.setAction(GWT.getModuleBaseURL() +"/MyServlet");
>
>  I changed it to
>  form.setAction("C:/apache-tomcat-6.0.16/webapps/GWTFileUpload/WEB-
> INF/classes/com/abc/pt06/uploadfile/server/UploadServlet");
>
>  which is the real path of my servlet after starting the tomcat.
>
>  But still it does not seem to be working. I just get an "Error on
> Page" alert in IE and in Firefox, i get an alert like "Firefox does'nt
> know how to open this address, because the protocol(c) isn't
> associated with any program."
>
>  Can someone please suggest what I need to do to get this working. Or
> some sample code where FileUpload has been working properly in GWT
> 1.7.
>
> Regards,
> Abhiram

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



how to mix text and javascript with native method?

2009-09-29 Thread 徐恒飞
 *this method can get a String: abc*

private native String getHtml()/*-{

return [
'abc'
].join("");
}-*/;



*this native method can invoke JavaMethod MsgAlert();*
private native void alert()/*-{

@com.package.Test::MsgAlert()();


}-*/;


public static void MsgAlert(){

MessageBox.alert("test","test");

}


*My problem is : how to use native method to get this String: abc*
*
*
*this problem confuse me for a long time , who can help me ,thank you!!!*

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



How to react on every new typed in character of a textbox

2009-09-29 Thread ojay

Hi,

I have a textbox and a list of values in a listbox. Regarding of the
input of the typed in value of the textbox the list will be filtered.
I've managed this so far, but it's not working as expected. For
example you typed in AAA then every value in the list which does not
contain AAA will be removed. But when you mark all the AAA and type
instead a B then my function will search for the string AAAB instead
of only B. This happens because I am building this string on the
keypresshandler, but if i do not build it like this I do not get
actual textfield value and the new typed in character...

Does anybody understand my problem and have a suggestion ?

thanks


public void onKeyPress(KeyPressEvent event) {

filterFormList(filterText.getText().trim() + 
event.getCharCode())

}


public void filterFormList(String matchThis){

ArrayList toDeleteList = new ArrayList();


for (int i = 0; i < formList.getItemCount(); i++){
System.out.println("checking if " + matchThis
+ " is found in " + 
formList.getItemText(i));

formList.getItemText(i).contains(matchThis);

if (formList.getItemText(i).contains(matchThis)){
System.out.println("found it---adding index " + 
i + " to delete
list");
toDeleteList.add(new Integer(i));
}
else{
System.out.println("no match");
}
}


for (Integer integer: toDeleteList){
System.out.println("removing item " + 
formList.getItemText
(integer.intValue()));
formList.removeItem(integer.intValue());
}





}


--~--~-~--~~~---~--~~
You received 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: Showing PopupPanel command is deferred

2009-09-29 Thread mdwarne

Below are my assumptions, and may not be the exact way it works.

As you have already found out, many commands that change the DOM or
the visual display seem to be actually sent to an execution queue for
execution later.  Often times this queue has pending commands, and is
polled  later on.  This polling, seems to occur when the browser is
idle, or waiting for user interaction.  So if you command a popup to
display, the re-writing of the DOM is immediately queued up.   However
if you immediately continue executing javascript code in a loop or a
long algorithm, the browser will not poll the queue until your code is
completed.  (The popup  shows up after your code completes instead of
before it completes!)

That is why you will find that DeferredCommand is your friend.   If
you need to display a 'Please Wait' panel before doing some long task,
and then remove the 'Please Wait'  after  the task is finished you
will often need to use a DeferredCommand to execute the long running
code, and hide the 'Please Wait' panel  (Exactly as you have done in
your code).

It's a little frustrating.. because looking at your code, it is not
obvious that the code is not executing in the exact order you think it
should.  But if you are working with a large application, you will be
using DeferredCommand quite a bit.

Mike.





On Sep 28, 10:19 am, The Question  wrote:
> Hi,
>
> This is the method that I'm using to show a PopupPanel.
>
> 
> private PopupPanel loadingPopup = new PopupPanel(false, true);
> this.loadingPopup.setWidget(getLoadingWidget());
>
> private void showLoading(final Boolean loading)
>     {
>         if (loading)
>         {
>             this.addStyleName(waitCursorStyle);
>
>             this.loadingPopup.center();
>             //if table header is already displayed, show
>             //the loading message in the table.
>             if (ResultSetTable.this.loadingTop != 0)
>             {
>                 this.loadingPopup.setPopupPosition(
>                         this.loadingPopup.getPopupLeft(),
>                         this.loadingTop);
>             }
>         }
>         else
>         {
>             this.removeStyleName(waitCursorStyle);
>             this.loadingPopup.hide();
>         }
>     }
> 
>
> I use the following code to call it:
>
> this.showLoading(true);
> this.doStuff();
> this.showLoading(false);
>
> However, the loading box never actually shows up.  But when I do the
> following:
>
> this.showLoading(true);
> DeferredCommand.addCommand(new Command()
> {
>      public void execute()
>      {
>            parentClass.this.doStuff();
>            parentClass.this.showLoading(false);
>       }
>
> });
>
> Everything works as expected.  Does this mean that the setPopupPosition
> () and Center() methods used deferred commands?
>
> I'm at a loss as to why this happens...
>
> S
--~--~-~--~~~---~--~~
You received 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: parent-child add/update

2009-09-29 Thread Sumit Chandel
Hi Tom,
You typically want strike the right balance between appropriately-sized RPC
payloads and the number of RPC requests required to load up and operate on
various parts of your application. Using this design in the context of the
questions you asked below:

1) how are you handling a parent-child relationship from the database,
> how do you define the DTO(s).
>

You can model the entire parent-child relationship in a 1:1 fashion and
fully load the DTO if it makes sense for the specific part of your
application where this data is required (i.e. if the user is going to need
to operate on all of that data in the same screen, it might be worth sending
it all in one RPC request with a fully loaded DTO). However, if the fully
loaded object isn't needed, or if the payload for the fully loaded object
risks choking the application given the user's connection bandwidth, then
you might want to split these up.


> 2) how do you handle pushing parent-child data from the UI (in a DTO)
> back to the database for an update or add.
>

A couple of common strategies revolve around marking DTOs as "updated", with
an ID linking them back to the DB model. Another technique would be to
maintain a listing of updated objects in a command, and have the command
passed back and executed on the server-side to update that listing of
objects.

It seems like you're just getting started with your application design and
planning the architecture you're going to use given the fact that your two
previous questions are pretty high level. I recommend checking out a talk on
architectural perspectives when creating GWT applications. You might not end
up using the patterns described in the talk, but I feel there is a lot of
food for thought in the talk that would be better delivered through video
than through a forum posting. I recommend checking out the talk, let some of
the ideas cook in your head, and then coming back here with follow-up
questions for the architecture you're thinking of using.

Google Web Toolkit Architecture: Best Practices For Architecting Your GWT
App:
http://code.google.com/events/io/sessions/GoogleWebToolkitBestPractices.html

Hope that helps,
-Sumit Chandel


>
> Any examples, or any suggestions would be very helpful.
>
> 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-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 the Image alt property

2009-09-29 Thread Thomas Broyer



On 29 sep, 21:03, Pion  wrote:
> I am using "com.google.gwt.user.client.ui.Image". But I cannot find a
> method to set the image "alt" property 
> onhttp://google-web-toolkit.googlecode.com/svn/javadoc/1.6/index.html?c
>
> I am looking for the equivalent "setAlt(String alt)" method of
> "com.google.gwt.dom.client.ImageElement" as shown 
> onhttp://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/g...
>
> Thanks in advance for your help.

See http://code.google.com/p/google-web-toolkit/issues/detail?id=1333

(found by searching for "image alt" in the issues)
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



DecoratorPanel - issue with the CSS inheritance.

2009-09-29 Thread Memo Sanchez

Hello :)

I am creating a widget who has 2 Decorator Panels (One inside the
other), both of them have different images for the rounded corners,
the problem is that the internal decoratorPanel inherits all the CSS
stying from his parent every single time. I have change the same
parameters in the css for both of them (i.e. topLeft,
topInnerLeft... .bottomCenter ... etc). And the child ignores the
changes and still uses the same styling that the parent use.

Can somebody give me a tip on how can I make the  child ignore the
parents CSS and use its own please.

Thank you very much.



--~--~-~--~~~---~--~~
You received 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: This breaks gwt 1.7.0

2009-09-29 Thread Ian Bambury
You can cut out quite a lot of that code and still get the same effect.
And then (or now) all you have to do is to leave the cursor in the rich text
area and cancel (or do anything else to hide it).

Because you are leaving RTAs lying about but not visible, and because the
RTA is in an IFRAME, and because the focus remains in the iframe and because
it's not visible, you end up with the focus stuck in an invisible frame. At
least, I think that's the problem.

Yes, it probably shouldn't do that, but on the other hand, if you stop
leaving them lying about...if not for the focus problem, then for the sake
of your users' memory.

You will probably save yourself a lot of pain and gnashing of teeth if you
give up on RTAs now. They may be OK if you really don't mind what html and
JS your users paste in there.

Ian

http://examples.roughian.com


2009/9/29 mwaschkowski 

>
>  I forgot to add, but the following is a workaround, and makes both
> the TextBox and RichTextArea editable.
>
>categoryTextBox.addClickHandler(new ClickHandler() {
> @Override
>public void onClick(ClickEvent event) {
> categoryTextBox.setFocus(true);
>categoryTextBox.setCursorPos(0);
>}
>});
>
> On Sep 29, 2:37 pm, mwaschkowski  wrote:
> > Not sure why, but the below code stops working in IE (works fine for
> > me in chrome).
> >
> > In IE, do the following:
> >
> > 1) click Show Dialog
> > 2) enter '1' into the TextBox AND into the RichTextArea
> > 3) press cancel
> > 4) click Show Dialog
> >
> > On my box, both the TextBox and RichTextArea become un-editable (like
> > setEnabled(false) was called).
> >
> > Other people notice the same? If so, I'll fill out a bug report. If
> > I'm doing something incorrectly, just let me know...
> >
> > Thanks,
> >
> > Mark
> >
> > package com.test.client;
> >
> > import com.google.gwt.core.client.EntryPoint;
> > import com.google.gwt.event.dom.client.ClickEvent;
> > import com.google.gwt.event.dom.client.ClickHandler;
> > import com.google.gwt.user.client.ui.Button;
> > import com.google.gwt.user.client.ui.DialogBox;
> > import com.google.gwt.user.client.ui.FlexTable;
> > import com.google.gwt.user.client.ui.HorizontalPanel;
> > import com.google.gwt.user.client.ui.Label;
> > import com.google.gwt.user.client.ui.PopupPanel;
> > import com.google.gwt.user.client.ui.RichTextArea;
> > import com.google.gwt.user.client.ui.RootPanel;
> > import com.google.gwt.user.client.ui.TextBox;
> > import com.google.gwt.user.client.ui.VerticalPanel;
> >
> > /**
> >  * Entry point classes define onModuleLoad().
> >  */
> > public class RichTextAreaTest implements EntryPoint {
> >
> > /**
> >  * This is the entry point method.
> >  */
> > public void onModuleLoad() {
> >
> > Button showButton = new Button("Show", new ClickHandler()
> {
> > @Override
> > public void onClick(ClickEvent event) {
> > PopupPanel popup = getPopup();
> > popup.show();
> > }
> > });
> >
> > Button showDialogButton = new Button("Show Dialog", new
> ClickHandler
> > () {
> > public void onClick(ClickEvent event) {
> > DialogBox dialogBox = getDialogBox();
> > dialogBox.setAutoHideEnabled(true);
> > dialogBox.show();
> > }
> > });
> >
> > RootPanel.get().add(showButton);
> > RootPanel.get().add(showDialogButton);
> > }
> >
> > private DialogBox getDialogBox(){
> > final DialogBox db = new DialogBox();
> >
> > Label categoryLabel = new Label("Category");
> > TextBox categoryTextBox = new TextBox();
> >
> > Label contentLabel = new Label("Content");
> > RichTextArea contentTextArea = new RichTextArea();
> >
> > //setup inputs
> > FlexTable table = new FlexTable();
> > table.setWidget(0, 0, categoryLabel);
> > table.setWidget(0, 1, categoryTextBox);
> > table.setWidget(1, 0, contentLabel);
> > table.setWidget(1, 1, contentTextArea);
> > //if above gets commented out, then everything works as
> expected
> >
> > //setup buttons
> > Button cancelButton = new Button("Cancel", new
> ClickHandler() {
> > @Override
> > public void onClick(ClickEvent event) {
> > db.hide();
> > }
> > });
> >
> > HorizontalPanel hp = new Horizontal

GWT-RPC and Long Polling

2009-09-29 Thread Ittai

Hi,
I have a GWT app which is currently up and working and which uses GWT-
RPC for passing objects between the client and the server. The current
communication is via old fashioned polling.
I tried moving my app to long polling, i.e. start a request and wait
until new data or timeout and only after that initiate another
request, but I'm having a problem where I try to sleep myServiceImpl
thread during the waiting for 500ms and it gets woken up by the GWT
doPost code.
Just to make things clear I would really rather not use any extension
or modifying of the gwt-code and I have no problem with the threads
being occupied while they wait (it's a long story but currently I'm ok
with this).
Has anyone any experience with this? I just want to keep this request
idle until it has something new but I'm afraid I'm missing something.

Appreciate any help,
Ittai
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Using JavaMail in a GWT application

2009-09-29 Thread Jared Smith
I am having a bit of an issue testing my web application.  I have written a
customized Emailer class that is used to send an email to the specified
email address.  I am able to get the class to successfully send an email
while using a driver class, however, when I attempt to use the Emailer class
on the server side, no email is sent.  I have embeded the code in a
try-catch block and I am not catching any exceptions.  Does anyone have any
knowledge as to why this may be the case?



Server Side Code:

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class EmailServiceImpl extends RemoteServiceServlet implements
EmailService {
public String sendEmail(String email) {
try {
Emailer eMail = new Emailer();
eMail.setEmailRecipient(email);
eMail.setEmailSender(email);
eMail.setEmailSubject("Its Jail!");
eMail.setEmailText("No, java mail silly!!...");
eMail.send();
return "an email has successfully been sent to the specified
email address.";
} catch(Exception e) {
return "An exception has occured.";
}
}
}


Emailer class:

import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;


public class Emailer {
private String smtpHost;
private int smtpPort;
private String emailSender;
private String emailRecipient;
private String emailSubject;
private String emailText;

public Emailer() {
smtpHost = "*mysmtphost*";
smtpPort = 25;
}

public Emailer(String host, int port) {
smtpHost = host;
smtpPort = port;
}

public void setEmailSender(String sender) {
emailSender = sender;
}

public void setEmailRecipient(String recipient) {
emailRecipient = recipient;
}

public void setEmailSubject(String subject) {
emailSubject = subject;
}

public void setEmailText(String text) {
emailText = text;
}

public void send() {
Properties props = new Properties();
props.put("mail.smtp.host", smtpHost);
props.put("mail.smtp.port", smtpPort);
Session ses = Session.getDefaultInstance(props, null);
Message msg = new MimeMessage(ses);
try {
msg.setFrom(new InternetAddress(emailSender));
msg.setRecipient(Message.RecipientType.TO, new
InternetAddress(emailRecipient));
msg.setSubject(emailSubject);
msg.setText(emailText);
Transport.send(msg);
} catch (MessagingException e) {
e.printStackTrace();
}
}
}


--~--~-~--~~~---~--~~
You received 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: Calling remote service defined in different module

2009-09-29 Thread Sripathi Krishnan
You can do something like ..

MyService service = GWT.create(MyServiceAsync.class);
((ServiceDefTarget) service).setServiceEntryPoint("../path/to/myservice");

Note the "*../*". The path is relative to your module, but you can always do
../ to get out of your module and then specify the path from there.


--Sri


2009/9/29 Darren 

>
> I have a remote service "MyServlet" defined in a module "module1", and
> I wish to call the service from a different module "module2".
>
> The trouble is that the URL that is generated, and used for the POST
> is of the form module2/MyServlet instead of module1/MyServlet. This
> doesn't match the URL mapping in my web.xml
>
> What should I do here? Should I add a URL servlet mapping for each
> module that uses the servlet?
>
> Thanks
>
>
> >
>

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



Re: Help with web application if possible.

2009-09-29 Thread Jared Smith
Thanks a bunch that did the trick!

The problem now is a bit different.  I have written a special java class
called Emailer to use the java mail functionality of sending an email.  When
I just use the class in a driver class I am able to send an email
successfully.  However, when I reference the class within the server side
java code it does not send an email.  I even embed the code in a try-catch
block and am not receiving any exceptions.  Any ideas as to what the issue
may be?  Thanks in advance.

On Mon, Sep 28, 2009 at 8:19 PM, Sripathi Krishnan <
sripathi.krish...@gmail.com> wrote:

> See GreetingService.java (or whatever interface that extends
> RemoteService). It typically has an annotation @RemoteServiceRelativePath
> which specifies the path to the servlet.  If you are changing your web.xml,
> you would also need to change the value specified in this annotation.
>
>  --Sri
>
>
> 2009/9/28 Rakmos 
>
>
>> I have eclipse installed with the GWT as well as the full blown Java
>> SDK.  I created a GWT template web application that is standard within
>> eclipse.  I basically am testing functionality of being able to send
>> an email using the shell that is provided from eclipse.  I have
>> renamed several files, and for whatever reason, when I change the
>> web.xml file located in the war/WEB-INF directory to the relative path
>> for the servlet -- I change the "url-pattern" property of the "servlet-
>> mapping" item to "/email" instead of "/greet" -- I lose the ability to
>> communicate with the server.  My question is where else is this
>> information being stored, because it clearly is not pulling the
>> information just from the web.xml file.
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: CommandPattern vs Server side Event Bus?

2009-09-29 Thread PJ Gray
Yeah, I have thought the same thing as I was implementing
MVP/CommandPattern.   I have a few eventbus events that I handle with
EventHandlers, but then I have the whole gwt rpc mechanism that uses my own
generic action classes.

Combining the two might be a good move, however it might get tricky crossing
the great wall of javascript.   I am no gwt expert, so I don't know how
tight a coupling you can get from your server side stuff and GwtEvent
(assuming you still want to use eventhandlers).

I am sure its doable though.

-pj



On Tue, Sep 29, 2009 at 3:37 PM, Chris wrote:

>
> Just had a quick question... I can see the benefits of the
> CommandPattern to some extent, what I'm not sure about is why, if
> we're using an Event Bus on the client side, one might not try and use
> an event bus on the server side too with an "event bridge" (you might
> say) in the middle.
>
> - Each event would define whether it propagates to the server.
> - The clients would be listening for events and all they would see is
> their relevant events being fired. They wouldn't know whether the
> event originated from the server and the client.
> - The server components would be listening on to the server-side event
> bus. In this case, the server would just fire off its response in the
> form of an event that all other server components could see and if
> need be this would propagate to the clients.
>
> Just wondering what people think of that pattern? I'm rather new to
> GWT and want to make my app as simple as possible, and it seems to me
> it would be rather nice if my
>
> Client Module says: "I need a list of names",
> Server Module sees message "someone needs a list of names".
> Server Module says "Someone needed a list of names and here it is"...
>
> I guess in that way, the response can be shared by many clients. The
> bridge in the middle could do some caching/filtering in the middle,
> since clearly not all events would need to be propagated to the
> server...
>
> Just some thoughts...
>
> >
>

--~--~-~--~~~---~--~~
You received 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 initiate a event inside a KeyPressHandler

2009-09-29 Thread Dominik Steiner
you could do something like this

public void onModuleLoad() {
 // Create a tab panel with three tabs, each of which  
displays a
different
 // piece of text. VerticalPanel  
formSelectPanel = new VerticalPanel();

 formSelectPanel.setSize("150px", "400px");
 final TextBox formFilterBox = new TextBox();
 formFilterBox.setFocus(true);
 formFilterBox.setSize("150px", "20px");
 formFilterBox.addKeyPressHandler(new KeyPressHandler  
(){
 @Override
 public void onKeyPress(KeyPressEvent event) {

int index = 0;

//implement some logic to set index according to key pressed

formFilterBox.setSelectedIndex(int index); });

 formFilterBox.addChangeHandler(handler)
 ListBox formList = new ListBox(false);
 formList.setVisibleItemCount(10);
 for ( int i = 0; i < 40; i++){
 formList.addItem("form"+i);
 }
 formList.setSize("150px", "380px");
 formSelectPanel.add(formFilterBox);
 formSelectPanel.add(formList);
 RootPanel.get().add(formSelectPanel);
 }

I haven't tested the code, you might need to adapt the syntax, but i  
hope that you get going like this

HTH

Dominik
>
> Hi thanks for your response but i don't get it :-(
>
> Can you make an example with pseudo code? Thanks
>
> On 27 Sep., 02:09, Dominik Steiner 
> wrote:
>> Hi ojay,
>>
>> did you try to make your KeyListener an anonymous class so that you
>> can reference from within it the formList and then change the
>> selection of the ListBox by using the method
>>
>> formList.setSelectedIndex(int index);
>>
>> HTH
>>
>> Dominik
>>
>> On 25 Sep., 17:07, ojay  wrote:
>>
>>> Hi,
>>
>>> after I read the intro to gwt in practice and looking around on the
>>> gwt site I just started my first steps with gwt and now I'm stuck.
>>
>>> I guess its an easy question for you guys...
>>
>>> I have a textbox and a listbox in my project. Now I added a
>>> KeyPressHandler to the textbox so that I can do something if  
>>> somebody
>>> types in. I want to use this textbox input as a filter for the shown
>>> values in the listbox. So now what I do not know is, how can I
>>> initialize a change of the Listbox from my KeyPressHandler ??
>>
>>> Here my Module
>>
>>> public void onModuleLoad() {
>>> // Create a tab panel with three tabs, each of  
>>> which displays a
>>> different
>>> // piece of text.
>>> KeyPressHandler changeFormFilter = new  
>>> FormFilterChanger();
>>
>>> VerticalPanel formSelectPanel = new VerticalPanel();
>>> formSelectPanel.setSize("150px", "400px");
>>
>>> TextBox formFilterBox = new TextBox();
>>> formFilterBox.setFocus(true);
>>> formFilterBox.setSize("150px", "20px");
>>
>>> formFilterBox.addKeyPressHandler(changeFormFilter);
>>> formFilterBox.addChangeHandler(handler)
>>
>>> ListBox formList = new ListBox(false);
>>> formList.setVisibleItemCount(10);
>>
>>> for ( int i = 0; i < 40; i++){
>>> formList.addItem("form"+i);
>>> }
>>> formList.setSize("150px", "380px");
>>
>>> formSelectPanel.add(formFilterBox);
>>> formSelectPanel.add(formList);
>>
>>> RootPanel.get().add(formSelectPanel);
>>
>>> }
>>
>>> and the Handler
>>
>>> public class FormFilterChanger implements KeyPressHandler {
>>
>>> @Override
>>> public void onKeyPress(KeyPressEvent event) {
>>> System.out.println("change"); // TODO Auto- 
>>> generated method stub
>>
>>> }
>>
>>> }
> >


--~--~-~--~~~---~--~~
You received 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: CommandPattern vs Server side Event Bus?

2009-09-29 Thread charlie
+1

On Tue, Sep 29, 2009 at 2:37 PM, Chris wrote:

>
> Just had a quick question... I can see the benefits of the
> CommandPattern to some extent, what I'm not sure about is why, if
> we're using an Event Bus on the client side, one might not try and use
> an event bus on the server side too with an "event bridge" (you might
> say) in the middle.
>
> - Each event would define whether it propagates to the server.
> - The clients would be listening for events and all they would see is
> their relevant events being fired. They wouldn't know whether the
> event originated from the server and the client.
> - The server components would be listening on to the server-side event
> bus. In this case, the server would just fire off its response in the
> form of an event that all other server components could see and if
> need be this would propagate to the clients.
>
> Just wondering what people think of that pattern? I'm rather new to
> GWT and want to make my app as simple as possible, and it seems to me
> it would be rather nice if my
>
> Client Module says: "I need a list of names",
> Server Module sees message "someone needs a list of names".
> Server Module says "Someone needed a list of names and here it is"...
>
> I guess in that way, the response can be shared by many clients. The
> bridge in the middle could do some caching/filtering in the middle,
> since clearly not all events would need to be propagated to the
> server...
>
> Just some thoughts...
>
> >
>

--~--~-~--~~~---~--~~
You received 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 the RichTextArea to expand as you type

2009-09-29 Thread Zak

I had a lot of fun with this problem. My solution was to increase/
decrease the row attribute of the textarea as the user types. It's not
perfect but it behaves as expected and executes fast.

Source code for my widget here: http://pastie.org/635638

I'd be interested if you folks have any critiques or insights.

Hope this helps!

On Sep 29, 11:01 am, James Tamplin  wrote:
> M -
>
> Can you post the whole solution. I'm unsure exactly how myHTML and
> divHidden fit in.
>
> Thanks.
>
> On Sep 8, 3:57 am, "m.assa...@gmail.com"  wrote:
>
> > I solved the issue by associating a keyboardlistener to thetextarea
> > which copies
> > thetextareacontents into a GWT HTML Element and get its height.
> > (Then you resize thetextareawith the new HTML Element height)
>
> > in the keyboard listener you do sth like
>
> >         public void onKeyUp(Widget sender, char keyCode, int modifiers) {
> >                                 RichTextArea rta = (RichTextArea) sender;
> >                                 myHTML.setHTML(rta.getHTML());
>
> >                                 rta.setHeight(""+ 
> > (divHidden.getOffsetHeight()));
> >                         }
>
> > hope this helps.
> > M.
>
> > You should associate a css rule like visibility: hidden to the HTML
> > Element in order to make the browser not showing it.
>
> > On Aug 26, 1:26 am, Arthur Kalmenson  wrote:
>
> > > Yes, that is the way to do this.
>
> > > --
> > > Arthur Kalmenson
>
> > > On Thu, Aug 20, 2009 at 2:09 PM, Yossi wrote:
>
> > > > Someone please answer, it is very important for me.
> > > > I need it to expand only vertically and not horizontally
>
> > > > I am thinking of adding an event listener for the keyboard and mouse
> > > > and on each event I willcheckif there are scrollbars - if there are,
> > > > I will increase the height, if there aren't I will decrease.
>
> > > > Thanks
>
> > > > On 12 Aug, 14:27, LuminariGWT  wrote:
> > > >> I'm trying to use the GWTRichTextArea.  I would like the size of the
> > > >> area to expand vertically as you type, so there is never ascrollbar.
> > > >> Any ideas on how I can accomplish this?
>
> > > >> overflow:visible; doesn't work
>
> > > >> 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
-~--~~~~--~~--~--~---



CommandPattern vs Server side Event Bus?

2009-09-29 Thread Chris

Just had a quick question... I can see the benefits of the
CommandPattern to some extent, what I'm not sure about is why, if
we're using an Event Bus on the client side, one might not try and use
an event bus on the server side too with an "event bridge" (you might
say) in the middle.

- Each event would define whether it propagates to the server.
- The clients would be listening for events and all they would see is
their relevant events being fired. They wouldn't know whether the
event originated from the server and the client.
- The server components would be listening on to the server-side event
bus. In this case, the server would just fire off its response in the
form of an event that all other server components could see and if
need be this would propagate to the clients.

Just wondering what people think of that pattern? I'm rather new to
GWT and want to make my app as simple as possible, and it seems to me
it would be rather nice if my

Client Module says: "I need a list of names",
Server Module sees message "someone needs a list of names".
Server Module says "Someone needed a list of names and here it is"...

I guess in that way, the response can be shared by many clients. The
bridge in the middle could do some caching/filtering in the middle,
since clearly not all events would need to be propagated to the
server...

Just some thoughts...

--~--~-~--~~~---~--~~
You received 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 initiate a event inside a KeyPressHandler

2009-09-29 Thread ojay

Hi thanks for your response but i don't get it :-(

Can you make an example with pseudo code? Thanks

On 27 Sep., 02:09, Dominik Steiner 
wrote:
> Hi ojay,
>
> did you try to make your KeyListener an anonymous class so that you
> can reference from within it the formList and then change the
> selection of the ListBox by using the method
>
> formList.setSelectedIndex(int index);
>
> HTH
>
> Dominik
>
> On 25 Sep., 17:07, ojay  wrote:
>
> > Hi,
>
> > after I read the intro to gwt in practice and looking around on the
> > gwt site I just started my first steps with gwt and now I'm stuck.
>
> > I guess its an easy question for you guys...
>
> > I have a textbox and a listbox in my project. Now I added a
> > KeyPressHandler to the textbox so that I can do something if somebody
> > types in. I want to use this textbox input as a filter for the shown
> > values in the listbox. So now what I do not know is, how can I
> > initialize a change of the Listbox from my KeyPressHandler ??
>
> > Here my Module
>
> > public void onModuleLoad() {
> >                 // Create a tab panel with three tabs, each of which 
> > displays a
> > different
> >             // piece of text.
> >                 KeyPressHandler changeFormFilter = new FormFilterChanger();
>
> >                 VerticalPanel formSelectPanel = new VerticalPanel();
> >                 formSelectPanel.setSize("150px", "400px");
>
> >                 TextBox formFilterBox = new TextBox();
> >                 formFilterBox.setFocus(true);
> >                 formFilterBox.setSize("150px", "20px");
>
> >                 formFilterBox.addKeyPressHandler(changeFormFilter);
> >                 formFilterBox.addChangeHandler(handler)
>
> >                 ListBox formList = new ListBox(false);
> >                 formList.setVisibleItemCount(10);
>
> >                 for ( int i = 0; i < 40; i++){
> >                         formList.addItem("form"+i);
> >                 }
> >                 formList.setSize("150px", "380px");
>
> >                 formSelectPanel.add(formFilterBox);
> >                 formSelectPanel.add(formList);
>
> >                 RootPanel.get().add(formSelectPanel);
>
> >         }
>
> > and the Handler
>
> > public class FormFilterChanger implements KeyPressHandler {
>
> >         @Override
> >         public void onKeyPress(KeyPressEvent event) {
> >                 System.out.println("change");         // TODO 
> > Auto-generated method stub
>
> >         }
>
> > }
--~--~-~--~~~---~--~~
You received 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: Character.isWhitespace alternative? (whitespace check)

2009-09-29 Thread Dominik Steiner

Hi Ed,

for performance reason I would definitely recommend you to actually  
use regex instead of equals or equalsIgnoreCase methods of the String  
class. Especially IE has really performance problems with former ones.  
Concerning heavy, I would actually say that it is much cleaner to use  
regex and more adaptable in case you would need in the future

HTH

Dominik
Am 29.09.2009 um 01:11 schrieb Ed:

>
> Yes I can, but don't want to, as it's way to heave for just checking
> if a character is a white space... Especialy in my case where
> performance is an issue.
>
> >


--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Setting the Image alt property

2009-09-29 Thread Pion

I am using "com.google.gwt.user.client.ui.Image". But I cannot find a
method to set the image "alt" property on
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/index.html?com/google/gwt/user/client/ui/Image.html.

I am looking for the equivalent "setAlt(String alt)" method of
"com.google.gwt.dom.client.ImageElement" as shown on
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/dom/client/ImageElement.html#setAlt%28java.lang.String%29

Thanks in advance for your help.

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



Re: Form panel content type is not correct in case of Videos upload

2009-09-29 Thread Thomas Broyer



On 29 sep, 13:59, "vaibhav.saxena"  wrote:
> Hi,
> I am using form panel in my GWT client code. I need to detect the
> content type on my server side of the file being upload. Now strange
> thing that is happening is something defined below:
>
> When i upload a image i get the correct content type "image/jpeg" but
> when i upload a video of type mp4 i used to get "application/octet-
> stream" while i should get "video/mp4".

GWT doesn't (and actually cannot) do anything about it, it's just what
your browser chooses the send. You can test with a plain HTML 
and you should get the same result. Not a GWT bug.
--~--~-~--~~~---~--~~
You received 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: BUG GWT border handling

2009-09-29 Thread Thomas Broyer



On 29 sep, 13:43, edorsey  wrote:
> I just encountered a problem that would be a nice addition to future
> GWT releases. The border handling seems to not have been fixed between
> IE and Firefox. I add a border to an object and IE puts the border
> within the object's width and Firefox adds the border to the outside
> of the object's width. Has anyone found a workaround for this that
> doesn't involve layering to panels on top of each other?

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



Re: Is the Hosted Browser source code under the GWT svn repo?

2009-09-29 Thread Thomas Broyer



On 29 sep, 18:44, plafayette  wrote:
> I'm interested in taking a look at the code used for the mini browser.
> If it is within the repository, where?

HostedMode's code is of course in the repo (in the "dev" subproject),
but the browser is actually an embedded one (using SWT bindings):
 - Internet Explorer on Windows (the one installed on the computer;
though note that IE8 defaults to its EmulateIE7 mode)
 - Safari on Max Os X (again, the one installed on the computer)
 - a very old Mozilla on Linux (something equivalent to Firefox 1.1;
at least before Firefox 1.5), packaged on the GWT distrib
--~--~-~--~~~---~--~~
You received 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: This breaks gwt 1.7.0

2009-09-29 Thread mwaschkowski

 I forgot to add, but the following is a workaround, and makes both
the TextBox and RichTextArea editable.

categoryTextBox.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
categoryTextBox.setFocus(true);
categoryTextBox.setCursorPos(0);
}
});

On Sep 29, 2:37 pm, mwaschkowski  wrote:
> Not sure why, but the below code stops working in IE (works fine for
> me in chrome).
>
> In IE, do the following:
>
> 1) click Show Dialog
> 2) enter '1' into the TextBox AND into the RichTextArea
> 3) press cancel
> 4) click Show Dialog
>
> On my box, both the TextBox and RichTextArea become un-editable (like
> setEnabled(false) was called).
>
> Other people notice the same? If so, I'll fill out a bug report. If
> I'm doing something incorrectly, just let me know...
>
> Thanks,
>
> Mark
>
> package com.test.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.event.dom.client.ClickEvent;
> import com.google.gwt.event.dom.client.ClickHandler;
> import com.google.gwt.user.client.ui.Button;
> import com.google.gwt.user.client.ui.DialogBox;
> import com.google.gwt.user.client.ui.FlexTable;
> import com.google.gwt.user.client.ui.HorizontalPanel;
> import com.google.gwt.user.client.ui.Label;
> import com.google.gwt.user.client.ui.PopupPanel;
> import com.google.gwt.user.client.ui.RichTextArea;
> import com.google.gwt.user.client.ui.RootPanel;
> import com.google.gwt.user.client.ui.TextBox;
> import com.google.gwt.user.client.ui.VerticalPanel;
>
> /**
>  * Entry point classes define onModuleLoad().
>  */
> public class RichTextAreaTest implements EntryPoint {
>
>         /**
>          * This is the entry point method.
>          */
>         public void onModuleLoad() {
>
>                 Button showButton = new Button("Show", new ClickHandler() {
>                         @Override
>                         public void onClick(ClickEvent event) {
>                                 PopupPanel popup = getPopup();
>                                 popup.show();
>                         }
>                 });
>
>                 Button showDialogButton = new Button("Show Dialog", new 
> ClickHandler
> () {
>                         public void onClick(ClickEvent event) {
>                                 DialogBox dialogBox = getDialogBox();
>                                 dialogBox.setAutoHideEnabled(true);
>                                 dialogBox.show();
>                         }
>                 });
>
>                 RootPanel.get().add(showButton);
>                 RootPanel.get().add(showDialogButton);
>         }
>
>         private DialogBox getDialogBox(){
>                 final DialogBox db = new DialogBox();
>
>                 Label categoryLabel = new Label("Category");
>                 TextBox categoryTextBox = new TextBox();
>
>                 Label contentLabel = new Label("Content");
>                 RichTextArea contentTextArea = new RichTextArea();
>
>                 //setup inputs
>                 FlexTable table = new FlexTable();
>                 table.setWidget(0, 0, categoryLabel);
>                 table.setWidget(0, 1, categoryTextBox);
>                 table.setWidget(1, 0, contentLabel);
>                 table.setWidget(1, 1, contentTextArea);
>                 //if above gets commented out, then everything works as 
> expected
>
>                 //setup buttons
>                 Button cancelButton = new Button("Cancel", new ClickHandler() 
> {
>                         @Override
>                         public void onClick(ClickEvent event) {
>                                 db.hide();
>                         }
>                 });
>
>                 HorizontalPanel hp = new HorizontalPanel();
>                 hp.add(cancelButton);
>
>                 VerticalPanel mainPanel = new VerticalPanel();
>                 mainPanel.add(table);
>                 mainPanel.add(hp);
>
>                 db.add(mainPanel);
>                 return db;
>         }
>
>         private PopupPanel getPopup() {
>                 final PopupPanel popup = new PopupPanel(true);
>                 VerticalPanel panel = new VerticalPanel();
>                 panel.add(new TextBox());
>                 panel.add(new RichTextArea());
>                 popup.setWidget(panel);
>                 return popup;
>         }
>
>
>
> }
--~--~-~--~~~---~--~~
You received 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
-~--~~~---

This breaks gwt 1.7.0

2009-09-29 Thread mwaschkowski

Not sure why, but the below code stops working in IE (works fine for
me in chrome).

In IE, do the following:

1) click Show Dialog
2) enter '1' into the TextBox AND into the RichTextArea
3) press cancel
4) click Show Dialog

On my box, both the TextBox and RichTextArea become un-editable (like
setEnabled(false) was called).

Other people notice the same? If so, I'll fill out a bug report. If
I'm doing something incorrectly, just let me know...

Thanks,

Mark



package com.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * Entry point classes define onModuleLoad().
 */
public class RichTextAreaTest implements EntryPoint {

/**
 * This is the entry point method.
 */
public void onModuleLoad() {

Button showButton = new Button("Show", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
PopupPanel popup = getPopup();
popup.show();
}
});

Button showDialogButton = new Button("Show Dialog", new 
ClickHandler
() {
public void onClick(ClickEvent event) {
DialogBox dialogBox = getDialogBox();
dialogBox.setAutoHideEnabled(true);
dialogBox.show();
}
});

RootPanel.get().add(showButton);
RootPanel.get().add(showDialogButton);
}

private DialogBox getDialogBox(){
final DialogBox db = new DialogBox();

Label categoryLabel = new Label("Category");
TextBox categoryTextBox = new TextBox();

Label contentLabel = new Label("Content");
RichTextArea contentTextArea = new RichTextArea();

//setup inputs
FlexTable table = new FlexTable();
table.setWidget(0, 0, categoryLabel);
table.setWidget(0, 1, categoryTextBox);
table.setWidget(1, 0, contentLabel);
table.setWidget(1, 1, contentTextArea);
//if above gets commented out, then everything works as expected

//setup buttons
Button cancelButton = new Button("Cancel", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
db.hide();
}
});

HorizontalPanel hp = new HorizontalPanel();
hp.add(cancelButton);

VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add(table);
mainPanel.add(hp);

db.add(mainPanel);
return db;
}

private PopupPanel getPopup() {
final PopupPanel popup = new PopupPanel(true);
VerticalPanel panel = new VerticalPanel();
panel.add(new TextBox());
panel.add(new RichTextArea());
popup.setWidget(panel);
return popup;
}
}

--~--~-~--~~~---~--~~
You received 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: Project Structure in GWT-2.0

2009-09-29 Thread Daniel Jue

+1 for Maven nested module friendliness.

On Tue, Sep 29, 2009 at 12:25 PM, Iain Shigeoka  wrote:
>
> +1 Maven friendly is ideal. Less ideal but better than current is
> separation of source and compiled code as the original poster mentioned.
>
> -iain
>
> On Sep 29, 2009, at 9:02 AM, Michał Sędzielewski wrote:
>
>>
>> I agree, it would be nice to have maven structure in GWT 2.0
>>
>> On 28 Wrz, 15:45, logicpeters  wrote:
>>> Can anyone tell me if there are plans to rework the way the
>>> currentGWTproject structure is configured for2.0?  Mxing the source
>>> and
>>> compiled code in the /war folder has been a real pain in the butt for
>>> build scripts and source control.  I've been trying to "mavenize" our
>>> project, and find the various solutions to be un-elegant hacks that
>>> wind up confusing the structure even more.
>> >
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: turn off the war output of HostedMode

2009-09-29 Thread Ed

He Jason,

Thanks for the tip, that really seems to work fine for now and isn't
so fragil as the other working set option.
I also use it now for the testNG plugin output, as that also isn't
derived.



--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Smart GWT

2009-09-29 Thread MarcoGT

Hi all,

I am looking for a GUI Builder for GWT;
is SmartGWT a tool of these?

I use Eclipse, how can I use it?

I tried WindowBuilder (GWT Designer) but it's not free;

I would prefer something free.

Thanks,
Marco
--~--~-~--~~~---~--~~
You received 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 fire events registered with a HandlerManager?

2009-09-29 Thread charlie
Excellent reference, http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf

On Tue, Sep 29, 2009 at 12:46 PM, John V Denley
wrote:

>
> Bulat, can you direct me to any documentation anywhere which explains
> the use of the  and  constructs?
>
> Thanks,
> J
>
>
> On Sep 21, 4:03 am, Bulat Sirazetdinov  wrote:
> > You should do it this way:
> > At first you'll need to create a class that implements
> > HasValueChangeHandlers interface. It is because of the fact that
> > ValueChangeEvent.fire() method requires a class that implements
> > HasValueChangeHandlers interface passed in a first parameter.
> > So let name that class MyHandlers (see below).
> >
> > Then you should get an instance of MyHandlers class:
> > ---
> > MyHandlers exampleHandlers = new Handlers();
> > ---
> >
> > and register ValueChangeHandler objects in that instance:
> > ---
> > exampleHandlers.addValueChangeHandler(someHandler1);
> > exampleHandlers.addValueChangeHandler(someHandler2);
> > exampleHandlers.addValueChangeHandler(someHandler3);
> > ---
> >
> > Now you can fire ValueChangeEvent to all handlers that you've
> > registered in exampleHandlers object:
> > ---
> > ValueChangeEvent.fire(exampleHandlers, "text");
> > ---
> >
> > MyHandlers class declaration:
> > -
> > public class MyHandlers implements HasValueChangeHandlers {
> >
> > private final List> list = new
> > ArrayList>();
> >
> > public void fireEvent(GwtEvent event) {
> > if (event instanceof ValueChangeEvent) {
> > for (ValueChangeHandler handler : list) {
> > handler.onValueChange((ValueChangeEvent) event);
> > }
> > }
> > }
> >
> > public HandlerRegistration addValueChangeHandler(final
> > ValueChangeHandler handler) {
> > list.add(handler);
> > return new HandlerRegistration() {
> >
> > public void removeHandler() {
> > list.remove(handler);
> > }
> > };
> > }}
> >
> > -
> >
> > Hope that helps.
> > Best wishes!
> >
> > On Aug 20, 4:33 am, jscheller  wrote:
> >
> > > Hello -
> >
> > > So, I've got a composite that has something like this inside it...
> >
> > > private HandlerManager changeHandlers = new HandlerManager( null );
> >
> > > public HandlerRegistration
>  addValueChangeHandler(ValueChangeHandler
> > > handler)
> > >{ return changeHandlers.addHandler(ValueChangeEvent.getType(),
> > > handler); }
> >
> > > ...and somewhere down the pipeline, I want to actually fire off an
> > > event to anyone who registered a handler when the composite decides
> > > it's represented value has changed and wants the rest of the world to
> > > know. However, the syntax for actually constructing and firing the
> > > event off has got me pulling my hair out.
> >
> > > I've tried variants of sending the event through the change
> > > handlers...
> >
> > > changeHandlers.fireEvent( new ValueChangeEvent("foo") );
> > > changeHandlers.fireEvent( new ValueChangeEvent("foo") );
> >
> > > ...and using the static fire() method in the event class itself...
> >
> > > ValueChangeEvent.fire( changeHandlers, "foo");
> >
> > > ...and Eclipse complains loudly about all of these constructions. I
> > > mean, I know this can't be that hard, but I can't find any good
> > > examples of things like this using the new (GWT 1.6 or later) event
> > > handlers, and reading the code sends me down a DOM event/Java generics
> > > rabbit hole that I'm frankly not experienced enough to deal with
> > > yet...
> >
> > > Any help appreciated!
> >
> > > Jim
> >
>

--~--~-~--~~~---~--~~
You received 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 fire events registered with a HandlerManager?

2009-09-29 Thread John V Denley

Bulat, can you direct me to any documentation anywhere which explains
the use of the  and  constructs?

Thanks,
J


On Sep 21, 4:03 am, Bulat Sirazetdinov  wrote:
> You should do it this way:
> At first you'll need to create a class that implements
> HasValueChangeHandlers interface. It is because of the fact that
> ValueChangeEvent.fire() method requires a class that implements
> HasValueChangeHandlers interface passed in a first parameter.
> So let name that class MyHandlers (see below).
>
> Then you should get an instance of MyHandlers class:
> ---
> MyHandlers exampleHandlers = new Handlers();
> ---
>
> and register ValueChangeHandler objects in that instance:
> ---
> exampleHandlers.addValueChangeHandler(someHandler1);
> exampleHandlers.addValueChangeHandler(someHandler2);
> exampleHandlers.addValueChangeHandler(someHandler3);
> ---
>
> Now you can fire ValueChangeEvent to all handlers that you've
> registered in exampleHandlers object:
> ---
> ValueChangeEvent.fire(exampleHandlers, "text");
> ---
>
> MyHandlers class declaration:
> -
> public class MyHandlers implements HasValueChangeHandlers {
>
>     private final List> list = new
> ArrayList>();
>
>     public void fireEvent(GwtEvent event) {
>         if (event instanceof ValueChangeEvent) {
>             for (ValueChangeHandler handler : list) {
>                 handler.onValueChange((ValueChangeEvent) event);
>             }
>         }
>     }
>
>     public HandlerRegistration addValueChangeHandler(final
> ValueChangeHandler handler) {
>         list.add(handler);
>         return new HandlerRegistration() {
>
>             public void removeHandler() {
>                 list.remove(handler);
>             }
>         };
>     }}
>
> -
>
> Hope that helps.
> Best wishes!
>
> On Aug 20, 4:33 am, jscheller  wrote:
>
> > Hello -
>
> > So, I've got a composite that has something like this inside it...
>
> > private HandlerManager changeHandlers = new HandlerManager( null );
>
> > public HandlerRegistration      addValueChangeHandler(ValueChangeHandler
> > handler)
> >    { return changeHandlers.addHandler(ValueChangeEvent.getType(),
> > handler); }
>
> > ...and somewhere down the pipeline, I want to actually fire off an
> > event to anyone who registered a handler when the composite decides
> > it's represented value has changed and wants the rest of the world to
> > know. However, the syntax for actually constructing and firing the
> > event off has got me pulling my hair out.
>
> > I've tried variants of sending the event through the change
> > handlers...
>
> > changeHandlers.fireEvent( new ValueChangeEvent("foo") );
> > changeHandlers.fireEvent( new ValueChangeEvent("foo") );
>
> > ...and using the static fire() method in the event class itself...
>
> > ValueChangeEvent.fire( changeHandlers, "foo");
>
> > ...and Eclipse complains loudly about all of these constructions. I
> > mean, I know this can't be that hard, but I can't find any good
> > examples of things like this using the new (GWT 1.6 or later) event
> > handlers, and reading the code sends me down a DOM event/Java generics
> > rabbit hole that I'm frankly not experienced enough to deal with
> > yet...
>
> > Any help appreciated!
>
> > Jim
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Calling remote service defined in different module

2009-09-29 Thread Darren

I have a remote service "MyServlet" defined in a module "module1", and
I wish to call the service from a different module "module2".

The trouble is that the URL that is generated, and used for the POST
is of the form module2/MyServlet instead of module1/MyServlet. This
doesn't match the URL mapping in my web.xml

What should I do here? Should I add a URL servlet mapping for each
module that uses the servlet?

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



Hover, CSS and reusing widgets in IE

2009-09-29 Thread George Georgovassilis

I've been playing around with :hover lately and thought my findings
and workarounds might be of interest to the general public :-)

An important step towards a responsive UI is to have widgets already
prepared when making them visible, since widget creation takes up
quite some time. We're definitely not talking about seconds, but it is
the faint difference between "fast" and "instant", which makes up for
quality and positive user experience. The least wasteful way of doing
that is to reuse widgets by adding and removing them instead of
reinstantiating them.

In combination with IE (all versions) and the CSS :hover class I
noticed a peculiar problem in the following scenario:

1. user moves mouse over a widget with :hover style
2. widget changes appearance
3. user clicks on widget
4. click handler causes widget to be removed from the document

later:

5. widget is added again to the document

After step 5, the widget will still appear with the :hover style even
though the mouse pointer is not hovering over it which might confuse
the user and for sure doesn't look right.

The workaround here consists in first setting the widget's visibility
to hidden and then removing the widget from its parent in a deferred
command which, for simplicity, can reinstate visibility so that no
special logic is required when reattaching the widget:

public void removeWidgetFromParent(final Widget widget) {
widget.setVisible(false);
DeferredCommand.addCommand(new Command() {
@Override
public void execute() {
widget.removeFromParent();
widget.setVisible(true);
}
});
}









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



Is the Hosted Browser source code under the GWT svn repo?

2009-09-29 Thread plafayette

I'm interested in taking a look at the code used for the mini browser.
If it is within the repository, where?

Thanks,
Pierre.

--~--~-~--~~~---~--~~
You received 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: Project Structure in GWT-2.0

2009-09-29 Thread Iain Shigeoka

+1 Maven friendly is ideal. Less ideal but better than current is  
separation of source and compiled code as the original poster mentioned.

-iain

On Sep 29, 2009, at 9:02 AM, Michał Sędzielewski wrote:

>
> I agree, it would be nice to have maven structure in GWT 2.0
>
> On 28 Wrz, 15:45, logicpeters  wrote:
>> Can anyone tell me if there are plans to rework the way the  
>> currentGWTproject structure is configured for2.0?  Mxing the source  
>> and
>> compiled code in the /war folder has been a real pain in the butt for
>> build scripts and source control.  I've been trying to "mavenize" our
>> project, and find the various solutions to be un-elegant hacks that
>> wind up confusing the structure even more.
> >


--~--~-~--~~~---~--~~
You received 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: turn off the war output of HostedMode

2009-09-29 Thread Jason Parekh
Hi Ed,
Ah, yeah, that sounds frustrating.

One more workaround I just realized:  right-click on the "war" folder, go to
its properties, and check the "Derived" checkbox.  I'm thinking this
combined with unchecking the "Show derived" in the Ctrl-Shift-R should have
the functionality you need.

jason

On Tue, Sep 29, 2009 at 7:34 AM, Ed  wrote:

>
> H looked at the work arount, played with it (the working set
> solution)... but it's not really an option for me...
> I really have to many gwt projects to manage it this way.
> It becomes very unfriendly and every time I add a folder I have to
> make sure it's added to the working set, as otherwise it doesn't show
> up :(... which brings me to strange behavior/bugs...
> It would be nice to add a project and then be able to exclude the war
> folder, just like the source folder options...
>
> Let's hope this will be improved soon.
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: RichTextArea:setEnabled

2009-09-29 Thread Parvez Shah
Thanks .. got the idea

On Tue, Sep 29, 2009 at 9:24 PM, tskaife  wrote:

>
> You don't need to toolbar to use the RichTextArea, but it's pretty
> useless without it since you won't be able to do any formatting with
> the text.
>
> But as far as disabling the RichTextArea, I don't think it's going to
> work since the RichTextArea is rendered as an iframe element. If you
> want to have a similar effect of disabling you can swap out the
> RichTextArea with an HTML element that has styling of a disabled text
> box (black border, light gray backround, dark gray text). Then swap
> back in the RichTextArea when you want to enable it.
>
> On Sep 29, 10:24 am, Parvez Shah  wrote:
> > Bump --
> > any one has any idea on how to make RichTextArea  setEnabeled(false)
> >
> >
> >
> > On Tue, Sep 29, 2009 at 1:42 PM, Prashant  wrote:
> > > if you need the toolbar you must use RichTextToolbar. I am not much
> > > familiar with RichTextArea so I cannot what you can/can't do with
> > > RichTextArea alone...
> >
> > > yes, docs says noting about it, refer to gwt showcase for working
> > > examples...
> >
> > > On Tue, Sep 29, 2009 at 1:35 PM, Parvez Shah 
> wrote:
> >
> > >> So u mean i cant use RichTextArea without RichTextToolbar ..
> > >> The document says nothing like this
> >
> > >> On Tue, Sep 29, 2009 at 1:20 PM, Prashant  wrote:
> >
> > >>> ohh, that's area only not areat
> >
> > >>> On Tue, Sep 29, 2009 at 1:19 PM, Prashant 
> wrote:
> >
> >  do this...
> >
> >  RootPanel.get().add(new RichTextToolbar(areat));
> >  RootPanel.get().add(area);
> >
> >  copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all
> the
> >  images in the folder from
> > 
> "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\cli
> ent\content\text"
> >  to your project
> >
> >  On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah  >wrote:
> >
> > > Hello I am facing problem in making RichTextArea setEnabled(false);
> is
> > > it like RichTextArea is not meant to be setEnabeled(false);
> >
> > > public void onModuleLoad() {
> > > RichTextArea area = new RichTextArea();
> > > area.setEnabled(false);
> > > area.setHTML("Name: some name  Address:
> some
> > > addrsss with reallly long addresss lerts testTin:
> N/A");
> >
> > > RootPanel.get().add(area);
> >
> > > }
> >
>

--~--~-~--~~~---~--~~
You received 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: 3rd party widget pluggable interface

2009-09-29 Thread Dave

Hi,

I had a similar requirement.  Essentially I was trying to create a web
app, that had a number of default forms where users would enter data,
but I wanted the ability to add new forms on the fly (typically from a
third-party source).

The simplest approach I found was to define my forms with XML.  When
the app loads, it gets the XML from the server side and builds the
list of forms.
When a user actually loads a form, a parser goes through the XML and
constructs the appropriate widgets.

e.g.


  
Default Value
Default Value
  


The is obviously a simple version, but the above would construct a new
form and add a 1x2 grid to it hopefully looking something like:

__
| |
| test name __   |
||__|  |
|_|


To add a new file on the fly a third-party just needs to submit the
forms xml to the server side DB.  When a client refreshes their
browser the latest list of forms will be brought over.



On Sep 29, 4:45 am, Matt  wrote:
> Hi,
>
> I was wondering if it's possible at all, or if anyone has suggestions
> on best practices for plugging additional widgets into a GWT app after
> compile?
>
> We have a fat client app that has a pretty large set of functionality
> that we're porting to GWT, but occasionally clients needs some
> specific additional functionality, currently we support the ability to
> do this by a COM interface in our C++ app.
>
> I'm looking to replicate a similar ability in a GWT app, from what I
> can tell there is no way to do this other than providing a javascript
> interface that gets wrapped by a handler frame that has a JSNI
> interface. Is this really the only way to handle this case?
--~--~-~--~~~---~--~~
You received 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: Crashed when "ant hosted" and "ant build"

2009-09-29 Thread Rajeev Dayal
Hi,
I've talked with another GWT developer, and he indicated that most likely
your Linux installs were updated, and they broke something with the 5-year
old Mozilla that we ship. Unfortunately, we're not doing anything at this
time to support legacy (or soon-to-be legacy) hosted mode on newer distros,
because Out-of-process-hosted-mode will be arriving with GWT 2.0, and that
5-year old version of Mozilla will no longer be required.

The best thing to do would be to work from the GWT Trunk, and use
Out-of-process-hosted-mode until a GWT 2.0 milestone is released (which
should be shortly).

The other option would be to find a version of Mozilla 1.7.{12, 13} that
works on your distro of Linux, and then modify the
mozilla-hosted-browser.conf file to point at that version. Most likely,
you'll have to build such a distro yourself.


Rajeev

On Tue, Sep 29, 2009 at 6:51 AM, bodrin  wrote:

>
> Hi,
>
> I have a similar problem when building on linux with GWT 1.7.0 - see
> below.
> Did you find any solution?
>
>

--~--~-~--~~~---~--~~
You received 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: RichTextArea:setEnabled

2009-09-29 Thread tskaife

You don't need to toolbar to use the RichTextArea, but it's pretty
useless without it since you won't be able to do any formatting with
the text.

But as far as disabling the RichTextArea, I don't think it's going to
work since the RichTextArea is rendered as an iframe element. If you
want to have a similar effect of disabling you can swap out the
RichTextArea with an HTML element that has styling of a disabled text
box (black border, light gray backround, dark gray text). Then swap
back in the RichTextArea when you want to enable it.

On Sep 29, 10:24 am, Parvez Shah  wrote:
> Bump --
> any one has any idea on how to make RichTextArea  setEnabeled(false)
>
>
>
> On Tue, Sep 29, 2009 at 1:42 PM, Prashant  wrote:
> > if you need the toolbar you must use RichTextToolbar. I am not much
> > familiar with RichTextArea so I cannot what you can/can't do with
> > RichTextArea alone...
>
> > yes, docs says noting about it, refer to gwt showcase for working
> > examples...
>
> > On Tue, Sep 29, 2009 at 1:35 PM, Parvez Shah  wrote:
>
> >> So u mean i cant use RichTextArea without RichTextToolbar ..
> >> The document says nothing like this
>
> >> On Tue, Sep 29, 2009 at 1:20 PM, Prashant  wrote:
>
> >>> ohh, that's area only not areat
>
> >>> On Tue, Sep 29, 2009 at 1:19 PM, Prashant  wrote:
>
>  do this...
>
>  RootPanel.get().add(new RichTextToolbar(areat));
>  RootPanel.get().add(area);
>
>  copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
>  images in the folder from
>  "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\cli
>   ent\content\text"
>  to your project
>
>  On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah 
>  wrote:
>
> > Hello I am facing problem in making RichTextArea setEnabled(false); is
> > it like RichTextArea is not meant to be setEnabeled(false);
>
> > public void onModuleLoad() {
> >         RichTextArea area = new RichTextArea();
> >         area.setEnabled(false);
> >         area.setHTML("Name: some name  Address: some
> > addrsss with reallly long addresss lerts testTin: N/A");
>
> >         RootPanel.get().add(area);
>
> >     }
--~--~-~--~~~---~--~~
You received 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: files removed after compilation

2009-09-29 Thread Matias Beade
Hi! Ptitboutette, your problem is that you need add to the module
configuration *.gwt.xml the next tag
 where resources will be the directory
where you have  statics resources (css, js, html).
The gwt compiler need to  know wich ones resources must to be include.
I hope to serve you.
Sorry for mi english.

2009/9/29 ptitboutette 

>
> hello folks,
>
> I have a problem after the compilation of my gwt project ...
> The behaviours is right before under the hosted mode but once compiled
> some files are removed in the war tree.
> For instance, my war/projectname/images and war/projectname/js/ext
> directories are removed after the compilation ... If I put these
> directories by hand in the tree after the compilation, the link is
> done with the ext directory but not for the images one ...
> Do I have to allows these resources in a configuration file ?
>
> 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: files removed after compilation

2009-09-29 Thread Rajeev Dayal
Hi,
Any resources under war/projectname are automatically generated by the GWT
compiler, and it will blow away any artifacts that you add under there by
hand. You can either put these resources in a war/,
or you can put them in a public directory which is a peer of your
module. See:

http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html

for more information.


Rajeev

On Tue, Sep 29, 2009 at 10:41 AM, ptitboutette wrote:

>
> hello folks,
>
> I have a problem after the compilation of my gwt project ...
> The behaviours is right before under the hosted mode but once compiled
> some files are removed in the war tree.
> For instance, my war/projectname/images and war/projectname/js/ext
> directories are removed after the compilation ... If I put these
> directories by hand in the tree after the compilation, the link is
> done with the ext directory but not for the images one ...
> Do I have to allows these resources in a configuration file ?
>
> 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: Deployment and Eclipse+SVN

2009-09-29 Thread charlie
Ok thanks all, will do.



On Tue, Sep 29, 2009 at 10:04 AM, Rajeev Dayal  wrote:

> Generally, you should not be committing GWT's generated artifacts into
> version control. Of course, this is completely up to you, but the usual way
> to do this would be to tag your source code at a particular point and time,
> and then use a build script to generate a war file for deployment.
> As has been mentioned on this thread, you won't be able to automate your
> build/deployment process from Eclipse itself. You'll need to use something
> like Ant (or Maven) for this. There is an open feature request to have
> Eclipse generate a build script for your project. We have not implemented
> this as yet.
>
> For now, you can take a look at the build scripts included with the sample
> projects that come with GWT. If you downloaded GWT separately, drop into the
> "samples" directory of the SDK, and take a look at the build.xml file for
> the DynaTable sample. If you downloaded the plugin and the SDKs together,
> you'll find the GWT SDK under  dir>/plugins/com.google.gwt.eclipse.sdkbundle../gwt--/samples
>
> If you have any other questions, please post back here.
>
> On Tue, Sep 29, 2009 at 12:40 AM, rjcarr  wrote:
>
>>
>> If you have installed the toolkit there is an application that you can
>> call to generate shell / template projects for you.  This will also
>> create a build file that you can take a look at.  None of this has
>> anything to do with eclipse.  If you have only used eclipse you might
>> need to download the toolkit separately.
>>
>> On Sep 28, 11:54 am, charlie  wrote:
>> > I'm having a hard time automating the build process.  The folders that
>> gwt
>> > generates DO NOT want to get into SVN, no matter what command I add I
>> can't
>> > get them to commit.  As a consequence, when I try to export the war
>> > directory and zip it up for deployment on the server, it's missing
>> crucial
>> > pieces.
>> >
>> > When I issue Compile on the Hosted Mode Browser, where does that
>> directory
>> > get deployed to?
>> >
>> > Does anyone have a build script that executes outside of eclipse ?  Or
>> > within eclipse, I'm just trying to automate the build and deployment.
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: RichTextArea:setEnabled

2009-09-29 Thread Parvez Shah
Bump --
any one has any idea on how to make RichTextArea  setEnabeled(false)


On Tue, Sep 29, 2009 at 1:42 PM, Prashant  wrote:

> if you need the toolbar you must use RichTextToolbar. I am not much
> familiar with RichTextArea so I cannot what you can/can't do with
> RichTextArea alone...
>
> yes, docs says noting about it, refer to gwt showcase for working
> examples...
>
>
>
> On Tue, Sep 29, 2009 at 1:35 PM, Parvez Shah  wrote:
>
>> So u mean i cant use RichTextArea without RichTextToolbar ..
>> The document says nothing like this
>>
>> On Tue, Sep 29, 2009 at 1:20 PM, Prashant  wrote:
>>
>>> ohh, that's area only not areat
>>>
>>>
>>> On Tue, Sep 29, 2009 at 1:19 PM, Prashant  wrote:
>>>
 do this...

 RootPanel.get().add(new RichTextToolbar(areat));
 RootPanel.get().add(area);

 copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
 images in the folder from
 "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text"
 to your project




 On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah wrote:

> Hello I am facing problem in making RichTextArea setEnabled(false); is
> it like RichTextArea is not meant to be setEnabeled(false);
>
>
> public void onModuleLoad() {
> RichTextArea area = new RichTextArea();
> area.setEnabled(false);
> area.setHTML("Name: some name  Address: some
> addrsss with reallly long addresss lerts testTin: N/A");
>
> RootPanel.get().add(area);
>
> }
>
>
>
>
>

>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Remote controlling an iframe

2009-09-29 Thread David Given

David Given wrote:
> I want to embed a mini web browser into my app (for help text). I've 
> seen this done before on other sites. I want to load the help pages into 
> an iframe, and then use GWT widgetry to listen for onload events, 
> determine the page title, go forwards and back, and remotely set the URL.
> 
> I've looked into writing my own, but managing all the interactions 
> between onload events, Javascript security issues, and so on looks 
> horrendously complex involving lots of hairy JSNI. So, before I go 
> ahead, has anybody already done this and is the code available?
> 
> All my files are going to come from the same domain, so hopefully 
> security *shouldn't* be a problem...

Does anyone know about this?

-- 
┌─── dg@cowlark.com ─ http://www.cowlark.com ─
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan

--~--~-~--~~~---~--~~
You received 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: Deployment and Eclipse+SVN

2009-09-29 Thread Rajeev Dayal
Generally, you should not be committing GWT's generated artifacts into
version control. Of course, this is completely up to you, but the usual way
to do this would be to tag your source code at a particular point and time,
and then use a build script to generate a war file for deployment.
As has been mentioned on this thread, you won't be able to automate your
build/deployment process from Eclipse itself. You'll need to use something
like Ant (or Maven) for this. There is an open feature request to have
Eclipse generate a build script for your project. We have not implemented
this as yet.

For now, you can take a look at the build scripts included with the sample
projects that come with GWT. If you downloaded GWT separately, drop into the
"samples" directory of the SDK, and take a look at the build.xml file for
the DynaTable sample. If you downloaded the plugin and the SDKs together,
you'll find the GWT SDK under /plugins/com.google.gwt.eclipse.sdkbundle../gwt--/samples

If you have any other questions, please post back here.

On Tue, Sep 29, 2009 at 12:40 AM, rjcarr  wrote:

>
> If you have installed the toolkit there is an application that you can
> call to generate shell / template projects for you.  This will also
> create a build file that you can take a look at.  None of this has
> anything to do with eclipse.  If you have only used eclipse you might
> need to download the toolkit separately.
>
> On Sep 28, 11:54 am, charlie  wrote:
> > I'm having a hard time automating the build process.  The folders that
> gwt
> > generates DO NOT want to get into SVN, no matter what command I add I
> can't
> > get them to commit.  As a consequence, when I try to export the war
> > directory and zip it up for deployment on the server, it's missing
> crucial
> > pieces.
> >
> > When I issue Compile on the Hosted Mode Browser, where does that
> directory
> > get deployed to?
> >
> > Does anyone have a build script that executes outside of eclipse ?  Or
> > within eclipse, I'm just trying to automate the build and deployment.
> >
>

--~--~-~--~~~---~--~~
You received 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 the RichTextArea to expand as you type

2009-09-29 Thread James Tamplin

M -

Can you post the whole solution. I'm unsure exactly how myHTML and
divHidden fit in.

Thanks.

On Sep 8, 3:57 am, "m.assa...@gmail.com"  wrote:
> I solved the issue by associating a keyboardlistener to thetextarea
> which copies
> thetextareacontents into a GWT HTML Element and get its height.
> (Then you resize thetextareawith the new HTML Element height)
>
> in the keyboard listener you do sth like
>
>         public void onKeyUp(Widget sender, char keyCode, int modifiers) {
>                                 RichTextArea rta = (RichTextArea) sender;
>                                 myHTML.setHTML(rta.getHTML());
>
>                                 rta.setHeight(""+ 
> (divHidden.getOffsetHeight()));
>                         }
>
> hope this helps.
> M.
>
> You should associate a css rule like visibility: hidden to the HTML
> Element in order to make the browser not showing it.
>
> On Aug 26, 1:26 am, Arthur Kalmenson  wrote:
>
> > Yes, that is the way to do this.
>
> > --
> > Arthur Kalmenson
>
> > On Thu, Aug 20, 2009 at 2:09 PM, Yossi wrote:
>
> > > Someone please answer, it is very important for me.
> > > I need it to expand only vertically and not horizontally
>
> > > I am thinking of adding an event listener for the keyboard and mouse
> > > and on each event I willcheckif there are scrollbars - if there are,
> > > I will increase the height, if there aren't I will decrease.
>
> > > Thanks
>
> > > On 12 Aug, 14:27, LuminariGWT  wrote:
> > >> I'm trying to use the GWTRichTextArea.  I would like the size of the
> > >> area to expand vertically as you type, so there is never ascrollbar.
> > >> Any ideas on how I can accomplish this?
>
> > >> overflow:visible; doesn't work
>
> > >> 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: Multiple Words Suggestion Oracle

2009-09-29 Thread jiao guofeng

Thanks very much.

I'm searching other implementation too.


On 9月29日, 午後4:15, Albert Attard  wrote:
> Hi Everyone:
>
> I need to create a suggestion box where the user will enter a set of
> comma separated categories, very similar to the Gmail address fields,
> and display a list of matching key words for the current entry.
>
> For example, let say I have the following suggestions: car; motor;
> truck; and caravan. When the user enters 'c' the key words 'car' and
> 'caravan' will be listed and the user selects one. Then the user
> enters comma: ',' followed by 't' (so the suggestion box has the text:
> "car, t" with the cursor just after the 't'). Now I want to list all
> the matching key words for 't'. I managed to, sort of, go around this
> as shown below, but as you’ll see it’s flawed.
>
> MultiWordSuggestOracle oracle = new MultiWordSuggestOracle() {
>   private String prefix = "";
>
>   @Override
>   public synchronized void requestSuggestions(Request request,
> Callback callback) {
>     prefix = "";
>     String[] keys = request.getQuery().split(",");
>     if (keys.length > 0) {
>       for (int i = 0; i < keys.length - 1; i++) {
>         prefix += keys[i].trim().toLowerCase() + ", ";
>       }
>       request.setQuery(keys[keys.length - 1]);
>     }
>     super.requestSuggestions(request, callback);
>   }
>
>   @Override
>   protected synchronized MultiWordSuggestion createSuggestion(String
> replacementString, String displayString) {
>     return super.createSuggestion(prefix + replacementString,
> displayString);
>   }};
>
> oracle.add("car");
> oracle.add("motor");
> oracle.add("truck");
> oracle.add("caravan");
>
> SuggestBox categoriesSuggestBox = newSuggestBox(oracle);
>
> The main issue is that I cannot get the cursor position and I can only
> append. So the user cannot change one of the first categories. He/she
> can only append for this to work correctly.
>
> Do you know of any better implementation?
>
> Thanks in advance,
> Albert

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



files removed after compilation

2009-09-29 Thread ptitboutette

hello folks,

I have a problem after the compilation of my gwt project ...
The behaviours is right before under the hosted mode but once compiled
some files are removed in the war tree.
For instance, my war/projectname/images and war/projectname/js/ext
directories are removed after the compilation ... If I put these
directories by hand in the tree after the compilation, the link is
done with the ext directory but not for the images one ...
Do I have to allows these resources in a configuration file ?

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



accessing external database from GWT

2009-09-29 Thread Tobe

Hi,
how can I access, like sending queries, an external database (MySQL)
from GWT?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Project Structure in GWT-2.0

2009-09-29 Thread Michał Sędzielewski

I agree, it would be nice to have maven structure in GWT 2.0

On 28 Wrz, 15:45, logicpeters  wrote:
> Can anyone tell me if there are plans to rework the way the currentGWTproject 
> structure is configured for2.0?  Mxing the source and
> compiled code in the /war folder has been a real pain in the butt for
> build scripts and source control.  I've been trying to "mavenize" our
> project, and find the various solutions to be un-elegant hacks that
> wind up confusing the structure even more.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



(de)Serialization of gwt rpc objects

2009-09-29 Thread PJ Gray
My project works fine under hosted mode, but I tried a test deployment last
night and ran into issues with deserializing gwt rpc objects.  It looks to
me like the serialization is working fine, and finding the gwt.rpc whitelist
file, which lists my various classes.  However, once on the server, it
complains that the object cannot be deserialized due to security issues with
using java.io.serializable.

I suspect that this might be a problem specific to my deployment, but I
thought I would ask to see if anyone had any suggestions.

Everyone seems to quote directly from the FAQ the line "...the serialization
policy file must be deployed to your web server as a public resource and
needs to be accessible from a
*RemoteServiceServlet
* via 
*ServletContext.getResource()
*. If the serialization whitelist policy file is not deployed properly, your
GWT application will run in 1.3.3 compatibility mode and refuse to serialize
types implementing *java.io.Serializable*."

However, as I said, the whitelist policy file IS found, cause the objects
are serialized.   However, (heres the rub), on my server I share a tomcat
server with other customers of my ISP, thus the ISP forces me to put my
WEB-INF in a 'servlet' folder of my public_html.   I have to change the
servlet mappings in my xml file to make this work.   I am assuming that due
to this weirdness the gwt.rpc file is not found on the server side, thus
cannot deserialize? That would make sense, but I just can't figure out
where to put it!The faq is extremely non-helpful with its "must be
deployed properly",   uggg.

Anyone know more details on this? Or have any suggestions?

thanks in advance!

-pj

--~--~-~--~~~---~--~~
You received 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: Gadget "more>>" ?

2009-09-29 Thread Andrei Fifiita

I can, but i thought there is a more complex widget somewhere (from a
graphic point of view for example)

On Sep 29, 3:58 pm, Adam T  wrote:
> can't you do it using the normal GWT menu and menuitem widgets?
> //A
>
> On 29 Sep, 13:50, Ice13ill  wrote:
>
> > Does someone knows a library with gadget/widget like the "more>>" item
> > from the google main menu ? (the menu seen on the top of the page,
> > with links to other apps)
--~--~-~--~~~---~--~~
You received 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: dialog box background - BUG?

2009-09-29 Thread John V Denley

Hmmm, not sure I ever would have figured that out on my own, Ive only
been doing web application development for about 2-3 months, so this
is all new to me.

You were correct in your assumptions, and that makes sense why the
problem only happens when you "add" a stylename, as using the
"setStyleName" would override the gwt-DialogBox Style.

Also odd though that the problem "goes away" when you use
dialogBox.setWidget(dialogVPanel); which must mean that the dialog box
width automatically shrinks to fit the vertical panel, but doesnt when
the widget is a flextable.

Thanks for the tip about firebug, I downloaded that for another
purpose a while ago, and didnt know that you could use it in the way
you have described below, so I will have a look at that, not least as
it might help me dissect and understand whats happening with GWT
unther the hood a bit better

Thanhks for your help and input, hopefully this will be a useful entry
for anyone else with a similar issue :D

On Sep 29, 1:20 pm, Isaac Truett  wrote:
> John,
>
> I'm assuming that by "basic GWT project" you mean a project created
> with the New Web Application Project wizard in the Google Plugin for
> Eclipse, since that seems to fit with your description. If that
> assumption is correct, then you're not looking at a bug at all. The
> CSS file created by the wizard sets a width of 400px on DialogBoxes:
>
> .gwt-DialogBox {
>   width: 400px;
>
> }
>
> You have a 400px-wide dialog with a smaller table inside it, allowing
> the background to show through. I'm sure you could've discovered that
> for yourself. If you'd really stripped things down to the smallest
> possible reproduction case, you would've found that the problem
> disappeared when you removed that CSS rule. You also could've
> discovered it by examining your application in a DOM inspector such as
> the Firefox plugin Firebug.
>
> -- Isaac
>
> On Tue, Sep 29, 2009 at 6:41 AM, John VDenley
>
>  wrote:
>
> > OK so this bug seems to relate to a dialog box, containing a
> > FlexTable, when you use the "addStyleName" operator rather than the
> > "setStyleName" operator
>
> > If you create a basic GWT project and add the following code just just
> > after the line which adds the send button into the HTML page
> > (   RootPanel.get("sendButtonContainer").add(sendButton);  )
>
> >        final Button TestButton = new Button("TEST",
> >                        new ClickHandler() {
> >                public void onClick(ClickEvent event) {
>
> >                        final DialogBox TestDialogBox = new DialogBox();
> >                        TestDialogBox.addStyleName("TEST_DIALOG");
> >                        final FlexTable TestFT = new FlexTable();
> >                        final Button TestCloseButton = new Button("Close");
> >                        TestFT.setWidget(3,1,TestCloseButton);
> >                        TestDialogBox.setWidget(TestFT);
> >                        TestCloseButton.addClickHandler(new ClickHandler() {
> >                                public void onClick(ClickEvent event) {
> >                                        TestDialogBox.hide();
> >                                }
> >                        });
> >                        TestDialogBox.show();
> >                        }
> >        });
> >        RootPanel.get("sendButtonContainer").add(TestButton);
>
> > Then add the following in the CSS file:
>
> > .TEST_DIALOG {
> >  background: red;
> > }
>
> > Then you will see this bug when you run the project and click on the
> > "TEST" button
>
> > On Sep 17, 3:47 pm, Isaac Truett  wrote:
> >> John,
>
> >> The first step in reporting a bug is to create the smallest possible
> >> piece of code that reproduces the problem. You can post that code here
> >> and the group can help you determine if you have a legitimate bug.
>
> >> - Isaac
>
> >> On Thu, Sep 17, 2009 at 5:36 AM, John VDenley
>
> >>  wrote:
>
> >> > ive just tried to set the background colour of all my dialog boxes
> >> > using CSS and its immediately obvious that there seems to be a bug
> >> > with the DIV somewhere, as the background colour is appearing to the
> >> > immediate right of the actual dialog box, its exactly the same height,
> >> > but approximately 30% wider. One of my dialog boxes has a disclosure
> >> > panel, and when i open that up, the "shadow" background expands with
> >> > it, again maintaining the same height, but approximately 30% more
> >> > width.
>
> >> > Has anyone else seen this, is it a known bug? If not how can i report
> >> > it officially?
>
> >> > I know i could probably work out how to report it etc myself, but I
> >> > have a deadline today to get my first version finished before i go off
> >> > on holiday tomorrow, and I still have a lot to do!!
>
> >> > Thanks,
> >> > J
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-t

Re: how to get values in gwt externally

2009-09-29 Thread Saurabh Naik
ok ..

on html form I am having 

where I have to do pop up thing for buttons but I am getting following error

[ERROR] Unable to load module entry point class my.pkg.client.Popup (see
associated exception for details)
java.lang.AssertionError: null
at com.google.gwt.dom.client.ButtonElement$.as(ButtonElement.java:33)
at com.google.gwt.user.client.ui.Button.(Button.java:125)
at com.google.gwt.user.client.ui.Button.wrap(Button.java:55)
at my.pkg.client.Popup.onModuleLoad(Popup.java:30)
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:585)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:343)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:77)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:161)
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)


On Tue, Sep 29, 2009 at 6:02 PM, Ian Bambury  wrote:

> Your subject line is "how to get values in gwt".
> If you are having a problem with ext then you should post your question in
> an ext forum not a gwt forum.
> Ian
>
> http://examples.roughian.com
>
>
> 2009/9/29 Saurabh Naik 
>
> I am using gwt ext but there is no wrap method.
>>
>>
>> On Tue, Sep 15, 2009 at 4:49 PM, Ian Bambury wrote:
>>
>>> You need to wrap it, e.g.
>>> TextBox t = TextBox.wrap(RootPanel.get("name").getElement());
>>>
>>> and then use that.
>>>
>>> Ian
>>>
>>> http://examples.roughian.com
>>>
>>>
>>> 2009/9/15 Saurabh Naik 
>>>
>>> Hello

   suppose there is one textbox in my html form. and I want to take
 the value which is entered in my gwt i.e in my onModuleLoad() function. how
 to take value ?

 e.g there is textbox

 

 String name = (String) rootpanel.get("name").getValue... but there is no
 get value method...



>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Gadget "more>>" ?

2009-09-29 Thread Adam T

can't you do it using the normal GWT menu and menuitem widgets?
//A

On 29 Sep, 13:50, Ice13ill  wrote:
> Does someone knows a library with gadget/widget like the "more>>" item
> from the google main menu ? (the menu seen on the top of the page,
> with links to other apps)
--~--~-~--~~~---~--~~
You received 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 get values in gwt externally

2009-09-29 Thread Ian Bambury
Your subject line is "how to get values in gwt".
If you are having a problem with ext then you should post your question in
an ext forum not a gwt forum.
Ian

http://examples.roughian.com


2009/9/29 Saurabh Naik 

> I am using gwt ext but there is no wrap method.
>
>
> On Tue, Sep 15, 2009 at 4:49 PM, Ian Bambury  wrote:
>
>> You need to wrap it, e.g.
>> TextBox t = TextBox.wrap(RootPanel.get("name").getElement());
>>
>> and then use that.
>>
>> Ian
>>
>> http://examples.roughian.com
>>
>>
>> 2009/9/15 Saurabh Naik 
>>
>> Hello
>>>
>>>   suppose there is one textbox in my html form. and I want to take
>>> the value which is entered in my gwt i.e in my onModuleLoad() function. how
>>> to take value ?
>>>
>>> e.g there is textbox
>>>
>>> 
>>>
>>> String name = (String) rootpanel.get("name").getValue... but there is no
>>> get value method...
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Crashed when "ant hosted" and "ant build"

2009-09-29 Thread bodrin

Hi,

I have a similar problem when building on linux with GWT 1.7.0 - see
below.
Did you find any solution?

--
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x062565bc, pid=21119, tid=2691672976
#
# Java VM: Java HotSpot(TM) Server VM (10.0-b19 mixed mode linux-x86)
# Problematic frame:
# V  [libjvm.so+0x2565bc]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---  T H R E A D  ---

Current thread (0x08725800):  JavaThread "CompilerThread0" daemon
[_thread_in_native, id=21130, stack(0xa067a000,0xa06fb000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR),
si_addr=0x

Registers:
EAX=0x, EBX=0x9e49d474, ECX=0x08c6d1d0, EDX=0x
ESP=0xa06f8ef0, EBP=0xa06f8f48, ESI=0x9e49d440, EDI=0x
EIP=0x062565bc, CR2=0x, EFLAGS=0x00010202

Top of Stack: (sp=0xa06f8ef0)
0xa06f8ef0:   08c6d1d0  0331 0331
0xa06f8f00:   a06f9010 093328a4  a06f9050
0xa06f8f10:   0669f9d0  000e 086c00b8
0xa06f8f20:   0001 08c6d1d0 0002 093328a0
0xa06f8f30:   0011 a06f939c 010002fe 068b
0xa06f8f40:   a06f9010 a06f9330 a06f9078 06255b15
0xa06f8f50:   a06f9330 0001 a06f9c80 a06f9c80
0xa06f8f60:   017b 017b a06f8fa8 a06f939c

Instructions: (pc=0x062565bc)
0x062565ac:   5d dc 8b 03 53 8d 5e 34 ff 50 40 89 c7 8b 56 34
0x062565bc:   8b 00 21 c2 89 56 34 8b 47 04 8b 4b 04 21 c1 8b

Stack: [0xa067a000,0xa06fb000],  sp=0xa06f8ef0,  free space=507k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
V  [libjvm.so+0x2565bc]
V  [libjvm.so+0x255b15]
V  [libjvm.so+0x2a29ad]
V  [libjvm.so+0x29f830]
V  [libjvm.so+0x247149]
V  [libjvm.so+0x2a6d1a]
V  [libjvm.so+0x2a6726]
V  [libjvm.so+0x5b5d7d]
V  [libjvm.so+0x4fde19]
C  [libpthread.so.0+0x543b]


Current CompileTask:
C2:637
org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding.
(Lorg/eclipse/jdt/internal/compiler/lookup/
ParameterizedTypeBinding;Lorg/eclipse/jdt/internal/compiler/lookup/
MethodBinding;)V (596 bytes)


---  P R O C E S S  ---

Java Threads: ( => current thread )
  0x08a40400 JavaThread "Timer-0" daemon [_thread_blocked, id=21135,
stack(0xa0069000,0xa00ba000)]
  0x08729800 JavaThread "Low Memory Detector" daemon [_thread_blocked,
id=21132, stack(0xa05a8000,0xa05f9000)]
  0x08728000 JavaThread "CompilerThread1" daemon [_thread_blocked,
id=21131, stack(0xa05f9000,0xa067a000)]
=>0x08725800 JavaThread "CompilerThread0" daemon [_thread_in_native,
id=21130, stack(0xa067a000,0xa06fb000)]
  0x08724400 JavaThread "Signal Dispatcher" daemon [_thread_blocked,
id=21129, stack(0xa06fb000,0xa074c000)]
  0x08709400 JavaThread "Finalizer" daemon [_thread_blocked, id=21128,
stack(0xa094c000,0xa099d000)]
  0x08708400 JavaThread "Reference Handler" daemon [_thread_blocked,
id=21127, stack(0xa099d000,0xa09ee000)]
  0x08685400 JavaThread "main" [_thread_blocked, id=21123, stack
(0xb7f6c000,0xb7fbd000)]

Other Threads:
  0x08705000 VMThread [stack: 0xa09ee000,0xa0a6f000] [id=21126]
  0x0872b000 WatcherThread [stack: 0xa0527000,0xa05a8000] [id=21133]

VM state:at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread:  ([mutex/lock_event])
[0x08683630/0x08683658] Safepoint_lock - owner thread: 0x08705000
[0x08683730/0x08683758] Threads_lock - owner thread: 0x08705000
[0x08683bf0/0x08683c08] Heap_lock - owner thread: 0x08685400

Heap
 PSYoungGen  total 19456K, used 14108K [0xb31f, 0xb4e6,
0xb4e6)
  eden space 9792K, 100% used [0xb31f,0xb3b8,0xb3b8)
  from space 9664K, 44% used [0xb3b8,0xb3fb7188,0xb44f)
  to   space 9664K, 0% used [0xb44f,0xb44f,0xb4e6)
 PSOldGentotal 133696K, used 100653K [0xa4e6, 0xad0f,
0xb31f)
  object space 133696K, 75% used [0xa4e6,0xab0ab798,0xad0f)
 PSPermGen   total 16384K, used 9584K [0xa0e6, 0xa1e6,
0xa4e6)
  object space 16384K, 58% used [0xa0e6,0xa17bc080,0xa1e6)

Dynamic libraries:
005cb000-005e4000 r-xp  68:02 1071658/lib/ld-2.5.so
005e4000-005e5000 r-xp 00019000 68:02 1071658/lib/ld-2.5.so
005e5000-005e6000 rwxp 0001a000 68:02 1071658/lib/ld-2.5.so
005ed000-00727000 r-xp  68:02 1071672/lib/libc-2.5.so
00727000-00729000 r-xp 00139000 68:02 1071672/lib/libc-2.5.so
00729000-0072a000 rwxp 0013b000 68:02 1071672/lib/libc-2.5.so
0072a000-0072d000 rwxp 0072a000 00:00 0
0072f000-00731000 r-xp  68:02 1071673/lib/libdl-2.5.so
00731000-00732000 r-xp 1000 68:02 1071673/lib/libdl-2.5.so
00732000-00733000 rwxp 2000 68:02 1071673/lib/libdl-2.5.so
00735000-0075a000 r-xp 00

Re: Totorial: How to produce JavaScript libraries using GWT

2009-09-29 Thread Saurabh Akshekar

Hi,
can you tell me how can we export java class to ".js" file using gwt-
exporter?

thnx :)

On Jul 31, 2:39 pm, Paul MERLIN  wrote:
> http://code.google.com/p/gwtchismes/wiki/Tutorial_ExportingGwtLibrari...
>
> Thanks Manuel for this tutorial !
>
> /Paul

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



BUG GWT border handling

2009-09-29 Thread edorsey

I just encountered a problem that would be a nice addition to future
GWT releases. The border handling seems to not have been fixed between
IE and Firefox. I add a border to an object and IE puts the border
within the object's width and Firefox adds the border to the outside
of the object's width. Has anyone found a workaround for this that
doesn't involve layering to panels on top of each other?

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



3rd party widget pluggable interface

2009-09-29 Thread Matt

Hi,

I was wondering if it's possible at all, or if anyone has suggestions
on best practices for plugging additional widgets into a GWT app after
compile?

We have a fat client app that has a pretty large set of functionality
that we're porting to GWT, but occasionally clients needs some
specific additional functionality, currently we support the ability to
do this by a COM interface in our C++ app.

I'm looking to replicate a similar ability in a GWT app, from what I
can tell there is no way to do this other than providing a javascript
interface that gets wrapped by a handler frame that has a JSNI
interface. Is this really the only way to handle this case?

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



Multiple Words Suggestion Oracle

2009-09-29 Thread Albert Attard

Hi Everyone:

I need to create a suggestion box where the user will enter a set of
comma separated categories, very similar to the Gmail address fields,
and display a list of matching key words for the current entry.

For example, let say I have the following suggestions: car; motor;
truck; and caravan. When the user enters 'c' the key words 'car' and
'caravan' will be listed and the user selects one. Then the user
enters comma: ',' followed by 't' (so the suggestion box has the text:
"car, t" with the cursor just after the 't'). Now I want to list all
the matching key words for 't'. I managed to, sort of, go around this
as shown below, but as you’ll see it’s flawed.

MultiWordSuggestOracle oracle = new MultiWordSuggestOracle() {
  private String prefix = "";

  @Override
  public synchronized void requestSuggestions(Request request,
Callback callback) {
prefix = "";
String[] keys = request.getQuery().split(",");
if (keys.length > 0) {
  for (int i = 0; i < keys.length - 1; i++) {
prefix += keys[i].trim().toLowerCase() + ", ";
  }
  request.setQuery(keys[keys.length - 1]);
}
super.requestSuggestions(request, callback);
  }

  @Override
  protected synchronized MultiWordSuggestion createSuggestion(String
replacementString, String displayString) {
return super.createSuggestion(prefix + replacementString,
displayString);
  }
};
oracle.add("car");
oracle.add("motor");
oracle.add("truck");
oracle.add("caravan");

SuggestBox  categoriesSuggestBox = new SuggestBox(oracle);


The main issue is that I cannot get the cursor position and I can only
append. So the user cannot change one of the first categories. He/she
can only append for this to work correctly.

Do you know of any better implementation?

Thanks in advance,
Albert

--~--~-~--~~~---~--~~
You received 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: dialog box background - BUG?

2009-09-29 Thread Isaac Truett

John,

I'm assuming that by "basic GWT project" you mean a project created
with the New Web Application Project wizard in the Google Plugin for
Eclipse, since that seems to fit with your description. If that
assumption is correct, then you're not looking at a bug at all. The
CSS file created by the wizard sets a width of 400px on DialogBoxes:

.gwt-DialogBox {
  width: 400px;
}

You have a 400px-wide dialog with a smaller table inside it, allowing
the background to show through. I'm sure you could've discovered that
for yourself. If you'd really stripped things down to the smallest
possible reproduction case, you would've found that the problem
disappeared when you removed that CSS rule. You also could've
discovered it by examining your application in a DOM inspector such as
the Firefox plugin Firebug.


-- Isaac


On Tue, Sep 29, 2009 at 6:41 AM, John V Denley
 wrote:
>
> OK so this bug seems to relate to a dialog box, containing a
> FlexTable, when you use the "addStyleName" operator rather than the
> "setStyleName" operator
>
> If you create a basic GWT project and add the following code just just
> after the line which adds the send button into the HTML page
> (   RootPanel.get("sendButtonContainer").add(sendButton);  )
>
>        final Button TestButton = new Button("TEST",
>                        new ClickHandler() {
>                public void onClick(ClickEvent event) {
>
>                        final DialogBox TestDialogBox = new DialogBox();
>                        TestDialogBox.addStyleName("TEST_DIALOG");
>                        final FlexTable TestFT = new FlexTable();
>                        final Button TestCloseButton = new Button("Close");
>                        TestFT.setWidget(3,1,TestCloseButton);
>                        TestDialogBox.setWidget(TestFT);
>                        TestCloseButton.addClickHandler(new ClickHandler() {
>                                public void onClick(ClickEvent event) {
>                                        TestDialogBox.hide();
>                                }
>                        });
>                        TestDialogBox.show();
>                        }
>        });
>        RootPanel.get("sendButtonContainer").add(TestButton);
>
> Then add the following in the CSS file:
>
> .TEST_DIALOG {
>  background: red;
> }
>
>
> Then you will see this bug when you run the project and click on the
> "TEST" button
>
>
> On Sep 17, 3:47 pm, Isaac Truett  wrote:
>> John,
>>
>> The first step in reporting a bug is to create the smallest possible
>> piece of code that reproduces the problem. You can post that code here
>> and the group can help you determine if you have a legitimate bug.
>>
>> - Isaac
>>
>> On Thu, Sep 17, 2009 at 5:36 AM, John VDenley
>>
>>  wrote:
>>
>> > ive just tried to set the background colour of all my dialog boxes
>> > using CSS and its immediately obvious that there seems to be a bug
>> > with the DIV somewhere, as the background colour is appearing to the
>> > immediate right of the actual dialog box, its exactly the same height,
>> > but approximately 30% wider. One of my dialog boxes has a disclosure
>> > panel, and when i open that up, the "shadow" background expands with
>> > it, again maintaining the same height, but approximately 30% more
>> > width.
>>
>> > Has anyone else seen this, is it a known bug? If not how can i report
>> > it officially?
>>
>> > I know i could probably work out how to report it etc myself, but I
>> > have a deadline today to get my first version finished before i go off
>> > on holiday tomorrow, and I still have a lot to do!!
>>
>> > Thanks,
>> > J
> >
>

--~--~-~--~~~---~--~~
You received 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 get values in gwt externally

2009-09-29 Thread Saurabh Naik
I am using gwt ext but there is no wrap method.


On Tue, Sep 15, 2009 at 4:49 PM, Ian Bambury  wrote:

> You need to wrap it, e.g.
> TextBox t = TextBox.wrap(RootPanel.get("name").getElement());
>
> and then use that.
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/9/15 Saurabh Naik 
>
> Hello
>>
>>   suppose there is one textbox in my html form. and I want to take the
>> value which is entered in my gwt i.e in my onModuleLoad() function. how to
>> take value ?
>>
>> e.g there is textbox
>>
>> 
>>
>> String name = (String) rootpanel.get("name").getValue... but there is no
>> get value method...
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Form panel content type is not correct in case of Videos upload

2009-09-29 Thread vaibhav.saxena

Hi,
I am using form panel in my GWT client code. I need to detect the
content type on my server side of the file being upload. Now strange
thing that is happening is something defined below:

When i upload a image i get the correct content type "image/jpeg" but
when i upload a video of type mp4 i used to get "application/octet-
stream" while i should get "video/mp4".

Now i test it out using the simple JSP based form and file upload
input type widget and strangely i get the the correct content type for
each.

I am not able to get where i am mistaking or it is the bug of GWT

Here is my code to make a GWT client side file upload widget





VerticalPanel userVideoContainer = new VerticalPanel
();
this.add(userVideoContainer);


FormPanel formPanel = new FormPanel());
formPanel .setEncoding(FormPanel.ENCODING_MULTIPART);
formPanel .setMethod(FormPanel.METHOD_POST);
formPanel .setAction(getRequestUrl());

userVideoContainer.add(getUserVideoFormPanel());

FileUpload fileUpload = new FileUpload());
fileUpload .setName("file");
fileUpload .add(getUserVideoUpload());

Button uploadButton = new Button("Upload");
userVideoContainer.add(uploadButton);




--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Gadget "more>>" ?

2009-09-29 Thread Ice13ill

Does someone knows a library with gadget/widget like the "more>>" item
from the google main menu ? (the menu seen on the top of the page,
with links to other apps)
--~--~-~--~~~---~--~~
You received 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: turn off the war output of HostedMode

2009-09-29 Thread Ed

H looked at the work arount, played with it (the working set
solution)... but it's not really an option for me...
I really have to many gwt projects to manage it this way.
It becomes very unfriendly and every time I add a folder I have to
make sure it's added to the working set, as otherwise it doesn't show
up :(... which brings me to strange behavior/bugs...
It would be nice to add a project and then be able to exclude the war
folder, just like the source folder options...

Let's hope this will be improved soon.


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



How to add Escape key handler

2009-09-29 Thread mohan

Hi,
I have a button and on click of the button i m opening a pop up.i want
to close the pop up on press of Escape key.
How and where to add the handler for Escape button? Kindly guide me :)

Thanks in advance.

Cheers!!!
Mohan
--~--~-~--~~~---~--~~
You received 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: dialog box background - BUG?

2009-09-29 Thread John V Denley

OK so this bug seems to relate to a dialog box, containing a
FlexTable, when you use the "addStyleName" operator rather than the
"setStyleName" operator

If you create a basic GWT project and add the following code just just
after the line which adds the send button into the HTML page
(   RootPanel.get("sendButtonContainer").add(sendButton);  )

final Button TestButton = new Button("TEST",
new ClickHandler() {
public void onClick(ClickEvent event) {

final DialogBox TestDialogBox = new DialogBox();
TestDialogBox.addStyleName("TEST_DIALOG");
final FlexTable TestFT = new FlexTable();
final Button TestCloseButton = new Button("Close");
TestFT.setWidget(3,1,TestCloseButton);
TestDialogBox.setWidget(TestFT);
TestCloseButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
TestDialogBox.hide();
}
});
TestDialogBox.show();
}
});
RootPanel.get("sendButtonContainer").add(TestButton);

Then add the following in the CSS file:

.TEST_DIALOG {
  background: red;
}


Then you will see this bug when you run the project and click on the
"TEST" button


On Sep 17, 3:47 pm, Isaac Truett  wrote:
> John,
>
> The first step in reporting a bug is to create the smallest possible
> piece of code that reproduces the problem. You can post that code here
> and the group can help you determine if you have a legitimate bug.
>
> - Isaac
>
> On Thu, Sep 17, 2009 at 5:36 AM, John VDenley
>
>  wrote:
>
> > ive just tried to set the background colour of all my dialog boxes
> > using CSS and its immediately obvious that there seems to be a bug
> > with the DIV somewhere, as the background colour is appearing to the
> > immediate right of the actual dialog box, its exactly the same height,
> > but approximately 30% wider. One of my dialog boxes has a disclosure
> > panel, and when i open that up, the "shadow" background expands with
> > it, again maintaining the same height, but approximately 30% more
> > width.
>
> > Has anyone else seen this, is it a known bug? If not how can i report
> > it officially?
>
> > I know i could probably work out how to report it etc myself, but I
> > have a deadline today to get my first version finished before i go off
> > on holiday tomorrow, and I still have a lot to do!!
>
> > Thanks,
> > J
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



File Upload not working after migrating to GWT1.7

2009-09-29 Thread abhiram

Hi All,

   I had my File Upload module working properly in 1.5.3. But it has
not been working after I migrated to GWT 1.7.
I realised that "addFormHandler" is deprecated in 1.7 and so I changed
it to "addSubmitHandler". Earlier the setAction was set as

   form.setAction(GWT.getModuleBaseURL() +"/MyServlet");

  I changed it to
  form.setAction("C:/apache-tomcat-6.0.16/webapps/GWTFileUpload/WEB-
INF/classes/com/abc/pt06/uploadfile/server/UploadServlet");

 which is the real path of my servlet after starting the tomcat.

 But still it does not seem to be working. I just get an "Error on
Page" alert in IE and in Firefox, i get an alert like "Firefox does'nt
know how to open this address, because the protocol(c) isn't
associated with any program."

  Can someone please suggest what I need to do to get this working. Or
some sample code where FileUpload has been working properly in GWT
1.7.

Regards,
Abhiram
--~--~-~--~~~---~--~~
You received 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: Maven + GWT 1.7.1

2009-09-29 Thread Jerome C.

I use a Mac under Snow Leopard, it's for that I need it ;)

thanks for your response.

I'll be patient (but since the snow leopard release, I can't use well
GWT so... it's long for me !)

On 29 sep, 10:05, Austen  wrote:
> Hi Jerome,
>
> 1.7.1 hasn't been released to the maven repository yet. There is
> usually a delay between the GWT release and this happening for some
> reason.
>
> You'll be fine using 1.7.0 as there's no difference, except of course
> if you're using a mac...and in that case I guess you need to be
> patient for a day or so.
>
> Austen
>
> On Sep 28, 6:26 pm, "Jerome C."  wrote:
>
> > Hello everybody,
>
> > I want to use GWT 1.7.1 with Maven but I can't find it for the moment
> > (current is gwt 1.7.0).
>
> > How can I get GWT 1.7.1 in Maven ?
>
> > I try to manually install it in my local repository but I have trouble
> > with some lib
>
> > 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: RichTextArea:setEnabled

2009-09-29 Thread Prashant
if you need the toolbar you must use RichTextToolbar. I am not much familiar
with RichTextArea so I cannot what you can/can't do with RichTextArea
alone...

yes, docs says noting about it, refer to gwt showcase for working
examples...


On Tue, Sep 29, 2009 at 1:35 PM, Parvez Shah  wrote:

> So u mean i cant use RichTextArea without RichTextToolbar ..
> The document says nothing like this
>
> On Tue, Sep 29, 2009 at 1:20 PM, Prashant  wrote:
>
>> ohh, that's area only not areat
>>
>>
>> On Tue, Sep 29, 2009 at 1:19 PM, Prashant  wrote:
>>
>>> do this...
>>>
>>> RootPanel.get().add(new RichTextToolbar(areat));
>>> RootPanel.get().add(area);
>>>
>>> copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
>>> images in the folder from
>>> "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text"
>>> to your project
>>>
>>>
>>>
>>>
>>> On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah wrote:
>>>
 Hello I am facing problem in making RichTextArea setEnabled(false); is
 it like RichTextArea is not meant to be setEnabeled(false);


 public void onModuleLoad() {
 RichTextArea area = new RichTextArea();
 area.setEnabled(false);
 area.setHTML("Name: some name  Address: some
 addrsss with reallly long addresss lerts testTin: N/A");

 RootPanel.get().add(area);

 }





>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: RichTextArea:setEnabled

2009-09-29 Thread Parvez Shah
So u mean i cant use RichTextArea without RichTextToolbar ..
The document says nothing like this

On Tue, Sep 29, 2009 at 1:20 PM, Prashant  wrote:

> ohh, that's area only not areat
>
>
> On Tue, Sep 29, 2009 at 1:19 PM, Prashant  wrote:
>
>> do this...
>>
>> RootPanel.get().add(new RichTextToolbar(areat));
>> RootPanel.get().add(area);
>>
>> copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
>> images in the folder from
>> "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text"
>> to your project
>>
>>
>>
>>
>> On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah wrote:
>>
>>> Hello I am facing problem in making RichTextArea setEnabled(false); is it
>>> like RichTextArea is not meant to be setEnabeled(false);
>>>
>>>
>>> public void onModuleLoad() {
>>> RichTextArea area = new RichTextArea();
>>> area.setEnabled(false);
>>> area.setHTML("Name: some name  Address: some
>>> addrsss with reallly long addresss lerts testTin: N/A");
>>>
>>> RootPanel.get().add(area);
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Maven + GWT 1.7.1

2009-09-29 Thread Austen

Hi Jerome,

1.7.1 hasn't been released to the maven repository yet. There is
usually a delay between the GWT release and this happening for some
reason.

You'll be fine using 1.7.0 as there's no difference, except of course
if you're using a mac...and in that case I guess you need to be
patient for a day or so.

Austen

On Sep 28, 6:26 pm, "Jerome C."  wrote:
> Hello everybody,
>
> I want to use GWT 1.7.1 with Maven but I can't find it for the moment
> (current is gwt 1.7.0).
>
> How can I get GWT 1.7.1 in Maven ?
>
> I try to manually install it in my local repository but I have trouble
> with some lib
>
> 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: JavaScriptException with method Label.setInnerText(String s) but works good with FireFox

2009-09-29 Thread kristo

Hi,
More informations here :
public void onModuleLoad() {

  // Login
  final PopupPanel simplePopup = new PopupPanel(false, true);
  simplePopup.setWidth("300px");
  simplePopup.setAnimationEnabled(true);
  simplePopup.setTitle("Authentification");

  VerticalPanel panel = new VerticalPanel();
  panel.setSpacing(10);

  Grid g = new Grid(2, 2);
  g.setWidget(0, 0, new Label("Login : "));
  g.setWidget(1, 0, new Label("Password"));
  final TextBox pw = new PasswordTextBox();
  final TextBox login = new TextBox();
  g.setWidget(0, 1, login);
  g.setWidget(1, 1, pw);
  Button okButton = new Button("GO >");

  okButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
  final String userName = login.getValue();
  String password = pw.getValue();

}
  });
  panel.add(g);
  panel.add(okButton);

  simplePopup.add(panel);
  simplePopup.center();
  simplePopup.show();
  // Hide loading element
  RootPanel.get("loading").getElement().getParentElement
().removeChild(
  RootPanel.get("loading").getElement());
}

It works very well and suddenly not, but always work with firefox, it
s very strange :-|

On 29 sep, 06:39, Ben  wrote:
> Need more information to answer the question.
>
> -Ben
>
> On Sep 28, 11:10 am, mars1412  wrote:
>
> > show more code
> > what is the var 'g'?
> > in which class is it - what's the parent class?
>
> > On Sep 28, 2:17 pm, kristo  wrote:
>
> > > Hi all,
>
> > > Today i restart my eclipse and when i launch my application on Hosted
> > > mode, i have the following problem :
> > > [ERROR] Unable to load module entry point class
> > > com.perso.test.client.Test (see associated exception for details)
> > > com.google.gwt.core.client.JavaScriptException: (Error):
> > >  number: -2147467259
> > >  description:
> > >         at com.google.gwt.dom.client.DOMImplTrident.setInnerText(Native
> > > Method)
> > >         at 
> > > com.google.gwt.dom.client.Element$.setInnerText$(Element.java:450)
> > >         at com.perso.test.client.Test.onModuleLoad(Test.java:61)
>
> > > The problem occurs on the following lines :
> > > g.setWidget(0, 0, new Label("Login : "));
>
> > > It's the first label created.
> > > When i compile my code, same problem on IE but it works good with
> > > FireFox.
>
> > > Any ideas ?
>
> > > 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: RichTextArea:setEnabled

2009-09-29 Thread Prashant
ohh, that's area only not areat

On Tue, Sep 29, 2009 at 1:19 PM, Prashant  wrote:

> do this...
>
> RootPanel.get().add(new RichTextToolbar(areat));
> RootPanel.get().add(area);
>
> copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
> images in the folder from
> "\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text"
> to your project
>
>
>
>
> On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah wrote:
>
>> Hello I am facing problem in making RichTextArea setEnabled(false); is it
>> like RichTextArea is not meant to be setEnabeled(false);
>>
>>
>> public void onModuleLoad() {
>> RichTextArea area = new RichTextArea();
>> area.setEnabled(false);
>> area.setHTML("Name: some name  Address: some
>> addrsss with reallly long addresss lerts testTin: N/A");
>>
>> RootPanel.get().add(area);
>>
>> }
>>
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received 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: RichTextArea:setEnabled

2009-09-29 Thread Prashant
do this...

RootPanel.get().add(new RichTextToolbar(areat));
RootPanel.get().add(area);

copy RichTextToolbar.java, RichTextToolbar$Strings.properties & all the
images in the folder from
"\gwt-windows-1.7.1\samples\Showcase\src\com\google\gwt\sample\showcase\client\content\text"
to your project



On Tue, Sep 29, 2009 at 12:43 PM, Parvez Shah  wrote:

> Hello I am facing problem in making RichTextArea setEnabled(false); is it
> like RichTextArea is not meant to be setEnabeled(false);
>
>
> public void onModuleLoad() {
> RichTextArea area = new RichTextArea();
> area.setEnabled(false);
> area.setHTML("Name: some name  Address: some
> addrsss with reallly long addresss lerts testTin: N/A");
>
> RootPanel.get().add(area);
>
> }
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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:setEnabled

2009-09-29 Thread Parvez Shah
Hello I am facing problem in making RichTextArea setEnabled(false); is it
like RichTextArea is not meant to be setEnabeled(false);


public void onModuleLoad() {
RichTextArea area = new RichTextArea();
area.setEnabled(false);
area.setHTML("Name: some name  Address: some
addrsss with reallly long addresss lerts testTin: N/A");

RootPanel.get().add(area);

}

--~--~-~--~~~---~--~~
You received 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: Character.isWhitespace alternative? (whitespace check)

2009-09-29 Thread Ed

Yes I can, but don't want to, as it's way to heave for just checking
if a character is a white space... Especialy in my case where
performance is an issue.

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Trunk Mail Sample compiling error

2009-09-29 Thread mfiandesio

Hi to all,
I'm having a look at the UIBinder layouting using as tutorial the Mail
sample but when i try to compile my application or the sample code it
gives me this exception

The method addNorth(Widget, double) in the type DockLayoutPanel is not
applicable for the arguments (Header, int, int).

My layout xml is pretty simple:

 

  



  

  



  

  

and the code

@UiField public Header header;
@UiField public Menu menu;
[..]
 DockLayoutPanel outer = binder.createAndBindUi(this);

// Get rid of scrollbars, and clear out the window's 
built-in
margin,
// because we want to take advantage of the entire client 
area.
Window.enableScrolling(false);
Window.setMargin("0px");

// Special-case stuff to make topPanel overhang a bit.
Element topElem = outer.getContainerElementFor(header);
topElem.getStyle().setZIndex(2);
topElem.getStyle().setOverflow(Overflow.VISIBLE);

RootLayoutPanel root = RootLayoutPanel.get();
root.add(outer);
root.layout();
[..]
Do you have any hint?

Regards,
Matteo

--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---