Re: GWT project data grid double scroll issue in edge browser

2019-05-29 Thread hy
This is a known issue, I have encountered it in past. See: 
https://groups.google.com/forum/#!topic/google-web-toolkit/xxeS6LETdBs

The way I fix it is by adding the following css to the page:

/*Fix for extra scroll bar in celltables*/
::-webkit-scrollbar {
width: 10px;
}

::-webkit-scrollbar-thumb {
width: 10px;
-webkit-border-radius:3px;
border-radius:3px;
background:rgba(0,0,0,0.3);
}
/*End Fix for extra scroll bar in celltables*/





On Wednesday, May 29, 2019 at 5:17:35 AM UTC-4, Thomas Broyer wrote:
>
> As you can see in your screenshots, columns are not aligned with their 
> headers. This is the reason GWT (tries to) hide the native scrollbars, and 
> "replaces" them with translucent ones (the one you've hidden).
>
> This apparently only happens in right-to-left locales; compare 
> http://samples.gwtproject.org/samples/Showcase/Showcase.html?locale=ar#!CwCustomDataGrid
>  vs 
> http://samples.gwtproject.org/samples/Showcase/Showcase.html?locale=en#!CwCustomDataGrid
>
> I don't remember how all of this is done, so can't tell if it's a bug in 
> GWT (well, it is indeed, but possibly caused by:) or a bug in MSEdge; as it 
> doesn't happen in Chrome or Firefox.
>
> On Wednesday, May 29, 2019 at 10:27:23 AM UTC+2, Sanoob V wrote:
>>
>> Hi All,
>>
>> I am getting two scrollers in datagrid edge browser.
>>
>> [image: Two scroll.png]
>>
>>
>> and when check inspect code i can see two GWT generated CSS if i remove 
>> that one scroll is hiding but I don't know from where it is coming 
>> please advice me.
>>
>>
>> [image: css class.png]
>>
>>
>>
>>
>> [image: Hidind class.png]
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/3762be62-05e9-46ca-8157-9a9f3c945c26%40googlegroups.com.


Re: how to create an anchor column in a celltable

2018-08-29 Thread hy
Create a class that renders anchor like below:

public class CustomAnchorCell
extends ClickableTextCell {

private String itsHref = "";
private boolean isEnabled = true;

public CustomAnchorCell(String inHref) {
super();
itsHref = inHref;
}

public CustomAnchorCell() {
super();
itsHref = "";
}

public CustomAnchorCell(String inHref, boolean inEnabled) {
this(inHref);
isEnabled = inEnabled;
}

@Override
protected void render(Context context, SafeHtml value, SafeHtmlBuilder sb) {
if (value != null) {
String theElementStart = "";
String theElementEnd = "";
if (isEnabled) {
theElementStart = "")
.append(value)
.appendHtmlConstant(theElementEnd);
}
}

public void setHref(String inHref) {
itsHref = inHref;
}

public void setEnabled(boolean inEnabled) {
isEnabled = inEnabled;
}

public void setClassName(String inClassName) {
itsClassName = inClassName;
}
}



Use it like this:

Column theReport = new Column< Report, String>(new 
CustomAnchorCell()) {
@Override
public String getValue(Report object) {
return "Hello New Tab";
}

@Override
public void render(Cell.Context context, Report object, SafeHtmlBuilder sb) 
{
CustomAnchorCell theCustomAnchorCell = (CustomAnchorCell) getCell();
theCustomAnchorCell.setHref("_your new tab url_");
theCustomAnchorCell.setClassName(*"_your custom css class name_"*);

super.render(context, object, sb);
}
};



On Wednesday, August 29, 2018 at 10:50:25 AM UTC-4, Ousti Driss wrote:
>
> What I want is when you click on the cell a new tab opens with the url you 
> clicked,
> my string url column is filled with the response I get from the servlet
> can you please give me more details on the alternative response.
>
> On Wednesday, August 29, 2018 at 3:45:27 PM UTC+2, Thomas Broyer wrote:
>>
>> If you want to display text as-is (e.g. not a link), then you can use a 
>> ClickableTextCell (see it live, with source code, in 
>> http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellSampler),
>>  
>> the FieldUpdater will be called when the cell is clicked.
>> Alternatively, you could use a TextCell with a custom SafeHtmlRenderer 
>> that would wrap the URL in a link (easiest would probably be to implement 
>> this using a SafeHtmlTemplates: pass the URL as input –you'll want to pass 
>> it as a SafeUri, constructed using UriUtils.fromString()–, use it to 
>> construct something like {0})
>>
>> On Tuesday, August 28, 2018 at 6:00:00 PM UTC+2, Ousti Driss wrote:
>>>
>>> Hey everyone,
>>>
>>> I'm writing the code of a simple web app using gwt, I have a Celltable 
>>> all its columns are String type,
>>> one of the columns is a url column , I want to make this column 
>>> clickable, which means once you click on a cell
>>> of this column, you are redicted to the url shown, is that possible?
>>> i tried to add an anchor column to the table, but I got error messages 
>>> while defining this column when I call the getValue method, the type of 
>>> return should be a string!!
>>> Is there a way to do such a thing?
>>>
>>> Thank you :) 
>>>
>>

