Jarrod, you could try to code 2 versions of that class, say
UploaderWidget and UploaderWidgetIE, and dinamically switch from one
to another with (almost) the same rules

On Dec 15, 8:13 pm, jarrod <[email protected]> wrote:
> Actually, I was just struggling with this a bit... I have my two
> ui.xml templates setup, but I can't seem to get GWT.create() to select
> the right one. Here's what I tried:
>
> @UiTemplate("JavaApplet.ui.xml")
> interface JavaApplet extends UiBinder<Element, UploaderWidget> {
>
> }
>
> @UiTemplate("JavaAppletIE.ui.xml")
> interface JavaAppletIE extends JavaApplet {
>
> }
>
> JavaApplet binder = GWT.create(JavaApplet.class);
>
> The following rules were defined in my module:
>         <replace-with
> class="com.playonsports.web.uploader.client.JavaAppletIE">
>                 <when-type-is
> class="com.playonsports.web.uploader.client.JavaApplet" />
>                 <any>
>                         <when-property-is name="user.agent" value="ie6" />
>                         <when-property-is name="user.agent" value="ie8" />
>                 </any>
>         </replace-with>
>
> But unfortunately, I just get compiler errors:
> 12/15/09 12:45:14 PM EST: [INFO] Compiling module
> com.playonsports.web.uploader.Uploader
> 12/15/09 12:45:21 PM EST: [INFO]    [ERROR] Errors in 'file:/C:/Users/
> jcarlson/Projects/com.playonsports.web.uploader/src/main/java/com/
> playonsports/web/uploader/client/UploaderWidget.java'
> 12/15/09 12:45:21 PM EST: [INFO]       [ERROR] Line 16:  Rebind result
> 'com.playonsports.web.uploader.client.JavaAppletIE' must be a class
> 12/15/09 12:45:21 PM EST: [INFO]    [ERROR] Cannot proceed due to
> previous errors
>
> I guess that makes sense, but how does one get around this?
>
> On Dec 15, 11:44 am, John Tamplin <[email protected]> wrote:
>
>
>
> > On Tue, Dec 15, 2009 at 11:29 AM, jarrod <[email protected]> wrote:
> > > Combined with the ability to use different ui.xml templates documented
> > > here:
>
> > >http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Ap...
> > > I should be able to declare one ui.xml for IE and another for
> > > everything else. I'll try that next and that would really simplify
> > > things.
>
> > Speaking of that example,  shouldn't the GWT.create calls refer to
> > RedBinder/BlueBinder?
>
> > --
> > John A. Tamplin
> > Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to