[
https://issues.apache.org/jira/browse/TOBAGO-807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768680#action_12768680
]
Udo Schnurpfeil commented on TOBAGO-807:
----------------------------------------
I've tested the patch (which is looking good), but unfortunately it doesn't
work, because the parent.getParent() always returns null.
It depends on Facelets, that in this phase the needed information is not
available.
By the way, in Tobago 1.5 this problem is solved (Scripts are UIComponents in
1.5).
> Allow script tag not only at page level
> ---------------------------------------
>
> Key: TOBAGO-807
> URL: https://issues.apache.org/jira/browse/TOBAGO-807
> Project: MyFaces Tobago
> Issue Type: Improvement
> Components: Facelets
> Affects Versions: 1.0.23
> Environment: Facelets, all
> Reporter: Helmut Swaczinna
> Assignee: Udo Schnurpfeil
>
> With jsp you can put a tc:script in any other tag, with facelets only in
> tc:page. This is a serious restriction when you define custom facelet tags.
> To solve this restriction I modified the ScriptHandler class:
> public void apply(FaceletContext faceletContext, UIComponent parent)
> throws IOException, FacesException, ELException {
> UIPage page = ComponentUtil.findPage(faceletContext.getFacesContext(),
> parent);
> if (page != null) {
> ...
> } else {
> throw new TagException(tag, "The ScriptTag cannot find UIPage. "
> + "Check you have defined the ScriptTag inside of the PageTag!");
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.