[prev in list] [next in list] [prev in thread] [next in thread]
List: myfaces-dev
Subject: [jira] Created: (MYFACES-2373) Add a way to document event
From: "Leonardo Uribe (JIRA)" <dev () myfaces ! apache ! org>
Date: 2009-09-30 5:40:32
Message-ID: 704674806.1254289232073.JavaMail.jira () brutus
[Download RAW message or body]
Add a way to document event capabilities for components using myfaces builder plugin
------------------------------------------------------------------------------------
Key: MYFACES-2373
URL: https://issues.apache.org/jira/browse/MYFACES-2373
Project: MyFaces Core
Issue Type: Improvement
Components: build process
Reporter: Leonardo Uribe
Priority: Minor
With trinidad-faces-plugin it is possible to add event documentation for components. \
For example, h:commandButton component could handle ActionEvent, h:inputText \
component handle ValueChangeEvent. In the generated tlddoc, it renders a table like \
this:
Type Phases \
Description javax.faces.event.ActionEvent Invoke Application
Apply Request Values Event \
delivered when the "action" of the component has
\
been invoked; for example, by clicking on a button.
\
The action may result in page navigation.
One option is add a @JSFEvent annotation, but it seems better add a @JSFListener \
annotation and use it like this (for example in UICommand):
/**
* The event handled by this Listener is delivered when the "action" of the \
component has
* been invoked; for example, by clicking on a button.
* The action may result in page navigation.
**/
@JSFListener(event="javax.faces.event.ActionEvent",
phases="Invoke Application, Apply Request Values")
public ActionListener[] getActionListeners()
{
return (ActionListener[]) getFacesListeners(ActionListener.class);
}
Note this annotation has only documentation purposes, so it does not trigger side \
effects on code templates.
Suggestions are welcome
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic