Re: PlaceTokenizer with no (trailing) token

2011-02-27 Thread ciosbel
I think you have to play around with
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/app/place/AbstractPlaceHistoryHandler.java?r=8815
but i've never tried.

If you have luck, just tell us.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Async lazy load on scrolling (pagingscrolltable / celltable)

2011-03-01 Thread ciosbel
Hi,

I'm developing a gwt app in which I used (among other things) a table to 
present my items.
The table is a PagingScrollTable from the gwt-incubator. So far I had no 
problems using it (and it helped me a lot...), but now I'd like to implement 
something like a lazy loading behavior as user scrolls down (avoiding paging 
at all) like the one in the new google groups UI.
For legacy policy i can't switch to the new CellTable or the new 
RequestFactory, so i'm a bit stucked with a (not perhaps so) old style (RPC 
+ incubator).

I looked back on this group and other sources, and I found almost nothing, 
so I ask if someone has already faced this problem, and have snippets / 
hints / suggestions that I can build on.
I think the topic is quite interesting, even more for an old approach and, 
even if my request concerns pagingscrolltable, fell free to express you 
opinions on celltable too (could help someone else).

Cios.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Integrating GIN into HelloMVP sample from GWT

2011-03-01 Thread ciosbel
https://groups.google.com/forum/#!topic/google-web-toolkit/LtGZpCxQAVY
might help?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Async lazy load on scrolling (pagingscrolltable / celltable)

2011-03-02 Thread ciosbel
Just to say that CellTable (and all widgets that implements 
HasKeyboardPagingPolicy) has a KeyboardPagingPolicy that can be set to 
INCREASE_RANGE in order to append the next page instead switching to it. 
Showcase shows this functionality with a CellList, using a 
ShowMorePagerPanel (that extends AbstractPager) that uses an inner 
ScrollPanel to update the current range once the scrollbar reaches the end.
For the Async part, i think a simple AsyncDataProvider should do the trick.

Unfortunately, PagingScrollTable does not have such a policy... :(

cios.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC Problem with HashMap containing ArrayList Value

2011-03-28 Thread ciosbel
Remember that gwt will create a serialization policy for all serializable 
types at compile time.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC Problem with HashMap containing ArrayList Value

2011-03-28 Thread ciosbel
Not necessarily a problem, but the serialization file is bigger and 
compilation can take a while longer.
When i faced that problem i also see plenty of warnings, but maybe recent 
releases are less verbose.

I got to use an interface that extends Serializable, and then mark my DTOs 
used with generics with that.

Hope that helps.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Spring Security

2011-03-29 Thread ciosbel
It's two years old, but you can start here:
http://seewah.blogspot.com/2009/02/gwt-and-spring-security.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Spring Security

2011-03-29 Thread ciosbel
and here 
http://raibledesigns.com/rd/entry/integrating_gwt_with_spring_security

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RPC Problem with HashMap containing ArrayList Value

2011-03-29 Thread ciosbel
I mean that instead using List as base type (that will create 
a serialization policy for all types that extend Serializable), you just use 
List where MyDTO is

public interface MyDTO extends Serializable {
}

then gwt will create a serialization policy only for all types that 
implement MyDTO.

But if you are fine with Serializable, just use it. I think that manually 
declare all possible types is avoidable. But i'm not an expert.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: JPA & JAXB Classes with GWT RPC

2011-04-01 Thread ciosbel
I've managed to use them but with JAXB only. I've no experience with JPA.

If you are not stucked with gwt-rpc, you can try to use the new 
requestfactory, keeping server side entities and make transferrable only the 
proxy types. But i'm not familiar with that either.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



R: Old presenters registered on event bus, how to deal with this?

2011-04-13 Thread ciosbel
The signature of the method addHandler() that you use every time to add a 
handler on the bus for a particular event, is:

public abstract http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/event/shared/EventHandler.html>>
 HandlerRegistration 

 *addHandler*(GwtEvent.Type 

 type, H handler)

So it returns a HandlerRegistration that you can use to remove the added 
handler. You have to keep track of all registered handlers and remove them 
when you switch.

With Activities, one of the parameters of the start() method is an instance 
of a ResettableEventBus, so every time an activities is stopped (on place 
change, display region change etc), all handlers attached to that eventbus 
will be removed. This a really powerfull feature. And yes, you can use 
ResettableEventBus without the new Activities & Places concept (but you need 
at least gwt 2.1).

Andrew.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



R: Re: CellTree and RPC

2011-04-14 Thread ciosbel
Ok, this is old, but for future related questions, here is how i did.

Define an AsyncDataProvider of your own, like:

  public class MyDataProvider extends AsyncDataProvider {

protected void onRangeChanged(final HasData display) {
  // calling my RPC method to obtain inner elements
  myService.randomMethod(param1, new AsyncCallback() {

public void onSuccess(MyReturnType result) {
  // do something
  Range range = display.getVisibleRange();
  int start = range.getStart();
  updateRowData(start, result);

}
  });
}
  }

Then inside getNodeInfo(T value) of your TreeViewModel just return a new 
DeafultNodeInfo with a new MyDataProvider. In this way your NodeInfo is 
returned syncronously, but the data provider updates itself asyncronously. 
For exampe:

  public  NodeInfo getNodeInfo(T value) {

// do something with the value and return the right DefaultNodeInfo
if(value instanceof MyType1) {
  return new DefaultNodeInfo(
  new SectionDataProvider([pass here value if you want the data 
provider knows about the selected node]),
  new MyCustomCellOrADefaultOne());
}
else if ...
  }

This will retrieve inner elements asynchronously. If you want to do 
something else when a leaf (or a non-leaf) is clicked (or selected), define 
a SelectionModel (it could be a SingleSelectionModel, or a more complex one) 
inside your TreeViewModel and pass it to DefaultNodeInfo. Example:

  // defining
  private SingleSelectionModel selectionModel =
new SingleSelectionModel();

  // inside TreeViewModel ctor (or in a better place)
  selectionModel.addSelectionChangeHandler(new 
SelectionChangeEvent.Handler() {

public void onSelectionChange(SelectionChangeEvent event) {
  // fire rpc, a place change or something else
  // event.getSelectedObject() contains the selected element
}
  });

  // return the DefaultNodeInfo with info about the selection strategy
  public  NodeInfo getNodeInfo(T value) {

// do something with the value and return the right DefaultNodeInfo
if(value instanceof MyType1) {
   return new DefaultNodeInfo(
   new SectionDataProvider(),
   new MyCustomCellOrADefaultOne(),
  selectionModel,
  null);
}
else if ...
  }

Hope that helps,
Andrew.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



R: View GWT RPC traffic

2011-04-15 Thread ciosbel
If you enable gwt logging and set the firebug handler you can see, inside 
firebug Console, the ouput of the serialized /deserialized request / 
response in plain text.
See 
http://code.google.com/intl/it-IT/webtoolkit/doc/latest/DevGuideLogging.html#Different_Types_of_Handlers

If you want to benchmark rpcs timings try this: 
http://code.google.com/p/gwt-debug-panel/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Creating Session ID using java.uti.UUID and ignoring Cookie header

2011-05-01 Thread ciosbel
GWT 2.3 comes with XSRF RPC builtin protection. See 
http://code.google.com/intl/it-IT/webtoolkit/doc/latest/DevGuideSecurityRpcXsrf.html
that's an implementation of what already discussed in an old (but still 
interesting) document: 
http://code.google.com/intl/it-IT/webtoolkit/articles/security_for_gwt_applications.html#xsrf

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Creating a Dialog Box that Returns Data to its Caller

