How to design the header of a website in GWT without using CSS? - gwt

I need to make the header and logo (google Code and Stockwatcher) of the stockwatcher example http://code.google.com/webtoolkit/doc/1.6/tutorial/gettingstarted.html without using CSS or HTML, that is all the code should be in JAVA. Can someone tell me how to do it ?

You should be able to create Panels and place elements in them progmatatically without a problem. But if you add more details to your questions I am sure we can be more helpful.
Also, you are linking to an older version of GWT, you might be helped by using the most recent version:
http://code.google.com/webtoolkit/doc/latest/DevGuide.html
This is probably the section you are looking for:
http://code.google.com/webtoolkit/doc/latest/DevGuideUiPanels.html
But I would recommend using UiBinder where you can, instead of pure Java. It is easier and more flexible that way.
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

Related

How to define custom wicket tag

I could not find a wicket tag like wicket:include? Can anyone suggest me anything? I want to include/inject raw source into html files? If there is no such utility, any suggestions to develop it?
update
i am looking for sth like jsp:include. this inclusion is expected to be handled on the server side.
To do this, you'll need to implement your own IComponentResolver.
This blog article shows an example somewhat resembling what you're after.
Is it raw markup that you want to include, or Wicket content?
If it's raw markup, even a simple Label can do that for you. If you call setEscapeModelStrings( false), the string value of the model will be copied straight in the markup. (Watch out for potential XSS attacks though.)
"Including" Wicket markup is done via Panels (or occasionally Fragments)
Update: If you add more detail about the actual problem you need to solve, there's a good chance that we can find a more "wickety" solution, after all, JSP and Wicket are two different worlds and the mindset of one doesn't work very well in the other.

Has anyone made explorercanvas work with GWT?

Has anyone made explorercanvas work with GWT? Can you share the exact code?
I see a lot of references to explorercanvas with GWT. For example: http://code.google.com/p/explorercanvas/wiki/Instructions But these are always filled with caveats and complaints. I haven't seen any complete solutions.
Yeah I have done so for a project. I created a module which you can inherit and use in your gwt application and use the GWT Canvas class to write your code. You can see the details in my blog.
http://ummeessa.blogspot.com/2011/09/gwtcanvas-on-ie7-and-8.html
Hope the blog will help you creating your own module.
I have used my module in a project to create charts using canvas. It works fine in IE7/8 and I am sure there should be no issues. Everything which is supported by excanvas works in my module.

GWT/java and javascript

can i design my web pages in html and css instead of java methods and use gwt only in parts of page that i need ajax? and which one is better gwt, extgwt, vaadin(it run apps in server-side.can i also use it in client-side?), etc...? do i also need to know javascript for using gwt?
thanks
can i design my web pages in html and
css instead of java methods and use
gwt only in parts of page that i need
ajax?
Yes, you can. You can create a div on your HTML page and insert your GWT widget there.
which one is better gwt, extgwt,
vaadin(it run apps in server-side.can
i also use it in client-side?)
I don't know about vaadin but Ext-GWT is a set of ready made components to use with GWT which make your life easier especially if you want to build an web app that looks and feels like a desktop application.
do i also need to know javascript for
using gwt?
No, it can be useful sometimes but is not necessary.

Is there any Wicket-like web framework to use with Scala (besides lift)?

I want to start a project using the Scala language. While searching for web frameworks I've found Lift. However, it is not what I was looking for: a web framework that has complete separation of HTML and code. Lift does have some nice features (and a learning curve) but we need to have complete separation of HTML and code. I was hoping to find something like Wicket, Tapestry or Barracuda for the Scala language.
Although it is nice to be able to reuse html templates, it is more important to us to have the HTML templates work as a "static application" mockup. In Tapestry we can just put links in the static templates and use that to have static navigation and a sort of prototype of the application.
So, do you know of any other web framework that is easy to work with the Scala language?
Thanks,
Luis
Here it is I can understand why you might want it pure Scala, but you haven't stated that's necessary, and with the techniques defined within the blog post, and there is another blog which also helps, you should be able to get it close enough to what you desire.
Tapestry 5 has many similarities with Wicket and works very well with Scala. I haven't tried it myself, but Francois Armand has being doing it for some time and he's writing about in in his blog.
Try Context. It is a component based framework written in Java but I have used it with Scala without much difficulties.
Context uses XSL as templating language which forces a sharp separation between logical presentation (DOM-tree) and actual presentation (HTML/CSS/JS).
You can even, with little effort, create prototypes and mocked views by faking the DOM-tree and trying invidual components in different combinations.

Stand-alone charts in GWT

I've been trying to get pretty charts to work in GWT on our internal network.
Playing around with GWT-Ext's charts is nice, but it requires flash and is really messy to control (it seems buggy, in general).
I'd like to hear about something that works with the least amount of dependencies and it also must work without a connection to the web (so, Google' charts API isn't a solution).
Edit: Indeed, I would rather a library that is all client-side.
I'm building a GWT chart library based on Flot: http://gflot.googlecode.com
I hope you find it useful. Contact me if you have any questions.
Googling for "GWT +sparklines" has gotten me to gchart, which seems like what I need.
From what I understand - it's all client side and requires nothing more than their JAR file.
Google's charts actually come in two flavours, and one of them does not require interaction with Google's servers - so should satisfy your needs.
Google Image Charts is the API you are thinking of, which is an API on Google's servers that returns images.
Google Interactive Charts is a client side javascript API that renders entirely within the browser: Google Interactive Charts
Google provides a GWT wrapper for the interactive charts: GWT Visualization API
It's not all rainbows and unicorns and you can find chart libs out there that make nicer charts, but it's pretty solid, works on all major browsers and we've been using it successfully for quite a while.
http://code.google.com/p/ext-ux-ofcgxt/ is a nice option if you're using ext-gwt
Do you want something that has a server side component or entirely client driven? The best ones I have seen are all flash, alas. I have done little tricks with JS and GWT before, but there is only sophisticated I will get before I go hunting for a library to do it for me.
There is also "sparklines" - they are available in lots of flavours (very simple charts though).
gchart looks seriously awesome. Go with it !
If you're looking for client-side check out flotr which is based on prototype javascript library or flot which is based on jQuery. Both work well, though flot seems like its got a bigger backing.
If you are willing to go with flash, XML/SWF is a wonderful tool
+1 flot, requires jQuery though, so might not play well with GWT, I haven't used that.
Another flash option, with a pre-built GWT integration - Open Flash Chart / ofcgwt.
I think that gwt-chart is a better framework for you.
well.. i've used yahoo ui chart library (which GWT-Ext uses internally). Pretty neat solution, in the beta stage though.
Let us know the conclusion you arrive at..
There is one open source api for charts in GWT hosted on http://code.google.com/p/gwt-rcharts/ . The API works on SVG/VML specification. You may find it quite easy to implement and use. You may find the demo at http://gwt-rcharts.appspot.com/