input
stringlengths
10
828
output
stringlengths
5
107
public group model get group model return group model
get group model property
public string match string value if value length 0 return value matcher matcher pattern matcher value sub sequence 0 value length if matcher find return null return matcher group
apply pattern to specified value
public void set pattern string pattern throws exception this pattern pattern compile pattern
get the pattern property
protected void reset super reset sort null select tag null disabled null selection null key null keys null
reset tag attributes
public string get readonly return readonly
get readonly property
protected void init module context context forms root config config form factory factory throws config exception this context context this config config this factory factory forms key forms key prefix context get name i18n i18n support get instance context
initialze by setting the module context and configuration element
protected module context get context return context
get the module context we belong to
public void set accesskey string string accesskey string
set accesskey property
public void set alt string string alt string
set alt property
public void set selection object value selection value
set selection property
public form get form http servlet request request locale locale string action http session session request get session forms map map forms map session get attribute forms key if map null session set attribute forms key map new forms map form form form map get action if form null locale equals form get locale string name get form name action if name null return null form config form config config find form config name locale if form config null return null form factory create form form config locale map put action form return form
answer form for given action and locale
public void set onblur string string onblur string
set onblur property
public void set onchange string string onchange string
set onchange property
public void set onfocus string string onfocus string
set onfocus property
public form result get form result http servlet request request string action string name get form name action if name null return null form result result form result request get attribute form result key if result null result get form config get name equals name return result return null
get the form validation result from the given request
public void set readonly string string readonly string
set readonly property
public boolean is multiple form component component return form get form input component get name is array component get index 0
answer true if the specified component corresponds to an array input
public void set tabindex string string tabindex string
set tabindex property
public void check form component component throws config exception form input input form get form input component get name if input null throw new config exception input component get name does not exist if input is array component get index 0 throw new config exception input component get name is not an array but has an index
check if the specified component corresponds to an input in this form
private boolean is assertion failed form component component return result null result is assertion failed component get name
answer true iff the specified component is involved in a failed assertion
private boolean is valid or relaxed form component component if result null form input result input result result get form input result component get name if input result is relaxed return true int index component get index return index 0 input result is valid input result is valid index return true
answer true iff the specified component is valid
public string get class form component component string result null if is valid or relaxed component result component get error class if result null result styles get error class else if is assertion failed component result component get assert class if result null result styles get assert class if result null result component get error class if result null result styles get error class return result
get css class attribute for the specified component
public string get label object value locale locale return i18n get resource locale bundle get key value
this implementation uses a
public void add option string key object value if key null key length 0 throw new illegal argument exception illegal key must be non empty if key2value contains key key throw new illegal argument exception duplicate key key if value null throw new illegal argument exception illegal value must be non null if value2key contains key value throw new illegal argument exception duplicate value value key2value put key value value2key put value key values add value index arrays clear
add a key with associated value
public boolean check object value if value null number number number value if number utils is na n number return false int compare number utils compare min number if compare 0 allow min compare 0 return false compare number utils compare number max if compare 0 allow max compare 0 return false return true
check object to be in receivers interval
public double get max return max double value
get max property
public void remove key string key if key2value contains key key throw new illegal argument exception unknown key key object value key2value get key values remove value value2key remove value key2value remove key index arrays clear
remove the specified key
public double get min return min double value
get min property
public boolean is allow max return allow max
get allow max property
public boolean is allow min return allow min
get allow min property
public void set allow max boolean new allow max allow max new allow max
set allow max property
public void set allow min boolean new allow min allow min new allow min
set allow min property
public void set max double new max max new double new max
set max property
private filter config get filter config string action string path action if path starts with path path cut off query string int question action index of if question 0 path path substring 0 question lookup action configuration return filter config filters get path
lookup filter element for specified action path
public void set min double new min min new double new min
set min property
public method resolve function string prefix string name return null
answer code null code
public panels root config parse url urls throws config exception return panels root config impl parse all urls
parse panels configuration files
protected void init throws config exception super init root panels root config impl get nearest ancestor panels root config impl class nearest ancestor panel panel config impl get nearest ancestor panel config impl class
initialize root element and nearest panel ancestor
protected void init2 throws config exception super init2 iterator iter panels configs values iterator while iter has next panels config impl value panels config impl iter next panels configs by locale put value get locale value
initialize panels by locale lookup
protected void init2 throws config exception super init2 if nearest ancestor panel null top level panels config impl panels panels config impl get nearest ancestor panels config impl class locale generalized locale root generalize panels get locale if generalized locale null generalized panel panel config impl root find panel config name generalized locale
initialize base panel by locale
private string get panels key panels config impl value string buffer key new string buffer if value get language null key append value get language if value get country null key append key append value get country if value get variant null key append key append value get variant return key to string
create panels key
private panel config get panel config string name locale locale panels config panels config panels config panels configs by locale get locale if panels config null panel config panel config panels config get panel config name if panel config null return panel config return null
lookup panel by name and locale exact match
public int do end tag throws jsp exception if log is trace enabled log trace param name panel tag panel panel tag find ancestor with class this panel tag class if panel null throw new jsp exception param tag must be nested in panel tag panel add new dynamic param config name value return eval page
add a dynamic parameter to the contexts current panel
public int do start tag throws jsp exception if log is trace enabled log trace panel name panels support support panels support get instance page context context support get context page context panel context lookup panel config name if panel null throw new jsp exception could not get panel name return eval body buffered
get panels context stack from request scope
public int do start tag throws jsp exception if log is trace enabled log trace list name panels support support panels support get instance page context context support get context page context list config list context lookup list config name if list null throw new jsp exception could not get list name items new list status list if var status null page context set attribute var status items if items has next context push items next return eval body include else return skip body
get panels context stack from request scope
public void set template string string template string
set template path
public void push panel config panel top new panel entry panel top
push panel element
public void push item config item top new item entry item top
push item element
public string find template locale locale panel config impl panel this while panel null string path panel find template by generalization if path null return path panel panel lookup base locale return null
search by inheritance for a panel with code template code
public void destroy module context context context remove attribute panels support panels support key
remove panels support instance from module scope
public void pop if is empty throw new empty stack exception top top previous
pop panel or item element
public panel config find panel config string name locale locale return config find panel config name locale
find toplevel panel element by name and locale
public list config find list config string name locale locale panel config impl panel this while panel null list config result panel find list config by generalization name if result null return result panel panel lookup base locale return null
search nested list with specified name for given locale
public panels context get or create context http servlet request request locale locale panels context context panels context request get attribute panels context key if context null context new panels context this locale request set attribute panels context key context return context
get the panels context for the specified request
public boolean is empty return top previous null
answer code true code if the stack is empty
public void set var status string var this var status var
set the name of the list status page scope attribute
public panel config find panel config string name locale locale panel config impl panel this while panel null panel config result panel find panel config by generalization name if result null return result panel panel lookup base locale return null
search nested panel with specified name for given locale
public panel config lookup panel config string name panel config panel top lookup panel config name if panel null panel bottom lookup panel config name return panel
lookup panel within current scope
public param config find param config string name locale locale panel config impl panel this while panel null param config result panel find param config by generalization name if result null return result panel panel lookup base locale return null
search nested list with specified name for given locale
public param config lookup param config string name return top lookup param config name
lookup param within current scope
public list config lookup list config string name return top lookup list config name
lookup list within current scope
public void add param config param config param top add param config param
add a dynamic parameter to the current panel
public void set config string string config string
set comma separated list of configuration files
public void set config string value config value
set comma separated list of configuration files
private message resources get resources string bundle if bundle null bundle globals messages key message resources resources message resources module get attribute bundle if resources null resources message resources module get servlet context get attribute bundle return resources
lookup message resources in module and application scope
protected action mapping get action mapping string action int question action index of if question 0 action action substring 0 question if action starts with action action return action mapping module config find action config action
look up an action mapping
public action errors validate action mapping mapping http servlet request request return validator validate mapping request new request input values request
validate form input values are taken from the request
public string format http servlet request request form data bean int index throws exception string property get field config get property object value bean get property property if is array object values object value return format scalar request values index else if index 0 return format scalar request value else throw new index out of bounds exception bad index for scalar index
format ith component of field property from form data
private void init property config property object bean if log is trace enabled log trace property get name property get value try if property get value instanceof string property utils set property from string bean property get name string property get value else property utils set property bean property get name property get value catch exception e log error could not set property bean get class get name property get name e
set bean property
protected void init module context context validation config config throws config exception this context context this config config forms key forms key prefix context get name i18n i18n support get instance context
initialze by setting the module context and configuration element
private validator create validate config validate config validation engine engine null validator config config validate config get validator config try engine validation engine class for name config get type new instance catch exception e log error could not create config get type instance e return null init validate config engine return new validator validate config engine
create a new validator according to specified validate element
private string get key validate config config locale locale string key string config get id if locale null string s locale to string if s length 0 key locale to string return key
get key used for cache lookups
public boolean is sharable return engine is sharable
answer code true code iff the receiver may be shared by
public boolean is matcher return engine instanceof matcher
answer code true code iff the receivers engine is a matcher
public boolean is converter return engine instanceof converter
answer code true code iff the receivers engine is a converter
public boolean is checker return engine instanceof checker
answer code true code iff the receivers engine is a checker
public void localize locale locale number format f number format get integer instance locale f set parse integer only true format f
localize the receiver
public void localize locale locale date format f date format get time instance date format short locale f set lenient false format f
localize the receiver
public int get maximum fraction digits return number format format get maximum fraction digits
get the maximum fraction digits property
public int get minimum fraction digits return number format format get minimum fraction digits
get the minimum fraction digits property
public boolean get grouping used return number format format is grouping used
get the grouping used property
public boolean get null value return null value
get the null value property
public void localize locale locale number format f number format get instance locale f set grouping used get grouping used f set minimum fraction digits get minimum fraction digits f set maximum fraction digits get maximum fraction digits format f
localize the receiver
public void localize locale locale date format f date format get date instance date format short locale f set lenient false format f
localize the receiver
public void set maximum fraction digits int value number format format set maximum fraction digits value
set the maximum fraction digits property
public void localize locale locale number format f number format get integer instance locale f set parse integer only true f set grouping used get grouping used format f
localize the receiver
public void set minimum fraction digits int value number format format set minimum fraction digits value
set the minimum fraction digits property
public void set null value boolean new null value null value new null value
set the null value property
public void set grouping used boolean value number format format set grouping used value
set the grouping used property
protected void init throws config exception super init validation config impl validation validation config impl get nearest ancestor validation config impl class validators config validators validation get validators config validator config get validator from validators if validator config null throw new config exception could not find validator named name in to inline string
initialize validator element
public validation config parse url urls string param names object param values throws config exception return validation config impl parse all urls param names param values
parse validation configuration files
public void add property config impl value properties add value
add property element
public void add property config impl value properties put value get name value
add property element
private locale get cached locale string language string country hash map by country hash map locales by language get language if by country null locales by language put language by country new hash map locale locale locale by country get country if locale null if country length 0 locale new locale language else locale new locale language country by country put country locale return locale
get locale specified by language and country codes from locale cache
protected string get name attribute throws exception return group tag get name attribute
get name attribute
protected int find index if index null return 1 object value page context get attribute index if value instanceof number return number value int value else if value null return integer parse int value to string else return integer parse int index
answer the array index to be used to access form data value
protected string get checked attribute throws exception group model model group tag get group model boolean check false if model is selected get value attribute check true else if model is selected values available checked null check true return check checked null
get checked attribute
protected string get input value throws exception if index 0 return form tag get input value this else return form tag get input value this index
get value to be displayed as default
protected string get selected attribute throws exception boolean select false group model model select tag get group model if model is selected get value attribute select true else if model is selected values available selected null select true return select selected null
get selected attribute
protected boolean is valid or relaxed if index 0 return form tag is valid or relaxed this else return form tag is valid or relaxed this index
answer true iff our value displayed as default is valid