2011-05-15 Thread ciosbel
Or just use the EventBus: once inserted name & number and clicked something 
like "Send", just fire a new event that the caller will hook on.
If your widget is sufficiently complex to provide a two tier design (view & 
logic), put that in the logic (presenter/controller) part.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: TextBox filter

2011-05-20 Thread ciosbel
There is a handy IntegerBox (as well as DoubleBox and LongBox) that you can 
use instead of a simple TextBox. It parses and accepts only integer values 
inside a TextBox.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/user/client/ui/IntegerBox.html

In general if you want something different you can extend a ValueBox giving 
a right parser and renderer.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.3/com/google/gwt/user/client/ui/ValueBox.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT and annotations from JAXB

2010-05-12 Thread ciosbel
I've the same problem. I've followed your instructions and almost
everything has been fixed.
Except for these errors:
  [ERROR] Line 36: No source code is available for type
javax.xml.namespace.QName; did you forget to inherit a required
module?
  [ERROR] Line 198: No source code is available for type
javax.xml.bind.JAXBElement; did you forget to inherit a required
module?

I've also tried to include sources of stax, with no luck.
What i'm missing?

On Apr 27, 4:49 pm, Prieto-Ilarion Bianco  wrote:
> :Hi.
> You have to include source code for mentioned classes into classpath (you can 
> use  tag in your Module.gwt.xml to override java 
> classes).
> I've successfully integrated GWT andJAXBusing this approach.
> Thanks, Bina Prieto. > I have seen a few posts on this and apparently there 
> was a defect that
> > was filed and fixed in 1.5.  I am using GWT 2.0, but I still seem to
> > have this issue.
> > I have several class that are annotated with:
> > import javax.xml.bind.annotation.XmlAccessType;
> > import javax.xml.bind.annotation.XmlAccessorType;
> > import javax.xml.bind.annotation.XmlElement;
> > import javax.xml.bind.annotation.XmlType;
> > But when I run GWT, I get these type of errors:
> > Line 5: The import javax.xml.bind cannot be resolved
> > I included the jar (I am pretty sure it is the right one) that has
> > these annotations in the lib directory of my GWT project, so what else
> > do I need to do? 
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



XML binding/mapping and GWT-RPC

2010-05-13 Thread ciosbel
Hi everyone.
I'm writing an app that make intense use (reading/writing) of xml
configuration
files. My first approach was to use a library that maps/binds xml
files into java
serializable classes, in order to be used via RPC and having them
available
at client-side. To be concrete, i have:
- server-side: binds xml files to java classes using some kind of
library;
- shared-side: where business classes resides that are filled up by
the server
and all are Serializable.
Of course shared-side is compiled to js.

But i'm stucked. I've dig around and tried a lot of libraries (JAXB,
Xstream, XMLBeans...) that should makes this kind of things easier
but,
unfortunately, it seems to me that every one relies on reflection in
some ways
and while i can still use them in server-side, when i try to serialize
them to the
client, a lot of issues came up, because reflection is not part of the
jre subset that
can be freely compiled to js (am i right?).

So, i was wondering if there a way to use such tools (whatever) and
continue
using the whole GWT-RPC mechanism and object serialization to client-
side.
Are there any better solutions?

Thanks is advance,
ciosbel.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: XML binding/mapping and GWT-RPC

2010-05-13 Thread ciosbel
I need to manage xml files (already written), so i thought that
having them binded into serializable POJO's was a good choice.
But none of the technologies mentioned seemed to work in that way.

For example with JAXB you can autogenerate java classes from xsd
schema, having them serializable and usable through gwt rpc service.
But it doesn't work bacause of reflection. Xstream and XMLBeans is
the same.
Am i missing something?

On 13 Mag, 23:51, Mike  wrote:
> Why do you need XML, and not just POJO ?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: XML binding/mapping and GWT-RPC

2010-05-14 Thread ciosbel
> I assume that the files are on your server? If you are trying to set the
> contents of the elements of the xml file, then why not
> use an RPC mechanism that automatically binds them to POJOs on the
> client? (you don't have to use GWT-RPC)
>
> Or am I missing something? If they are stored as XML on the server you
> only need to bind/unbind them once and that should be in the RPC mechanism .

This is exactly what i want to do. But i can't figured it out how.
Binding into POJOs at server-side (XMLs are huge) and having them
available at client side through serialization, is wrong? Possible?
Useless?

Thank you,
ciosbel.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: XML binding/mapping and GWT-RPC

2010-05-14 Thread ciosbel
I've seen that project (and it's quite amazing) but its purpose is
client-side mapping using deferred binding. And i don't want to parse
15K LOC client-side...
And it does not (yet :D) generate xml from the annotated classes.

Thanks anyway.

ciosbel.

On 14 Mag, 19:19, Christian Goudreau 
wrote:
> Take a look at this project
>
> http://code.google.com/p/piriti/
>
> Cheers
>
> Christian
>
>
>
> On Fri, May 14, 2010 at 1:18 PM, ciosbel  wrote:
> > > I assume that the files are on your server? If you are trying to set the
> > > contents of the elements of the xml file, then why not
> > > use an RPC mechanism that automatically binds them to POJOs on the
> > > client? (you don't have to use GWT-RPC)
>
> > > Or am I missing something? If they are stored as XML on the server you
> > > only need to bind/unbind them once and that should be in the RPC
> > mechanism .
>
> > This is exactly what i want to do. But i can't figured it out how.
> > Binding into POJOs at server-side (XMLs are huge) and having them
> > available at client side through serialization, is wrong? Possible?
> > Useless?
>
> > Thank you,
> > ciosbel.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: XML binding/mapping and GWT-RPC

2010-05-16 Thread ciosbel
I think i'll go that way.

Thank you/all.

ciosbel.

On 14 Mag, 22:28, kozura  wrote:
> Server-side translation and sending through serialized classes is a
> fine way to go.  I do it using xmlbeans, but then do a trivial
> conversion to some POJO classes that are much simpler and more compact
> for use on the client side, and of course work through RPC.  I didn't
> actually try seeing if the results of xmlbeans were GWT-serializable,
> they were in any case not well suited for my client side needs, and
> also allowed me deal with references as I required rather than trying
> to make the xmlbeans classes work.  If the xml schema(s) you're using
> aren't too big and don't change much, this is an attractive option.
>
> jk
>
> On May 14, 11:18 am, ciosbel  wrote:
>
>
>
> > > I assume that the files are on your server? If you are trying to set the
> > > contents of the elements of the xml file, then why not
> > > use an RPC mechanism that automatically binds them to POJOs on the
> > > client? (you don't have to use GWT-RPC)
>
> > > Or am I missing something? If they are stored as XML on the server you
> > > only need to bind/unbind them once and that should be in the RPC 
> > > mechanism .
>
> > This is exactly what i want to do. But i can't figured it out how.
> > Binding into POJOs at server-side (XMLs are huge) and having them
> > available at client side through serialization, is wrong? Possible?
> > Useless?
>
> > Thank you,
> > ciosbel.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Get file on server with a pattern

2010-05-20 Thread ciosbel
My problem is that getServletContext always returns null.
I've also tried to put in a overridden init() but didn't help.

ciosbel.

On May 19, 9:23 am, Lorris  wrote:
> Thank you for your answer,
>
> This is my solution if another people need it :
>
> This is the content of my RPC method in server side.
>
> String realPath =
> getServletContext().getRealPath("/").concat(gwtModuleName); // Or
> other folder you want to access
>         File f = new File(realPath);
>         for (String s : f.list()) {
>             if (s.matches(PATTERN)) {
>                 // Do the job
>             }
>
> }
>
> Hope this will help.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Get file on server with a pattern

2010-05-20 Thread ciosbel
Nevermind. I called the getServletContext() inside the constructor
rather that inside an rpc method.

ciosbel.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: showing all the elements from SuggestOracle in suggestionBox

2010-09-07 Thread ciosbel
Instead defining your own oracle (which is, indeed, the best
solution), just use a MultiWordSuggestOracle.
There you can find methods like:

setDefaultSuggestions(Collection
suggestionList)
or
setDefaultSuggestionsFromText(Collection
suggestionList)

You can simply add suggestions to you oracle (oracle.add ...) and then
use one of the above to set default suggestions.
Now, using yourSuggestBoxInstance.showSuggestionList(), *all* your
suggestions will popup.
Remember that the oracle that provides suggestion and the default set
you specified using one of the above are two different things, with
two different purposes. So, if your list of suggestions will change in
future (i.e. after a clear/add in the oracle) just remember to reset
the defaults.

If you want to display them *all* on textbox focus...

yourSuggestBoxInstance.getTextBox().addFocusHandler(new FocusHandler()
{
  public void onFocus(FocusEvent event) {
// showing all default suggestions
yourSuggestBoxInstance.showSuggestionList();
  }
});

Do note also, that with 2.1 milestones the interface of the suggestbox
has been slightly changed. In particular you can now define your own
display for the popup, and use it instead of the default (and a bit
old) one. The custom popup can be defined by either extending
SuggestBox.SuggestionDisplay (if you start from zero), or
SuggestBox.DefaultSuggestionDisplay if you want to start from the
default one.

Hope it helps.

cios.
On 7 Set, 12:46, Santosh kumar  wrote:
> Hi ,
>
> I am adding the items to the suggestoracle on onmodule load. Its working
> fine if the match is found for the key pressed (alphabet) .
> But i want to show *all Existing Items* from the suggestoracle when their is
> no match found for the key pressed (alphabet) by the user ???
>
> Pls let me know if any one knows the solution ..!!
>
>
>
> On Fri, Aug 13, 2010 at 7:19 PM, ctasada  wrote:
> > You can send me a private message attaching the source of your class,
> > so I can take a look.
>
> > I'm using it in my code without problems.
>
> > On Aug 13, 6:33 am, aditya sanas <007aditya.b...@gmail.com> wrote:
> > > Hello,
>
> > > yes you are right we dont have direct access to SuggestBox Popups.
>
> > > I have already extended SuggestOracle and have overridden method
>
> > > requestSuggestion(request,callback);
>
> > > code for the following as follows :
>
> > > public class StartsWithSuggestOracle extends SuggestOracle
> > > {
> > >    //...  some other code...
>
> > > *   �...@override*
> > > *    public void requestSuggestions(Request request, Callback callback) *
> > > *    { *
> > > *        final List suggestions =
> > > computeItemsFor(request.getQuery().toLowerCase(),request.getLimit()); *
> > > *        Response response = new Response(suggestions); *
> > > *        callback.onSuggestionsReady(request, response); *
> > > *    } *
>
> > > }
>
> > > and the underlined method computeItemsFor(); returns me the suggestions
> > > based upon request so as per my
>
> > > logic if request contains no character that is an empty string "" i have
> > > returned all suggestions from oracle object.
>
> > > so here i m able to get this response correctly but i m nt getting wht
> > > should be done next with this response.
>
> > > from where i should give a call to this method and how that list get
> > > populated.
>
> > > I have followed that link suggested by you but that was the same
> > mechanism
> > > that used there.
>
> > > so i m lil confuse why its not showing the response.
>
> > > --
> > > Aditya
>
> > > On Thu, Aug 12, 2010 at 5:50 PM, ctasada  wrote:
> > > > Hi Aditya,
>
> > > > The problem is that you don't have direct access to the SuggestBox
> > > > popup.
>
> > > > If you want to see all the possible solutions you should extend the
> > > > SuggestOracle and implement your own requestSuggestions method (see
> > > > this link for some nice examples:http://development.lombardi.com/?p=39
> > )
>
> > > > In this way yo can simply return all your list, even ignoring the
> > > > limit.
>
> > > > Regards,
> > > > Carlos.
>
> > > > On Aug 12, 10:50 am, Aditya <007aditya.b...@gmail.com> wrote:
> > > > > hi,
>
> > > > > I want to show all elements from the suggestoracle whenever
> > > > > suggestionbox recieves a focus.
>
> > > > > I did some search for it and i found something as follows :
>
> >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
>
> > > > > Now i m able to recieve Response
>
> > > > > this.getSuggestOracle().requestSuggestions(request, new Callback() {
> > > > > @Override
> > > > > public void onSuggestionsReady(Request request, Response response) {
> > > > >                 // here I m getting complete list from suggestoracle
> > > > >         }
>
> > > > > });
>
> > > > > I am able to get list of suggestions in this response but i dnt knw
> > > > > what should i do next...?
>
> > > > > what should be done with this response how this will help me to
> > > > > populate suggestions...?
>
> > > > > Thank 

Re: showing all the elements from SuggestOracle in suggestionBox

2010-09-10 Thread ciosbel
I don't suggest you to do that. I think it's quite misleading for the
user. A better solution should be to show a popup with a message like
"no suggestions found" or something like that.
It's quite simple using 2.1 milestones: extend either
SuggestBox.DefaultSuggestionDisplay or SuggestBox.SuggestionDisplay
and override showSuggestions method, checking if suggestions.size() is
zero and displaying a "no suggestions found" popup instead of the
default one.

If you really want to implement the behavior you mentioned, maybe this
hint could be useful too, but atm i have no idea on how to do that.

ciosbel.
On Sep 8, 1:52 pm, Santosh kumar  wrote:
> Hi *ciosbel*,
>
> Thank you for your reply ..!!
>
> As u said, i am using setDefaultSuggestionsFromText method, its working
> fine.. !!! i thought solution would be very difficult...
> Its coool !! thank you once again !!!
>
> setDefaultSuggestionsFromText(Collection suggestionList)
> using this method, if their is no match found for the key pressed, Here i am
> displaying nothing. But after onChange its displaying the
> DefaultSuggestList.
>
> But my thinking is immediate onPress of the key i have to display the popup
> DefaultSuggestList if their is no match found for the key pressed.
>
> Please let me know if you know the solution ..!!
>
>
>
> On Wed, Sep 8, 2010 at 3:45 AM, ciosbel  wrote:
> > Instead defining your own oracle (which is, indeed, the best
> > solution), just use a MultiWordSuggestOracle.
> > There you can find methods like:
>
> > setDefaultSuggestions(Collection
> > suggestionList)
> > or
> > setDefaultSuggestionsFromText(Collection
> > suggestionList)
>
> > You can simply add suggestions to you oracle (oracle.add ...) and then
> > use one of the above to set default suggestions.
> > Now, using yourSuggestBoxInstance.showSuggestionList(), *all* your
> > suggestions will popup.
> > Remember that the oracle that provides suggestion and the default set
> > you specified using one of the above are two different things, with
> > two different purposes. So, if your list of suggestions will change in
> > future (i.e. after a clear/add in the oracle) just remember to reset
> > the defaults.
>
> > If you want to display them *all* on textbox focus...
>
> > yourSuggestBoxInstance.getTextBox().addFocusHandler(new FocusHandler()
> > {
> >  public void onFocus(FocusEvent event) {
> >    // showing all default suggestions
> >    yourSuggestBoxInstance.showSuggestionList();
> >  }
> > });
>
> > Do note also, that with 2.1 milestones the interface of the suggestbox
> > has been slightly changed. In particular you can now define your own
> > display for the popup, and use it instead of the default (and a bit
> > old) one. The custom popup can be defined by either extending
> > SuggestBox.SuggestionDisplay (if you start from zero), or
> > SuggestBox.DefaultSuggestionDisplay if you want to start from the
> > default one.
>
> > Hope it helps.
>
> > cios.
> > On 7 Set, 12:46, Santosh kumar  wrote:
> > > Hi ,
>
> > > I am adding the items to the suggestoracle on onmodule load. Its working
> > > fine if the match is found for the key pressed (alphabet) .
> > > But i want to show *all Existing Items* from the suggestoracle when their
> > is
> > > no match found for the key pressed (alphabet) by the user ???
>
> > > Pls let me know if any one knows the solution ..!!
>
> > > On Fri, Aug 13, 2010 at 7:19 PM, ctasada  wrote:
> > > > You can send me a private message attaching the source of your class,
> > > > so I can take a look.
>
> > > > I'm using it in my code without problems.
>
> > > > On Aug 13, 6:33 am, aditya sanas <007aditya.b...@gmail.com> wrote:
> > > > > Hello,
>
> > > > > yes you are right we dont have direct access to SuggestBox Popups.
>
> > > > > I have already extended SuggestOracle and have overridden method
>
> > > > > requestSuggestion(request,callback);
>
> > > > > code for the following as follows :
>
> > > > > public class StartsWithSuggestOracle extends SuggestOracle
> > > > > {
> > > > >    //...  some other code...
>
> > > > > *   �...@override*
> > > > > *    public void requestSuggestions(Request request, Callback
> > callback) *
> > > > > *    { *
> > > > > *        final List suggestions =
> > > > > computeItemsFor(request.getQuery().toLowerCase(),request.getLimit(

Re: Importing hellomvp

2010-11-07 Thread ciosbel
Simply create a new java project from existing sources.
Once imported, modify the project properties in order to use gwt 2.1
sdk and the project build path in order to have something like
hellomvp/war/WEB-INF/classes as output directory.

On 7 Nov, 13:04, hezjing  wrote:
> Hi
>
> I have downloaded Tutorial-hellomvp-2.1.zip, but there is no Eclipse project
> metadata (the .project and .classpath files) in the archive.
>
> May I know how to import and run hellomvp into Eclipse?
>
> I think it would be very useful to include the Eclipse project metadata into
> the archive, just like the Tutorial-Contacts.zip :-)
>
> Thank you!
>
> --
>
> Hez

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-dnd

2010-11-09 Thread ciosbel
Of course it is possible.
See live demos 
http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragAndDropDemo/DragAndDropDemo.html
The demo 8 should tell you how (see java sources).

I think you have to tell the drag controller to make a given panel
draggable by a given child.
i.e.

// make the panel draggable by its header
dragController.makeDraggable(verticalPanel, header);

Hope that helps.

On Nov 9, 2:03 am, Alexei Telles  wrote:
> Hi Everybody
>
> I need some drag and drop's in my application.
> Searching GWT group I found gwt-dnd.
>
> I tried some examples and works fine.
>
> But I need to be able to drag and drop a widget that will contain some
> textboxes, buttons, hyperlinks, etc...
>
> I am a little confuse.
> Is possible to make this with gwt-dnd?
>
> The way I did following some examples when I click in a textbox, or a
> button, etc...inside the dragable widget, the textbox does note get
> the focus.
>
> Any advice?
>
> Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Including jQuery in GWT

2010-11-09 Thread ciosbel
I don't know if it's helpful or (given your already coded js) usable,
but there is a clone of jquery for gwt. It's called GQuery.
Take a look http://code.google.com/p/gwtquery/

On 9 Nov, 21:58, Yaakov  wrote:
> Hi,
>
> I have a page that a web designer produced and now I need to add GWT
> into it.
>
> I placed the contents of the HTML between  (not including it)
> into a uiBinder .
>
> In the host page, I have some headers that refer to jQuery and
> javascript that the designer wrote, like this:
>   
>     
>     
>      script>
>