Most of the model elements will require a stereotype to be processed correctly, below you will find
a table indicating on which model element you may put what stereotype, it will also
denote which effect this has on the generation process.
Sometimes it happens you want to add information to the model but there is no clean way of doing it.
In those cases you may want to resort to tagged values, but these cases should be considered with
caution. A tagged value is something extra, something optional, and the application should
run fine without them.
The JSF cartridge allows you to add tagged values here and there but provides a default value
in case they are missing.
AndroMDA JSF Cartridge Profile
This profile contains all elements that can be applied on the model used as the
MDA transformation process. These elements are specific to the AndroMDA JSF Cartridge component.
Data Types
@TODO: write the documentation for 'Data Types' profile element group !!!
Stereotypes
Stereotypes are the names you sometimes see appear in UML diagrams, they typically look
like <<MyStereotype>> and can be applied on any type of UML model element.
Tagged Values
Sometimes it happens you want to add information to the model but there is no clean way
of doing it. In those cases you may want to resort to tagged values, but these cases should
be considered with caution. A tagged value is something extra, something optional,
and the application should run fine without them.
Jsf allows you to add tagged values here and there but provides a
default value in the event that they are missing.
FrontEndRegistration
(Back to Stereotypes)
|
Applied on: UseCase |
Modeled on a use case, this stereotype indicates that this use case
is a front-end registration wizard. This will cause a link on the login
taking the user to this use case.
|
FrontEndSessionObject
(Back to Stereotypes)
|
Applied on: Class |
These classes can be associated to controllers. They represent objects that persist
during the session of the user. For each such session object associated with a controller
the controller will have accessor methods for this object. Use a dependency from the controller
to the session object to properly model this relationship, a controller can depend on many
such session objects; and in the same way a session object might be shared between controllers.
|
@andromda.presentation.web.action.type
(Back to Tagged Values)
|
Applied on: Transition coming out of an action state carrying the <<FrontEndView>> stereotype |
Modeled on a transition coming out of an action state carrying the <<FrontEndView>> stereotype.
Indicates the type of trigger causing the action, possible values are hyperlink, image and form. Form
is the default value.
|
Allowed values for this element:
form (default)
hyperlink
image
popup
|
@andromda.presentation.web.action.tablelink
(Back to Tagged Values)
|
Applied on: Transition coming out of an action state carrying the <<FrontEndView>> stereotype |
Denotes this action applies on the information shown in a tabular format, you will need to specify
the name of the table as the value, optionally suffix with a dot and the name of the column.
If the column is specified the action will be rendered in that specific column, otherwise a new
column will be created for it.
|
@andromda.presentation.web.action.form.reset
(Back to Tagged Values)
|
Applied on: Transition coming out of an action state carrying the <<FrontEndView>> stereotype |
This allows one to reset all parameter values on the form after
the action is invoked (this is useful when you have an action transition
coming back to the same page and want the form variables reset to their original
values before the action was submitted).
|
Allowed values for this element:
|
@andromda.presentation.web.action.form.key
(Back to Tagged Values)
|
Applied on: Transition coming out of an action state carrying the <<FrontEndView>> stereotype |
Denotes the name of the key under which this action's form is stored under.
Will only be used when the form is not empty, and is ignored otherwise. This feature is useful
when you are doing something that requires more than one action to be executed at the same
time and you don't want form key names colliding.
|
Allowed values for this element:
form (default)
any string is allowed
|
@andromda.presentation.web.view.field.type
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Indicates the type of parameter, this information will be used when rendering the views,
possible values are: link, multibox, text, textarea, checkbox, radio, select, password,
hidden and plaintext.
|
Allowed values for this element:
text (default)
select
password
hidden
textarea
checkbox
radio
multibox
|
@andromda.presentation.web.view.field.reset
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Indicates whether or not the field should be reset (to its orginal value)
after the execution of the action. This is useful when you want only
some of the parameters reset on the form but not all of them.
|
Allowed values for this element:
|
@andromda.presentation.web.view.field.validwhen
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Additional validation to be performed, specify a
commons-validator condition here, see
Struts-Validator
and go to the section labeled
http://struts.apache.org/userGuide/dev_validator.html . The required
parentheses will automatically be placed around your condition.
|
Allowed values for this element:
a Struts 'validwhen' condition
|
@andromda.presentation.web.view.field.equal
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Allows the comparison between 2 fields, this allows you to specify the
other field that a parameter must equal in order to be valid (like when
comparing two passwords)
|
Allowed values for this element:
a Struts 'validwhen' condition
|
@andromda.presentation.web.view.field.validators
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Custom validation to be performed, you can add one or more of your own validators here.
Make sure you add your validator definitions in validator-rules.xml ,
there is a
merge point
that can be used to have them automatically inserted.
Validator values look like this: myValidator ,
myValidator(myVar=myArg) ,
myValidator(myVar=myArg,myVar2=myArg2) , etc...
Specify each validator using a new value, don't specify all of them in a single value.
Be careful when using multiple validators with the same 'var' name, the last one
found will be used! Normally speaking this should not happen, so try to avoid it
(I recommend against using names used by known validators: minlength,
test, datePattern, ...)
|
Allowed values for this element:
a call to one of your custom validators
|
@andromda.presentation.web.view.field.tablelink
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
The value is of the format table.column where
table denotes a parameter coming into
the page of type Collection (and containing a tagged value
to indicate it is to be displayed as a table); the
column part is used to indicate which column of
the corresponding table is to be used for linking.
The result will be that the specified table column will contain
a hyperlink reference to the action on which this parameter
resides, this is useful for example, to display a list of persons and view
their details by simply clicking on their names in the table
(for that to work this parameter's type should be 'link', use the
@andromda.presentation.web.view.field.type=link tagged value for that).
The column name is optional, if you do not specify it the name
of the parameter will be assumed. By setting the parameter type you
can have any widget rendered into the table.
|
Allowed values for this element:
Any name of a table page-variable that is a collection type followed by a dot
and the name of the target column
|
@andromda.presentation.view.table
(Back to Tagged Values)
|
Applied on:
A collection type parameter going into an action state carrying the <<FrontEndView>> stereotype
|
A flag indicating whether or not a parameter should be considered a table. This must be
set to true when you wish to display a list of simple types (such as strings) within a table.
|
Allowed values for this element:
|
@andromda.presentation.view.field.table.identifier.columns
(Back to Tagged Values)
|
Applied on:
A collection type parameter (array is preferred) going out of an action state carrying the <<FrontEndView>> stereotype
|
Allows one to define which columns should be considered identifiers when creating an input table, these
columns determine how the value is merged with the backing value of the table to be submitted.
|
Allowed values for this element:
|
@andromda.presentation.view.table.columns
(Back to Tagged Values)
|
Applied on:
A collection type parameter going into an action state carrying the <<FrontEndView>> stereotype
|
The collection will be displayed in scrollable tabular format.
Each column in this table will be mapped to a property of the object
type contained in the collection. So you will need to make sure all objects
have accessor methods for the property you list in this tagged value.
Properties are separated using a comma ','. More than one value maybe be assigned to
this tag, all properties will correctly be resolved.
|
Allowed values for this element:
Comma-separated list of column names
|
@andromda.presentation.view.table.pageable
(Back to Tagged Values)
|
Applied on: A collection type parameter going into an action state carrying the <<FrontEndView>> stereotype |
A flag indicating whether or not a table is "pageable". When a table is flagged as "pageable", support for DB paging is generated.
|
Allowed values for this element:
|
@andromda.presentation.view.field.required
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
Denotes whether or not this is a required field. If a field is required its type will always be
checked (you cannot enter a String value when an int is expected)
|
Allowed values for this element:
|
@andromda.presentation.view.field.format
(Back to Tagged Values)
|
Applied on: Parameter coming out of an action state carrying the <<FrontEndView>> stereotype |
The format of this field's value.
Type |
Value |
Arguments |
Example |
Description |
int, float, double, java.lang.Integer, java.lang.Float, java.lang.Double |
range |
2 of this type |
range 2 12 |
Specifies in which range the value of this attribute must fall |
java.util.Date, java.sql.Date |
N/A |
[strict] (format) |
strict dd/MM/yyyy |
The format in which dates need to be specified (optionally strict) (*) |
java.lang.String |
minlength |
an integer value |
minlength 4 |
Specifies the minimum number of characters |
java.lang.String |
maxlength |
an integer value |
maxlength 4 |
Specifies the maximum number of characters |
java.lang.String |
pattern |
a regular expression |
pattern [a-zA-Z]* |
Validates format according to a regular expression (**), the leading
'^' and trailing '$' must not be specified |
java.lang.String |
creditcard |
N/A |
creditcard |
Validates the value to be a creditcard number, according to what is known as the Luhn check |
java.lang.String |
email |
N/A |
email |
Checks if the specified value is a possible email address, IP addresses are also taken into account |
(*) The format is specified by the java.text.SimpleDateFormat class from the Java 2 SDK, please
refer to the JavaDoc documentation of that class for more information, this format is case-sensitive
SimpleDateFormat JavaDoc
(**) The pattern expression is a Perl regular expression as you would you use in Javascript,
by convention it requires the ^ and $ to denote respectively the beginning and ending of the pattern
Netscape's guide to regular expressions in Javascript
|
Allowed values for this element:
Any of the formats listed above
|