CustomButton implementation leads to incorrect handling of PushButton by screen readers

2016-12-12 Thread Julio Feferman
I am instrumenting an application for best possible support for assistive 
technologies (ATs) such as screen readers, using GWT's ARIA implementation. 
I see that the CustomButton widget setEnabled() method sets the 
aria-pressed attribute on the button element if it is enabled. This is fine 
for a ToggleButton but wouldn't it be incorrect for a PushButton? When the 
aria-pressed attribute is present, screen readers interpret the widget as a 
toggle button. In the case of a push button, however, this attribute should 
not be present, in order to allow the AT to click the widget via keyboard 
commands, instead of toggling it. 

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


Re: GWT JsInterop to Java Rhino ?

2016-12-12 Thread Ming-Yee Iu
At one point, I temporarily lost my sanity and adapted the old Elemental to 
do something like that. Here is some test code that hooks in to JavaFx to 
run some things in Java's embedded WebKit browser:

https://github.com/my2iu/gwt/blob/elementalfx/elemental/tests/elemental/javafx/dom/FxDocumentTest.java

I imagine that when the new Elemental with JsInterop-support comes out, it 
will be adaptable in a similar way. It might even be possible now to just 
do something using Java Proxy objects and skip Elemental entirely.

Overall though, it was really ungainly. I built a whole application on top 
of it, and it was just so many types of awful. Looking back, that was not 
an avenue worth exploring.

As for unit tests, you can just use a mocking framework to mock up your 
JsInterop interfaces. Then you'd get to work entirely in Java while still 
testing your code properly.

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


Re: How to make sure object is set before initWidget()

2016-12-12 Thread harshyadav
Have the parts that create the widget and populate the widgets separate.

A better approach would be, as recommended by GWT to use MVP design pattern.

1) You create your view/composite/widget (View.java)
2) You call your RPC in a presenter (Presenter.java)
3) Your presenter than transfer the object to the view
4) The view just renders the object values

The documentation here below explains this in detail:
http://www.gwtproject.org/doc/latest/DevGuideMvpActivitiesAndPlaces.html

--Harsh

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


Re: How to make sure object is set before initWidget()

2016-12-12 Thread Olar Andrei
I'm sorry. I don't get it here. The createMenu() should not return a
Widget? Or?

On Tue, Dec 13, 2016 at 12:11 AM, harshyadav  wrote:

> Ok, if your class is extending a composite, then just make sure, the
> createMenu only initialize the ui elements.
> After you have called the RPC, you then set the ui elements.
>
> for e.g.
> private void setMenu(UserInfo userInfo) {
>  label.setName(userInfo.getName());
> }
>
>
>
>
>
> On Monday, December 12, 2016 at 5:05:08 PM UTC-5, Olar Andrei wrote:
>>
>> Hello,
>>
>> It does not work like this, I've already tried. It says "Error:
>> java.lang.AssertionError: This UIObject's element is not set; you may be
>> missing a call to either Composite.initWidget() or UIObject.setElement()"
>> because my class extends Composite (I forgot to mention it). Like it is
>> looking for the initWidget() method before executing the entire rpc call...
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/google-web-toolkit/28B788mIbEU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to make sure object is set before initWidget()

2016-12-12 Thread harshyadav
Ok, if your class is extending a composite, then just make sure, the 
createMenu only initialize the ui elements.
After you have called the RPC, you then set the ui elements.

for e.g. 
private void setMenu(UserInfo userInfo) {
 label.setName(userInfo.getName());
}





On Monday, December 12, 2016 at 5:05:08 PM UTC-5, Olar Andrei wrote:
>
> Hello,
>
> It does not work like this, I've already tried. It says "Error: 
> java.lang.AssertionError: This UIObject's element is not set; you may be 
> missing a call to either Composite.initWidget() or UIObject.setElement()" 
> because my class extends Composite (I forgot to mention it). Like it is 
> looking for the initWidget() method before executing the entire rpc call... 
>

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


Re: How to make sure object is set before initWidget()

2016-12-12 Thread Olar Andrei
Hello,

It does not work like this, I've already tried. It says "Error: 
java.lang.AssertionError: This UIObject's element is not set; you may be 
missing a call to either Composite.initWidget() or UIObject.setElement()" 
because my class extends Composite (I forgot to mention it). Like it is 
looking for the initWidget() method before executing the entire rpc call... 

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


Re: How to make sure object is set before initWidget()

2016-12-12 Thread harshyadav
Call 
   Widget mainMenu = createMenu();
 initWidget(mainMenu);
from the onSuccess() method of the RPC after you have set the userInfo 
object.


Something like:
rpcService.getUserInfo(username, new AsyncCallback() {


 @Override
 public void onSuccess(UserInfo result) {
UserPanel.userInfo = result;

Widget mainMenu = createMenu();
  initWidget(mainMenu);
 }


 @Override
 public void onFailure(Throwable caught) {
 // Window.alert(caught.getMessage());
 }
 });


Remember, GWT RPC is asynchronous, so you have to always make sure you 
execute dependent code blocks in sequence.



On Monday, December 12, 2016 at 4:34:22 PM UTC-5, Olar Andrei wrote:
>
> Hello,
>
> I'm creating a menu, and I basically need my UserInfo object already set 
> (based on the username) before creating the menu and doing the initWidget().
> Basically I have the username, and based on this, I query the DB and get 
> everything else based on that username.
> But I am using an RPC call for the backend part. How can I make sure that 
> userInfo is set before proceeding to the createMenu() and initWidget() part 
> ?
>
> private static UserInfo userInfo;
>
> public UserPanel() {
> container = new MaterialContainer();
>   container.setFontSize("1em");
>
>setUserInfo("someUsername");
>
>Widget mainMenu = createMenu();
>  initWidget(mainMenu);
> }
>
> public void setUserInfo(String username) {
> DBGetUserInfoAsync rpcService = (DBGetUserInfoAsync) 
> GWT.create(DBGetUserInfo.class);
> ServiceDefTarget target = (ServiceDefTarget) rpcService;
> String moduleRelativeURL = GWT.getModuleBaseURL() + "DBGetUserInfoImpl";
> target.setServiceEntryPoint(moduleRelativeURL);
>
> rpcService.getUserInfo(username, new AsyncCallback() {
>
> @Override
> public void onSuccess(UserInfo result) {
> UserPanel.userInfo = result;
> }
>
> @Override
> public void onFailure(Throwable caught) {
> // Window.alert(caught.getMessage());
> }
> });
> }
>
>
>

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


How to make sure object is set before initWidget()

2016-12-12 Thread Olar Andrei
Hello,

I'm creating a menu, and I basically need my UserInfo object already set 
(based on the username) before creating the menu and doing the initWidget().
Basically I have the username, and based on this, I query the DB and get 
everything else based on that username.
But I am using an RPC call for the backend part. How can I make sure that 
userInfo is set before proceeding to the createMenu() and initWidget() part 
?

private static UserInfo userInfo;

public UserPanel() {
container = new MaterialContainer();
  container.setFontSize("1em");

   setUserInfo("someUsername");

   Widget mainMenu = createMenu();
 initWidget(mainMenu);
}

public void setUserInfo(String username) {
DBGetUserInfoAsync rpcService = (DBGetUserInfoAsync) 
GWT.create(DBGetUserInfo.class);
ServiceDefTarget target = (ServiceDefTarget) rpcService;
String moduleRelativeURL = GWT.getModuleBaseURL() + "DBGetUserInfoImpl";
target.setServiceEntryPoint(moduleRelativeURL);

rpcService.getUserInfo(username, new AsyncCallback() {

@Override
public void onSuccess(UserInfo result) {
UserPanel.userInfo = result;
}

@Override
public void onFailure(Throwable caught) {
// Window.alert(caught.getMessage());
}
});
}


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


GWT 1.7 to 2.7(migration). EXT-JS help

2016-12-12 Thread venkatasaimada
Hi,

 I have recently started migrating my application from GWT 1.7 to GWT 2.7. 
With  a limited availability of information online I was finding difficulty 
in updating.

Currently my 1.7 GWT application runs on GWTEXT 2.0.4. and the last 
released GWTEXT version in the market is 2.0.6.(http://gwt-ext.com/)


 My question-  *Does GWTEXT 2.0.6 support GWT 2.7, and is it compatible 
with browsers like IE9,10 and Microsoft edge.??*

*  Is there any other available GWTEXT versions in the 
market, compatible with 2.7 GWT??*



Thanks in advance.
 
 Venkat

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