Hi, 

I have written a little webapp f.e. "myWebapp" there I use CSS Resourses 
like they are discribe at the GWTProject site.

Now I need that other Web Apps that use my WebApp as an jar file can change 
the css resource. 


I found this 
post<https://groups.google.com/forum/#!msg/google-web-toolkit/QbWqzBR72Mo/haVHjFgVIbwJ>
 here 
at GWTGroup. And I try to write the factories and than use the replacement. 
Here is the code :


The Original Resource:
public interface PSGResources extends ClientBundle
{
  public static final PSGResources INSTANCE = GWT.create( 
PSGResources.class );
  
  @Source("com/SchumannGmbH/cam/web/mobile/mobile.css")
  MobileCss mobileCss();
}

The Resource where I change the path to css file:

public interface VHVResources extends PSGResources {

@Override
@Source("mobile.css")
public MobileCss mobileCss();
}
 
Here the Factory where I call the first resource:

public class PSGResourceFactory
{

  public static PSGResources newInstance()
  {
    return GWT.create( PSGResources.class );
  }


Here the Factory with the new Resource:

public class VHVResourceFactory extends PSGResourceFactory {
 public static PSGResources newInstance(){
return GWT.create(VHVResources.class);
}

}

And here my entry in gwt.xml:

<replace-with
class="com.SchumannGmbH.cam.web.vhv.client.stylePatch.VHVResourceFactory">
<any>
<when-type-is
class="com.SchumannGmbH.cam.web.client.resources.PSGResourceFactory" />
</any>
</replace-with>

Maybe someone can help me to get this work ? 

Thanks in advance 

Dominic 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to