myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sL07 <lu...@asteriski.com>
Subject Re: subview + subform aint working
Date Fri, 09 Feb 2007 01:49:35 GMT

simon,

ur a genius!

Yeap i had a t:panelTab enclosing the subform that did not have an implicit
id.

working well now!!

many thanks

-lp


Simon Kitching-3 wrote:
> 
> A jsp:include tag will definitely NOT allocate a JSF component id.
> 
> You don't show all of your included page but it must be a tag in there 
> somewhere that's causing it. And only a small subset of JSF tags are 
> "naming containers" that add their id into their child component path as 
> shown here: f:subview and h:table are the main ones.
> 
> Regards,
> 
> Simon
> 
> sL07 wrote:
>> hi jeff,
>> 
>> thanks for the great link, never would have found that!
>> 
>> Looking at the generated html the following is produced in the label for
>> all
>> the input controls on the subview
>> 
>> assetForm:tab1:_idJsp39:entitySubForm
>> 
>> Everything following the naming rules bellow except for the '_idJsp39'.
>> It
>> seems to much up with the <jsp:include> tag. Do u agree?
>> 
>> I guess it is autogenerated which makes explicit naming of it not
>> possible.
>> 
>> Any ideas are most welcome.
>> 
>> -lp
>> 
>> 
>> 
>> Jeff Bischoff wrote:
>>> 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
>>>
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/subview-%2B-subform-aint-working-tf3191469.html#a8878327
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message