From: petemuir <do-...@jb...> - 2006-07-01 23:12:32
|
I would suggest using a Validator to do validation, not a Converter (concept clarity, aviods a pointless getAsString() method). A few ideas: I'm not sure you can get anything except the value in this case - the component and its parent (etc) are of no use. My best suggestion is to write a Facelets ValidateHandler. This would then allow you to do <my:validateLimit pk="#{couplingL.id}" /> Then within the ValidateHandler create a new validator with a field containing the pk. This could then be looked up using a EL or Seam component accessed programmatically or JNDI or ... BUT I don't know how well this will play with components in datatables. Another way to do the same is to make validateLimit a non-rendering component (with componenthandler) and have it attach a validator to its parent with the pk field set (which I recall having more luck with than the above due to state saving stuff). Or perhaps you could do the validation inside a backing bean access method when the whole datatable is available, but then you have problems attaching the FacesMessage onto the correct table row. It would be good if you reach a solution if you share it :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954860#3954860 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954860 |