You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shale.apache.org by "Matthias Wuttke (JIRA)" <ji...@apache.org> on 2007/03/14 13:46:51 UTC
[jira] Commented: (SHALE-425) ViewControllerMapper allows mapping
only to one bean
[ https://issues.apache.org/struts/browse/SHALE-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40550 ]
Matthias Wuttke commented on SHALE-425:
---------------------------------------
Another (IMHO good) mapping strategy would be to allow backing beans to programmatically register themselves with the view mapper:
MyCoolDynamicViewMapper.registerBean(ctx.getViewRoot().getViewId(), "myBeanName");
This allows the use of abstract super classes for backing beans and allows for backing beans that are responsible for different views.
> ViewControllerMapper allows mapping only to one bean
> ----------------------------------------------------
>
> Key: SHALE-425
> URL: https://issues.apache.org/struts/browse/SHALE-425
> Project: Shale
> Issue Type: Improvement
> Components: View
> Affects Versions: 1.0.4
> Reporter: Matthias Wuttke
> Priority: Minor
>
> ViewControllerMapper.mapViewId(String viewId) allows only to map a view to a single bean. A key feature of JSF (IMHO) is the ability to have multiple backing beans / view controllers that contribute to a single page. An extension of this interface could allow other mapping strategies to associate multiple beans with a given page that can then receive phase change events. A possiblte mapping strategy would be a XmlViewControllerMapper which takes a XML file that associates view ids with bean names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
SV: [jira] Commented: (SHALE-425) ViewControllerMapper allows mapping
only to one bean
Posted by Hermod Opstvedt <he...@opstvedt.com>.
Hi
I think maybe there is a misunderstanding of idea behind the ViewController.
It is exactly for mapping one Controller! against a view - Hence the name
ViewController.
Just out of curiosity: Why would you want multiple viewcontrollers against a
view?
I think you may have misunderstood something. You can use multiple beans! To
feed a view with data.
Hermod
-----Opprinnelig melding-----
Fra: Matthias Wuttke (JIRA) [mailto:jira@apache.org]
Sendt: 14. mars 2007 13:47
Til: issues@shale.apache.org
Emne: [jira] Commented: (SHALE-425) ViewControllerMapper allows mapping only
to one bean
[
https://issues.apache.org/struts/browse/SHALE-425?page=com.atlassian.jira.pl
ugin.system.issuetabpanels:comment-tabpanel#action_40550 ]
Matthias Wuttke commented on SHALE-425:
---------------------------------------
Another (IMHO good) mapping strategy would be to allow backing beans to
programmatically register themselves with the view mapper:
MyCoolDynamicViewMapper.registerBean(ctx.getViewRoot().getViewId(),
"myBeanName");
This allows the use of abstract super classes for backing beans and allows
for backing beans that are responsible for different views.
> ViewControllerMapper allows mapping only to one bean
> ----------------------------------------------------
>
> Key: SHALE-425
> URL: https://issues.apache.org/struts/browse/SHALE-425
> Project: Shale
> Issue Type: Improvement
> Components: View
> Affects Versions: 1.0.4
> Reporter: Matthias Wuttke
> Priority: Minor
>
> ViewControllerMapper.mapViewId(String viewId) allows only to map a view to
a single bean. A key feature of JSF (IMHO) is the ability to have multiple
backing beans / view controllers that contribute to a single page. An
extension of this interface could allow other mapping strategies to
associate multiple beans with a given page that can then receive phase
change events. A possiblte mapping strategy would be a
XmlViewControllerMapper which takes a XML file that associates view ids with
bean names.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.