Comments (7)
"class" is not a property of the control, thus it cannot be used in databinding.
Usually you do not want styling information in your model as it defeats the purpose of the MVC pattern.
One workaround for your exact behavior would be to extend the used control and add a property that you can render any way you want in your own renderer,
What problem do you want to solve here? There are usually better ways.
Best regards,
Jens
from openui5.
Status is semantic information, so this definitely belongs in the model.
Here is an example of one way you could solve this: http://jsbin.com/sefiw/5/edit?html,output
from openui5.
Thanks for the fast response.
In my case, the model contains only a field named "status". For each status we wanna set custom styles (font-size, font-color and background color of the cell).
So I thought, that the simplest way would be to create a css class with the name of the status and just bind them to the cell.
So what's your recommended way to implement this?
Best regards,
Martin
from openui5.
Using factory function could also be another approach for the list.
https://openui5.hana.ondemand.com/#docs/guide/91f057786f4d1014b6dd926db0e91070.html
from openui5.
@sirion Thanks for the example. This is exactly what I'm looking for.
from openui5.
Glad I could help. :)
from openui5.
Thank you for your help! This article helped me.
from openui5.
Related Issues (20)
- Planning Calendar onCellPress Issue HOT 2
- How to use for Smart Filter for customize views HOT 1
- AnalyticalTable mandatory filters HOT 1
- oFocusInfo lacks documentation HOT 2
- sap.m.ComboBox does not allow user to type in the whole word, instead it jumps to the second letter you typed HOT 1
- `status` parameter of `uploadComplete` event for `sap.ui.unified.FileUploader` should be of type `int` HOT 3
- `_enforceNoReturnValue.js` does not allow for async lifecycle hooks HOT 4
- sap.ui.layout.form.SimpleForm Aggregation Clone Issue HOT 1
- ui5 1.120.11 Unnecessary and unwanted scrollbar on sap.m.TabContainer HOT 4
- Custom Colors on CalendarAppointments are breaking the "selected" behaviour HOT 1
- sap.m.MessageBox: undeprecate usage of sap.ui.core.Control as vMessage HOT 3
- [ui5-input]: Clear icon is not getting focus from keyboard HOT 3
- Color Palette Popover and Color Picker not showing selected color in a user-friendly way HOT 3
- sap.ui.model.type.Currency shortRefNumber does not work with 1000 HOT 7
- Calendar appointment row item component HOT 3
- sap.m.upload.UploadSet incompleteItem setSelectItem does not work HOT 3
- sap.m.upload.UploadSet aggregations do not get an update as uploadState property shifts HOT 1
- sap.m.ColumnListItem custom Detail icon HOT 4
- sap.m.UploadSet removeIncompleteItem() does not remove the last items HOT 1
- CSRF Card example does not run; functionality unclear HOT 3
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 openui5.