In ISF frame work the main purpose of converters is to convert the data from one to another type and from one format to another format
<f:convert number> This log or converter is used to convert a number from one format to another format Syntax <f:convertnumber type=””mininteger digits=”--” max integer digits=”--” minFraction digits=”--” max function digits=”--”currency symbol=”--”> Type It will take number type like number or currency Mininteger Digits It will take a number representing minimum number of integer digits Max integer digits It will take a number representing maxm number of integer digits Minfaction digits It will take a number representing minimum number of fraction digits Max faction digits It will take a number representing mamm number of fraction digits Currency symbol It will take Currency symbol like$
<f:convert date time> This tag or converter can be used to convert date from one format to another format Syntax <f:convert date time type=”--”pattern=”--” Data style=”--”time style=”--”/> Type It will take date type like date are time or both Pattern It will take a particular Pattern to allow date or time Data style It will take the value like short, medium, long full, default.
If the application requirement is not achieved with predefined converters then JSF has provided an environment to provide user defined converters called as custom converters
Public class my converter impotents converter{ Public object get as object(faces context fc, UI Component uc, string val) { Dss } Public string get as string(faces context fc, UI Component uc object var) { Dss } } : In ISF frame work the main purpose of converters is to convert the data from one to another type and from one format to another format
<f:convert number> This log or converter is used to convert a number from one format to another format Syntax <f:convertnumber type=””mininteger digits=”--” max integer digits=”--” minFraction digits=”--” max function digits=”--”currency symbol=”--”> Type It will take number type like number or currency Mininteger Digits It will take a number representing minimum number of integer digits Max integer digits It will take a number representing maxm number of integer digits Minfaction digits It will take a number representing minimum number of fraction digits Max faction digits It will take a number representing mamm number of fraction digits Currency symbol It will take Currency symbol like$
<f:convert date time> This tag or converter can be used to convert date from one format to another format Syntax <f:convert date time type=”--”pattern=”--” Data style=”--”time style=”--”/> Type It will take date type like date are time or both Pattern It will take a particular Pattern to allow date or time Data style It will take the value like short, medium, long full, default.
If the application requirement is not achieved with predefined converters then JSF has provided an environment to provide user defined converters called as custom converters
Public class my converter impotents converter{ Public object get as object(faces context fc, UI Component uc, string val) { Dss } Public string get as string(faces context fc, UI Component uc object var) { Dss } }
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.