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