[arquillian-issues] [JBoss JIRA] (ARQGRA-302) Page Fragments injectable by interface
Lukáš Fryč (JIRA)
jira-events at lists.jboss.org
Wed May 15 04:52:06 EDT 2013
Lukáš Fryč created ARQGRA-302:
---------------------------------
Summary: Page Fragments injectable by interface
Key: ARQGRA-302
URL: https://issues.jboss.org/browse/ARQGRA-302
Project: Arquillian Graphene
Issue Type: Feature Request
Reporter: Lukáš Fryč
Fix For: 2.Future
In order to be able hide implementation details of particular page fragments shipped with a framework,
we should favor injection of Page Fragments by interfaces.
{code}
interface Calendar;
class CalendarImpl;
@FindBy("calendar") Calendar calendar;
{code}
The implementation of the calendar can be registered using services mechanism.
{code}
Builder#service(Calendar.class, CalendarImpl.class);
{code}
----
When there are more {{Calendar}} implementations on the classpath registered, the user have either choice of using particular implementation or, preferably, use self-detection built-in into page fragment implementations -> with the knowledge of a root element, they can detect if they are appropriate implementation for given interface.
E.g. RichFaces calendar will look a the root element and check whether it has class {{rf-cal}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list