Hi all,
Let's say that I have a VerticalPanel that contains some Composite widgets.
I place this VerticalPanel inside a Scroll Panel.
Now, I would like to be able to click a link in one of the Composites, and
have the ScrollPanel scroll its contents to another Composite widget in the
same
Hi Stefan,
Is com.google.gwt.i18n.client.LocaleInfo.getCurrentLocale() what
you're looking for?
Hope this helps.
//Jason
On Tue, Oct 12, 2010 at 10:08 AM, StrongSteve swe.sta...@gmail.com wrote:
Hello,
I have a GWT application with I18N features.
Within one composite I do not want to access
Hi Charlie,
By join I'll assume you're talking about a straight database JOIN, in
which case: it's handled in EoD.
EoD doesn't parse or restructure your SQL (much the way iBatis
doesn't); and it generates it's internal ResultSet - Object mapping
structures on a case-by-case basis. It's a loose
Hi Jim,
Generally I would register a ServletContextListener with the
application-server (in your case Tomcat) to start and stop background
services. You would register it in your web.xml file:
listener
listener-classcom.company.webapp.MyContextListener/listener-class
/listener
Hope this
I assume you're using GWT 2.0. If so dom.client.Element has a method:
scrollIntoView which may be what you are looking for.
To scroll to a Button for example:
Button button = new Button();
//...
button.getElement().scrollIntoView();
This will scroll any required elements (including
The insertFirst method on the DOM model will also fail to register /
unregister any event listeners.
To insert a Widget at the beginning of any ComplexPanel (such as RootPanel)
use:
panel.insert(widget, 0);
If all you want to do is modify the DOM structure:
DivElement div =
Hi ben,
If you are using a version of GWT 2.0 this error appears because the standard
GWT List interface
doesn't have the subList method. You can either remove the @Override annotation
from that method, or
extend AbstractList instead of implementing List directly (generally considered
a
filled out the implementation
acording to the interface and if the method is not suppored how did
it got into the imlementation in the first place
On 23 נובמבר, 16:52, Jason Morris lem...@gmail.com wrote:
Hi ben,
If you are using a version of GWT 2.0 this error appears because
To re-iterate what has already been said: you can't truly disable this menu in
Opera (in fact you
won't even get the event by default).
However, if you are determined to try, this may help:
public class MyRichTextArea extends RichTextArea {
public MyRichTextArea() {
Hi Parmeet,
Why not wrap each type of test step in a Command, which also implements
AsyncCallback. Then allow
them to be chained together:
public abstract class AsyncCommandT implements AsyncCallbackT, Command {
private final Command next;
protected AsyncCommand(final
You have several options actually.
To do exactly what you are trying to, you would use something like:
public interface RuntimeParameters {
public static final String PAGE_URL = http://blablabla;;
}
and then use RuntimeParameters.PAGE_URL.
However, this is probably not what you
Hi Ben,
You are trying to use GWT client-side classes on the server-side. These classes
are supposed to be
compiled to JavaScript, not to be run in a Java VM.
You will need to either use JSON.org classes, some other JSON classes, or
spit-out the JSON as a
String directly. Your choice ;)
extends
RetryAction?
-Bakul
On Aug 23, 9:08 am, Jason Morris lem...@gmail.com wrote:
I would personally say that creating top-level or inner classes for the
response of an async
callback (or an event) is often the best way to do it.
Encapsulation is one of the main reasons we use OO
I would personally say that creating top-level or inner classes for the
response of an async
callback (or an event) is often the best way to do it.
Encapsulation is one of the main reasons we use OO languages because it
encourages re-use. If you
take a look at my blog post here:
This complaint is coming from WebSphere, not GWT.
By implementing IsSerializable you've said this object may be serialized by
GWT, but you haven't
implemented normal java.io.Serializable to make it serializable by WebSphere.
When session replication is turned on, any object in the session is
If the status code returned is not 200 the onFailure method will be passed
StatusCodeException. The
getStatusCode() method can be used from there.
Hope that helps.
reHa wrote:
Hi
I have implemented RemoteService and when I'm getting response in the
callback - in methods onFailure and
Hi Jake,
Unfortunately the DOM structure is bound more to the JavaScript way of doing
things than Widgets. In
JavaScript you can't have more than one event listener (of a given event type)
per element, while
Widgets may have any number.
So to work around this: GWT Widgets are the only
The foreach loop in normal Java will also construct an Iterator object, and
therefore is almost
always more expensive than a for-index-loop (assuming the Collection is
random-access).
I would really call this a premature optimization, but if you're really
concerned with such things,
the
Possibly you are looking for Integer.decode instead of Integer.parseInt?
Joel Paulsson wrote:
Thanks for the help, i think i follow. I'll have to look into why
Integer.parseInt didn't return the value i thought it would return
then.
On 16 Juni, 07:34, Dean S. Jones deansjo...@gmail.com
Personally I would say use a ServletContextListener if the structures you are
creating will be
shared by several of your Servlets. That way the init is finished before any of
your Servlets are
created.
Load-on-startup always feels like a bit of a hack to me ;)
Just my 2c
Steve wrote:
Actually HashMap and many of the Collections classes /are/ used in that simple
bit on code.
The Widget classes and Event management make heavy use of the Collections
classes. RootPanel alone
uses a HashMap, and HashSet (which in turn use AbstractSet, etc.), RootPanel
also uses the Window
On the surface, a Handler is just a Listener, but with only 1 event method.
Event Handlers also
don't have a removeOnClickHandler method, instead the add method returns a
registration object that
can be used to de-register that handler.
Underneath, Handlers are a very different beast. All of
As far as I know it won't complain (doesn't complain when I use annotations
from EoD SQL).
The best way to find out is write a test class with some annotations and try
compile it ;)
//J
djd wrote:
For hibernate entity beans, can I use hibernate's specific
annotations? I never actually
Hi Markus,
Is it possible the SessionId Cookie hasn't been sent to the client when the
second method is
invoked? You may need to force the Server to create the HttpSession object and
send the Cookie in
your host page (or before you reach it).
Basically any call to
, client code shouldn't set any
cookies, by hand at least.
On Mar 16, 9:10 am, Jason Morris lem...@gmail.com wrote:
Hi Markus,
Is it possible the SessionId Cookie hasn't been sent to the client when the
second method is
invoked? You may need to force the Server to create the HttpSession
Unfortunately there is no quick way to do this, you will need to search for the
element by hand.
private int indexOf(final Element target) {
final TableElement table = TableElement.as(getElement());
final NodeListTableRowElement rows = table.getRows();
final
If you run the project in debug mode you'll get GWT hosted mode automatically.
Bare in mind 2 additional things that netbeans will do:
1) start the debugger as well (which I find very useful)
2) start your real external Tomcat instance as the server
Hope that helps.
//J
mibtar wrote:
is there
Hi Ian
All of the add*Handler methods return a HandlerRegistration object, you keep a
reference to it, and
then invoke HandlerRegistration.removeHandler() when you want to remove it.
I wasn't to sure of whether I liked it or not at first, but it does make
automated removal of
Handlers on
Heya,
Just a heads-up. I change the build.xml in the project root directory, NOT the
build-impl or
build-gwt files, that way GWT4NB never overwrites the changes.
I'm busy working to get this patch merged into the GWT4NB project.
If your normal build.xml is being overwritten, something is
The JSON spec actually has no way of representing a date.
There are several possible methods (and hacks) that allow you to ship dates
over JSON (though none
of them are really perfect).
I would personally recommend sending dates as UTC numbers, since that way you
don't have to hack the
JSON
Not sure why it would take less time on the command line (memory possibly).
I blogged a nice little solution to gwt4nb's build problems here:
http://lemnik.wordpress.com/2008/07/27/fixing-compilation-in-gwt4nb/
It's a chunk of ant that you can drop in your normal build.xml to give the GWT
On the server side there is generally a pool of threads held by the server.
Thus a single session
(in the JSESSIONID sense of Session) may involve any number of threads from the
pool. Each request
is processed on a single thread taken from the pool.
So to answer your question: chances are it
Synchronization on the server depends on the resources you want to protect
access to. Synchronizing
a method in RemoteServiceSerlvet is a /very/ bad idea, since it ensures that
only one user can use
that method at a time.
You also can't assume that if you take up one of the browsers
If GWT translated to an intermediate form, it would be so close to source-code
that it really
wouldn't matter.
Besides that, GWT compiles from source-code to source-code (although it's
JavaScript source code).
I've seldom worked with a commercial enterprise product that I can't get the
java.util.ResourceBundle is not available to client side GWT code.
I would advise sticking to the Constants interface, since it has the advantage
that the bundle data
will be inlined into your JavaScript. There will be no properties files loaded
at runtime, and no
Hashtable like lookup when
It doesn't matter that they have the same value, they are returned from 2
different fields in Event:
if(event.getButton() == Event.BUTTON_RIGHT)
if(event.getTypeInt() == Event.ONDBLCLICK)
Hope that helps
//J
arun wrote:
no...actually i m mentioning about event.BUTTON_RIGHT and
Hi there,
I think what you are looking for is the getText() method of the Response
object (the one that gets
passed into the onResponseReceived method).
To convert the String returned into an XML DOM object, you can use the classes
in
com.google.gwt.xml.client:
public void
Heya,
I think your problem is that you are not either:
1) clearing the grid before re-populating it
2) removing the last row after a remove has been performed
RadioButton rb = new MyRadioButton(group, radioButtonText);
rb.addClickListener(listener);
scrollBoxGrid.setWidget(i, 0, rb);
except
Have you tried:
Window.setMargin(0);
Window.enableScrolling(false);
Which will remove the default padding the browser puts around the document, and
disables scrolling
of the document as well (ScrollPanel's will still work though ;) )
Hope that helps
//J
JohnMudd wrote:
The following code
Actually most containers pool their processor threads in order to conserve and
regulate resources.
The RemoteServiceServlet in GWT simply decodes the response and invokes the
method which the request
relates to. Theres no magic or rocket science going on here. I don't know what
tests you've
I tried reproducing your test to see what you were getting. I found the
behavior when I ran the code
in Hosted Mode and executed serverMethod() /twice/ before executing
anotherMethod() (it didn't
matter how many Hosted Browsers I had open).
When running the same test in real browsers (I used
The get method defined in Map accepts an Object as the key, it doesn't enforce
the generic
constraint since you are not modifying the contents of the Map (and thus
supposedly not doing
anything dangerous).
Lothar Kimmeringer wrote:
Francisco schrieb:
HashMapString, Integer map
It's not really a GWT related question, but heres what you're looking for:
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
final DocumentBuilder builder = dbf.newDocumentBuilder();
final Document doc = builder.parse(new
ByteArrayInputStream(xml.getBytes(UTF-8)));
The
nathan.r.matth...@googlemail.com wrote:
Hi GWTers
I'm writing some performance sensitive code for GWT. I'm wondering how
GWT compiles virtual functions to JavaScript. What's the associated
performance overhead? Obviously I'd like to use proper polymorphism
but if there's a significant
Madhu CM wrote:
Hi all,
I am new to GWT, and i like the way its been implemented.
But i am struck up with something I have developed sample
application just
to do RPC.
when i do GWT.create() . where will be the proxy class generated ?
is it done dynamically?dynamically create
The GWT event model is a close relation of the standard Java event model.
The problem with the standard DOM EventListeners is that only one listener can
be attached to an
Element. The other problem is that a custom Widget may be required to listen
for a sequence of
low-level events in order
Window.Location.assign(String url)
Should do what you're looking for.
crnl...@gmail.com wrote:
I have a problem when creating forward in different apps in GWT.
I tryed to implement it by using method WIndow.Location.replace
(String url), But by this way I can't back to History.
You could use myLabel.addStyleName(Hyperlink) to style it like a hyperlink
with CSS.
Smith wrote:
Thanks, Kevin. How about myLabel.addClickListener(ClickListener
listener) ?
Also,is there a disadvantage with making labels clickable? The user
wouldn't know if that text is clickable
The obfuscator should either leave those method alone by default (since they're
defined in an
outside interface), or you should be able to configure it to leave them alone.
Either way, RemoteServiceServlet uses reflection and thus does need the method
names intact. You may
be able to alter
A web browser won't allow you to do this, since it would basically allow anyone
to pull copies of
important files off your hard disk without your permission, this a FileUpload
(like input
type=file) is a readonly structure from a JavaScript point of view.
You can however use flash, or a
Label lblOfflineLabel = new Label();
Timer offlineLabelTimer;
lblOfflineLabel.addStyleName(OfflineLabel);
lblOfflineLabel.addStyleName(OfflineLabel-blink);
offlineLabelTimer = new Timer() {
private boolean on = true;
public void run() {
if(on = !on) {
The GWT Compiler does a massive amount of optimization and it does so for each
of the browsers. This
process takes a lot of time.
GWT has it's own browser that runs your Java code with less compilation work
(and lets you debug
your Java code instead of the generated JavaScript). To access
The GWT Compiler doesn't like to have @Override on an interface method, if the
method definition
comes from a class it's happy, but if the direct parent declaration is in an
interface it won't compile.
[EMAIL PROTECTED] wrote:
I get the error message in the development shell:
The method
This is something you simply can't do cleanly across all the browsers. The
elements returned by the
XMLParser are totally different classes to the HTMLParser. The way to do this
is to set the
innerHTML on an HTML Element object to the value returned from the
RequestBuilder. Then you can use
It's not really that Safari doesn't support it, it just doesn't allow for
XmlHttpRequest objects to
have a Method of anything other that GET / POST. The issue may have actually
been resolved (I'm open
to correction here), but some people are still using versions of Safari with
this problem.
You need to switch to using the Java 5 way of declaring Collections (ie: using
generics):
public ListToolOptions toolList = null;
slledru wrote:
I am trying to move my app from 1.4 to 1.5.3.
I am using ant to build and am getting following warnings and would
like to get rid of them.
What
the into: do you know how to convert elements
in XML package to elements in DOM package in Firefox by using GWT?
Thnak you again,
Cristiano
Jason Morris wrote:
This is something you simply can't do cleanly across all the browsers. The
elements returned by the
XMLParser are totally
I would say: pass the data as an array, and wrap the RPC service on the client
side:
public void doSomething(Object param1, AsyncCallback callback, String...
strings) {
asyncClient.doSomething(param1, strings, callback);
}
If you really need varargs. Bare in mind the expense of
The only types of connection available to JavaScript in HTTP/S, and then not
with Streams of data
(data is sent and received as Strings). Therefore GWT can't emulate a true
Socket of any sort.
If you describe your problem in more detail, perhaps someone can suggest a
solution.
Pete Kay
You can't use java.lang.ref on the client side, because JavaScript has no
notion of weak, soft, or
phantom references. You can however use the java.lang.ref package on the server.
If you need to release objects on the client side, it is best to do so by hand
when they are no
longer in use.
You should rather encapsulate your context menu logic in a PopupMenu or
ContextMenu class. Something like this may help:
public class ContextMenu extends PopupPanel {
private final ClickListener closeListener = new ClickListener() {
public void onClick(final Widget
I would say take a look at the GWT Mosaic project:
http://code.google.com/p/gwt-mosaic/
http://69.20.122.77/gwt-mosaic-current/Showcase.html#CwWindowPanel
benw wrote:
Is anybody willing to share some example code for a resizable
DialogBox or any kind of resizable panel?
Thanks,
-Ben
, thanks.
On Nov 10, 5:58 pm, Jason Morris [EMAIL PROTECTED] wrote:
Heya,
Your basic problem here is that you can't have your XmlParserUtil return a
Document object. The doc field will only be filled in when the async
RequestBuilder request returns and the parser is finished with the XML
Heya,
Your basic problem here is that you can't have your XmlParserUtil return a
Document object. The doc field will only be filled in when the async
RequestBuilder request returns and the parser is finished with the XML string.
By that time, your method has already returned.
The only way to
boraldomaster wrote:
I have a service (class that extends RemoteServiceServlet).
I have overriden method onBeforeRequestDeserialized there.
This method recieves serializedRequest as a string.
How can I deserialize it ?
I'm assuming you actually need to deserialize the string by
I personally use Tomcat a lot more, mainly because it started as the reference
implementation (though I know it no longer technically holds that position).
The
few times I've wanted to use Jetty I've had to switch back to Tomcat due to
lack
of system admin knowledge (ie: the various admins I
If you're on GWT 1.5, you can just use
Window.Location.getParameter(key);
rudolf michael wrote:
you just have to parse the http URL in your address bar.
in your onModuleLoad method just call the following method
public static native String getHref() /*-{
return $wnd.location.href;
As a rule of thumb, never setAttribute, when there is a property for that
element that does the same job. For example, use setClassName() instead of
setAttribute(class, ...), and getStyle().setProperty() instead of
setAttribute(style).
IE has problems handing setAttribute with any special
samsus wrote:
Hello,
Is there a way i can dynamically resize the RichTextArea Height?, that
is, it starts with 50px height, and if the content inside the
RichTextArea passes that limit, the height is increased.
Any ideas?
I'm not sure about automatically resizing the field (ie:
I assume what you want is for the client to have a new file on their
hard-drive.
First you'll need a servlet that produces the data. I'm not sure what
data-format you want to work with, so I'm gonna assume a plain text file here
(note, this is all typed directly into my mail client, sorry for
This is the way it's done.
You can think of JavaScript as running on the event-dispatch-thread.
Therefore, opening a DialogBox and making the thread wait until a button is
clicked results in the following on the queue:
++ +-+
| wait for click | - | click event
As far as I know all versions of Firefox have this problem.
Any HTML will always sit behind a flash object. I've never seen anyone fix it,
and it really frustrates me when I hit a site that puts their navigation menu
on top of a flash object, because it makes the site totally unusable.
Bottom
72 matches
Mail list logo