Perhaps you can use the @UiTemplate annotation?

Check out the very bottom of 
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

I can't find any documentation about the specifics of this, but it
looks promising.

On May 11, 2:51 pm, Yaakov Chaikin <[email protected]> wrote:
> Hi Sri,
>
> This wouldn't really work for me as we are using maven and maven has
> specific standard directory structure. I guess, I could modify the
> pom.xml to see those additional directories as source directories as
> well, but all that work in maven that would kinda defeat the purpose
> for me, i.e., it would now move the "mess" to maven and having to deal
> with maven over this is not worth it for us at this point.
>
> I just want to know if it's possible to do this with pure GWT solution or not.
>
> Anyone know?
>
> Thanks,
> Yaakov.
>
> On Tue, May 11, 2010 at 2:39 PM, Sripathi Krishnan
>
>
>
> <[email protected]> wrote:
> > If you just want to keep your java, css and ui.xml code in different
> > folders, there's an easier technique. Create two folders parallel to src -
> > "uibinder" and "css". Or whatever you want to name it. Then add these
> > folders to the sourcepath in eclipse. These three folders should have the
> > same package hierarchy, so GWT will be able to find ui.xml and css files
> > without any problem.
> > In our project, the above convention helps us to separate ui code from java
> > code. Keeps the ui folks from stepping over developers toes.
> > --Sri
>
> > On 11 May 2010 21:23, Yaakov <[email protected]> wrote:
>
> >> Hi,
>
> >> Does anyone know if there is a way to place the ui.xml files in a
> >> separate from its Java counterpart file package?
>
> >> What I have to have is essentially the following package structure:
> >> view - All Java uibinder classes
> >> view.uibinder - All .ui.xml files
> >> view.uibinder.resources - All .css files.
>
> >> I found the @UiTemplate annotation that allowed me to successfully
> >> move the ui.xml files into the view.uibinder package and just refer to
> >> those in the Java file with @UiTemplate("uibinder/someView.ui.xml").
>
> >> Unfortunately, all the references to the resources, although showing
> >> no errors in Eclipse, start breaking on GWT compile. So, for example,
> >> if I have the following in my ui.xml:
> >> <ui:style field='myStyle' src='resources/style.css' />
>
> >> When compiled, the error says that it can't find the style when lookin
> >> in view/resources/styles.css. Note the lack of "uibinder" directory in
> >> the error message!
>
> >> Upon further testing, it seems clear that when the ui.xml files gets
> >> ingested into its Java counter part, it copies that 'src' path
> >> verbatum, without adjusting it first. I know this because if I put "../
> >> resources/style.css", the error message will come with that it can't
> >> find the path and show that it's looking in "view/../resources/
> >> style.css"
>
> >> Is there some annotation or some flag I am supposed to provide to get
> >> this to work or is the location of the .ui.xml file forever stuck with
> >> the location of its counterpart Java file?
>
> >> Thanks,
> >> Yaakov.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected].
> >> 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 [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to