Re: Changing characters form lower to upper case in TextBox

2017-07-06 Thread Juan Carlos
Good Morning

In my case, i was resolved this problem with following code:

@Ian Bambury also shared this solution

TextBox example= new TextBox();
example.addKeyboardListener(new KeyboardListener() {
@Override
public void onKeyPress(Widget sender, char keyCode, int modifiers) {
DeferredCommand.add(new Command() {
@Override
public void execute() {
example.setText(example.getText().toUpperCase()); 
}
});
}

@Override
public void onKeyDown(Widget sender, char keyCode, int modifiers) {
}

@Override
public void onKeyUp(Widget sender, char keyCode, int modifiers) { 
}
});

El miércoles, 27 de septiembre de 2006, 14:48:02 (UTC-5), owl escribió:
>
> How to change characters form lower to upper case in TextBox as they
> are being typed??
>
>

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


Re: Setting Width of a TextBox inside LayoutPanel

2016-09-21 Thread Chris Odd
My original issue was that for textboxes, the call to

pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);

does not work.   Other widgets are fine, but for some reason textbox is 
different.


.LabelledTextBox {
-webkit-box-sizing: border-box; 
-moz-box-sizing: border-box;   
box-sizing: border-box;
width:100%;
height:100%; 
}


> On Sep 13, 2016, at 9:52 AM, Eddy <eddy.jaqui...@gmail.com> wrote:
> 
> Hello Chris,
> 
> I am not an expert about GWT but I always added a panel into a layoutpanel 
> before. After that I added my widgets into the panel.
> I am telling about SimplePanel for only one widget or FlowPanel for putting 
> several widgets into.
> 
> For example, I used a DockLayoutPanel (and think it is the same for 
> layoutpanel), I set it in Unit.PX made a setSize("100%", "100%").
> Then I instanciated a flowPanel, with a setSize("100%", "100%") too, and 
> added my widgets into (telling about the view into an MVP model).
> I ensured the view implements RequiresResize, ProvidesResize and implemented 
> some resizes code on the widgets I want to resize.
> The behaviour is that when the user resize the browser, the container 
> layoutPanel resize too and the panel take "dynamically" the size of the 
> layoutpanel.
> => perhaps you could set the size of your texbox = size panel and see what 
> happens.

The issue is not that the panels are incorrectly sized, but that the TextBox 
inside the panel does not expand to take up 100% of its container width, even 
though I call

pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);


Other non-textbox widgets seem to behave just fine.   Not sure what is 
different about TextBox. 

I did get it to behave the way I wanted using the following workaround… not 
fully programmatic, had to use CSS:

tb.setStylePrimaryName("LabelledTextBox");

and then putting this in the CSS:

.LabelledTextBox {
-webkit-box-sizing: border-box; 
-moz-box-sizing: border-box;   
box-sizing: border-box;
width:100%;
height:100%; 
}


> 
> Excuses me for my english but i am french :-)
> 
> Hope it could help
> 
> Eddy
> 
> Le mercredi 20 juillet 2016 00:16:56 UTC+2, Chris Odd a écrit :
> Hello all,
> 
> I have a LayoutPanel with one widget added to it (a TextBox).   I want to 
> make the TextBox's width equal to the LayoutPanel's width.
> 
> I thought this would work, but it does not (the TextBox is much narrower than 
> the LayoutPanel's width):
> 
> LayoutPanel pnl = new LayoutPanel();
> TextBox tb = new TextBox();
> pnl.add(tb);
> 
> pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);
> 
> Any idea why it doesn't work?  Or ideas for a better approach?
> 
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to google-web-toolkit+unsubscr...@googlegroups.com 
> <mailto:google-web-toolkit+unsubscr...@googlegroups.com>.
> To post to this group, send email to google-web-toolkit@googlegroups.com 
> <mailto:google-web-toolkit@googlegroups.com>.
> Visit this group at https://groups.google.com/group/google-web-toolkit 
> <https://groups.google.com/group/google-web-toolkit>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

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


Re: Setting Width of a TextBox inside LayoutPanel

2016-09-13 Thread Eddy
Hello Chris,

I am not an expert about GWT but I always added a panel into a layoutpanel 
before. After that I added my widgets into the panel.
I am telling about SimplePanel for only one widget or FlowPanel for putting 
several widgets into.

For example, I used a DockLayoutPanel (and think it is the same for 
layoutpanel), I set it in Unit.PX made a setSize("100%", "100%").
Then I instanciated a flowPanel, with a setSize("100%", "100%") too, and 
added my widgets into (telling about the view into an MVP model).
I ensured the view implements RequiresResize, ProvidesResize and 
implemented some resizes code on the widgets I want to resize.
The behaviour is that when the user resize the browser, the container 
layoutPanel resize too and the panel take "dynamically" the size of the 
layoutpanel.
=> perhaps you could set the size of your texbox = size panel and see what 
happens.

Excuses me for my english but i am french :-)

Hope it could help

Eddy

Le mercredi 20 juillet 2016 00:16:56 UTC+2, Chris Odd a écrit :
>
> Hello all,
>
> I have a LayoutPanel with one widget added to it (a TextBox).   I want to 
> make the TextBox's width equal to the LayoutPanel's width.
>
> I thought this would work, but it does not (the TextBox is much narrower 
> than the LayoutPanel's width):
>
> LayoutPanel pnl = new LayoutPanel();
> TextBox tb = new TextBox();
> pnl.add(tb);
>
> pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);
>
> Any idea why it doesn't work?  Or ideas for a better approach?
>
>
> Thanks
>

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


Setting Width of a TextBox inside LayoutPanel

2016-07-19 Thread Chris Odd
Hello all,

I have a LayoutPanel with one widget added to it (a TextBox).   I want to 
make the TextBox's width equal to the LayoutPanel's width.

I thought this would work, but it does not (the TextBox is much narrower 
than the LayoutPanel's width):

LayoutPanel pnl = new LayoutPanel();
TextBox tb = new TextBox();
pnl.add(tb);

pnl.setWidgetLeftWidth(tb, 0, Unit.PCT, 100, Unit.Pct);

Any idea why it doesn't work?  Or ideas for a better approach?


Thanks

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


Re: TextBox fails to show updated text

2016-02-09 Thread Jens


> I have tried stepping through the code in debug mode and found that the 
> code indeed updates the TextBox.  But the new value just doesn't show up in 
> the UI.
>

I am pretty sure the above code works as expected when creating a demo 
project. So I guess you have a bug in your code that you have not shown 
here.

The most simple bug that can cause this issue is assigning a new instance 
of TextBox to the @UiField annotated field messageTextBox after 
initWidget() has been called. The new instance is not attached to the DOM 
and thus you won't see the updated text. 

-- J.

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


Re: TextBox fails to show updated text

2016-02-09 Thread Velusamy Velu
Jens:

I appreciate you taking time to verify the issue.  Yes, I was continuing to 
diagnose the issue after posting this question and found the bug.  The 
object that called the setMessage(...) method created its own instance of 
the view.  That view was not connected to the UI at all.  Similar to what 
you said.  After fixing it I couldn't get back to this posting to update it.

Thanks 
Sam V

On Tuesday, February 9, 2016 at 2:38:00 AM UTC-5, Velusamy Velu wrote:
>
> Friends:
>
> I have been working with GWT for the past 18 months and I have been able 
> to achieve considerably.  A pilot version of my application is available at 
> http://peruselab.com/.
>
> However, I landed in a major trouble with the code and I'm quite not sure 
> how to resolve.  To narrow down and focus on the crux of the issue I 
> simplified the code as below.
>
> I have a UiBinder with the content
>
>  xmlns:g="urn:import:com.google.gwt.user.client.ui">
> 
> 
> 
> 
> 
> 
>
> and a snippet of the corresponding Java code:
>
>
> @UiField
> TextBox messageTextBox;
>
> public UserContent() {
> initWidget(uiBinder.createAndBindUi(this));
> messageTextBox.setText("Message to user goes here"); 
> }
>
> public void setMessage(String message) {
> *messageTextBox.setText(message); // fails to work.*
> }
>
> The last line of Java code in red seems like a very simple statement but 
> fails to work.  I even tried messageText.setValue(message) with no 
> resolution. The textBox just couldn't be updated with a new message.  I 
> have tried stepping through the code in debug mode and found that the code 
> indeed updates the TextBox.  But the new value just doesn't show up in the 
> UI.
>
> Does any one have any idea?
>
> Thanks
> Sam V
>

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


TextBox fails to show updated text

2016-02-08 Thread Velusamy Velu
Friends:

I have been working with GWT for the past 18 months and I have been able to 
achieve considerably.  A pilot version of my application is available 
at http://peruselab.com/.

However, I landed in a major trouble with the code and I'm quite not sure 
how to resolve.  To narrow down and focus on the crux of the issue I 
simplified the code as below.

I have a UiBinder with the content









and a snippet of the corresponding Java code:


@UiField
TextBox messageTextBox;

public UserContent() {
initWidget(uiBinder.createAndBindUi(this));
messageTextBox.setText("Message to user goes here"); 
}

public void setMessage(String message) {
*messageTextBox.setText(message); // fails to work.*
}

The last line of Java code in red seems like a very simple statement but 
fails to work.  I even tried messageText.setValue(message) with no 
resolution. The textBox just couldn't be updated with a new message.  I 
have tried stepping through the code in debug mode and found that the code 
indeed updates the TextBox.  But the new value just doesn't show up in the 
UI.

Does any one have any idea?

Thanks
Sam V

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


Re: TextBox in text

2015-09-14 Thread Pothireddi Dhinakar Reddy
This is either you need to fragment the text in to different labels and put
a textbox accordingly else you can add as some HTML content

On Mon, Sep 14, 2015 at 5:09 PM, Maksim <noname@gmail.com> wrote:

> Hello all !
>
> i need paste text box in text. Like as:
>
> Some long text... [ text box ] ...continue text.
>
>
> Graphically:
>
>
> <https://lh3.googleusercontent.com/-zaI5-WVVa30/VfauTFsIFAI/AUg/EqyLMt0Ctgw/s1600/text.png>
>
> I use UiBinder:
>
> 
>   
>   
> 
>
> As expected i get:
>
>
> <https://lh3.googleusercontent.com/-nWTIbTicZjw/Vfau4wWaRXI/AUo/IFP86ggQKxw/s1600/myText.png>
>
> How i can get result as first image? And further call the
> textBox.getText();
>  method in the code?
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: TextBox in text

2015-09-14 Thread Jens

Maecenas sed diam eget risus  varius blandit sit amet non magna.


If the text is not static you can wrap it using  elements use 


-- J.

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


TextBox in text

2015-09-14 Thread Maksim


Hello all !

i need paste text box in text. Like as:

Some long text... [ text box ] ...continue text.


Graphically:



I use UiBinder:


  
  


As expected i get:



How i can get result as first image? And further call the 
textBox.getText();
 method in the code?

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


Re: TextBox in text

2015-09-14 Thread Maksim
Nice! It is what I need. ty!

понедельник, 14 сентября 2015 г., 15:32:12 UTC+3 пользователь Jens написал:
>
> 
> Maecenas sed diam eget risus  varius blandit sit amet non magna.
> 
>
> If the text is not static you can wrap it using  elements use 
> 
>
> -- J.
>

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


IE9 textbox color problem

2015-07-09 Thread Meryem Alay
I have a problem where I'm trying to change the background and text color 
of a GWT( GWT 2.4) TextBox. 

In Firefox , this works just fine. In IE9, it takes the background color 
setting of the CSS but not the foreground color. 

So, my code looks like:

input[type=text] {
width: 140px; 
font-family: Arial Unicode MS, Arial, sans-serif;
font-size: 11px;
font-weight: bold;
color: #66;
border: 1px solid #A9BED9;
padding: 2px;
}

input[type=text][disabled], select[disabled], textarea[disabled] {
background: white;
color: black ! important;
}

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


Re: IE9 textbox color problem

2015-07-09 Thread Meryem Alay
Is there some sort of workaround for this? I want the color attribute to 
apply to my TextBox.

9 Temmuz 2015 Perşembe 15:16:00 UTC+3 tarihinde Meryem Alay yazdı:

 I have a problem where I'm trying to change the background and text color 
 of a GWT( GWT 2.4) TextBox. 

 In Firefox , this works just fine. In IE9, it takes the background color 
 setting of the CSS but not the foreground color. 

 So, my code looks like:

 input[type=text] {
 width: 140px; 
 font-family: Arial Unicode MS, Arial, sans-serif;
 font-size: 11px;
 font-weight: bold;
 color: #66;
 border: 1px solid #A9BED9;
 padding: 2px;
 }

 input[type=text][disabled], select[disabled], textarea[disabled] {
 background: white;
 color: black ! important;
 }


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


Re: IE9 textbox color problem

2015-07-09 Thread Meryem Alay
Is there some sort of workaround for this? I want the color attribute to 
apply to my TextBox.

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


Textbox wraps in FocusPanel, the focuspanel lost focus when the textbox is clicked

2014-12-12 Thread 'Leung' via Google Web Toolkit
Hi,
I intend to build a focus panel wrapped with a few textbox. When the user 
clicks somewhere other than the focus panel, blur event will be triggered and 
the focus panel will be hided. However, when I try to click and place the 
cursor on the textbox to type, the focus panel lost focus. What is the problem? 
Where should I check?
FocusPanel focusPanel = new FocusPanel();
VerticalPanel verticalPanel = new VerticalPanel();
focusPanel.setWidget(verticalPanel);
verticalPanel.add(new TextBox());
verticalPanel.add(new TextBox());
RootPanel.get().add(focusPanel);Thanks

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


Re: SuggestBox and the underlying TextBox

2014-11-28 Thread Thomas Broyer
I've done some really crappy and brittle code in an app where we delay the 
check for a few milliseconds when triggered by ValueChangeEvent, to let the 
time for the SelectionEvent to possibly be triggered.

But remember that this is a *suggest* box, not a select box with 
type-ahead; it gives suggestions (like Google Suggest, or your webmail 
searching your contacts list when typing in the To: or Cc: fields) but 
is otherwise free-form. Using the SuggestBox for a type-ahead listbox is 
misusing it; IMO you'd better look for another widget (and yes, there's no 
such widget in GWT proper), such as https://arcbees.github.io/gwtchosen/ 
(never used it, can't really comment)

On Friday, November 28, 2014 8:25:20 AM UTC+1, ckuetbach wrote:

 Hello,

 I have some trouble with the SuggestBox. 

 There are at least two Hadler at the SuggestBox:

 - ValueChangeHandler
 - SelectionHandler

 If I enter a Text into the SuggestBox and unfocus it, I get the 
 ValueChangeEvent, with the current Value (I need to validate the Input at 
 this moment)

 If I enter a Text into the SuggestBox and select one of the Selection, I 
 get two Events in this Order:

 1. ValueChangeEvent with the SearchTerm of the TextBox
 2. SelectionEvent with the selected Value

 My Problem is, that my Validation will validate the SearchTerm in the 
 ValueChangeEvent (Which may be wrong). In the following SelectionEvent, I 
 get the correct Value. 
 But in this case, I have already shown a warning Display, that the entered 
 Value is invalid.


 I think it may be this GWT Issue: 
 https://code.google.com/p/google-web-toolkit/issues/detail?id=1634


 Are there any ideas, how I can solve my problem?



 Thanks,
 Christian





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


Re: SuggestBox and the underlying TextBox

2014-11-28 Thread ckuetbach
Thanks for the anwser, I will take a look at the arcbee-project.


I think I found another trick to make the Suggestbox do what I want (There 
is no need for timer or delays): 
https://github.com/msh9/codinginthetrenches.com/blob/master/content/2012/catching-value-change-events-from-the-gwt-suggestbox.txt


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


SuggestBox and the underlying TextBox

2014-11-27 Thread ckuetbach
Hello,

I have some trouble with the SuggestBox. 

There are at least two Hadler at the SuggestBox:

- ValueChangeHandler
- SelectionHandler

If I enter a Text into the SuggestBox and unfocus it, I get the 
ValueChangeEvent, with the current Value (I need to validate the Input at 
this moment)

If I enter a Text into the SuggestBox and select one of the Selection, I 
get two Events in this Order:

1. ValueChangeEvent with the SearchTerm of the TextBox
2. SelectionEvent with the selected Value

My Problem is, that my Validation will validate the SearchTerm in the 
ValueChangeEvent (Which may be wrong). In the following SelectionEvent, I 
get the correct Value. 
But in this case, I have already shown a warning Display, that the entered 
Value is invalid.


I think it may be this GWT Issue: 
https://code.google.com/p/google-web-toolkit/issues/detail?id=1634


Are there any ideas, how I can solve my problem?



Thanks,
Christian



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


Re: Default value in empty TextBox

2014-08-07 Thread Ismael Hasan
Kudos for Moutellou, I find his solution very clean. 

HTML already provides the capability to fulfil the initial requirement, so 
I think it is best taking advantage of that instead of dealing with more 
GWT artifacts and re-building a functionality that already exists. 




El miércoles, 27 de noviembre de 2013 14:24:13 UTC+1, Moutellou escribió:

 You can try the attribute placeholder 
 http://www.w3schools.com/tags/att_input_placeholder.asp.
 getElement().setPropertyString(placeholder, default value)

 On Thursday, February 7, 2008 9:10:17 AM UTC-5, Brock Parker wrote:

 Hello, 

 Is there anything built into GWT to display a value in a TextBox if 
 the field is emtpy?  This value would disappear once the user clicked 
 in the field and started typing.  I have seen this functionality on 
 several Google web pages (i.e. the Contacts page in GMail) but I can't 
 find anything in the documentation or samples about it. 

 Thanks, 

 Brock



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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-04-06 Thread Andrei
Your problems are not related to GWT. It may be something very basic, like a 
font or a font size not being set in your CSS, or a font not being available in 
one of the browsers.

Check which CSS styles are applied to your elements in each browser.

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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-04-05 Thread Jens
Check your CSS. Maybe you have conditional CSS rules that screw things up. 
If you are sure it is correct then check your browser settings. Every 
browser allows the user to configure font settings for web pages. In Chrome 
for example you can go to settings - advanced settings - web content - 
font size.

To see if its a browser thing you could create a new empty GWT project, 
select a theme and place a button in the RootPanel. If this works as 
expected it is most likely a CSS issue in your app.

-- J.


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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-04-04 Thread KGD

Thank you for your response.  Unfortunately, I've had to focus on other 
issues and am now coming back to this issue.

Specifically, the layout, placement, sizing and alignment do not seem to be 
honored by the various browsers.  The two sets of screen shots give you 
an idea what I'm seeing.  Basically, when a component such as a textfield 
or button is added to a panel and sized in Eclipse IDE, it will appear 
appropriate and testing and tweaking on Safari will eventually get the 
layout correct.  But, viewing the component in Chrome or IE, and the layout 
is skewed.

Creation of the buttons is straightforward:

Button btnNewClient = new Button(New Client . . . );

mainPanel.add(btnNewClient, 652, 16);

btnNewClient.setSize(114px, 24px);


 Button btnNewContract = new Button(New Contract . . .);

mainPanel.add(btnNewContract, 775, 16);

btnNewContract.setSize(114px, 24px);


This is a simple example of the rendering differences.  I don't have images 
from IE but the buttons, for example as in the attached images, are 
extremely skewed (overlapping and extending way beyond their original 
bounds set in the code.


Obviously, this has to be something I'm overlooking or misunderstanding 
about GWT and any additional insight would be appreciated.


Thanks,

KGD


On Saturday, February 8, 2014 11:19:57 PM UTC-5, Jim Douglas wrote:

 The GWT TextBox isn't much more than a very thin veneer around an HTML 
 input type=text element.  It's one of the most commonly used GWT 
 Widgets; you should start with the assumption that it works fine in all 
 standard browsers.

 You can open this page in Chrome to see a sample GWT TextBox:


 http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwBasicText

 You didn't post any code, and your description is a bit vague, so what 
 exactly does your code look like and what are you seeing?  And what is it 
 about your code that gives you different behaviour for your TextBox Widgets 
 in Chrome versus some other browser?  Chrome and Safari shared the same 
 underlying rendering engine until recently, and Blink hasn't diverged 
 significantly from WebKit, I'd be very surprised if you see different 
 behaviour between Chrome and Safari.

 On Saturday, February 8, 2014 7:53:38 PM UTC-8, KGD wrote:

 In the app that I've built, I've noticed that items such as TextBoxes, 
 ComboBoxes and the like do not display the same in Chrome as in IE and 
 Safari.  Specifically, a textbox positioned on a panel displays correctly 
 (i.e. maintains its position based on the development and allows the user 
 to input text and see the text that has been typed in).  However, in 
 Chrome, the textbox is not positioned as when created in development, the 
 actual text is barely visible.  In order to get a textbox on a panel that 
 displays the typed text correctly in all three browsers, I have to grossly 
 oversize the textbox so that Chrome displays it correctly but then the 
 overall aesthetic of the app looks terrible.  What does Chrome not 
 respect/honor a widget's properties?  Am I missing some type of setting? 
  Surely, it's not expected that we check the browser type and if its Chrome 
 we have to programmatically change the widget's properties because of 
 Chrome's display issues.  Any help would be appreciated.

 Thanks,
 KGD



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

catch the Click Event on the TextBox draggable

2014-04-03 Thread paolamontorio
I'm developing with the dnd library 3.3.0 and my goal is to catch the click 
event on the text box draggable.

I create the textBox draggable : 
8-8
private Widget createDraggableTextBox() {
ClickTextBox textBox = new ClickTextBox(demoDragHandler);
dragController.makeDraggable(textBox);
return textBox;
}

public class ClickTextBox extends TextBox {

  private DemoDragHandler demoDragHandler;

  public ClickTextBox(DemoDragHandler demoDragHandler) {
this.demoDragHandler = demoDragHandler;

  }

  @Override
  public void setText(String text) {
super.setText(text);
  }
}
8

and now in my script to catch the click event I invoke:

for(final WSIO input:inputList){  // nn cycles

Widget wi = createDraggableTextBox();
wi.addAttachHandler(new AttachEvent.Handler() {
   @Override
   public void onAttachOrDetach(AttachEvent event) {
//do something
...
}
}

But the PROBLEM is that IT will catch n(size of cycles's FOR  ) events with 
only one click .
I would have need to catch only one event by only one click.
I'm waiting for an help for this idiosyncrasy,
thanks in advance to anybody to help me


Paola Montorio

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


Re: Insert Image into Textbox

2014-02-11 Thread Craig Mitchell
You can do it using CSS:

textBox.getElement().getStyle().setBackgroundImage(url(/blah.png));
textBox.getElement().getStyle().setProperty(backgroundPosition, right 
center);
textBox.getElement().getStyle().setProperty(backgroundRepeat, 
no-repeat);


On Sunday, March 16, 2008 8:07:05 AM UTC+11, MB wrote:

 Hi, 

 I know the textbox widget sets String to show. But I want to put and 
 image instead of the String. 
 The image is not a specific one and changes dynamically. 
 Is there a way to do so? How? 
 Should I use different widget? Which one? 

 Thanks, 
 Matan 


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


Re: Insert Image into Textbox

2014-02-11 Thread Craig Mitchell
However, sounds like you actually want to use the Image widget.

On Sunday, March 16, 2008 8:07:05 AM UTC+11, MB wrote:

 Hi, 

 I know the textbox widget sets String to show. But I want to put and 
 image instead of the String. 
 The image is not a specific one and changes dynamically. 
 Is there a way to do so? How? 
 Should I use different widget? Which one? 

 Thanks, 
 Matan 


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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-02-09 Thread Wayne Rasmuss
If you're using css to layout these boxes there are some differences between 
chrome and pretty much every other browser in how it handles sizing text boxes 
and did other input controls. I don't recall exactly what the issue was, but I 
know I fixed it by using calc in css to make chrome do the right think.

Basically, I added two width properties the the corresponding css class. One 
set the way that worked on other browsers and one using calc after. The 
browsers that support calc fall back on it, the nurses that don't use the first 
settings.

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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-02-09 Thread Wayne Rasmuss
Below is a CSS example that does what I was talking about. This css is used 
as a css resource in GWT so I had to wrap the calc in a literal. The left 
and right properties used by some browsers and the width with the calc is 
used in others.

.form-input-line-cell {
/*
!!! This class has two ways of specifying the width. One way works 
on chrome and client and the other firefox
and IE. Fortunately, the both work together
*/
position: absolute;
left: 8px;
right: 8px;
top:3px;
bottom: 3px;
font-size: 32px;
text-indent: 8px;
border: solid #d3d3d3 1px;
border-radius: 3px;
color: black;
width: literal(calc(100% - 16px));
}

On Sunday, February 9, 2014 7:19:20 AM UTC-6, Wayne Rasmuss wrote:

 If you're using css to layout these boxes there are some differences 
 between chrome and pretty much every other browser in how it handles sizing 
 text boxes and did other input controls. I don't recall exactly what the 
 issue was, but I know I fixed it by using calc in css to make chrome do the 
 right think.

 Basically, I added two width properties the the corresponding css class. 
 One set the way that worked on other browsers and one using calc after. The 
 browsers that support calc fall back on it, the nurses that don't use the 
 first settings.


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


Textbox Does Not Display Correctly When Using Chrome

2014-02-08 Thread KGD
In the app that I've built, I've noticed that items such as TextBoxes, 
ComboBoxes and the like do not display the same in Chrome as in IE and 
Safari.  Specifically, a textbox positioned on a panel displays correctly 
(i.e. maintains its position based on the development and allows the user 
to input text and see the text that has been typed in).  However, in 
Chrome, the textbox is not positioned as when created in development, the 
actual text is barely visible.  In order to get a textbox on a panel that 
displays the typed text correctly in all three browsers, I have to grossly 
oversize the textbox so that Chrome displays it correctly but then the 
overall aesthetic of the app looks terrible.  What does Chrome not 
respect/honor a widget's properties?  Am I missing some type of setting? 
 Surely, it's not expected that we check the browser type and if its Chrome 
we have to programmatically change the widget's properties because of 
Chrome's display issues.  Any help would be appreciated.

Thanks,
KGD

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


Re: Textbox Does Not Display Correctly When Using Chrome

2014-02-08 Thread Jim Douglas
The GWT TextBox isn't much more than a very thin veneer around an HTML 
input type=text element.  It's one of the most commonly used GWT 
Widgets; you should start with the assumption that it works fine in all 
standard browsers.

You can open this page in Chrome to see a sample GWT TextBox:

http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwBasicText

You didn't post any code, and your description is a bit vague, so what 
exactly does your code look like and what are you seeing?  And what is it 
about your code that gives you different behaviour for your TextBox Widgets 
in Chrome versus some other browser?  Chrome and Safari shared the same 
underlying rendering engine until recently, and Blink hasn't diverged 
significantly from WebKit, I'd be very surprised if you see different 
behaviour between Chrome and Safari.

On Saturday, February 8, 2014 7:53:38 PM UTC-8, KGD wrote:

 In the app that I've built, I've noticed that items such as TextBoxes, 
 ComboBoxes and the like do not display the same in Chrome as in IE and 
 Safari.  Specifically, a textbox positioned on a panel displays correctly 
 (i.e. maintains its position based on the development and allows the user 
 to input text and see the text that has been typed in).  However, in 
 Chrome, the textbox is not positioned as when created in development, the 
 actual text is barely visible.  In order to get a textbox on a panel that 
 displays the typed text correctly in all three browsers, I have to grossly 
 oversize the textbox so that Chrome displays it correctly but then the 
 overall aesthetic of the app looks terrible.  What does Chrome not 
 respect/honor a widget's properties?  Am I missing some type of setting? 
  Surely, it's not expected that we check the browser type and if its Chrome 
 we have to programmatically change the widget's properties because of 
 Chrome's display issues.  Any help would be appreciated.

 Thanks,
 KGD


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


Re: Textbox width according to the characters present in the textbox.

2013-12-17 Thread Andrei
You can only approximate.

(1) Users may not have a specified font. Browsers will try to substitute 
this font, and the width of characters maybe different for a substitute 
font.

(2) Users can zoom in or out, changing the font size from the one you set.


I need to set the size of the text box according to the length of the text 
 inside that box, it may contain localized characters like Chinese. Is any 
 we can calculate the length in pixels for this?


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


Textbox width according to the characters present in the textbox.

2013-12-16 Thread P
Hi,

I need to set the size of the text box according to the length of the text 
inside that box, it may contain localized characters like Chinese. Is any 
we can calculate the length in pixels for this?

Thank you,
Parag   

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


Re: Default value in empty TextBox

2013-11-27 Thread Zied Hamdi
Hi all,

There is ready version (among other widgets) in the buttom of this page 
http://1vu-widgets.appspot.com/IntoGwt.html

The project homepage is 
https://code.google.com/p/advanced-suggest-select-box/

Best regards


On Wednesday, March 19, 2008 7:25:53 AM UTC+1, Christopher wrote:

 Thanks for the code. Here's my extension of it: 

 public class DefaultTextBox extends TextBox implements FocusListener { 
 String defaultText; 
 boolean defaultTextMode = false; 

 public DefaultTextBox(String defaultText) { 
 setDefaultText(defaultText); 
 setDefaultTextMode(); 
 addFocusListener(this); 
 } 

 public String getDefaultText() { 
 return defaultText; 
 } 

 public String getText() { 
 if (!defaultTextMode) { 
 return super.getText(); 
 } else { 
 return ; 
 } 
 } 

 public void onFocus(Widget sender) { 
 if (defaultTextMode) { 
 setNormalTextMode(); 
 } 
 } 

 public void onLostFocus(Widget sender) { 
 if (getText().length() == 0) { 
 setDefaultTextMode(); 
 } 
 } 

 public void setDefaultText(String defaultText) { 
 this.defaultText = defaultText; 
 if (defaultTextMode) { 
 setDefaultTextMode();// Refresh 
 } 
 } 

 void setDefaultTextMode() { 
 assert super.getText().length() == 0; 
 super.setText(defaultText); 
 addStyleDependentName(default); 
 defaultTextMode = true; 
 } 

 void setNormalTextMode() { 
 assert super.getText().length() != 0; 
 super.setText(); 
 removeStyleDependentName(default); 
 defaultTextMode = false; 
 } 

 public void setText(String text) { 
 super.setText(text); 
 if (text.length() == 0) { 
 setDefaultTextMode(); 
 } else { 
 setNormalTextMode(); 
 } 
 } 
 } 

 Cheers, 
 -C

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


Re: Default value in empty TextBox

2013-11-27 Thread Moutellou
You can try the attribute 
placeholderhttp://www.w3schools.com/tags/att_input_placeholder.asp
.
getElement().setPropertyString(placeholder, default value)

On Thursday, February 7, 2008 9:10:17 AM UTC-5, Brock Parker wrote:

 Hello, 

 Is there anything built into GWT to display a value in a TextBox if 
 the field is emtpy?  This value would disappear once the user clicked 
 in the field and started typing.  I have seen this functionality on 
 several Google web pages (i.e. the Contacts page in GMail) but I can't 
 find anything in the documentation or samples about it. 

 Thanks, 

 Brock

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


[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-06-04 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Patch Set 2:

(1 comment)


File user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
Line 375:   public void testKeyDownEvent() {
Done. (added a reference to the issue)


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-06-04 Thread Goktug Gokdogan

Hello Leeroy Jenkins, Thomas Broyer, Patrick Tucker,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3141

to look at the new patch set (#3).

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..

Removes delegation of event from TextBox event handler inside SuggestBox.

The events are already fired in SuggestBox as it is a composite, additional
delegation was causing events to be fired twice.

Bug: Issue 3533

Original author: Patrick Tucker

Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Review-Link: https://gwt-review.googlesource.com/#/c/3141/
---
M user/src/com/google/gwt/user/client/ui/SuggestBox.java
M user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
2 files changed, 44 insertions(+), 10 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-06-04 Thread Goktug Gokdogan

Goktug Gokdogan has submitted this change and it was merged.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Removes delegation of event from TextBox event handler inside SuggestBox.

The events are already fired in SuggestBox as it is a composite, additional
delegation was causing events to be fired twice.

Bug: Issue 3533

Original author: Patrick Tucker

Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Review-Link: https://gwt-review.googlesource.com/#/c/3141/
---
M user/src/com/google/gwt/user/client/ui/SuggestBox.java
M user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
2 files changed, 44 insertions(+), 10 deletions(-)

Approvals:
  Leeroy Jenkins: Verified
  Goktug Gokdogan: Looks good to me, approved



diff --git a/user/src/com/google/gwt/user/client/ui/SuggestBox.java  
b/user/src/com/google/gwt/user/client/ui/SuggestBox.java

index 818e9b2..7d87fb2 100644
--- a/user/src/com/google/gwt/user/client/ui/SuggestBox.java
+++ b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
@@ -21,7 +21,6 @@
 import com.google.gwt.editor.client.IsEditor;
 import com.google.gwt.editor.client.LeafValueEditor;
 import com.google.gwt.editor.client.adapters.TakesValueEditor;
-import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
 import com.google.gwt.event.dom.client.HasAllKeyHandlers;
 import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.event.dom.client.KeyDownEvent;
@@ -1119,8 +1118,7 @@
   }

   private void addEventsToTextBox() {
-class TextBoxEvents extends HandlesAllKeyEvents implements
-ValueChangeHandlerString {
+class TextBoxEvents implements KeyDownHandler, KeyUpHandler,  
ValueChangeHandlerString {


   public void onKeyDown(KeyDownEvent event) {
 switch (event.getNativeKeyCode()) {
@@ -1140,17 +1138,11 @@
 }
 break;
 }
-delegateEvent(SuggestBox.this, event);
-  }
-
-  public void onKeyPress(KeyPressEvent event) {
-delegateEvent(SuggestBox.this, event);
   }

   public void onKeyUp(KeyUpEvent event) {
 // After every user key input, refresh the popup's suggestions.
 refreshSuggestions();
-delegateEvent(SuggestBox.this, event);
   }

   public void onValueChange(ValueChangeEventString event) {
@@ -1159,7 +1151,8 @@
 }

 TextBoxEvents events = new TextBoxEvents();
-events.addKeyHandlersTo(box);
+box.addKeyDownHandler(events);
+box.addKeyUpHandler(events);
 box.addValueChangeHandler(events);
   }

diff --git a/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java  
b/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java

index 503c96e..cbb0e1b 100644
--- a/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
+++ b/user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
@@ -17,6 +17,11 @@

 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.NativeEvent;
+import com.google.gwt.event.dom.client.KeyDownEvent;
+import com.google.gwt.event.dom.client.KeyDownHandler;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.KeyUpHandler;
 import  
com.google.gwt.user.client.ui.MultiWordSuggestOracle.MultiWordSuggestion;

 import com.google.gwt.user.client.ui.SuggestBox.DefaultSuggestionDisplay;
 import com.google.gwt.user.client.ui.SuggestBox.SuggestionCallback;
@@ -367,6 +372,42 @@
 assertTrue(b.getParent() == box);
   }

+  /**
+   * See https://code.google.com/p/google-web-toolkit/issues/detail?id=3533
+   */
+  public void testKeyDownEvent() {
+final int[] eventFireCount = {0};
+SuggestBox box = new SuggestBox();
+RootPanel.get().add(box);
+box.addKeyDownHandler(new KeyDownHandler() {
+  @Override
+  public void onKeyDown(KeyDownEvent event) {
+eventFireCount[0]++;
+  }
+});
+NativeEvent e = Document.get().createKeyDownEvent(false, false, false,  
false, 'g');

+box.getElement().dispatchEvent(e);
+assertEquals(1, eventFireCount[0]);
+  }
+
+  /**
+   * See https://code.google.com/p/google-web-toolkit/issues/detail?id=3533
+   */
+  public void testKeyUpEvent() {
+final int[] eventFireCount = {0};
+SuggestBox box = new SuggestBox();
+RootPanel.get().add(box);
+box.addKeyUpHandler(new KeyUpHandler() {
+  @Override
+  public void onKeyUp(KeyUpEvent event) {
+eventFireCount[0]++;
+  }
+});
+NativeEvent e = Document.get().createKeyUpEvent(false, false, false,  
false, 'g');

+box.getElement().dispatchEvent(e);
+assertEquals(1, eventFireCount[0]);
+  }
+
   protected SuggestBox createSuggestBox() {
 MultiWordSuggestOracle oracle = createOracle();
 return new SuggestBox(oracle, new TextBox(), new  
TestSuggestionDisplay());


--
To view, visit https://gwt

[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-06-04 Thread Goktug Gokdogan

Goktug Gokdogan has posted comments on this change.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Patch Set 3: Code-Review+2

(Just added a reference to issue after last patch)

--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 3
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-06-01 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Patch Set 2: Code-Review+2

(1 comment)


File user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
Line 375:   public void testKeyDownEvent() {
Should we add a link to the issue in a comment here? or we think git  
blame will be enough to find why we added these methods?


How about:

 /*
  * We used to have a keydown events fired twice.
  * See https://code.google.com/p/google-web-toolkit/issues/detail?id=3533
  */


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: Yes

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-05-31 Thread Patrick Tucker

Patrick Tucker has posted comments on this change.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Patch Set 1: Code-Review+1

Cool thanks for transferring this one over!

--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-05-31 Thread Thomas Broyer

Thomas Broyer has posted comments on this change.

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..


Patch Set 1: Code-Review+2

Should we add a test for it?
(dispatch an event on the SuggestBox and/or the TextBox and/or the  
underlying input, and count the number of times it's dispatched)


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-05-31 Thread Goktug Gokdogan

Hello Leeroy Jenkins, Thomas Broyer, Patrick Tucker,

I'd like you to reexamine a change.  Please visit

https://gwt-review.googlesource.com/3141

to look at the new patch set (#2).

Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..

Removes delegation of event from TextBox event handler inside SuggestBox.

The events are already fired in SuggestBox as it is a composite, additional
delegation was causing events to be fired twice.

Bug: Issue 3533

Original author: Patrick Tucker

Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Review-Link: https://gwt-review.googlesource.com/#/c/3141/
---
M user/src/com/google/gwt/user/client/ui/SuggestBox.java
M user/test/com/google/gwt/user/client/ui/SuggestBoxTest.java
2 files changed, 38 insertions(+), 10 deletions(-)


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com
Gerrit-Reviewer: Leeroy Jenkins jenk...@gwtproject.org
Gerrit-Reviewer: Patrick Tucker tucker...@gmail.com
Gerrit-Reviewer: Thomas Broyer t.bro...@gmail.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Change in gwt[master]: Removes delegation of event from TextBox event handler insid...

2013-05-30 Thread Goktug Gokdogan

Goktug Gokdogan has uploaded a new change for review.

  https://gwt-review.googlesource.com/3141


Change subject: Removes delegation of event from TextBox event handler  
inside SuggestBox.

..

Removes delegation of event from TextBox event handler inside SuggestBox.

The events are already fired in SuggestBox as it is a composite, additional
delegation was causing events to be fired twice.

Bug: Issue 3533

Original author: Patrick Tucker

Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
---
M user/src/com/google/gwt/user/client/ui/SuggestBox.java
1 file changed, 3 insertions(+), 10 deletions(-)



diff --git a/user/src/com/google/gwt/user/client/ui/SuggestBox.java  
b/user/src/com/google/gwt/user/client/ui/SuggestBox.java

index 818e9b2..7d87fb2 100644
--- a/user/src/com/google/gwt/user/client/ui/SuggestBox.java
+++ b/user/src/com/google/gwt/user/client/ui/SuggestBox.java
@@ -21,7 +21,6 @@
 import com.google.gwt.editor.client.IsEditor;
 import com.google.gwt.editor.client.LeafValueEditor;
 import com.google.gwt.editor.client.adapters.TakesValueEditor;
-import com.google.gwt.event.dom.client.HandlesAllKeyEvents;
 import com.google.gwt.event.dom.client.HasAllKeyHandlers;
 import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.event.dom.client.KeyDownEvent;
@@ -1119,8 +1118,7 @@
   }

   private void addEventsToTextBox() {
-class TextBoxEvents extends HandlesAllKeyEvents implements
-ValueChangeHandlerString {
+class TextBoxEvents implements KeyDownHandler, KeyUpHandler,  
ValueChangeHandlerString {


   public void onKeyDown(KeyDownEvent event) {
 switch (event.getNativeKeyCode()) {
@@ -1140,17 +1138,11 @@
 }
 break;
 }
-delegateEvent(SuggestBox.this, event);
-  }
-
-  public void onKeyPress(KeyPressEvent event) {
-delegateEvent(SuggestBox.this, event);
   }

   public void onKeyUp(KeyUpEvent event) {
 // After every user key input, refresh the popup's suggestions.
 refreshSuggestions();
-delegateEvent(SuggestBox.this, event);
   }

   public void onValueChange(ValueChangeEventString event) {
@@ -1159,7 +1151,8 @@
 }

 TextBoxEvents events = new TextBoxEvents();
-events.addKeyHandlersTo(box);
+box.addKeyDownHandler(events);
+box.addKeyUpHandler(events);
 box.addValueChangeHandler(events);
   }


--
To view, visit https://gwt-review.googlesource.com/3141
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I70752f24667a83bee208f31f37ec63d79ec8b1b8
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan gok...@google.com

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups GWT Contributors group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Trigger button on ENTER inside a TextBox?

2013-03-14 Thread Kody
Thanks Jens. Yes I use uibinder, did not know I can register more than one
widget to the same handler method. Will go for this approach.


2013/3/14 K vfdsdfbsdb kazuoh...@gmail.com

 sure you must add keyListener for all TextBox .
 But if you create one method,it 's smart.

 example for

 private void addListeners(ListTextBox textboxs ,Listener listener){
 for(int i=0;itextboxs.size;i++){
  textboxs.get(i).addKeyListener(listener);
 }
 }
 2013/03/14 7:02 membersound kodyreco...@gmail.com:

 Hi,

 I have a popup with a bunch of TextBox and TextArea fields. Also 3 Buttons
 like Save, Cancel, Reset.
 For the TextBoxes I would like to trigger the Save action if ENTER is
 hit while inside a TextBox (not for the TextAreas).

 Would I have to register a KeyDownHandler for all the TextBoxes (which
 would be lots of boilerplate code)? Or is there anything native in GWT
 catching ENTER key in TextBoxes?

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to google-web-toolkit+unsubscr...@googlegroups.com.

 To post to this group, send email to google-web-toolkit@googlegroups.com.
 Visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.



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




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




Trigger button on ENTER inside a TextBox?

2013-03-13 Thread membersound
Hi,

I have a popup with a bunch of TextBox and TextArea fields. Also 3 Buttons like 
Save, Cancel, Reset.
For the TextBoxes I would like to trigger the Save action if ENTER is hit 
while inside a TextBox (not for the TextAreas).

Would I have to register a KeyDownHandler for all the TextBoxes (which 
would be lots of boilerplate code)? Or is there anything native in GWT 
catching ENTER key in TextBoxes?

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




Re: Trigger button on ENTER inside a TextBox?

2013-03-13 Thread Jens
Do you use UiBinder for the DialogBox content widget? If so you can add 
more than one widget to @UiHandler:

@UiHandler({box1, box2, box3})
void maybeTriggerSave(KeyUpEvent event) {
  //check for ENTER and trigger save
}

Without UiBinder the above is equivalent to:

KeyUpHandler maybeTriggerSaveOnKeyUp = new KeyUpHanlder() { .. };
box1.addKeyUpHandler(maybeTriggerSaveOnKeyUp);
box2.addKeyUpHandler(...)


If you instantiate the TextBoxes yourself you could replace new TextBox() 
with createTextBox() and add the key handler inside that method.

Alternatively you could listen for Key events on your content widget 
(addDomHandler()) of your DialogBox and then figure out if the event source 
was a TextBox and not a TextArea.

-- J.

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




Re: Trigger button on ENTER inside a TextBox?

2013-03-13 Thread K vfdsdfbsdb
sure you must add keyListener for all TextBox .
But if you create one method,it 's smart.

example for

private void addListeners(ListTextBox textboxs ,Listener listener){
for(int i=0;itextboxs.size;i++){
 textboxs.get(i).addKeyListener(listener);
}
}
2013/03/14 7:02 membersound kodyreco...@gmail.com:

 Hi,

 I have a popup with a bunch of TextBox and TextArea fields. Also 3 Buttons
 like Save, Cancel, Reset.
 For the TextBoxes I would like to trigger the Save action if ENTER is hit
 while inside a TextBox (not for the TextAreas).

 Would I have to register a KeyDownHandler for all the TextBoxes (which
 would be lots of boilerplate code)? Or is there anything native in GWT
 catching ENTER key in TextBoxes?

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




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




Re: PopupPanel.hide() steals focus from TextBox?

2013-02-28 Thread Kody
Tried this but does not work for me. Only what helps is disabling the
animation...


2013/2/27 rjfl...@gmail.com

 I had a similar problem with a DialogBox
 setModal(false) fixed it.

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




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




CssResource RTLsupport, textBox issue

2013-02-28 Thread Liam McGregor
Currently when injecting a style using a ClientBundle interface like 
this*TasklistResourceBundle.INSTANCE.style().ensureInjected();
*  

If we set the locale *?locale=ar_iq* to arabic everything is moved to the 
RHS which is fine, however when typing into textBoxes the cursor is 
positioned on the left not the right.

The css we are injecting

.tasklistwidget {
width: 100%;
height: 100%;
}

I have found a workaround, but struggling to understand how this works.

i have created another CSS file

.tasklistwidget {
float:right;
direction: rtl;
width: 100%;
height: 100%;
}

and inject this instead. The text box now functions as expected and all 
elements are on the RHS.


Here is our extent of ClientBundle interface

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

/* note the source path is relative to the location of this file! */
@Source(css/tasklist-widget.css)
@CssResource.NotStrict
CssResource style();
 @Source(css/tasklist-widgetRTL.css)
@CssResource.NotStrict
CssResource styleRTL();
}

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




Re: PopupPanel.hide() steals focus from TextBox?

2013-02-26 Thread rjfleck
I had a similar problem with a DialogBox
setModal(false) fixed it.

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




Re: PopupPanel.hide() steals focus from TextBox?

2013-02-24 Thread membersound
I found out this is cause by popupPanel.setAnimationEnabled(true);

Using false would work as expected. Is there any way to fix it and though 
use animation?

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




Re: TextBox - cannot select text with mouse?

2013-02-23 Thread Kody
It turned out that it was indeed a CSS issue:

I did some -moz-user-select: -moz-none; to prevent doubleclick highlight
issues on some of my components. And (of course) this would also affect the
inputs. I excluded input elements now and everything works fine again.


2013/2/22 Jens jens.nehlme...@gmail.com

 Are you doing any crazy things in your app? :-)

 Have you used Event.addNativePreviewHandler() somewhere and the handler
 maybe busts certain mouse events? Or overwritten any onBrowserEvent()
 methods somewhere in your outer App UI?

 Couldn't think of anything else that forbids you to select text on any
 textbox available in your app. My best guess is that you have canceled
 certain native events by mistake.

 -- J.

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




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




TextBox - cannot select text with mouse?

2013-02-22 Thread membersound
Hi,

can anyone confirm that it is not possible to select the content of a 
TextBox using Mouse only?

I found this isse from 2011 
(http://code.google.com/p/google-web-toolkit/issues/detail?id=6468), but as 
there are no other complains, maybe I could be missing something?
Do I have to set some properties on textBox to enable mouse selection?

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




PopupPanel.hide() steals focus from TextBox?

2013-02-22 Thread membersound
Hi,

I have a TextBox, and a PopupPanel. Inside the PopupPanel I have a MenuItem, 
which on click should set the focus into the TextBox.

Now, if I do not hide the popup everything works fine (except that the 
popup is still showing).
But if I do PopupPanel.hide(), the focus gets lost from TextBox!

I also tried using Scheduler.get().scheduleDeferred(new ScheduledCommand() 
{...}) on both: either let the hide() be scheduled, or let the focus be 
scheduled. Both failed setting the focus on the TextInput. Or better: it 
sets the focus and immediately loses it due to the hide() action.

What can I do about this?

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




Re: TextBox - cannot select text with mouse?

2013-02-22 Thread membersound
Thanks, that's very strange.

Could I somehow have *disabled *mouse interaction on a input field 
globally??

I just added a TextBox upmost of my application, and the behaviour is the 
same: neither mouse selection nor POS1 or END keys work.

g:SplitLayoutPanel
 g:north size='40'
  g:TextBox /

Am Freitag, 22. Februar 2013 15:48:21 UTC+1 schrieb Jens:

 I can select text in TextBox and ValueBox. Maybe a hidden div is above 
 your TextBox? You can check that using your browsers developer tools.

 -- J.


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




Re: TextBox - cannot select text with mouse?

2013-02-22 Thread Manuel
Hey,

maybe you styles have highlighted text in the same color as your background 
color?
Some time ago I had a webpage where the selected text just looked like the 
non selected... so maybe its just something in your css?

Regards,
Manuel

Am Freitag, 22. Februar 2013 18:52:24 UTC+1 schrieb membersound:

 Thanks, that's very strange.

 Could I somehow have *disabled *mouse interaction on a input field 
 globally??

 I just added a TextBox upmost of my application, and the behaviour is the 
 same: neither mouse selection nor POS1 or END keys work.

 g:SplitLayoutPanel
  g:north size='40'
   g:TextBox /

 Am Freitag, 22. Februar 2013 15:48:21 UTC+1 schrieb Jens:

 I can select text in TextBox and ValueBox. Maybe a hidden div is above 
 your TextBox? You can check that using your browsers developer tools.

 -- J.



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




Re: TextBox - cannot select text with mouse?

2013-02-22 Thread Kody
CTRL+A for selecting the whole text works just as expected. So I can
probably count css styles out.


2013/2/22 Manuel develop.m...@gmail.com

 Hey,

 maybe you styles have highlighted text in the same color as your
 background color?
 Some time ago I had a webpage where the selected text just looked like the
 non selected... so maybe its just something in your css?

 Regards,
 Manuel

 Am Freitag, 22. Februar 2013 18:52:24 UTC+1 schrieb membersound:

 Thanks, that's very strange.

 Could I somehow have *disabled *mouse interaction on a input field
 globally??

 I just added a TextBox upmost of my application, and the behaviour is
 the same: neither mouse selection nor POS1 or END keys work.

 g:SplitLayoutPanel
  g:north size='40'
   g:TextBox /

 Am Freitag, 22. Februar 2013 15:48:21 UTC+1 schrieb Jens:

 I can select text in TextBox and ValueBox. Maybe a hidden div is above
 your TextBox? You can check that using your browsers developer tools.

 -- J.



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




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




Re: TextBox - cannot select text with mouse?

2013-02-22 Thread membersound
What I also noticed: I have a CellTable/DataGrid with EditTextCells, which 
so use input text fields.
Within the onBrowserEvent() I can see that mouse clicks are received. BUT 
the cursor selection within text in the edit fields does not change.
I can move the cursor by Arrow Keys, but not by Mouse Clicks.

Tried this from different machines and different browsers, so it must be 
within my application.

That's very strange that this behaviour is the same vor all available input 
fields. Wether they come from a TextBox or are inside a CellTable es 
EditableTextCell, they just don't care...

Am Freitag, 22. Februar 2013 20:21:42 UTC+1 schrieb membersound:

 CTRL+A for selecting the whole text works just as expected. So I can 
 probably count css styles out.



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




Re: TextBox - cannot select text with mouse?

2013-02-22 Thread Jens
Are you doing any crazy things in your app? :-)

Have you used Event.addNativePreviewHandler() somewhere and the handler 
maybe busts certain mouse events? Or overwritten any onBrowserEvent() 
methods somewhere in your outer App UI?

Couldn't think of anything else that forbids you to select text on any 
textbox available in your app. My best guess is that you have canceled 
certain native events by mistake.

-- J.

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




Re: No Textbox can take the focus by mouse clicking in IE8

2013-01-21 Thread Alex Ph
Hi,
I had a similar issue. I use a RichTextArea (which uses an IFrame) inside a 
TabPanel. When I close the TabPanel I could not click into other widgets 
(focus broken(?)) 

I solved this issue by using richTextArea.getFormatter().removeLink(); 
whiledestroying the TabPanel. (The removeLink triggers some stuff inside 
the RichTextArea. I think u could use another formatter method here)

Perhaps Its not an exact answer to your issue but perhaps someone else 
could use this info to solve his problem.

Am Dienstag, 25. Januar 2011 09:56:16 UTC+1 schrieb AlexF:

 I have a problem in GWT 2.0.4 that I can reproduce only with IE8 
 (Windows XP). I use a TabPanel with IFrames in the tabs. When I close 
 a tab which has an element with focus no TextBox in other tabs can 
 take the focus by mouse clicking (but only by Tab-Key). If the closed 
 tab did not have a focused element the problem does not occur. I tried 
 to use TabLayoutPanel but it did not help. What can cause such 
 behavior in the web browser?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/eERaPaAQp3AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-08 Thread membersound
I was not aware of the editor framework. This looks very promising!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/9qGf8hGJ1ZwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 only allow digits to be entered in a textbox?

2013-01-08 Thread RyanZA
Grab this code from stackoverflow, should do what you want

http://stackoverflow.com/questions/2865647/solution-for-numeric-text-field-in-gwt

On Monday, January 7, 2013 4:55:44 PM UTC+2, membersound wrote:

 Hi,

 I have a textbox where I want to user to only enter digits. Moreover I 
 want to prevent him entering other characters. This is what I tried but it 
 does not work:

 @UiHandler(textbox)
 void onInputsKeyPress(KeyPressEvent event) {
 if (!Character.isDigit(event.getCharCode())) {
 ((IntegerBox) event.getSource()).cancelKey();
 }
 }

 Any hints?


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/EnUl7quza6MJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread membersound
I'm having problems in getting started with GWT Validation. I just want to 
validate some form fields on a page.
I started like this, but don't know how to go on:

class Person {
  @Size(min = 4, message = Name too short.)
  private String name;

  Person(name) {
 this.name = name;
  }
}

class MyForm {
@UiField
TextBox name;

@UiHandler
void onClick(saveButton) {
new Person(name);
//...
}
}

What do I have to do in order to validate the field now, and show the error 
message from the annotation on the page?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/mse3aWjA5AUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread Jens
Take a look 
at: https://developers.google.com/web-toolkit/doc/latest/DevGuideValidation

The GWT SDK also contains a small validation example project that validates 
a Person before sending it to the server.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/85Y_5w-U0ysJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread membersound
Yes I know this side. But it still does not tell me:
- how to validate the name before creating the person object (which I'm 
looking for in terms of numbers like int age; There I'd first like the 
validator to catch if it's a valid age before creating the person object)
- how to display an annotation error message beneath a textbox

Could you help me out?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/xC7Y9XCSE48J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 only allow digits to be entered in a textbox?

2013-01-07 Thread membersound
Hi,

I have a textbox where I want to user to only enter digits. Moreover I want 
to prevent him entering other characters. This is what I tried but it does 
not work:

@UiHandler(textbox)
void onInputsKeyPress(KeyPressEvent event) {
if (!Character.isDigit(event.getCharCode())) {
((IntegerBox) event.getSource()).cancelKey();
}
}

Any hints?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/qj6zZvmH9iMJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread Jens


 Yes I know this side. But it still does not tell me:
 - how to validate the name before creating the person object (which I'm 
 looking for in terms of numbers like int age; There I'd first like the 
 validator to catch if it's a valid age before creating the person object)


Your validation annotations are defined on the person so you have to create 
a person, fill its annotated properties with values and then validate that 
person. How should the validation framework know what to validate if you 
dont provide a person instance?
 

- how to display an annotation error message beneath a textbox


Create a error message label that you can show/hide/update based on the 
ConstraintViolation you get from validating your class. If Person.name has 
a validation violation then constraintViolation.getPropertyPath() should be 
name. 

In the validation example, all messages are appended into a single message 
and then displayed using a label (method: sendPersonToServer()):
https://gwt.googlesource.com/gwt/+/releases/2.5/samples/validation/src/main/java/com/google/gwt/sample/validation/client/ValidationView.java

If your app is big enough it is maybe worth it to also look into GWT's 
editor framework which will save you from writing a lot of glue code 
between your UI and your model classes you want to edit.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/dJmLLSQFeuUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread Thomas Broyer


On Monday, January 7, 2013 3:45:53 PM UTC+1, membersound wrote:

 Yes I know this side. But it still does not tell me:
 - how to validate the name before creating the person object (which I'm 
 looking for in terms of numbers like int age; There I'd first like the 
 validator to catch if it's a valid age before creating the person object)


If you want to use the annotations that are on your Person fields, then you 
have to create a Person object.
Technically, I believe you could generate code, the generator reading the 
annotations and producing code that will be able to validate data before 
creating the Person object, but there's no such things in GWT proper.
That being said, creating a Person object shouldn't be that expensive that 
you want to avoid it a all costs.

- how to display an annotation error message beneath a textbox


Well, use an Image widget? or a Label widget? call addStyleName on the 
textbox?
You'd still have to manually map the error to the appropriate widget 
though.
 

 Could you help me out?


The easiest is probably to use the Editor framework:

   - Each Editor has the possibility of doing some validation by itself 
   (implement HasEditorDelegate and then call reportError on the 
   EditorDelegate; if you want to do that only on flush() rather than 
   dynamically as the textbox value changes, then implement ValueAwareEditor)
   - errors passed to EditorDriver#setConstraintViolations are 
   automatically mapped to the corresponding editors, which can implement 
   HasEditorErrors to be notified and display the errors (the way they want); 
   ValueBoxEditorDecorator is one such widget provided out-of-the-box (though 
   not configurable so you'll generally want to build your own)

Your onClick will then:

   1. flush()
   2. check errors from editors
   3. possibly validate using javax.validation, and then call 
   setConstraintViolations to display them (beware that it then clears the one 
   reported by editors themselves, you have to merge both lists of errors)

Using the Editor framework though you'll be editing an existing Person 
object (and/or create an empty Person object specifically to edit it and 
save it later), which also means it has to be mutable.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gqzz_Dtra-oJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 validate TextBox fields?

2013-01-07 Thread Nick Chalko
On Mon, Jan 7, 2013 at 7:42 AM, Thomas Broyer t.bro...@gmail.com wrote:



 On Monday, January 7, 2013 3:45:53 PM UTC+1, membersound wrote:

 Yes I know this side. But it still does not tell me:
 - how to validate the name before creating the person object (which I'm
 looking for in terms of numbers like int age; There I'd first like the
 validator to catch if it's a valid age before creating the person object)


 If you want to use the annotations that are on your Person fields, then
 you have to create a Person object.
 Technically, I believe you could generate code, the generator reading the
 annotations and producing code that will be able to validate data before
 creating the Person object, but there's no such things in GWT proper.
 That being said, creating a Person object shouldn't be that expensive that
 you want to avoid it a all costs.



http://docs.oracle.com/javaee/6/api/javax/validation/Validator.html#validateValue(java.lang.Class,
java.lang.String, java.lang.Object, java.lang.Class...)

validateValue

T java.util.SetConstraintViolation
http://docs.oracle.com/javaee/6/api/javax/validation/ConstraintViolation.htmlT
*validateValue*(java.lang.ClassT beanType,

java.lang.String propertyName,
java.lang.Object value,

java.lang.Class?... groups)

Validates all constraints placed on the property named propertyName of the
class beanType would the property value be value

ConstraintViolation objects return null for
ConstraintViolation#getRootBean() and ConstraintViolation#getLeafBean()

*Parameters:*beanType - the bean type propertyName - property to validate
value - property value to validategroups - group or list of groups targeted
for validation (default to
Defaulthttp://docs.oracle.com/javaee/6/api/javax/validation/groups/Default.html
) *Returns:*constraint violations or an empty Set if none*Throws:*
IllegalArgumentException - if beanType is null, if propertyName null, empty
or not a valid object property or if null is passed to the varargs groups
ValidationException - if a non recoverable error happens during the
validation process
--



-- 
Nick Chalko | Software Engineer | ncha...@google.com |   :-)
Generate your java flags for easier testing.
go/java_flags

-- 
You received this message because you are subscribed to the Google Groups 
Google 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 validate TextBox fields?

2013-01-07 Thread Thomas Broyer


On Monday, January 7, 2013 4:50:03 PM UTC+1, Nick Chalko wrote:




 On Mon, Jan 7, 2013 at 7:42 AM, Thomas Broyer t.br...@gmail.comjavascript:
  wrote:



 On Monday, January 7, 2013 3:45:53 PM UTC+1, membersound wrote:

 Yes I know this side. But it still does not tell me:
 - how to validate the name before creating the person object (which I'm 
 looking for in terms of numbers like int age; There I'd first like the 
 validator to catch if it's a valid age before creating the person object)


 If you want to use the annotations that are on your Person fields, then 
 you have to create a Person object.
 Technically, I believe you could generate code, the generator reading the 
 annotations and producing code that will be able to validate data before 
 creating the Person object, but there's no such things in GWT proper.
 That being said, creating a Person object shouldn't be that expensive 
 that you want to avoid it a all costs.




 http://docs.oracle.com/javaee/6/api/javax/validation/Validator.html#validateValue(java.lang.Class,
  
 java.lang.String, java.lang.Object, java.lang.Class...)

 validateValue

 T java.util.SetConstraintViolation 
 http://docs.oracle.com/javaee/6/api/javax/validation/ConstraintViolation.htmlT
  *validateValue*(java.lang.ClassT beanType,
 java.lang.String 
 propertyName,
 java.lang.Object 
 value,
 java.lang.Class?... 
 groups)

 Validates all constraints placed on the property named propertyName of 
 the class beanType would the property value be value

 ConstraintViolation objects return null for 
 ConstraintViolation#getRootBean() and ConstraintViolation#getLeafBean()


Ooh, great! Thanks for the tip Nick.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/RPL7MVRxYjgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: No Textbox can take the focus by mouse clicking in IE8

2013-01-03 Thread Daniel Girtler
Has there been a solution yet??? It still happens and I really need a 
solution

On Wednesday, August 1, 2012 10:51:16 PM UTC+2, Patrick Duffy wrote:

 Has there been a resolution to this problem.  Still happening in gwt 2.4

 On Tuesday, January 25, 2011 3:56:16 AM UTC-5, AlexF wrote:

 I have a problem in GWT 2.0.4 that I can reproduce only with IE8 
 (Windows XP). I use a TabPanel with IFrames in the tabs. When I close 
 a tab which has an element with focus no TextBox in other tabs can 
 take the focus by mouse clicking (but only by Tab-Key). If the closed 
 tab did not have a focused element the problem does not occur. I tried 
 to use TabLayoutPanel but it did not help. What can cause such 
 behavior in the web browser?



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



different gwt-textbox height in IE9 and FF13

2013-01-01 Thread tong123123
I found that for gwt-textbox (without modify any of its css attribute), 
when render in IE9, the height is 22px but NOT including padding-top, 
padding-bottom, border-top-width, border-bottom-width, so in IE, the 
gwt-textbox is in fact 22+1+1+1+1 = 26px;
but in FF13, the height 22px is including padding and border, so in 
Firefox, the gwt-textbox height is really 22px.

why has these difference?

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



Re: GWT textbox.

2012-12-19 Thread Jonathan
Any news on *'Even i cannot be able to select the text by dragging the 
mouse over the text.*'? I have the same issue in IE9. Is this already 
fixed? Other solutions?

Gr

Op donderdag 30 augustus 2012 23:21:44 UTC+2 schreef Bobby het volgende:

 onFocus of any of the textboxes in my GWT application the cursor is going 
 back to the starting of the text.
 I tried to set the cursor position but still didnt work.

 Even i cannot be able to select the text by dragging the mouse over the 
 text.

 This happens only in IE ,works fine in Chrome.
 Please provide with a solution guys..


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/o5QUAQMoxCwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: TextBox with pre-filled suggestion

2012-12-06 Thread Drew Spencer
Wow, when I think of the hassle I went through writing JS to do this on my 
site a few years ago, and now HTML5 makes it that easy now! I shouldn't be 
bitter, but I am :)

On Wednesday, 5 December 2012 10:27:25 UTC, dcheeky77 wrote:

 I confirm that both solutions worked!!
 Thank you very much!

 On Wednesday, December 5, 2012 9:33:35 AM UTC+1, dcheeky77 wrote:

 Wow, thank you very much, I'll definitely give it a try!!!


 On Wednesday, December 5, 2012 8:04:33 AM UTC+1, Igor Knyazev wrote:

 You can use HTML 5 input placeholder attribute to achive that.

 TextBox textBox = new TextBox();
 textBox.getElement().setAttribute(placeholder, some text);


 check browser support of this attribute here 
 http://www.w3schools.com/html5/att_input_placeholder.asp

 For rounded borders just add styleName to TextBox with 
 border-radiushttp://www.w3schools.com/css3/css3_borders.aspproperty

 On Wednesday, December 5, 2012 2:35:58 AM UTC+4, dcheeky77 wrote:

 Hello!

 I need to use a TextBox to enter some data, but the label which 
 explains the field's purpose must be of the kind inside the TextBox 
 itself, 
 which disappears when the user clicks on the field (I hope I've let you 
 understand what I'm talking about ;) )
 I'm using GWT 2.4: is there any such component or a common method to 
 achieve the result?

 Since I also need to customize the look of the TextBox (rounded 
 corners), I was thinking of implementing my own TextBox, but should it 
 extend Composite? Or is there some other way for basic components?

 Thank you very much for your help!



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/o7qurzgJgZIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: TextBox with pre-filled suggestion

2012-12-06 Thread Jens
Well if you want it in IE  10 you still need JS to do so. Simply read the 
placeholder attribute through JS and set the value into the Textbox if the 
textbox is empty and not focused. On focus clear the textbox if it contains 
the placeholder text.

-- J.

Am Donnerstag, 6. Dezember 2012 13:56:33 UTC+1 schrieb Drew Spencer:

 Wow, when I think of the hassle I went through writing JS to do this on my 
 site a few years ago, and now HTML5 makes it that easy now! I shouldn't be 
 bitter, but I am :)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/JseA5A0Z9FcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: TextBox with pre-filled suggestion

2012-12-05 Thread dcheeky77
Wow, thank you very much, I'll definitely give it a try!!!


On Wednesday, December 5, 2012 8:04:33 AM UTC+1, Igor Knyazev wrote:

 You can use HTML 5 input placeholder attribute to achive that.

 TextBox textBox = new TextBox();
 textBox.getElement().setAttribute(placeholder, some text);


 check browser support of this attribute here 
 http://www.w3schools.com/html5/att_input_placeholder.asp

 For rounded borders just add styleName to TextBox with 
 border-radiushttp://www.w3schools.com/css3/css3_borders.aspproperty

 On Wednesday, December 5, 2012 2:35:58 AM UTC+4, dcheeky77 wrote:

 Hello!

 I need to use a TextBox to enter some data, but the label which explains 
 the field's purpose must be of the kind inside the TextBox itself, which 
 disappears when the user clicks on the field (I hope I've let you 
 understand what I'm talking about ;) )
 I'm using GWT 2.4: is there any such component or a common method to 
 achieve the result?

 Since I also need to customize the look of the TextBox (rounded corners), 
 I was thinking of implementing my own TextBox, but should it extend 
 Composite? Or is there some other way for basic components?

 Thank you very much for your help!



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/B5wD-3TywSoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: TextBox with pre-filled suggestion

2012-12-05 Thread dcheeky77
I confirm that both solutions worked!!
Thank you very much!

On Wednesday, December 5, 2012 9:33:35 AM UTC+1, dcheeky77 wrote:

 Wow, thank you very much, I'll definitely give it a try!!!


 On Wednesday, December 5, 2012 8:04:33 AM UTC+1, Igor Knyazev wrote:

 You can use HTML 5 input placeholder attribute to achive that.

 TextBox textBox = new TextBox();
 textBox.getElement().setAttribute(placeholder, some text);


 check browser support of this attribute here 
 http://www.w3schools.com/html5/att_input_placeholder.asp

 For rounded borders just add styleName to TextBox with 
 border-radiushttp://www.w3schools.com/css3/css3_borders.aspproperty

 On Wednesday, December 5, 2012 2:35:58 AM UTC+4, dcheeky77 wrote:

 Hello!

 I need to use a TextBox to enter some data, but the label which explains 
 the field's purpose must be of the kind inside the TextBox itself, which 
 disappears when the user clicks on the field (I hope I've let you 
 understand what I'm talking about ;) )
 I'm using GWT 2.4: is there any such component or a common method to 
 achieve the result?

 Since I also need to customize the look of the TextBox (rounded 
 corners), I was thinking of implementing my own TextBox, but should it 
 extend Composite? Or is there some other way for basic components?

 Thank you very much for your help!



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



TextBox with pre-filled suggestion

2012-12-04 Thread dcheeky77
Hello!

I need to use a TextBox to enter some data, but the label which explains 
the field's purpose must be of the kind inside the TextBox itself, which 
disappears when the user clicks on the field (I hope I've let you 
understand what I'm talking about ;) )
I'm using GWT 2.4: is there any such component or a common method to 
achieve the result?

Since I also need to customize the look of the TextBox (rounded corners), I 
was thinking of implementing my own TextBox, but should it extend 
Composite? Or is there some other way for basic components?

Thank you very much for your help!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5813TgO5PIEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: TextBox with pre-filled suggestion

2012-12-04 Thread Igor Knyazev
You can use HTML 5 input placeholder attribute to achive that.

TextBox textBox = new TextBox();
textBox.getElement().setAttribute(placeholder, some text);


check browser support of this attribute here 
http://www.w3schools.com/html5/att_input_placeholder.asp

For rounded borders just add styleName to TextBox with 
border-radiushttp://www.w3schools.com/css3/css3_borders.aspproperty

On Wednesday, December 5, 2012 2:35:58 AM UTC+4, dcheeky77 wrote:

 Hello!

 I need to use a TextBox to enter some data, but the label which explains 
 the field's purpose must be of the kind inside the TextBox itself, which 
 disappears when the user clicks on the field (I hope I've let you 
 understand what I'm talking about ;) )
 I'm using GWT 2.4: is there any such component or a common method to 
 achieve the result?

 Since I also need to customize the look of the TextBox (rounded corners), 
 I was thinking of implementing my own TextBox, but should it extend 
 Composite? Or is there some other way for basic components?

 Thank you very much for your help!


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/294CFzSw4J4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Required solution for all Textbox on value change event - generic way

2012-11-22 Thread Oliver Krylow
You need an abstract view class, which all your views extend. In your
abstract presenter you register all event handlers to that view. Then you
just need a mechanism how your presenter implementations can pass in their
concrete view BEFORE the event handlers are registered. Via setter or
argument maybe.


On Wed, Nov 21, 2012 at 5:51 PM, Dharanipathi D dharanipa...@gmail.comwrote:

 Hi all,

 In my application we are using
1. Screen are designed using UIBinder with a view class to bind
2. Presenter as controller and model.
3. We do have Base Presenter (abstract with few generic implementations)
4. We are having many such screens with all screen will have textbox in
 it and all screen presenter will extends Base Presenter.

 -- My requirement is to fire and catch generic event when user changes any
 textbox in any screen.
 -- I dont want to define event for each and every textboxes available in
 each screen.
 -- I want to register all textbox on value change (ValueChangeHandler)
 event in generic.

 Is there anyway we can achieve this.

 I would highly appreciate if anyone provides solution for this..

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


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



How to write / capture generic Value change event for all the textbox in my application

2012-11-21 Thread Dharanipathi D
Hi all,

In my application we are using 
   1. Screen are designed using UIBinder with a view class to bind 
   2. Presenter as controller and model. 
   3. We do have Base Presenter (abstract with few generic implementations)
   4. We are having many such screens with all screen will have textbox in 
it and all screen presenter will extends Base Presenter.

-- My requirement is to fire and catch generic event when user changes any 
textbox in any screen.
-- I dont want to define event for each and every textboxes available in 
each screen.
-- I want to register all textbox on value change (ValueChangeHandler) 
event in generic.

Is there anyway we can achieve this.

I would highly appreciate if anyone provides solution for this..

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



textbox focus is not working as expected on IE8

2012-10-08 Thread Miroslav Genov
Hello,

It seems that focus is not working as expected on IE8. Does anyone has an 
idea why FocusImpl is using FocusImplIE6 when ie8 when FocusImplStandard 
seens more reasonable as described 
in: 
http://stackoverflow.com/questions/1326993/jquery-focus-sometimes-not-working-in-ie8

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



[gwt-contrib] Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread t . broyer

My preferred option, with one small adjustment to make it a non-breaking
change.


https://codereview.appspot.com/6492092/diff/1/user/src/com/google/gwt/user/client/ui/SuggestBox.java
File user/src/com/google/gwt/user/client/ui/SuggestBox.java (right):

https://codereview.appspot.com/6492092/diff/1/user/src/com/google/gwt/user/client/ui/SuggestBox.java#newcode877
user/src/com/google/gwt/user/client/ui/SuggestBox.java:877: public
ValueBoxBaseString getTextBox() {
How about adding a getValueBox() instead, and let this method throw a
ClassCastException in case 'box' is not a TextBoxBase?
(and deprecate it in favor of getValueBox)

That way, we wouldn't even break anyone's code.

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread jat

BTW: you should create code reviews at
http://gwt-code-reviews.appspot.com/ instead.

There is a also a TODO to support SafeHtml here.  I'm not entirely sure
what that means in this case (Doesn't TextBox already ensure the string
is uninterpreted?  Does changing to a ValueBoxBase mean you might be
displaying HTML in a value?), but we should either make sure this change
moves us closer to that or remove the TODO.


https://codereview.appspot.com/6492092/diff/1/user/src/com/google/gwt/user/client/ui/SuggestBox.java
File user/src/com/google/gwt/user/client/ui/SuggestBox.java (right):

https://codereview.appspot.com/6492092/diff/1/user/src/com/google/gwt/user/client/ui/SuggestBox.java#newcode877
user/src/com/google/gwt/user/client/ui/SuggestBox.java:877: public
ValueBoxBaseString getTextBox() {
On 2012/09/10 10:42:04, t.broyer wrote:

How about adding a getValueBox() instead, and let this method throw a
ClassCastException in case 'box' is not a TextBoxBase?
(and deprecate it in favor of getValueBox)



That way, we wouldn't even break anyone's code.


True, but you leave a runtime landmine that may fail in production.  I
think if you do that, you need to deprecate this method and retire it
pretty soon.

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread t . broyer

On 2012/09/10 12:03:20, jtamplin wrote:

BTW: you should create code reviews at

http://gwt-code-reviews.appspot.com/

instead.



There is a also a TODO to support SafeHtml here.  I'm not entirely

sure what

that means in this case (Doesn't TextBox already ensure the string is
uninterpreted?  Does changing to a ValueBoxBase mean you might be

displaying

HTML in a value?), but we should either make sure this change moves us

closer to

that or remove the TODO.


Could it have rather been about the SuggestionDisplay?
Sounds hard to add (would require a breaking-change in
SuggestOracle.Suggestion, or possibly a new interface, and a breaking
change to SuggestBox.SuggestionDisplay).
At this point, we'd probably better rebuild SuggestBox from scratch with
better modularity (possibly even build it as an extender/behavior,
similar to ASP.NET AJAX's AutoComplete
http://www.asp.net/ajaxlibrary/act_AutoComplete.ashx) and allowing for
auto-completing parts of the valuebox's value (similar to Closure
Library's AutoComplete
http://closure-library.googlecode.com/svn/docs/class_goog_ui_ac_AutoComplete.html)

In other words, we should probably remove this TODO, or change it to a
comment suggesting the above.

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread jat

LGTM

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread jat


https://codereview.appspot.com/6492092/diff/5001/user/src/com/google/gwt/user/client/ui/SuggestBox.java
File user/src/com/google/gwt/user/client/ui/SuggestBox.java (right):

https://codereview.appspot.com/6492092/diff/5001/user/src/com/google/gwt/user/client/ui/SuggestBox.java#newcode878
user/src/com/google/gwt/user/client/ui/SuggestBox.java:878: *
@deprecated in favour of getValueBox
If there is going to be an official policy of removing deprecated items,
should list a date or a release version where it will be removed here?

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread t . broyer

LGTM


https://codereview.appspot.com/6492092/diff/5001/user/src/com/google/gwt/user/client/ui/SuggestBox.java
File user/src/com/google/gwt/user/client/ui/SuggestBox.java (right):

https://codereview.appspot.com/6492092/diff/5001/user/src/com/google/gwt/user/client/ui/SuggestBox.java#newcode878
user/src/com/google/gwt/user/client/ui/SuggestBox.java:878: *
@deprecated in favour of getValueBox
On 2012/09/10 15:46:14, jtamplin wrote:

If there is going to be an official policy of removing
deprecated items,


I really hope so!
Proposed it a couple times already but received no feedback so far :-(


should list a date or a release version where it will be
removed here?


In the mean time, maybe list the first release version where it'll be
marked deprecated (i.e. 2.6 here).

https://codereview.appspot.com/6492092/

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


[gwt-contrib] Re: Breaking Change: Use ValueBoxBaseString instead of TextBox in SuggestBox (issue 6492092)

2012-09-10 Thread skybrian

LGTM. I'll commit this soon.


https://codereview.appspot.com/6492092/

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


TextBox not working in FireFox

2012-09-07 Thread rohit s kumar
 Hi 

 I am using gwt 2.4.0. jar. I have a problem with text box 
setFocus() in Firefox 15. 

 I researched about the topic and I have find out a lot of solution 
using 

 Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand () 
{
  public void execute () {
 textbox.setfocus(true);
}
  });

 DeferredCommand.addCommand(new Command() {
public void execute() {
textbox.setfocus(true);
}
  });

 
 I also used timer to schedule the focus(), but that won't 
work. 

 

   But None of them worked. The setFocus(true) is working fine in IE 9 
and IE8 . Please help me ... 

 

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



GWT textbox.

2012-09-03 Thread Bobby
onFocus of any of the textboxes in my GWT application the cursor is going 
back to the starting of the text.
I tried to set the cursor position but still didnt work.

Even i cannot be able to select the text by dragging the mouse over the 
text.

This happens only in IE ,works fine in Chrome.
Please provide with a solution guys..

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



[gwt-contrib] Re: Add role=presentation into textbox of FocusPanel. (issue1803804)

2012-08-14 Thread skybrian

I'm not familiar with FocusPanel, but it looks like it's used by a
variety of subclasses that need to accept keyboard input for various
reasons. So I don't think this is a good idea in all cases. Perhaps
FocusPanel needs a way to set the ARIA role and you should do this only
for your app?


http://gwt-code-reviews.appspot.com/1803804/

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


[gwt-contrib] Re: Add role=presentation into textbox of FocusPanel. (issue1803804)

2012-08-14 Thread skybrian

LGTM


http://gwt-code-reviews.appspot.com/1803804/

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


newbie question: what return type to use for TextBox?

2012-08-12 Thread wuziq
This might be a loaded question.

I am using mvp4g.  I have a view with a TextBox.  In my presenter, I want 
to do 2 things with the TextBox:

// in one part of the presenter
view.getMyTextBox().setFocus( true );

// in another part of the same presenter
String myText = view.getMyTextBox().getText();

In my view, I return the TextBox as a Focusable so that I can do 
setFocus().  But then I can't do getText() - for that, I think I need to 
return the TextBox as a HasText.

Is there a return type that will cover both of these?

public SomeReturnTypeThatLetsMeDoEverything getMyTextBox()
{
return this.myTextBox;
}

I know I must be missing something totally obvious, but I don't know what 
it is.  Any guidance would be appreciated.  Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/KBbloD1XxmAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: newbie question: what return type to use for TextBox?

2012-08-12 Thread Jens
I don't know mvp4g but what you describe is pretty normal. If you expose 
your widget as feature interfaces you would need to add a method per 
feature like:

Focusable getNameFocusable();
HasText getNameHasText();

Technically you can define more interfaces as return value by using 
generics:

T extends Focusable  HasText T getTextBox() {
  return (T) textbox; *//unchecked cast!*
}

which will allow you to access methods from both interfaces when calling 
view.getTextBox().someMethod() but I dont recommend it because the 
downsides are:
- you don't get a compile time error if textbox does not implement the 
interfaces T extends from because its an unchecked cast to T.
- you don't get a compile time error if you assign the return type to 
something different like HasEnabled enabled = view.getTextBox(). You could 
even write something like Person p = view.getTextBox() which is plain 
wrong. Also because of the unchecked cast to T.

So I tend to not use feature interfaces in my views. Instead of 
view.getNameTextBox().get/setText(String) I simply use 
view.get/setName(String). Its shorter, more meaningful and you dont have to 
struggle with a good name for a HasXYZ getter method (adding the widget 
class name or the feature interface name to the getter method name seems 
silly and something like view.getName().getText() also looks kind of silly 
to me). If I need to make the name focusable I would add 
view.setNameFocused(boolean). So yes, I would add a new method to the view, 
like you would add a new getter now.
In some cases I push the model class to the view like view.display(person) 
/ view.getPerson(). This allows you to implement some minor logic into the 
view and can help to keep the presenter a bit more cleaner. Some people 
dont like it because the view knows about the model but I am fine with it 
as it can be more practical.
For events I also dont use feature interfaces (e.g. HasClickHandlers). I 
define my own Delegate interface that contains event callback methods, like 
onNameChanged, and then call view.setDelegate(delegate). This works 
pretty well with UiBinder's @UiHandler and in general it saves you a lot of 
anonymous classes in your presenter.

So short story: Add a new method to your interface as its the safest thing 
to do. If you think your presenter looks a bit ugly because of lengthly 
view.getX().get/setY() method calls, don't use the feature interfaces in 
your view and instead define methods that work with the concrete values, 
e.g. String getName, Date getBirthday(), setAddressFocused(boolean), ... 

Hope that helps.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gSuWnKbKhcQJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: No Textbox can take the focus by mouse clicking in IE8

2012-08-02 Thread Patrick Duffy
Has there been a resolution to this problem.  Still happening in gwt 2.4

On Tuesday, January 25, 2011 3:56:16 AM UTC-5, AlexF wrote:

 I have a problem in GWT 2.0.4 that I can reproduce only with IE8 
 (Windows XP). I use a TabPanel with IFrames in the tabs. When I close 
 a tab which has an element with focus no TextBox in other tabs can 
 take the focus by mouse clicking (but only by Tab-Key). If the closed 
 tab did not have a focused element the problem does not occur. I tried 
 to use TabLayoutPanel but it did not help. What can cause such 
 behavior in the web browser?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/F4stbbHAUX8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 send data from gwt TextBox to PhP server via JSON

2012-08-02 Thread Godel83
Hi,

I'm trying to send login datato php script, when click on submit button. I 
want to send data as Post for php script, via JSON.
This is my code on java file (piece of the form):

final TextBox mioUsername = new TextBox();

final PasswordTextBox miaPassword = new PasswordTextBox();

Button accedi = new Button();


//BUTTON SUBMIT

accedi.addClickHandler(new ClickHandler() {

publicvoid onClick(ClickEvent event) {

RequestBuilder request = new RequestBuilder(RequestBuilder.POST
,URL.encode(checklogin.php));

   

   String name = mioUsername.getText();

String pssw = miaPassword.getText();

JSONObject jsonValue = new JSONObject();

jsonValue.put(myusername, new JSONString(name));

jsonValue.put(mypassword, new JSONString(pssw));

request.setHeader(Content-Type, application/json);

try {

request.sendRequest(jsonValue.toString(),new RequestCallback() {

@Override

public void onResponseReceived(Request request, Response response) {

}


@Override

public void onError(Request request, Throwable exception) {

//displayError(Couldn't retrieve JSON);

}

});

} catch (com.google.gwt.http.client.RequestException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

 } });


and this is my php script:


?php


$host=localhost; // Host name 

$username=usersuper; // Mysql username 

$password=passw; // Mysql password 

$db_name=Pippo; // Database name 

$tbl_name=Users; // Table name 


// Connect to server and select databse.

mysql_connect($host, $username, $password)or die(cannot connect); 

mysql_select_db($db_name)or die(cannot select DB);


// username and password sent from form 

$myusername=$_POST['myusername'];

$mypassword=$_POST['mypassword'];


$sql=SELECT * FROM $tbl_name WHERE Nome='$myusername' and Cognome='
$mypassword';

$result=mysql_query($sql);


// Mysql_num_row is counting table row

$count=mysql_num_rows($result);

echo $count;

// If result matched $myusername and $mypassword, table row must be 1 row

if($count==1){


// Register $myusername, $mypassword and redirect to file 
login_success.php

session_register(myusername);

session_register(mypassword); 

header(location:login_success.php);

}

else {

echo Wrong Username or Password;

}
?
 
I don't know how must implement onResponseReceived method, to ensure that 
everything 
runs.

I need help.
Thanks


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/1Mxt4PRXndEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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 send data from gwt TextBox to PhP server via JSON

2012-08-02 Thread Joseph Lust


 // username and password sent from form 

 $myusername=$_POST['myusername'];

 $mypassword=$_POST['mypassword'];


You will need to json_decode() the request before you can access 
the variables within. Further the incoming request JSON should be assigned 
to a variable (i.e. msg=JSON) so that PHP can fetch it from the $_POST 
variable.

Frankly, given that you only have two parameters, there is really no reason 
to JSON encode them. Just POSTing the two parameters as form encoded data 
would work with your PHP code as written. You can however us JSON to return 
a response.


Sincerely,
Joseph 

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



max allowed text length in textbox

2012-07-10 Thread Dan
Hi, 

There is a limit for the lenght of string in textbox? We are facing some 
problems, strings with length  4849 chars are being truncated. 

Thanks in advance. 



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



Invoking Value Change Event via JS on TextBox

2012-07-06 Thread pragati
I have a requirement where via javascript, a value is copied into the GWT 
TextBox widget 
and the Value Change Event should get fired so that i know i have to do 
something.

Is there a way to achieve this?
It works via JSNI, which actually does a call to TextBox.setValue(value, 
true) 
But i dont intend to provide an JSNI but achieve it with an JS written to 
invoke this event on the GWT TextBox widget.

Thanks




-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/A7TfzlUgOugJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email 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: Invoking Value Change Event via JS on TextBox

2012-07-06 Thread Thomas Broyer

On Friday, July 6, 2012 3:00:12 PM UTC+2, pragati wrote:

 I have a requirement where via javascript, a value is copied into the GWT 
 TextBox widget 
 and the Value Change Event should get fired so that i know i have to do 
 something.

 Is there a way to achieve this?
 It works via JSNI, which actually does a call to TextBox.setValue(value, 
 true) 
 But i dont intend to provide an JSNI but achieve it with an JS written to 
 invoke this event on the GWT TextBox widget.


The easiest, in pure JS, would be to simply dispatch a 'change' event on 
the input. 

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



  1   2   3   4   >