Thursday, February 28, 2013

CssResource RTLsupport, textBox issue

Currently when injecting a style using a ClientBundle interface like this TasklistResourceBundle.INSTANCE.style().ensureInjected();  

If we set the locale ?locale=ar_iq to arabic everything is moved to the RHS which is fine, however when typing into textBoxes the cursor is positioned on the left not the right.

The css we are injecting

.tasklistwidget {
width: 100%;
height: 100%;
}

I have found a workaround, but struggling to understand how this works.

i have created another CSS file

.tasklistwidget {
float:right;
direction: rtl;
width: 100%;
height: 100%;
}

and inject this instead. The text box now functions as expected and all elements are on the RHS.


Here is our extent of ClientBundle interface

public interface TasklistResourceBundle extends ClientBundle
{
public static final TasklistResourceBundle INSTANCE = GWT.create(TasklistResourceBundle.class);

/* note the source path is relative to the location of this file! */
@Source("css/tasklist-widget.css")
@CssResource.NotStrict
CssResource style();
@Source("css/tasklist-widgetRTL.css")
@CssResource.NotStrict
    CssResource styleRTL();
}

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment