Re: ExtVal: Rendering component with visual indication for required fields
hi tom, some additions: first of all: thx for your questions. such questions allow us to improve the documentation! (+ usually there is a simple solution provided by extval and you don't have to care about such extval internals.) @renderer interceptors: the concept allows extval to do all the magic it offers. however, usually it's an internal concept. you just need it e.g. for add-ons (the label support you would like to implement is such an add-on) *...@meta-data transformers* if you have custom constraints, you normally impl. a meta-data transformer for each annotation you would like to use for component initialization. *and that's it.* * * *(in case of bv it's a bit more difficult - e.g.: you have to care about group validation, composite constraints,...).* * * you can transform information provided by concrete meta-data to a generic representation. e.g. @Size (bv) and @Length (extval) provide the same information. so you just have to impl. a transformer e.g. for @Size which extracts the information. as soon as you forward the extracted information to extval, the framework does the rest (if it knows how to handle the provided information). so you don't have to care about all the other details and internals. @component initialization (i just use trinidad as concrete example): you just have to impl. a component initializer e.g. for your component lib if - you have (input) components which provide special features and the components aren't supported by extval (or an extval-add-on). - you have a new type of meta-data (e.g. if you would like to add a client-side validator for validating @EMail) e.g. trinidad offers client-side validation. so the optional trinidad module of extval uses the information provided by the transformers to add client-side validators and to set properties of the trinidad components. so trinidad isn't aware of extal. it just gets plain (initialized) trinidad components. the trinidad support module isn't aware of a concrete annotation like @Length - it just knows that there is a generic representation to express e.g. min and max length (independent of the used constraint). -> you get client-side validation based on constraints and support modules like the trinidad module aren't aware of the concrete annotations. so you can impl. your custom constraints or use bv constraints,... - as soon as you transform the provided information to a known (generic) format, extval is able to use the information to prepare the components for the rendering process. (+ there are further possibilities which depend on the concrete company/projects.) @your suggestion: as you see - you don't have to use all mechanisms provided by extval - your impl. also works. the only downside is that you have to support features like group validation, composite constraints, validation payload,... on your own (+ the impl. depends on a bv constraint - so we can't use it as generic add-on). if you impl. it based on my example (just without trinidad), you could reuse all features provided by extval and you don't have to care about mechanisms like group-validation,... - you can delegate such tasks to extval. additional hint: the trinidad support module autom. activates initialization of the required attribute [1] (by default initialization of the required attribute is deactivated) -> if you use my suggestion without trinidad, you also have to activate the initialization of the required attribute in the startup listener. regards, gerhard [1] https://svn.apache.org/repos/asf/myfaces/extensions/validator/trunk/component-support/trinidad-support/src/main/java/org/apache/myfaces/extensions/validator/trinidad/startup/TrinidadModuleStartupListener.java http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces 2010/4/27 Rudy De Busscher > Hi Tom, > > a little more explanation of the *"... and do the component initialization > of this EditableValueHolder"* . > > When you have an outputLabel in the RendererInterceptor, the > EditableValueHolder that goes with it, (the component referenced in the for > attribute) isn't initialized by ExtVal yet. So if you ask the Required > attribute of it, it will return false, no matter what annotations there are > placed on the property in the backing bean. (except of course when you have > set the required attribute in the screen). > > So if you want to know if the input field is required at that time you must > analyze the annotations. The method > ExtValUtils.configureComponentWithMetaData() does just that so you can look > at the required property of the UIInput after the method executed. > > Why RendererInterceptor and component initialization ?? > Well the RendererInterceptor has more functionality then just intercepting > the rendering of the component. It adds extra functionality for encode and > decode. So the component initializer is made to add information from the > annotations to
Re: ExtVal: Rendering component with visual indication for required fields
Hi Tom, a little more explanation of the *"... and do the component initialization of this EditableValueHolder"* . When you have an outputLabel in the RendererInterceptor, the EditableValueHolder that goes with it, (the component referenced in the for attribute) isn't initialized by ExtVal yet. So if you ask the Required attribute of it, it will return false, no matter what annotations there are placed on the property in the backing bean. (except of course when you have set the required attribute in the screen). So if you want to know if the input field is required at that time you must analyze the annotations. The method ExtValUtils.configureComponentWithMetaData() does just that so you can look at the required property of the UIInput after the method executed. Why RendererInterceptor and component initialization ?? Well the RendererInterceptor has more functionality then just intercepting the rendering of the component. It adds extra functionality for encode and decode. So the component initializer is made to add information from the annotations to the UIComponent just before rendering. But the interceptor is also responsible for coordination of the validation after a decode is done. In your case, a label has nothing to decode so there is no need to have this separation. Hopes this clarifies a bit. regards Rudy. On 27 April 2010 21:25, Tom M. wrote: > Hi Gerhard, > > what I had already used before asking in the mailing list was: > - ExtVal Core > - BeanValidation (using JSR-303 annotations) > - PropertyValidation (using basic code for custom cross validation > annotation and provided out-of-the-box annotations such as @RequiredIf) > - I did not want to use Trinidad since other component libraries are to be > used in the project. > - I have absolutely no validation code in the html templates (no validator > tags, no required attribute, nothing of that at all), only using > annotations > and in consequence separating page structure/layout from validation rules > in > the domain objects (also founded in the organization of the development > teams). > > This combination works perfect so far: validating the data according to the > annotations, transforming messages und even generating a html maxlength > attribute for @Size.max (nice!). > > Since I found it quite hard to understand how ExtVal is working in detail > (even with your hints and links stated), I found a very simple solution > that > is working for me: > - I asked myself why do I need a renderer interceptor AND a component > initializer? From my point of view adding the '*' to the label text is more > a question of rendering the label's text. And I could not figure out what > Rudy meant with "... and do the component initialization of this > EditableValueHolder" or what to do since I want to change the label not the > input component. > - By obmitting the component initializer, there is no need for meta data > and > a transformer... > - I used some code I found in ExtVal classes, especially from ExtValUtils. > > So this is my simple (non standard?) solution which works for the @NotNull > annotation: > > public class RequiredLabelRendererInterceptor extends > AbstractRendererInterceptor { > >public static final String REQUIRED_SYMBOL = "*"; > >@Override >public void beforeEncodeBegin(FacesContext facesContext, UIComponent > uiComponent, Renderer wrapped) throws IOException { > >if (uiComponent instanceof HtmlOutputLabel) { > >HtmlOutputLabel labelComp = (HtmlOutputLabel) > uiComponent; >UIComponent inputComp = ...; // find by label > attribute 'for' > >MetaDataExtractor extractor = > createMetaDataExtractor(); >for (MetaDataEntry entry : > extractor.extract(facesContext, inputComp).getMetaDataEntries()) { > checkAndHandleRequiredAttribute(labelComp, > entry.getKey()); >} >} >} > >private MetaDataExtractor createMetaDataExtractor() { >return ExtValContext.getContext().getFactoryFinder() > > .getFactory(FactoryNames.COMPONENT_META_DATA_EXTRACTOR_FACTORY, > ComponentMetaDataExtractorFactory.class) >.create(); >} > >private void checkAndHandleRequiredAttribute(HtmlOutputLabel > labelComp, String key) { > >if (NotNull.class.getName().equals(key)) { >String label = (String) labelComp.getValue(); >if (!label.startsWith(REQUIRED_SYMBOL)) { > > labelComp.setValue(REQUIRED_SYMBOL+labelComp.getValue()); > } > } >} > } > > A question to: > >> e.g.: instead of using coreOutputLabel at: > >> ExtValUtils.configureComponentWithMetaData(facesContext, > >> coreOutputLabel, metaDataResult); you could use the targetComponent > >> (= the input component). after this
AW: ExtVal: Rendering component with visual indication for required fields
Hi Gerhard, what I had already used before asking in the mailing list was: - ExtVal Core - BeanValidation (using JSR-303 annotations) - PropertyValidation (using basic code for custom cross validation annotation and provided out-of-the-box annotations such as @RequiredIf) - I did not want to use Trinidad since other component libraries are to be used in the project. - I have absolutely no validation code in the html templates (no validator tags, no required attribute, nothing of that at all), only using annotations and in consequence separating page structure/layout from validation rules in the domain objects (also founded in the organization of the development teams). This combination works perfect so far: validating the data according to the annotations, transforming messages und even generating a html maxlength attribute for @Size.max (nice!). Since I found it quite hard to understand how ExtVal is working in detail (even with your hints and links stated), I found a very simple solution that is working for me: - I asked myself why do I need a renderer interceptor AND a component initializer? From my point of view adding the '*' to the label text is more a question of rendering the label's text. And I could not figure out what Rudy meant with "... and do the component initialization of this EditableValueHolder" or what to do since I want to change the label not the input component. - By obmitting the component initializer, there is no need for meta data and a transformer... - I used some code I found in ExtVal classes, especially from ExtValUtils. So this is my simple (non standard?) solution which works for the @NotNull annotation: public class RequiredLabelRendererInterceptor extends AbstractRendererInterceptor { public static final String REQUIRED_SYMBOL = "*"; @Override public void beforeEncodeBegin(FacesContext facesContext, UIComponent uiComponent, Renderer wrapped) throws IOException { if (uiComponent instanceof HtmlOutputLabel) { HtmlOutputLabel labelComp = (HtmlOutputLabel) uiComponent; UIComponent inputComp = ...; // find by label attribute 'for' MetaDataExtractor extractor = createMetaDataExtractor(); for (MetaDataEntry entry : extractor.extract(facesContext, inputComp).getMetaDataEntries()) { checkAndHandleRequiredAttribute(labelComp, entry.getKey()); } } } private MetaDataExtractor createMetaDataExtractor() { return ExtValContext.getContext().getFactoryFinder() .getFactory(FactoryNames.COMPONENT_META_DATA_EXTRACTOR_FACTORY, ComponentMetaDataExtractorFactory.class) .create(); } private void checkAndHandleRequiredAttribute(HtmlOutputLabel labelComp, String key) { if (NotNull.class.getName().equals(key)) { String label = (String) labelComp.getValue(); if (!label.startsWith(REQUIRED_SYMBOL)) { labelComp.setValue(REQUIRED_SYMBOL+labelComp.getValue()); } } } } A question to: >> e.g.: instead of using coreOutputLabel at: >> ExtValUtils.configureComponentWithMetaData(facesContext, >> coreOutputLabel, metaDataResult); you could use the targetComponent >> (= the input component). after this call you can check if the >> targetComponent is required. Does that mean after configuring the component's attribute 'required' would be set? I didn't try that. Is there really a need for the component initialize and initiating the call via ExtValUtils.configureComponentWithMetaData()? For my already mentioned @RequiredExactlyOneOf cross validation annotation (which works fine regarding validation), I managed to render all labels belonging to the specified attributes via the renderer interceptor. But this only works if the annotation is defined at the attribute that occurs first in the html in order to manipulate the labels that are rendered later on. Possibly there would be a better solution to avoid this tight coupling by really using ExtVal's infrastructure!? Tom > -Ursprüngliche Nachricht- > Von: Gerhard Petracek [mailto:gerhard.petra...@gmail.com] > Gesendet: Dienstag, 27. April 2010 00:45 > An: MyFaces Discussion > Betreff: Re: ExtVal: Rendering component with visual indication for > required fields > > hi thomas, > > basically you have 3 possibilities with extval: > - use simple but dynamic validation, jpa based validation and > cross-validation -> use extval-core + extval-property-validation (+ > your > custom constraints) > - use bean-validation + some advanced extval mechanisms for it -> use > extval-core + extval-bean-validation + an impl. of bv (+ custom > bv-constraints) > - create
Re: [TOBAGO] How to add new css to Tobago
Hi, for panel you should use tobago-panel-markup-important. The gridlayout is just the panel content. Regards, Volker 2010/4/27 tobagouser : > > Hi Udo, > > I created a new markup for box and its worked.Thanks for that.I tried to > create a markup for panel in the same way. > > I observed the selected styles through firebug ,for box its taking new > tobago-box-markup-important style. > > but for panel its not picking the new tobago-gridLayout-markup-important > style. > > please find the content of tobago-theme.xml > > > standard > Standard Theme > > org.apache.myfaces.tobago.context.StandardTheme > org/apache/myfaces/tobago/renderkit > > > > Box > > important > > > > GridLayout > > important > > > > > > > > > This is little bit surprising. Please let me know how to resolve this.. > > KSK > > > > Udo Schnurpfeil wrote: >> >> Hi, >> >> there is no style class "tobago-box-footer" defined for any HTML tag. So >> the style will not be applied. >> >> When you want to give some panels a different style, you can assign a >> markup like: >> > this will result in HTML with the class "tobago-panel-markup-important". >> Than you can define a style for that class. >> First, you have to register a markup for a renderer. See: >> http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup >> >> If you want to see which styles from which files will be applied, you >> may use Firebug, or any other browser development tool, which are very >> helpful. >> >> Regards, >> >> Udo >> >> Am 26.04.10 20:06, schrieb tobagouser: >>> Hi Udo,Helmut >>> >>> Thanks for the info.Its really useful. >>> >>> My requirements are >>> >>> 1.I want to have a different background color and shade to some of the >>> panels in the pages.This color and shade should be different from the >>> default panel css ,so it should have a different css . >>> >>> 2.As mentioned earlier I want to add a new css to the border footer.I >>> added >>> it similar to the box header css in the speyside style.css file ..like >>> >>> .tobago-box-footer { >>> values here... >>> } >>> >>> But this footer css never applied on the pages. >>> >>> please let me know whether tc:style tag applies at the page level only >>> or >>> applies at the child tags like panel and box. >>> >>> also please let me know how to add a new css to box footer and why the >>> above css does not worked. >>> >>> Thanks, >>> KSK >>> >>> Udo Schnurpfeil wrote: >>> Hi, The simple way: You can also put a file "style/style.css" (exactly this name) in the webapp directory. The ResourceManager will find it and add it to the list of needed resources. The style will be effect all Tobago pages in one application. Helmut solution is also possible. The advantage is, you can decide, which pages need the style. It is also possible to make changes in more than one theme, if needed. If you want to make bigger changes to the design of the pages (specially for more than one application), you may want to write a Tobago theme, that contains your custom look and feel. Regards, Udo Am 22.04.10 15:55, schrieb Helmut Swaczinna: > Hi, > > wich style.css do you mean exactly? Where is it located? You can add > your own styles with the tc:style tag, e.g. style="style/mystyles.css" />, under your resource path. > > Regards > Helmut > > > Am 22.04.2010 15:51, schrieb tobagouser: > >> Any inputs on this please.. >> >> >> tobagouser wrote: >> >>> Hi All, >>> >>> I have tried to add tobago-box-footer to the style.css ,but it never >>> affected the pages.Please could you let me know how to add a new css >>> to >>> tobago. >>> >>> Thanks, >>> KSK >>> >>> >>> >>> >> > >>> >> >> > > -- > View this message in context: > http://old.nabble.com/How-to-add-new-css-to-Tobago-tp28288029p28378878.html > Sent from the MyFaces - Users mailing list archive at Nabble.com. > > -- inexso - information exchange solutions GmbH Bismarckstraße 13 | 26122 Oldenburg Tel.: +49 441 4082 356 | FAX: +49 441 4082 355 | www.inexso.de
Re: [TOBAGO] problem selecting current item in tx:selectOneChoice
Hello Udo, thanks for the comprehensive answer. I decide to use solution no. 5 and it works fine for me. But I dont't use enums because the underlying objects are also used for hibernates and it'makes some trouble to mapped them to the hibernate datatypes. I'm not really understanding why the mapping does not works with but for know I have a working solution. Thanks & best regards Michael Udo Schnurpfeil schrieb: Hi Michael, there are more than one solution for that, but as far as I know there is not cast operator... 1. use a managed bean faces-config.xml: intValues java.util.ArrayList application java.lang.Integer 0 1 2 JSP/Facelet: (simple, scales not good, works with JSF 1.1, 1.2 and JSP and Facelets) 2. write a EL-function AFAIK: works with facelets and/or JSF 1.2 but may not work with JSP and JSF 1.1. What do you are using? 3. write a converter that implements the list, or map interface and use it as managed bean (a little bit complicated, scales good, works with JSF 1.1, 1.2 and JSP and Facelets) 4. write an additional getter/setter activeLong. (needs Java) 5. use (instead of ) and you may also want to use enums. (may be the best solution but more work, needs Java 1.5, scales good, refactoring is easy: there is only one position in the code to define the values, type save: use the enum in your Controller, so you know the meaning of the value from the enum) For a simple application or demo I would prefer #1 or #4, for an enterprise application I would prefer #5... Regards, Udo Am 22.04.10 22:33, schrieb Michael Kakuschky: Hello Udo, hello Volker, both together (using braces for EL expression and long data type for getter and setter) helped to get the tx:selectOneChoice working like expected :-) Since I use many int getters and setters where I want to use the tx:selectOneChoice component it would be nice if there is some way to convert the int to long in EL. It would help to save a lot of work.. Thanks & best regards Michael Udo Schnurpfeil schrieb: Hi, there is still a little problem with that. #{0} is a Long value, so the getter/setter needs be a also a Long and not an Integer. I don't know, if in EL there is something like a "cast" operator... Regards, Udo Am 22.04.10 18:20, schrieb Volker Weber: Hi Michael, (btw yes i work together with Dirk Fangohr. sorry for the delay, was a bit busy last Friday) the problem is you has int as value in getActive() but String in select items. Try you don't need a converter! Regards, Volker 2010/4/21 Michael Kakuschky: Hello, I have a strange problem selecting the correct item of tx:selectOneChoice boxes if the itemValue of the tc:selectItem item is an Integer. Storing the selected values works fine as aspected. I will find the correct values in mybackend database What does not work is that after rerendering the correct value is selected. If in my example the MyController.active Integer attribute has a value of 1 "suspended" should be selected. But it's always the first value of the tc:selectItem elements selected. I tried already to use a converter because I guessed that there is an conversion problem between Integer and String but it does not help. If the selectItem bind to a String it works fine (sure without the integerConverter). With the tomahawk h:selectOneMenu component it works also with Integers. Knows anybody how to solve this problem for tobago to use an Integer as value attribute? public class MyController{ private Integer active = 1; public Integer getActive() { return active; } public void setActive(Integer active) { this.active = active; } } public class IntegerConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { return Integer.getInteger(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { if (value instanceof Integer) { return ((Integer) value).toString(); } return ""; } } Thanks and best regards Michael
Re: [TOBAGO] How to add new css to Tobago
Hi Udo, I created a new markup for box and its worked.Thanks for that.I tried to create a markup for panel in the same way. I observed the selected styles through firebug ,for box its taking new tobago-box-markup-important style. but for panel its not picking the new tobago-gridLayout-markup-important style. please find the content of tobago-theme.xml standard Standard Theme org.apache.myfaces.tobago.context.StandardTheme org/apache/myfaces/tobago/renderkit Box important GridLayout important This is little bit surprising. Please let me know how to resolve this.. KSK Udo Schnurpfeil wrote: > > Hi, > > there is no style class "tobago-box-footer" defined for any HTML tag. So > the style will not be applied. > > When you want to give some panels a different style, you can assign a > markup like: > this will result in HTML with the class "tobago-panel-markup-important". > Than you can define a style for that class. > First, you have to register a markup for a renderer. See: > http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup > > If you want to see which styles from which files will be applied, you > may use Firebug, or any other browser development tool, which are very > helpful. > > Regards, > > Udo > > Am 26.04.10 20:06, schrieb tobagouser: >> Hi Udo,Helmut >> >> Thanks for the info.Its really useful. >> >> My requirements are >> >> 1.I want to have a different background color and shade to some of the >> panels in the pages.This color and shade should be different from the >> default panel css ,so it should have a different css . >> >> 2.As mentioned earlier I want to add a new css to the border footer.I >> added >> it similar to the box header css in the speyside style.css file ..like >> >> .tobago-box-footer { >> values here... >> } >> >> But this footer css never applied on the pages. >> >> please let me know whether tc:style tag applies at the page level only >> or >> applies at the child tags like panel and box. >> >> also please let me know how to add a new css to box footer and why the >> above css does not worked. >> >> Thanks, >> KSK >> >> Udo Schnurpfeil wrote: >> >>> Hi, >>> >>> The simple way: You can also put a file "style/style.css" (exactly this >>> name) in the webapp directory. The ResourceManager will find it and add >>> it to the list of needed resources. The style will be effect all Tobago >>> pages in one application. >>> >>> Helmut solution is also possible. The advantage is, you can decide, >>> which pages need the style. It is also possible to make changes in more >>> than one theme, if needed. >>> >>> If you want to make bigger changes to the design of the pages (specially >>> for more than one application), you may want to write a Tobago theme, >>> that contains your custom look and feel. >>> >>> Regards, >>> >>> Udo >>> >>> Am 22.04.10 15:55, schrieb Helmut Swaczinna: >>> Hi, wich style.css do you mean exactly? Where is it located? You can add your own styles with the tc:style tag, e.g.>>> style="style/mystyles.css" />, under your resource path. Regards Helmut Am 22.04.2010 15:51, schrieb tobagouser: > Any inputs on this please.. > > > tobagouser wrote: > >> Hi All, >> >> I have tried to add tobago-box-footer to the style.css ,but it never >> affected the pages.Please could you let me know how to add a new css >> to >> tobago. >> >> Thanks, >> KSK >> >> >> >> > >>> >>> >> > > -- View this message in context: http://old.nabble.com/How-to-add-new-css-to-Tobago-tp28288029p28378878.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: Antwort: [Trinidad] Table row selection over several pages doesn't work
Thanks for the link, it made me dig a little deeper and I found the reason. I had a selectionListener attached to the table which always overwrote the previous selection when switching the page. -- View this message in context: http://old.nabble.com/-Trinidad--Table-row-selection-over-several-pages-doesn%27t-work-tp28374871p28377852.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Antwort: [Trinidad] Table row selection over several pages doesn't work
Hi, Take for example http://www.irian.at/trinidad-demo/faces/components/table_selection.jsp There it works across pages and I think that ought to be normal behavior ;=) Best wishes, Wolfgang. schneidc 27.04.2010 11:35 Bitte antworten an "MyFaces Discussion" An users@myfaces.apache.org Kopie Thema [Trinidad] Table row selection over several pages doesn't work Hi, I have a large table with several pages, selection style set to multiple and I just encountered that when rows are selected on one page, if I change to another page and only when I also make selections on this other page, all selections made on the previous one vanish. So it seems, that it's only possible to make selections on a single page. Is this behaviour intended or a bug? To me it spoils the point of multiple selection a little bit. Cheers Simon -- View this message in context: http://old.nabble.com/-Trinidad--Table-row-selection-over-several-pages-doesn%27t-work-tp28374871p28374871.html Sent from the MyFaces - Users mailing list archive at Nabble.com. PTA Programmier-Technische Arbeiten GmbH Seckenheimer Str. 65-67, 68165 Mannheim Amtsgericht Mannheim, HRB 1139 USt-IdNr.: DE 143 839 368 Geschaeftsfuehrer: Dipl.-Ing. Peter Fischer Dr. Harald W. Busch Dipl.-Kfm. Knut Fischer
Re: [TOBAGO] How to add new css to Tobago
Thanks Udo.I will try it and will let you know the result. Udo Schnurpfeil wrote: > > Hi, > > there is no style class "tobago-box-footer" defined for any HTML tag. So > the style will not be applied. > > When you want to give some panels a different style, you can assign a > markup like: > this will result in HTML with the class "tobago-panel-markup-important". > Than you can define a style for that class. > First, you have to register a markup for a renderer. See: > http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup > > If you want to see which styles from which files will be applied, you > may use Firebug, or any other browser development tool, which are very > helpful. > > Regards, > > Udo > > Am 26.04.10 20:06, schrieb tobagouser: >> Hi Udo,Helmut >> >> Thanks for the info.Its really useful. >> >> My requirements are >> >> 1.I want to have a different background color and shade to some of the >> panels in the pages.This color and shade should be different from the >> default panel css ,so it should have a different css . >> >> 2.As mentioned earlier I want to add a new css to the border footer.I >> added >> it similar to the box header css in the speyside style.css file ..like >> >> .tobago-box-footer { >> values here... >> } >> >> But this footer css never applied on the pages. >> >> please let me know whether tc:style tag applies at the page level only >> or >> applies at the child tags like panel and box. >> >> also please let me know how to add a new css to box footer and why the >> above css does not worked. >> >> Thanks, >> KSK >> >> Udo Schnurpfeil wrote: >> >>> Hi, >>> >>> The simple way: You can also put a file "style/style.css" (exactly this >>> name) in the webapp directory. The ResourceManager will find it and add >>> it to the list of needed resources. The style will be effect all Tobago >>> pages in one application. >>> >>> Helmut solution is also possible. The advantage is, you can decide, >>> which pages need the style. It is also possible to make changes in more >>> than one theme, if needed. >>> >>> If you want to make bigger changes to the design of the pages (specially >>> for more than one application), you may want to write a Tobago theme, >>> that contains your custom look and feel. >>> >>> Regards, >>> >>> Udo >>> >>> Am 22.04.10 15:55, schrieb Helmut Swaczinna: >>> Hi, wich style.css do you mean exactly? Where is it located? You can add your own styles with the tc:style tag, e.g.>>> style="style/mystyles.css" />, under your resource path. Regards Helmut Am 22.04.2010 15:51, schrieb tobagouser: > Any inputs on this please.. > > > tobagouser wrote: > >> Hi All, >> >> I have tried to add tobago-box-footer to the style.css ,but it never >> affected the pages.Please could you let me know how to add a new css >> to >> tobago. >> >> Thanks, >> KSK >> >> >> >> > >>> >>> >> > > -- View this message in context: http://old.nabble.com/How-to-add-new-css-to-Tobago-tp28288029p28375156.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [TOBAGO] How to add new css to Tobago
Hi, there is no style class "tobago-box-footer" defined for any HTML tag. So the style will not be applied. When you want to give some panels a different style, you can assign a markup like: this will result in HTML with the class "tobago-panel-markup-important". Than you can define a style for that class. First, you have to register a markup for a renderer. See: http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup If you want to see which styles from which files will be applied, you may use Firebug, or any other browser development tool, which are very helpful. Regards, Udo Am 26.04.10 20:06, schrieb tobagouser: Hi Udo,Helmut Thanks for the info.Its really useful. My requirements are 1.I want to have a different background color and shade to some of the panels in the pages.This color and shade should be different from the default panel css ,so it should have a different css . 2.As mentioned earlier I want to add a new css to the border footer.I added it similar to the box header css in the speyside style.css file ..like .tobago-box-footer { values here... } But this footer css never applied on the pages. please let me know whether tc:style tag applies at the page level only or applies at the child tags like panel and box. also please let me know how to add a new css to box footer and why the above css does not worked. Thanks, KSK Udo Schnurpfeil wrote: Hi, The simple way: You can also put a file "style/style.css" (exactly this name) in the webapp directory. The ResourceManager will find it and add it to the list of needed resources. The style will be effect all Tobago pages in one application. Helmut solution is also possible. The advantage is, you can decide, which pages need the style. It is also possible to make changes in more than one theme, if needed. If you want to make bigger changes to the design of the pages (specially for more than one application), you may want to write a Tobago theme, that contains your custom look and feel. Regards, Udo Am 22.04.10 15:55, schrieb Helmut Swaczinna: Hi, wich style.css do you mean exactly? Where is it located? You can add your own styles with the tc:style tag, e.g., under your resource path. Regards Helmut Am 22.04.2010 15:51, schrieb tobagouser: Any inputs on this please.. tobagouser wrote: Hi All, I have tried to add tobago-box-footer to the style.css ,but it never affected the pages.Please could you let me know how to add a new css to tobago. Thanks, KSK
[Trinidad] Table row selection over several pages doesn't work
Hi, I have a large table with several pages, selection style set to multiple and I just encountered that when rows are selected on one page, if I change to another page and only when I also make selections on this other page, all selections made on the previous one vanish. So it seems, that it's only possible to make selections on a single page. Is this behaviour intended or a bug? To me it spoils the point of multiple selection a little bit. Cheers Simon -- View this message in context: http://old.nabble.com/-Trinidad--Table-row-selection-over-several-pages-doesn%27t-work-tp28374871p28374871.html Sent from the MyFaces - Users mailing list archive at Nabble.com.