Comments (6)
public interface FirstResources extends Resources {
public FirstResources INSTANCE = GWT.create(FirstResources.class);
public interface FirstStyle extends ChozenCss{}
@Override
@Source("FirstCssFile.css")
FirstStyle css();
}
and
public interface SecondResources extends Resources {
public SecondResources INSTANCE = GWT.create(SecondResources.class);
public interface SecondStyle extends ChozenCss{}
@Override
@Source("SecondCssFile.css")
SecondStyle css();
}
Should work ?
from gwtchosen.
Yeah, that's exactly what I did. When I open the first view that has a
chosen with FirstResources and then close it and open the second view with
a chosen with Second Resources - than the chosen drop down suggestions
appear on the upper right side of the screen (the chosen box is located
somewhere in the middle of the screen)
If I open the second view first, than it works perfectly....
:/
On Feb 27, 2013 12:24 AM, "Julien Dramaix" [email protected] wrote:
public interface FirstResources extends Resources {
public FirstResources INSTANCE = GWT.create(FirstResources.class);public interface FirstStyle extends ChozenCss{} @Override @Source("FirstCssFile.css") FirstStyle css();}
and
public interface SecondResources extends Resources {
public SecondResources INSTANCE = GWT.create(SecondResources.class);public interface SecondStyle extends ChozenCss{} @Override @Source("SecondCssFile.css") SecondStyle css();}
Should work ?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-14143764
.
from gwtchosen.
You have to also inject manually the second css (before to call chosen):
//true is important here to force the injection at the time you call the method
StyleInjector.inject(SecondResources.INSTANCE.css().getText(), true);
from gwtchosen.
10x, I'll give it a try.
Is there a difference between calling the line you mentioned and
SecondResources.css().ensureInjected()? (that's what I'm doing now)
On Feb 27, 2013 9:18 AM, "Julien Dramaix" [email protected] wrote:
You have to also inject manually the second css (before to call chosen):
//true is important here to force the injection at the time you call the methodStyleInjector.inject(SecondResources.INSTANCE.css().getText(), true);
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-14160393
.
from gwtchosen.
Cool, yet works magically!
So why does that work and INSTANCE.css().ensureInjected(); doesn't?
שוקי.
On Wed, Feb 27, 2013 at 9:21 AM, שוקי קפון [email protected] wrote:
10x, I'll give it a try.
Is there a difference between calling the line you mentioned and
SecondResources.css().ensureInjected()? (that's what I'm doing now)
On Feb 27, 2013 9:18 AM, "Julien Dramaix" [email protected]
wrote:You have to also inject manually the second css (before to call chosen):
//true is important here to force the injection at the time you call the methodStyleInjector.inject(SecondResources.INSTANCE.css().getText(), true);
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-14160393
.
from gwtchosen.
SecondResources.INSTANCE.css().ensureInjected() will inject the css in the dom at the end of the loop.
StyleInjector.inject(SecondResources.INSTANCE.css().getText(), true); forces the style to be injected at the time the method is called.
Chosen needs that the style is applied before to call it, otherwise a number of dimension computation are wrong.
from gwtchosen.
Related Issues (20)
- Missing classes into default chosen.gss
- ChosenValueListBox on change event is not fired HOT 2
- Error on demo page in custom filtering HOT 4
- Error "this.selectedItem is undefined" when add new items to ChosenListBox and update it HOT 2
- Is it possible to use gwtchosen as searchbox for multiple custom search terms? HOT 2
- X icon with multiple select chosen isn't centered
- No space in No results text HOT 1
- ChosenValueListBox allowSingleDeselect not working as expected HOT 17
- opt group dissapears on mobile gwtchosen view when select/deselecting its options HOT 2
- Make sure that box-sizing is set to content-box HOT 1
- Groups are not displayed when using a custom ResultFilter
- Using a custom ProvidesKey will cause an error in MultiChosenValueBox
- ShowingDropDownEvent missfired in iPad HOT 2
- ChosenChangeEvent fired only on selection (not deselection) HOT 1
- ChosenListBox.wrap() leads to NPE
- gwtchosen select box closes when clicking scrollbar (using IE) HOT 1
- Chosen List Box Width problems (too narrow)
- Custom Results Filter Resets Selected Options
- Failed to upgrade from GWT 2.7.0 to 2.8.0 HOT 2
- Chosen not Filtering Correctly and Error When Using Down Arrow Key to Select Results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwtchosen.