myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Bischoff <jbisch...@klkurz.com>
Subject Re: subview + subform aint working
Date Thu, 08 Feb 2007 14:27:36 GMT
lp,

This is not a bug.

When referencing components in different naming containers in a "for" 
attribute, a simple id is not sufficient. The component will be looked 
up using the algorithm defined in findComponent() of UIComponent class. 
See [1](tinyurl) or [2](full url).

In your case, try the following:

actionFor="tab1:entitySubForm"


You could also do something like:

actionFor=":MyFormName:tab1:entitySubForm"

[1] http://tinyurl.com/2k8yzn
[2] 
http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/api/javax/faces/component/UIComponent.html#findComponent(java.lang.String)

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

sL07 wrote:
> hi all,
> 
> 
> i have subforms within subview. However when using the actionFor in a
> commandButton that is outside the subview it seems to ignore the validation
> phase. The subforms work fine when the command button is within the subview. 
> 
> see snippet below.
> 
> Is this a known issue?
> Is there a way to reference the subform name within a subview. ie
> subview.formname
> 
> 
>    <f:subview id="tab1" >
>  	<jsp:include page="assetEntityDetail.jsp"/>    <----- subform
> entitySubForm in here
>    </f:subview>
>     <f:subview id="tab2"  >
>        	<jsp:include page="assetLocationDetail.jsp"/>
>    </f:subview>
> 
>  <h:panelGroup>
> 
> .....
> 
>      <t:commandButton id="save" immediate="false" action="#{assetForm.save}"
> value="#{example_messages['button_save']}" disabled="#{assetForm.mode==1}" 
> actionFor="entitySubForm"/>
>                <f:verbatim>&nbsp;</f:verbatim>                     
> 	
> 
> 
> any help appreciated
> 
> -lp



Mime
View raw message