Re: gwt tomcat unix doesn't work

2014-02-22 Thread Boris Lenzinger
Hi,

Can you post the error you get ?
It would also be good to have the output of
  java -version
  which java
Do you have any gcj installed ? Could you also post which distribution of
linux you are using and which version ?

Thank you.



2014-02-22 8:17 GMT+01:00 fedex shashankgris...@gmail.com:

 Hi everyone

 I am using tomcat version 6 in the unix server. When I try to run the sh
 version.sh file I get an error saying bad version. bin/bootstrap is not
 working i believe. I checked the jdk and jre version . They are compatible
 . I used commands java -version and javac -version to check the
 compatibility of java and compiler version.

 Recently I developed an application using GWT framework. When I deploy the
 application on the local tomcat server it wrks greats in the windows. I am
 using jdk 1.7 and jre7 in my local and verified on both tomcat version 6 
 7. The application worked great and have no issues. I used ANT script to
 package the application so to deploy on unix server. I used the same ANT
 script to build the package when I deployed on local tomcat.

 Can anyone suggest what exactly could have gone wrong. Based on the error
 I understand compiler is not compatible to java version. When I run the sh
 version.sh in unix it showed the JRE HOME variable as /usr folder. I found
 in that folder java and jre compatible. Please help . 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/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.
For more options, visit https://groups.google.com/groups/opt_out.


