[TEEDA-11] CommandLinkでverbatimタグ以下が表示されない Created: 2006-06-27  Updated: 2006-06-27  Due: 2006-06-27  Resolved: 2006-06-27

Status: Resolved
Project: Teeda
Component/s: None
Affects Version/s: 1.0-beta-4
Fix Version/s: 1.0-beta-5

Type: Bug Priority: Major
Reporter: shot Assignee: shot
Resolution: Fixed Votes: 0
Labels: None


 Description   

以下で、outputTextが表示されない。

<h:form id="commandLinkForm">
<h:inputText id="text1" value="#

{commandLinkBean.a}

"/>
<h:commandLink id="link1" action="#

{commandLinkBean.countUp}

">
<f:verbatim>
<h:outputText value="#

{commandLinkBean.hoge}

"/>
</f:verbatim>
</h:commandLink>
</h:form>



 Comments   
Comment by shot [ 2006-06-27 ]

Renderer.encodeChildren()で、component.getRenderersChildren()がfalseのとき
子供のcomponentをencodeしてなかったため。

Rendererを以下のように修正。

public void encodeChildren(FacesContext context, UIComponent component)
throws IOException {
AssertionUtil.assertNotNull("context", context);
AssertionUtil.assertNotNull("component", component);
for (Iterator itr = component.getChildren().iterator(); itr.hasNext() {
UIComponent child = (UIComponent) itr.next();
child.encodeBegin(context);
if (child.getRendersChildren())

{ child.encodeChildren(context); }

else

{ encodeChildren(context, child); }

child.encodeEnd(context);
if (context.getResponseComplete())

{ break; }

}
}

Comment by yone [ 2006-06-27 ]

後ほどSpec確認しようと思いますが
f:verabtimタグってJSFコンポーネントを含めないのでは?

syntax
<f:verbatim [escape="true|false">
Template text and/or non-JSF action elements
</f:verbatim>

O'REILLY本より抜粋

Comment by shot [ 2006-06-27 ]

<h:outputText value="#

{commandLinkBean.hoge}

"/>がそのまま出力されるはずなんですけど、
CommandLinkRendererでgetRenderersChildren()をtrueにしてしまっているために
出力されない模様。

ただし、他のJSF実装でも同じように実装されています。
うーん。

Comment by yone [ 2006-06-27 ]

verbatim単体はOKそうで、CommandLinkと組み合わせるとNGのようですね。
同じく、teeda-exampleのlink/commandLink.jspで確認。

Generated at Sat Apr 20 05:06:04 JST 2024 using Jira 9.15.0#9150000-sha1:9ead8528714127d8cfabf2446010d7e62c0a195c.