-- 
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: Strange Issue with Nested Editors

2017-11-22 Thread hy
Figured it out.
The issue is that the ChildView had a getter that exposed the AddressForm 
to its parent:

public AddressForm getAddressForm() {
 return addressForm;
}

This was causing the Editor framework to choke. 


On Wednesday, November 22, 2017 at 3:05:00 PM UTC-5, hy wrote:
>
> I am trying to use a nested editors; however its been failing at the code 
> generation step.
> Below is a sample code snippet to explain the issue:
>
> public class ParentView
>  implements Editor{
>
>  interface Binder
>  extends UiBinder {
>  }
>
>  interface Driver
>  extends SimpleBeanEditorDriver {
>  }
>
>  @UiField @Editor.Path ("child1") ChildView childView; 
>  @UiField @Editor.Path ("child2") Child2View child2View;
>
>
>
> public class ChildView
>  extends Composite
>  implements Editor {
>
>  interface ChildViewUiBinder
>  extends UiBinder {
>  }
>
>  private static ChildViewUiBinder uiBinder = 
> GWT.create(ChildViewUiBinder.class);
>
>  @UiField @Editor.Path ("") AddressForm formAddress;
>  @UiField @Path ("") InformationForm informationForm;
>
>
>
> public class AddressForm
>  extends Composite
>  implements Editor {
>
>  interface AddressFormUiBinder
>  extends UiBinder {
>  }
>
>  private static AddressFormUiBinder uiBinder = 
> GWT.create(AddressFormUiBinder.class);
>
>  @UiField InputEditor address1;
>  @UiField InputEditor address2;
>  @UiField InputEditor city;
>  @UiField SelectEditor stateCode;
>  @UiField InputEditor zip;
>
>
>
> public class InformationForm
>  extends Composite
>  implements Editor {
>
>  interface InformationFormUiBinder
>  extends UiBinder {
>  }
>
>  private static InformationFormUiBinder uiBinder = 
> GWT.create(InformationFormUiBinder.class);
>
>  @UiField InputEditor a;
>  @UiField InputEditor b;
>
>
> When I try to compile the above code, I get the below error:
>
> [ERROR] Could not find a getter for path getFormAddress in proxy type 
> com...Child1   [ERROR] Unable to create Editor model due to 
> previous errors
>
>
>
> The class hierarchy looks like this:
>
> public class Parent {
>
>  private Child1 child1;
>  private Child2 child2;
>
>  public Child1 getChild1() {
>return child1;
>  }
>
>  public void setChild1(Child1 child1) {
>   this.child1 = child1;
>  }
>
>  public Child2 getChild2() {
>return child2;
>  }
>
>  public void setChild2(Child2 child2) {
>this.child2 = child2;
>  }
> }
>
>
> public class Child1 {
>
>  private Integer id;
>  //below are common for AddressForm
>  private String address1;
>  private String address2;
>  private String address3;
>  private String city;
>  private String stateCode;
>  private String zip;
>
>  //below are common for InformationForm
>  private int a;
>  private float b; 
>
>
>
> I can use the AddressForm widget successfully when its a direct child of 
> the parent view; however it fails in the above case where it is in the child 
> view.
>
> InformationForm on the other hand works correctly without any issues.
>
>
>
> Appreciate any help regarding this.
>
>

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


Strange Issue with Nested Editors

2017-11-22 Thread hy
I am trying to use a nested editors; however its been failing at the code 
generation step.
Below is a sample code snippet to explain the issue:

public class ParentView
 implements Editor{

 interface Binder
 extends UiBinder {
 }

 interface Driver
 extends SimpleBeanEditorDriver {
 }

 @UiField @Editor.Path ("child1") ChildView childView; 
 @UiField @Editor.Path ("child2") Child2View child2View;



public class ChildView
 extends Composite
 implements Editor {

 interface ChildViewUiBinder
 extends UiBinder {
 }

 private static ChildViewUiBinder uiBinder = 
GWT.create(ChildViewUiBinder.class);

 @UiField @Editor.Path ("") AddressForm formAddress;
 @UiField @Path ("") InformationForm informationForm;



public class AddressForm
 extends Composite
 implements Editor {

 interface AddressFormUiBinder
 extends UiBinder {
 }

 private static AddressFormUiBinder uiBinder = 
GWT.create(AddressFormUiBinder.class);

 @UiField InputEditor address1;
 @UiField InputEditor address2;
 @UiField InputEditor city;
 @UiField SelectEditor stateCode;
 @UiField InputEditor zip;



public class InformationForm
 extends Composite
 implements Editor {

 interface InformationFormUiBinder
 extends UiBinder {
 }

 private static InformationFormUiBinder uiBinder = 
GWT.create(InformationFormUiBinder.class);

 @UiField InputEditor a;
 @UiField InputEditor b;


When I try to compile the above code, I get the below error:

[ERROR] Could not find a getter for path getFormAddress in proxy type 
com...Child1   [ERROR] Unable to create Editor model due to 
previous errors



The class hierarchy looks like this:

public class Parent {

 private Child1 child1;
 private Child2 child2;

 public Child1 getChild1() {
   return child1;
 }

 public void setChild1(Child1 child1) {
  this.child1 = child1;
 }

 public Child2 getChild2() {
   return child2;
 }

 public void setChild2(Child2 child2) {
   this.child2 = child2;
 }
}


public class Child1 {

 private Integer id;
 //below are common for AddressForm
 private String address1;
 private String address2;
 private String address3;
 private String city;
 private String stateCode;
 private String zip;

 //below are common for InformationForm
 private int a;
 private float b; 



I can use the AddressForm widget successfully when its a direct child of the 
parent view; however it fails in the above case where it is in the child view.

InformationForm on the other hand works correctly without any issues.



Appreciate any help regarding this.

-- 
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 2.8.2 release

2017-10-19 Thread hy
This is great! Thank you!

On Thursday, October 19, 2017 at 5:32:21 PM UTC-4, Wesley.JUNG wrote:
>
> Thanks
>
> On Thursday, October 19, 2017 at 4:30:49 PM UTC-4, Colin Alworth wrote:
>>
>> Today we released the next version of GWT, version 2.8.2. A few quick 
>> highlights from this new release:
>>
>>- GWT can now run on Java 9 (though Java 9 features are not yet 
>>supported, coming soon!)
>>- Chrome 61 change in getAbsoluteTop/Left has been fixed
>>- Errors on the page reported from window.onerror are now reported to 
>>your uncaught exception handler
>>- GWT now generates CSP compliant dom elements
>>
>> The release notes can be found at 
>> http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2. Get 
>> yours from Maven Central, or from the zip release 
>> .
>>
>> Special thanks to Max Barkley of RedHat who helped lead the release 
>> effort this time, and to all of the fantastic testers who helped us ensure 
>> that this release was ready to go.
>>
>

-- 
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 MVP Frameworks

2017-10-13 Thread hy
Errai Framework is awesome, and we are using parts of it (like jaxrs); 
however its too much focussed on javaee specific development (which is 
great btw but too heavy for general and ever-evolving use-cases and has a 
steep learning curve viz. custom CDI/IOC).
mvp4g 
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fmvp4g%2Fmvp4g&sa=D&sntz=1&usg=AFQjCNFZVdRFuONp-UOuqjqn34NLz-YTdg>
 again 
uses GIN.

Also, IMO JS frameworks like vue, react or polymer are very good for 
creating isolated custom components and rendering HTML.
However for MVP/data-flow/binding/architecture they might not be the ideal 
solution (other than if you are going to fully commit to them for future 
use and as we all know there is a new js framework every month deprecating 
the old one).

Vanilla js (which in this case cross-compiled by the awesome GWT compiler), 
is the path we would want to take.
Still open to other suggestions.


On Friday, October 13, 2017 at 10:28:16 AM UTC-4, DavidN wrote:
>
> I'm also depending on GWTP for my projects. It would be nice if it somehow 
> got migrated to Dagger, but I guess the company behind it stopped doing GWT 
> work.
>
> I'm considering moving to a mix of GWT with Vue.js in combination with 
> Vue-routing.
>
>
> On Fri, Oct 13, 2017 at 4:14 PM Subhrajyoti Moitra  > wrote:
>
>> U can try http://erraiframework.org/ or https://github.com/mvp4g/mvp4g 
>> as alternatives.
>>
>> On Fri, Oct 13, 2017 at 7:30 PM, hy > 
>> wrote:
>>
>>> Is anyone using any GWT MVP based framework?
>>>
>>> We have been using GWTP, however the development on it seems to be 
>>> stalled and it still depends on GIN, which is also not under active 
>>> development.
>>>
>>> GWTP is extremely powerful, however a lack of investment in it recently 
>>> has been concerning for us and we would like to be sure that our app is 
>>> future compatible.
>>>
>>> So, is there any other framework anyone is using out there that works 
>>> like GWTP and would take minimum transition (from GIN to Dagger, etc.); and 
>>> has a future compatibility (annotation processing, raw HTML, etc.).
>>>
>>> -- 
>>> 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-we...@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-we...@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.


GWT MVP Frameworks

2017-10-13 Thread hy
Is anyone using any GWT MVP based framework?

We have been using GWTP, however the development on it seems to be stalled 
and it still depends on GIN, which is also not under active development.

GWTP is extremely powerful, however a lack of investment in it recently has 
been concerning for us and we would like to be sure that our app is future 
compatible.

So, is there any other framework anyone is using out there that works like 
GWTP and would take minimum transition (from GIN to Dagger, etc.); and has 
a future compatibility (annotation processing, raw HTML, etc.).

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