Why @UiFactory ListBox makeListBox1() apply for all UiBinder ListBoxes (ListBox1, ListBox2, ListBox3 etc?

2014-02-22 Thread Tom
 

Ok, I have a need to use many ListBoxes in UiBinder.

Ok, in View.ui.xml file:

g:ListBox ui:field='listBox1' visibleItemCount='3' 
g:item value='1' Car /g:item
g:item value='2' Car2 /g:item
g:item value='3' Car3 /g:item
//more item
/g:ListBox

g:ListBox ui:field='listBox2' visibleItemCount='3' 
g:item value='1' Bike /g:item
g:item value='2' Bike2 /g:item
g:item value='3' Bike3 /g:item
//more item
/g:ListBox

// more ui binder ListBox here

Now I want to setMultipleSelect for some ListBoxes only, so I can do 
something like this g:ListBox ui:field='listBox2' visibleItemCount='3' 
multipleSelect=true , it works fine but setMultipleSelect(boolean 
multiple) was deprecated, Google said:

@Deprecated public void setMultipleSelect(boolean multiple)

Deprecated. use ListBox(boolean) instead Sets whether this list allows 
multiple selections. NOTE: The preferred way of enabling multiple 
selections in a list box is by using the ListBox(boolean) constructor. 
Using this method can spuriously fail on Internet Explorer 6.0.

So it means we don't use setMultipleSelect but use constructor 
ListBox(boolean) to set the MultipleSelection, so here is what I did in 
View.java

@UiField ListBox listBox1;
@UiField ListBox listBox2;
@UiFactory ListBox makeListBox1(){
listBox1=new ListBox(true);
return listBox1;
}

However, the above code apply ListBox(true) for all the ListBoxes 
(listBox1, listBox2, etc). I don't want that cos some other ListBoxes need 
to have single selection only.

So why @UiFactory ListBox makeListBox1() apply for all ListBoxes  how to 
fix it? 

Not sure provided=true can help?

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


Display videos from different Youtube channels, sorted by date (published) in my GWT application?

2014-02-22 Thread marian lux
As in the title described, I want to display a sorted list of Youtube 
videso (by publishing date) from different Youtube channels/users.

I found the gwt-youtube-api https://code.google.com/p/gwt-youtube-api/ but 
I don't know if this api is any more in development. The last stable 
release was on JUL 2010.
Is it better to use Javascript (JNSI) and if yes, could someone give me a 
link or a tutorial how to get started?

The client should should display youtube videos (from given youtube 
channels/users) in a sorted (by publishing date) thumbnail list. Something 
like this http://jsfiddle.net/NmvA9/490/ or 
thishttp://gwt-youtube-api.appspot.com/com.google.gdata.showcase.Showcase/Showcase.html.
 
It should be optimized for mobile devices because I want to embed it in my 
mgwt application.

I would be very thankful if someone could give me tips how to figure out 
his. I don't want to start developing in the wrong direction and maybe 
someone had the same task some time ago...

Thanks,
Marian

-- 
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: Why @UiFactory ListBox makeListBox1() apply for all UiBinder ListBoxes (ListBox1, ListBox2, ListBox3 etc?

2014-02-22 Thread Jens
The name of a @UiFactory method is irrelevant, what matters is its return 
type. Thats why it gets called for all your ListBox variables.

What you actually need is @UiField(provided = true) for your listBox1.

@UiField(provided = true)
ListBox listbox1;

public class MyWidget() {
  listbox1 = new ListBox(true); //* it is important to initialize the 
variable before calling uiBinder.createAndBindUi()*
  initWidget(uiBinder.createAndBindUi(this));
}


-- 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/groups/opt_out.


SuperDevMode: speedtracer.html reports much shorter compile times than what is really observed

2014-02-22 Thread Ivan Markov
I'm using GWT 2.5.1 (still).

The subject says it all: 
- The reality: our project compiles for ~ 38 seconds (in the SuperDevMode 
Code Server; single permutation; second  subsequent compilations). (This 
is what is printed in the Code Server console, and what I observe using a 
stopwatch.) 
- But according to the generated speedtracer.html file - big surprise - it 
should have taken a mere 15 seconds! 

Is anyone aware of any inaccuracies in the Speed Tracer logs?

(I can email (personally) the speed tracer file as well as the console 
logs.)

=

P.S. Regarding Speed Tracer - this 
(https://code.google.com/p/speedtracer/issues/detail?id=54sort=-id) is 
really annoying.
Anyone willing to push a new release to Chrome Web Store?
Or - if ChromeDevTools' Timeline view is the future - how about changing 
the GWT compiler to generate profiling info compatible with ChromeDevTools 
instead?

-- 
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: Why @UiFactory ListBox makeListBox1() apply for all UiBinder ListBoxes (ListBox1, ListBox2, ListBox3 etc?

2014-02-22 Thread Thomas Broyer
Answered on StackOverflow (please crosslink when 
crossposting): http://stackoverflow.com/a/21956336/116472

On Saturday, February 22, 2014 12:23:15 PM UTC+1, Tom wrote:

 Ok, I have a need to use many ListBoxes in UiBinder.

 Ok, in View.ui.xml file:

 g:ListBox ui:field='listBox1' visibleItemCount='3' 
 g:item value='1' Car /g:item
 g:item value='2' Car2 /g:item
 g:item value='3' Car3 /g:item
 //more item
 /g:ListBox

 g:ListBox ui:field='listBox2' visibleItemCount='3' 
 g:item value='1' Bike /g:item
 g:item value='2' Bike2 /g:item
 g:item value='3' Bike3 /g:item
 //more item
 /g:ListBox

 // more ui binder ListBox here

 Now I want to setMultipleSelect for some ListBoxes only, so I can do 
 something like this g:ListBox ui:field='listBox2' visibleItemCount='3' 
 multipleSelect=true , it works fine but setMultipleSelect(boolean 
 multiple) was deprecated, Google said:

 @Deprecated public void setMultipleSelect(boolean multiple)

 Deprecated. use ListBox(boolean) instead Sets whether this list allows 
 multiple selections. NOTE: The preferred way of enabling multiple 
 selections in a list box is by using the ListBox(boolean) constructor. 
 Using this method can spuriously fail on Internet Explorer 6.0.

 So it means we don't use setMultipleSelect but use constructor 
 ListBox(boolean) to set the MultipleSelection, so here is what I did in 
 View.java

 @UiField ListBox listBox1;
 @UiField ListBox listBox2;
 @UiFactory ListBox makeListBox1(){
 listBox1=new ListBox(true);
 return listBox1;
 }

 However, the above code apply ListBox(true) for all the ListBoxes 
 (listBox1, listBox2, etc). I don't want that cos some other ListBoxes need 
 to have single selection only.

 So why @UiFactory ListBox makeListBox1() apply for all ListBoxes  how to 
 fix it? 

 Not sure provided=true can help?


-- 
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: CssResource inheritance and avoiding rule repetition on injection, possibility of an @Require?

2014-02-22 Thread GWTter


On Friday, February 21, 2014 5:09:36 PM UTC+1, Thomas Broyer wrote:



 On Thursday, February 20, 2014 10:51:29 PM UTC+1, GWTter wrote:

 Before anything, sorry Thomas, I think I may have just replied to you 
 instead of just the topic (buttons bugged on me a bit), no-spam intended

 You're right I guess I did misunderstand if the imported with prefix 
 doesn't in fact use a different obfuscation
 for the original selectors in the final css. So using the imported with 
 prefix method isn't a viable workaround for avoid the
 precedence override on injection after all.

 And definitely, anything that will help clear it up. I can try to clarify 
 my original example:

 You have the following,

 === Pseudocode ===

 CssResouces:

 SuperCssResource, is injected onModuleLoad (global css) and has the 
 following css as its source:
 .genButton{
 color: black;
 }

 and

 LeafCssResource extends SuperCssResource
  
 css definitions here 
 


 Why are you using an extends here? what do you expect from it? and more 
 importantly what does your ClientBundle(s) looks like?


I'm just setting up viable example when working with Resources. In this 
case specifically you would expect to be able to reference the styles
from SuperCssResource via LeafCssResource and be able to use the selectors 
from SuperCssResource's css to qualify other selectors in LeafCssResource's 
css.

The client bundle would simply look like:

interface LeafClientBundle extends ClientBundle{
  @Source({Leaf.css,Super.css})
  LeafCssResource leafCss();
}

  

 

 Finally, we have the following 2 widgets:

 WidgetDisplayedFirst, 
 has the following css via uibinder:
 MyCssResource:
 .myButton{
 color: red;
 }

 And this button element:
 button class=genButton myButton /


 Using this, it means you have to ensure SuperCssResource is always 
 injected *before* you createAndBindUi for the widget.
 Using .genButton.myButton (higher specificity) in the CSS would fix it.


Yes, and in this example I would make sure to inject LeafCssResource which 
would thereby inject SuperCssResource.
And adding .genButton to further the specificity of .myButton would indeed 
fix, however the point I'm trying to make is that I think it's
unreasonable to either overqualify every selector for fear of having your 
styles be overridden because of precedence or that developers
need to be aware of all the other styles they would be affecting when 
creating their own widget trying to qualify their selectors with a global 
cssresource.

 

 and WidgetDisplayedSecond which uses LeafCssResource

 --

 Now if while my app is running I just display WidgetDisplayedFirst then 
 it will display its button
 with the correct color: red because the .myButton was declared last and 
 thus overrides the .genButton which
 has the same specificity.

 The issue comes into play if I then display WidgetDisplayedSecond. Since 
 WidgetDisplayedSecond uses LeafCssResource
 this will cause SuperCssResource and its css to be injected when 
 LeafCssResource is injected.


 No. Unless you have a @Shared annotation on SuperCssResource, the names 
 from LeafCssResource will be different from those of SuperCssResource (so 
 even if you referenced the same CSS file in @Source of your 2 ClientBundle 
 methods, you'd have duplicated rules with different selectors, in no way 
 would SuperCssResource be reinjected).
 See http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#Scope


Yes, and I should have actually put the @Shared in the example. I didn't 
remember to add it because I was talking about reusing selectors in the 
leaf css to qualify in which case you would need to have the same names or 
else the qualifying would not work at all since the names would be 
different. So in this case I am talking about using the @Shared on the 
SuperCssResource and that you do see the selectors from SuperCssResource's 
css reinjected when you inject LeafCssResource.
 

  

 At this point because
 SuperCssResource has now been reinjected and thus is now the last one 
 declared between it and MyCssResource, its
 .genButton rule now wins and causes WidgetDisplayedFirst's button to now 
 have a color of black.


 With the code above, it shouldn't (now there could be bugs).


So you're saying that SuperCssResource's css should not be included in with 
the css generated for LeafCssResource to be injected? If that's the case 
then I think there is a bug.
 

  

 Now, granted, this is how Css is intended to work in terms of the 
 cascade. However, what I'm trying to say is that this
 is an example of a case where that is not the desired outcome if you want 
 the button to keep the color of red as defined
 in its MyCssResource.

 You really only have 3 options in order to prevent this currently as far 
 as I can see:
 1) You over-qualify all of your selectors to ensure that they always have 
 the most specifity and nothing
 

Re: CssResource inheritance and avoiding rule repetition on injection, possibility of an @Require?

2014-02-22 Thread Jens


 At this point because
 SuperCssResource has now been reinjected and thus is now the last one 
 declared between it and MyCssResource, its
 .genButton rule now wins and causes WidgetDisplayedFirst's button to now 
 have a color of black.


 With the code above, it shouldn't (now there could be bugs).


 So you're saying that SuperCssResource's css should not be included in 
 with the css generated for LeafCssResource to be injected? If that's the 
 case then I think there is a bug.


In all your samples above you are not defining that SuperCssResource has a 
@Shared annotation and without that @Shared annotation your issue can not 
happen because all duplicated css classes will get unique names. Thus With 
the code above, it shouldn't.


-- 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/groups/opt_out.


[ANN] gwt-websockets 1.0 and gwt-eventsource 1.0

2014-02-22 Thread Peter Donald
Hi,

I would like to announce the 1.0 releases of  gwt-websockets [1]  and
gwt-eventsource [3]. These libraries provide gwt-ish abstractions over
the underlying HTML5 websocket and eventsource capabilities. The
libraries were extracted from existing projects and have gone through
some fairly significant refactoring in response to recent user
requests. The libraries are available in Maven Central [2],[4] and
there is some user documentation on the github projects [1],[3] with
pointers to example projects.

[1] https://github.com/realityforge/gwt-websockets
[2] 
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.websockets%22
[3] https://github.com/realityforge/gwt-eventsource
[4] 
http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.realityforge.gwt.eventsource%22

-- 
Cheers,

Peter Donald

-- 
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: CssResource inheritance and avoiding rule repetition on injection, possibility of an @Require?

2014-02-22 Thread Thomas Broyer


You have a fundamental misunderstanding of @Import, despite the doc being 
rather clear, and that's your only problem (afaict).
http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#Imported_scopes
You also have a slight misunderstanding of @Shared.

Let's go back to the 
basics: 
http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#Selector_obfuscation_details

   - each method in a CssResource interface maps to a unique name (let's 
   call it obfuscated class name) based on the type of the interface and the 
   name of the method
   - the basis for the unique name is the interface used as return type of 
   the ClientBundle method, even for methods inherited from other interfaces, 
   except if such an interface is annotated with @Shared, in which case the 
   name will be unique for the @Shared interface (and the same name used for 
   every sub-interface)
   - each class name used in the CSS must map to a method in the interface, 
   unless you use @NotStrict, or the class name has been declared @external, 
   or the class name has been @Import-ed from another interface. In that case, 
   the .*prefix-className* in the CSS (where *prefix* is the prefix 
   declared in @ImportedWithPrefix on the imported interface, and 
   *className* is the original class name from the imported interface) will 
   be replaced with the unique name computed for the method of the imported 
   interface
   - mapping class names to/from methods is based on the method name or a 
   @ClassName annotation (the class name in the CSS file will thus be replaced 
   with the unique name computed for the method)

So, if you want to reuse a class name in a selector, then use @Import or 
@Shared+inheritance. The difference is that with @Shared you're forced to 
declare rules for the inherited/shared class names (to satisfy the 4th rule 
above), and the class name is accessible from outside the CSS file, from 
the CssResource interface (because of inheritance).

@Import is for cases where you want to say the style rules have to be 
slightly different when used within/in coordination with/in the context of 
some other widget (e.g. a cell that's slightly different when in a 
CellTree, compared to a CellTable or CellList, or a widget that's slightly 
different when put in some specific container widget, or possibly when 
defining the style of a container or composite widget saying a child widget 
needs to have a slightly different style).
@Shared is generally for cases where you want to say the style rules have 
to be slightly different depending on some state/situation, where the 
state/situation is toggled/triggered externally by adding/removing a class 
name, and you possibly want a shared/common way to toggle/trigger that 
state/situation independently of the current specific style (e.g. all 
checkables have checked and unchecked states, whether they're 
checkboxes, push buttons, togglable menu items, etc.)
In both cases, the goal is to write compound selectors using a local class 
name and an imported/shared class name, composed directly (both classes 
applied to the same element) or with an operator.

In your case, you'll use either @Import or @Shared, depending on your use 
case. But if you use @Shared, then you MUST NOT use the parent CSS file in 
the @Source for the child interface!

Inline notes below:

On Saturday, February 22, 2014 10:09:48 PM UTC+1, GWTter wrote:



 On Friday, February 21, 2014 5:09:36 PM UTC+1, Thomas Broyer wrote:



 On Thursday, February 20, 2014 10:51:29 PM UTC+1, GWTter wrote:

 Before anything, sorry Thomas, I think I may have just replied to 
 you instead of just the topic (buttons bugged on me a bit), no-spam 
 intended

 You're right I guess I did misunderstand if the imported with prefix 
 doesn't in fact use a different obfuscation
 for the original selectors in the final css. So using the imported with 
 prefix method isn't a viable workaround for avoid the
 precedence override on injection after all.

 And definitely, anything that will help clear it up. I can try to 
 clarify my original example:

 You have the following,

 === Pseudocode ===

 CssResouces:

 SuperCssResource, is injected onModuleLoad (global css) and has the 
 following css as its source:
 .genButton{
 color: black;
 }

 and

 LeafCssResource extends SuperCssResource
  
 css definitions here 
 


 Why are you using an extends here? what do you expect from it? and more 
 importantly what does your ClientBundle(s) looks like?


 I'm just setting up viable example when working with Resources. In this 
 case specifically you would expect to be able to reference the styles
 from SuperCssResource via LeafCssResource and be able to use the selectors 
 from SuperCssResource's css to qualify other selectors in LeafCssResource's 
 css.

 

 The client bundle would simply look like:

 interface LeafClientBundle extends ClientBundle{
   @Source({Leaf.css,Super.css})
   LeafCssResource leafCss();
 }

Re: Why @UiFactory ListBox makeListBox1() apply for all UiBinder ListBoxes (ListBox1, ListBox2, ListBox3 etc?

2014-02-22 Thread Tom
Thaxnk you very much Jens, I put the  listbox1 = new ListBox(true); after 
initWidget(uiBinder.createAndBindUi(this));  then i got an error, so i 
thought @UiField(provided = true) didn't work.

On Sunday, February 23, 2014 1:09:06 AM UTC+11, Jens wrote:

 The name of a @UiFactory method is irrelevant, what matters is its return 
 type. Thats why it gets called for all your ListBox variables.

 What you actually need is @UiField(provided = true) for your listBox1.

 @UiField(provided = true)
 ListBox listbox1;

 public class MyWidget() {
   listbox1 = new ListBox(true); //* it is important to initialize the 
 variable before calling uiBinder.createAndBindUi()*
   initWidget(uiBinder.createAndBindUi(this));
 }


 -- 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/groups/opt_out.