Is it possible to have a JSF converter with dynamic parameters?
I understand you can sort of pass parameters using the <f:attribute name='myName' value='yourValue' /> and then access them on your getAsObject method using the getAttributesbutes.get('myName'). But I'd like to do the conversion based on the user's selection on a select menu and I know the value of the f:attribute element can not be set dynamically. I've been researching for a bit now and haven't found anything. Any pointers, ideas, or examples would be greatly appreciated. Thank you.
            Asked
            
        
        
            Active
            
        
            Viewed 99 times
        
    0
            
            
        
        p192
        
- 518
 - 1
 - 6
 - 19
 
- 
                    May I ask why you want to do this? Sounds like putting businesslogic in the view layer. – Kukeltje Dec 28 '17 at 07:34
 - 
                    It's how the system is setup atm. But if there are no options available, and assuming I assign the user's choice on the dropdown to a bean variable, how would I access this bean variable from the converter? – p192 Dec 28 '17 at 16:45
 - 
                    Whilst the duplicate answers it for a custom validator, the principle is exactly the same for a custom converter. – BalusC Dec 28 '17 at 18:00
 - 
                    Thank you @BalusC, I believe the solution on your site should work, but I have the following problem: https://stackoverflow.com/questions/48178010/binding-of-composite-attribute – p192 Jan 09 '18 at 23:12