Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Aphorismen
Applications
Business Economics & Admin.
My Computers
Cooking
Devices
Folders
Food
Hardware
Infos
Software Development
Sports
Operation Instructions
Todos
Test
Help
Glossary
Community portal
adaptions
Sidebar anpassen
Wiki RB4
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Seam
(section)
Page
Discussion
English
Read
Edit
View history
Toolbox
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=Annotations= Seam defines own annotations and uses some other annotations. ==[[Hibernate#Length|org.hibernate.validator.Length]]== ==[[Hibernate#NotNull|org.hibernate.validator.NotNull]]== ==org.jboss.seam.annotations.datamodel.DataModel== '''@org.jboss.seam.annotations.datamodel.DataModel'''['''(scope=ScopeType.'''<TYPE>''')'''] <attribute declaration> The @DataModel annotation exposes an attibute of type java.util.List to the JSF page as an instance of javax.faces.model.DataModel. This allows us to use the list in a JSF <h:dataTable> with clickable links for each row. In this case, the DataModel is made available in a session context variable named messageList. ==org.jboss.seam.annotations.datamodel.DataModelSelection== '''@org.jboss.seam.annotations.datamodel.DataModelSelection''' <attribute declaration> The @DataModelSelection annotation tells Seam to inject the List element that corresponded to the clicked link. ==org.jboss.seam.annotations.Factory== '''@org.jboss.seam.annotations.Factory[("'''<context variable name>'''")'''] <method_declaration> The @Factory annotation tells Seam to create an instance of the bean and invoke the method to initialize the value. We call method a factory method. Marks a method as a factory method for a context variable. A factory method is called whenever no value is bound to the named context variable, and is expected to initialize the value of the context variable. There are two kinds of factory methods. Factory methods with void return type are responsible for outjecting a value to the context variable. Factory methods which return a value do not need to explicitly ouject the value, since Seam will bind the returned value to the specified scope. This annotation supports use of the Seam "factory component" pattern. ==org.jboss.seam.annotations.In== '''@org.jboss.seam.annotations.In'''['''("'''<Contextvariablename>|<EL_Expression>'''")''' ['''create=true'''] ['''required=false''']] <attribute_declaration>|<setter_method> The attribute is injected by Seam. Examples for injections are EntityManager or FacesMessages. By default Seam will use the name of the property or instance variable that is being injected. You may wish to specify the context variable name explicitly, using, for example, @In("currentUser"). If you want Seam to create an instance of the component when there is no existing component instance bound to the named context variable, you should specify @In(create=true). If the value is optional (it can be null), specify @In(required=false). ==org.jboss.seam.annotations.Logger== @org.jboss.seam.annotations.Logger private org.jboss.seam.log.Log log; ==org.jboss.seam.annotations.Name== '''@org.jboss.seam.annotations.Name("'''<Name>'''")''' <class_declaration> specifies the name of the Seam component. ==org.jboss.seam.annotations.Out== '''@org.jboss.seam.annotations.Out'''['''('''['''required='''('''true'''|'''false''') [''',scope='''<SCOPE>]''')'''] <attribute_declaration>|<getter_method> The @Out annotation specifies that an attribute should be outjected, either from an instance variable. ==org.jboss.seam.annotations.Scope== '''@org.jboss.seam.annotations.Scope(org.jboss.seam.ScopeType.'''<SCOPE_TYPE>''')''' <class_declaration> specifies what context a component instance is bound to, when it is instantiated by Seam. ==org.jboss.seam.annotations.Unwrap== '''@org.jboss.seam.annotations.Unwrap''' <method_declaration> A manager component is any component with an @Unwrap method. This method returns the value that will be visable to clients, and is called every time a context variable is referenced.
Summary:
Please note that all contributions to Wiki RB4 may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Uwe Heuer Wiki New:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width