Slides from my JavaOne 2011 conference talk in San Francisco.
Published by
DevRel & No-Code
Slides from my JavaOne 2011 conference talk in San Francisco.
Published by
Hi Maxa,
I need to highlight the labels when validation occurs. I gone through your example (How to hightlight a field in JSF when validation fails ) it is working fine .
But there are lots of components in my page for each component I am writing separate method to highlight when validation fails . Is there any possibility to write generic one for highlighting all fields.
@ravi: there is another example here: http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/.
If you are using JSF 1.2, you could try adding Seam. Seam has such feature built-in.
Hi Maxa,
Thanks for your reply.
Actually my requirment is any type of validation i.e jsf validation or validatiors validation or custom validations. When any of this validation fails we are displaying by tag.
If any validation occurs corresponding Textbox label should become red.
We have 200 pages . Each page has at least 20 components.
They want code to be generic. so that in future problems may not arise .
So, could u please suggest solution for this. I am running my time on this.
@ravi: Seam has s:validateAll tag allows you wrap all the fields on which you would like to invoke validation and mark them when validation fails. The only other option is to create a custom tag, I believe.
Hi Maxa,
75% of my work done with the following link that u have sent.
http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/. you have give I implemented with some modifications it is working fine(i.e for label color change) for JSF validations like required =”true” and for our own validatiors.
The same i.e label color change should work for the business validations. Could u suggest what to do.
Thanks & Regards ,
Ravikumar.
@ravi: what’s a business validation?
ex:Login validation if I am failing to give correct credentials( This will check from the database) it will display the error message at the top. When error message was displayed the label color should change.
@ravi: not sure how I can help you, you just need to write the logic for that.
Thanks Maxa
I will implement it.
Hi Maxa,
At last I am coming to you for solution I tried it in many ways but not working.
Problem:
After successful validation I have to display all the fields readonly. All the fields are in read only except rich calender (Input text was in read only but calender image is not read only when I click on it it is displaying )
Pls suggest a solution I will be very thankful to you.
@ravi: I’m not sure whether you can disable opening the calendar popup. The calendar could be bound to a custom data model in which you can disable date selection.
Hi Max,
Just I have a doubt in rich faces.
I am using (richfaces V4)). Basically we get 8 records from data base and rows will be 4 then there will be 2 pages(displayed by using dataTable) . So, when user clicks next it has to get next 8 records (exists) and update to list that is displayed in table( now 4 pages ).
When I try to use
It is not hitting backing bean. I used action and action listiner also .
Could u please help me out in this what I have to do.
Thanks & Regards,
Ravikumar.K
@ravi: I don’t see the code, please include it via http://pastie.org
In .xhtml
In backing Bean
public void scrollListenerCheck(DataScrollEvent event){
System.out.println(“Checking for Scroll event”);
}
and I used actionListener also still it is not working.
Thanks & Regards,
Ravi
@ravi: please include the code via http://pastie.org (or similar service)
@ravi: I think the listener has to be invoked like this: scrollerListener=”scrollerCheck”
Hi Max,
Thanks for the reply.
I used scrollerListener=”scrollerCheck” still it is not triggering action.
I had gone through the attributes of even onclick , actionListener is not working . Only few attributes are working like
for=”instSrchRsltTable” id=”scroll” maxPages=”1″ fastControls=”hide” .
Is there any other way of calling backing bean when clicking next button in scroller.
Thanks & Regards,
Ravi
@ravi: one more thing, it should be like this: scrollerListener=”scrollListenerCheck”
Hi max ,
In java class I used like this
public void scrollerCheck(DataScrollEvent event){
System.out.println(“Checking for Scroll event”);
}
Thanks & Regards,
Ravi
@ravi: not sure what the problem might be. Are you using the latest RichFaces 4.1? I’d post this question on RichFaces forum.. maybe someone else had the same problem.
Hi max,
I am using richfaces 4.1.
ActonListener is working with tomhawks datascroller. But tomhawks datascroller is not providing much features comparing with richfaces datascroller.
Thanks & Regards,
Ravi
Hi Max,
I am facing problem while saving the state of .
I followed your link
http://mkblog.exadel.com/2008/12/keeping-richpanelmenu-state/
and did .
The problem is while loading the navigation.xhtml . are getting unselected and it is showing the .
When I click on any from then every thing is working fine.
Code attached.
I am not understanding where I am doing wrong. Could you please help me out in this.
Hi Max,
I am facing problem while saving the state of .
I followed your link
http://mkblog.exadel.com/2008/12/keeping-richpanelmenu-state/
and did .
The problem is while loading the navigation.xhtml . all rich:panelMenuGroup are getting unselected and it is showing the . rich:panelMenuItem is showing.
When I click on any from then rich:panelMenuItem every thing is working fine.
Code attached.
I am not understanding where I am doing wrong. Could you please help me out in this.
Thanks & Regards,
Ravi
@ravi: when you load the page for the first time, the object to which the menu is bound, needs to be initialized to the correct value for the menu item to be selected.
Thank you So, much max it is working fine
Leave a Reply to ravi Cancel reply