What is the best way to assign Custom Converters to specific attributes in Jheadstart?
For example, I have created a Custom Phone Number Converter. I want this converter to be applied to only specific attributes i.e., attributes that are phone numbers.
Is there a simple way of associating a Custom Converter to an attiribute before one runs the Jheadstart Application Definition file? Can this be done at the Entity Object level? For example, somehow you would associate the Custom Converter to an Attribute in an Entity. You would then create the View Object on top of the Entity. After that you would then run jheadstart, after which the JSF files are created with the Custom Converter associated with the attribute on the JSF page. Is this possible?
Now I know you can manually associate a Custom Converter with an attribute on a JSF page. After you run jheadstart Application Definition file, you can then go onto a page and add in the custom converter:
But is there anyway to automate things without having to manually add in the above entry. Is there anyway to have jheadstart add in the converter when run the jheadstart application definition file.
ONE OTHER THING! If I enter it manually using <f:converter converterId="phoneNumberConverter"/> as above, I cannot do it for the attribute that is created in the Filter's quick search and advanced search features. For example when you use jheadstart in table format, it will generate a table for you. It will also generate a filter component that has both basic and advanced search options. The attributes are then added at runtime to the basic and advanced search options. There doesn't seem to be way to associate a Custom Converter with these search options. So at this point how can one associate a custom converter to the attributes in the quick and advanced search sections. Hence why I am asking the question: How to assign Custom Converters to specific attributes in jheadstart?
Hey B-man, perhaps try using the JHS option for the quick-search / advanced-search and see whether we can use the converters there. I'm assuming it will generate some fragments explicitly which we can then modify.
We would then just miss out on using the other features that come with the ADF Model variants such as MDS integration.
Once we know the capabilities, we can then decide if we want to go down this road.
to the top level template for TABLE_TEXT_INPUT (or FORM_TEXT_INPUT, or whichever is the appropriate template), then just add a Custom Property named customConverter to any field that needs to have a converter applied, with the name of your converter as the value.
Note: the JHS Quick Search and Advanced search have their own set of templates, so you'd have to add it to those as well.
Not sure if there's a more ADF-ish way to do it using the ADF style search.