Comments (8)
It's something I wanted to add before the first release but I forgot.
Try with the last snapshot : https://github.com/jDramaix/gwtchosen/raw/master/release/gwtchosen-1.0.3-snapshot.jar
ChosenOptions options = new ChosenOptions();
options.setResources(GWT.<MyResources>create(MyResources.class));
ChosenListBox box = new ChosenListBox(options);
from gwtchosen.
It is working just fine, thanks!
Minor glitch: all other setXXX() methods return ChosenOptions, i.e. "return this;" while ChosenOptions.setResources() returns void. Of course this is not a showstopper at all.
from gwtchosen.
you right. commit 2719745 correct that
from gwtchosen.
Hi!
I would also like to change to font size as ivmarkov wanted to but I am finding it difficult to understand the way of customizing the css which is presented in your comment jDramaix. I hope you can help me even though I know the last message was written 9 months ago ;)
I have written this:
ChosenOptions options = new ChosenOptions();
options.setResources(GWT. create(CustomChosenRecources.class));
marketSegmentListTest = new ChosenListBox(options);
and have created the CustomChosenResources like this:
import com.google.gwt.resources.client.DataResource;
import com.watopi.chosen.client.resources.ChozenCss;
import com.watopi.chosen.client.resources.Resources;
public class CustomChosenRecources implements Resources{
@Override
public ChozenCss css() {
// TODO Auto-generated method stub
System.out.println("Does this even show?");
return null;
}
@Override
public DataResource chosenSprite() {
// TODO Auto-generated method stub
return null;
}
}
But the System printline is never printed and the program crashes with the following errors:
00:00:16,018 [DEBUG] Rebinding com.watopi.chosen.client.resources.CustomChosenRecources
00:00:16,018 [DEBUG] Invoking generator com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
00:00:16,018 [ERROR] com.watopi.chosen.client.resources.CustomChosenRecources is not an interface.
00:00:16,018 [ERROR] Deferred binding failed for com.watopi.chosen.client.resources.CustomChosenRecources'; expect subsequent failures
What am I doing wrong? And a following question: if I got it to work, where would I call for my own css?
from gwtchosen.
00:00:16,018 [ERROR] com.watopi.chosen.client.resources.CustomChosenRecources is not an interface.
Your Custom resource should be an interface. Check the gwt documentation : http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#ClientBundleExamples
from gwtchosen.
We use a regular CSS file to style our GWT application. Customers may define a custom CSS to apply some changes. Thus I would like to avoid to bundle any resources which can not be changed without building the code. So is there a way to override the CSS classes with an external CSS?
from gwtchosen.
Try to use the @external
at-rule : http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#External_and_legacy_scopes
from gwtchosen.
Thanks, I tried it already and it works. I have implemented a custom resource class which uses a copy of the original chosen CSS file. Compared to the original version my CSS file has one additional line to avoid CSS class name obfuscation:
@external .chzn-*;
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.