Tuesday, November 1, 2016

Re: jqm4gwt ver. 1.4.7 released

I will plan switch to js interop in next release, which will be jQuery Mobile 1.5 based.
This 1.4.7 version is quite stable, and I have huge project based on it, so decided not to introduce heavy changes, just checked that everything is working fine on GWT 2.8

On Saturday, October 29, 2016 at 6:59:36 AM UTC-7, Kirill Prazdnikov wrote:


On Saturday, October 29, 2016 at 4:12:00 PM UTC+3, Alain wrote:

Thanks, I see lots of gwt-user dependencies:  Widget, ClickHandler, JavaScriptObject.
I agree better to have 100% interop solution.


--
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+unsubscribe@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 Desktop-Notification

Hey Marcel,

Your project works fine with Chrome desktop but now Chrome mobile seems to require Service Workers to send notifications.

I have tried to implement it based on examples, it works with simple html projects but when I try to register a serviceworker from a GWT project I get the following error: Failed to register a ServiceWorker: No URL is associated with the caller's document

if ('serviceWorker' in navigator) {
   navigator
.serviceWorker.register('sw.js');
   navigator
.serviceWorker.ready.then(function(registration) {
      registration
.showNotification(title,
         
{ body: body, icon: icon }
     
);
   
});
}

Have you updated your project or may be have you more experience with serviceworkers?

Thanks,
Ricardo


On Friday, February 7, 2014 at 9:26:29 AM UTC+1, Marcel K wrote:
Hey,

after some coding with gwt i want to publish a component that i wrote. It's an api for desktop-notification and should work with Chrome, FF and Safari (according to https://developer.mozilla.org/en-US/docs/Web/API/notification#Browser_compatibility).

I would really appreciate if someone could take a look at it and maybe give me some advices ;) or.. maybe even use :)



Cheers
Marcel

--
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+unsubscribe@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: The type AbstractRequestContext.MyConstraintViolation must implement the inherited abstract method ConstraintViolation.getExecutableParameters()

Hi Jens,

Thanks for the hint!. it helped

Best regards,

On Wednesday, October 26, 2016 at 3:47:52 PM UTC+1, Jens wrote:
You have validation-api-1.1.0 and validation-api-1.0.0.GA on classpath. GWT is only compatible to validation-api-1.0.0.GA.

-- 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+unsubscribe@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: Strange error with streams

package org.jresearch.commons.gwt.client.widget;

import javax.annotation.Nonnull;

import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Label;

public class MessageTestBox extends DialogBox {

@Nonnull
private Label content;
private Button cancel;
@Nonnull
private HTMLPanel panel;

public MessageTestBox() {
final FlowPanel main = new FlowPanel();
setModal(true);
main.add(content = new Label());
main.add(panel = new HTMLPanel(""));
setWidget(main);
setGlassEnabled(true);
}

protected void createButtons(@Nonnull final HTMLPanel p, @Nonnull final Action... actions) {
p.clear();
for (final Action action : actions) {
p.add(createButton(action));
}
// Stream.of(actions).map(this::createButton).forEach(p::add);
if (cancel == null) {
cancel = createButton(new Action(SafeHtmlUtils.fromTrustedString("Cancel"), this::close));
}
p.add(cancel);
}

protected Button createButton(final Action action) {
return new Button(action.getActionName(), e -> close(action.getHandler()));
}

private void close(final Command toDo) {
hide(false);
toDo.execute();
}

public void show(@Nonnull final SafeHtml title, @Nonnull final SafeHtml text, @Nonnull final Action... actions) {
createButtons(panel, actions);
setHTML(title);
content.setText(text.asString());
center();
}

private void close() {
hide(true);
}

}
package org.jresearch.commons.gwt.client.widget;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.google.common.base.MoreObjects;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.user.client.Command;

public class Action {

@Nonnull
private final SafeHtml actionName;
@Nullable
private final Command handler;

/**
* @param actionName
* @param handler
*/
public Action(@Nonnull final SafeHtml actionName, @Nullable final Command handler) {
this.actionName = actionName;
this.handler = handler;
}

/**
* @param actionName
* @param handler
*/
public Action(@Nonnull final SafeHtml actionName) {
this(actionName, null);
}

/**
* @return the actionName
*/
@Nonnull
public SafeHtml getActionName() {
return actionName;
}

/**
* @return the handler
*/
@Nullable
public Command getHandler() {
return handler;
}

@SuppressWarnings("nls")
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("actionName", actionName)
.add("handler", handler)
.toString();
}

}
Simplified widget is in attachment. Mehod createButtons contains the the problem code.

Let me know if you need something else.

Stas

On Tuesday, November 1, 2016 at 11:13:41 AM UTC+1, Jens wrote:
Use -style PRETTY as SDM parameter so that the JS code is more readable. 

Looks like a GWT bug either in the compiler because of method references or inside the Stream emulation. If you can provide a minimal, reproducible example then open a bug report.

-- 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+unsubscribe@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: Strange error with streams

IIRC, there are gotchas with method references in some cases, and using lambdas workarounds the problem. Colin or Andrei would know better as it was them that had such issues when implementing… the streams emulation.

--
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+unsubscribe@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: Strange error with streams

Use -style PRETTY as SDM parameter so that the JS code is more readable. 

Looks like a GWT bug either in the compiler because of method references or inside the Stream emulation. If you can provide a minimal, reproducible example then open a bug report.

-- 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+unsubscribe@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.

Strange error with streams

Hi,

Why the following code throw runtime exception ConsoleLogger.java:32 ReferenceError: jQw_g$ is not defined at MCw_g$.RCw_g$ [as createButtons_5_g$] (MessageBox.java:57)

         Stream.of(actions).map(this::createButton).forEach(p::add);

while the classic equivalent works without errors

        for (final Action action : actions) {
            p.add(createButton(action));
        }

where actions is Action[];

In chrome debugger it fails after return from map method.

BTW somebody knows how in Chrome debugger switch between Java and underlying JavaScript code?

Best,
Stas

--
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+unsubscribe@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.