myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heath Borders <heath.bord...@gmail.com>
Subject Re: problem with hidden fields and f:params int the same form
Date Wed, 06 Apr 2005 18:53:19 GMT
The f:param name for commandLinks is rendered as a URL parameter. Thus, the 
name you supply is not modified to contain parent NamingContainer names 
(should it?). However, your hidden input shouldn't be affected because its 
clientId should be something like '_1:section', and not 'section'.

On Apr 6, 2005 12:15 PM, Borja Martín <borjam@dagi3d.net> wrote: 
> 
> hi,
> I would like to know if this behaviour is a bug or not.
> 
> suppose I have this form(I have simplified it so its easier to 
> understand):
> 
> <h:form>
> 
> <f:subview id="edit" rendered="#{cover.isItemSaved}">
> <h:commandLink action="#{cover.editNews}">
> <h:outputText value="edit" />
> <f:param name="section" value="#{sections.path}" />
> </h:commandLink>
> </f:subview>
> 
> <h:inputText value="#{cover.item.title}" required="true" size="50" />
> 
> <h:inputHidden id="section" value="#{sections.path}" />
> 
> <h:commandButton action="#{cover.save}" value="save" />
> </h:form>
> 
> as you see, there is a hidden field called 'section' and a parameter for
> the commandlink called 'section' too.
> the problem is that as longer as both have the same name, the hidden
> field will not be sent to the form, but when I change the name, I can
> retrieve its value with no problem. so, why is the parameter name
> affecting the whole form?
> It seems that the commandlink is called when the form is submitted. does
> this behaviour correspond to the jsf specifications?
> 
> thanks in advance
> 
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Mime
View raw message