You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rønnevik,
Eivind <ei...@kadme.com> on 2007/03/27 13:05:55 UTC
Possible "bug" in tag/component?
Hi!
To explain shortly, I have a page with a dataTable, and for each item in the table I can click a link and open a popup (using the window.open function in javascript) with specified information.
I also have some commandLinks and commandButtons inside my popup-page, and the backing bean lives in the request (I need to support multiple popups, each popup gets it's onw instance of the bean). Originally I had implemented a solution with t:saveState to keep the parameters, but for different reasons I had to go back to the "old way" of re-sending needed parameters through the request scope for each submit.
I have three parameters that my bean need through the request, and I started using the <t:inputHidden> component inside my form, like this:
<h:form id="popupForm">
........ different panelGrids, tables, buttons etc......
<t:inputHidden forceId="true" id="objectId" value="#{param['objectId']}"></t:inputHidden>
</h:form>
Suddenly all my commandLinks and commandButtons didn't work anymore, I could press them and the form would submit (causing a reload of the page), but no actions would be fired, and the updateActionListeners stopped working as well.
I really couldn't understand why, and the last thing I thought about was that it could have something to do with the <t:inputHidden> component. The generated html/source code seemed okay, and the parameters where properly passed into the request scope. But still, no actions would fire.
After several hours of struggling and not knowing where to go I decided to go for plain vanilla html to send the parameters instead, using the f:verbatim tag like this:
<f:verbatim>
<input type="hidden" name=" objectId " value="${param['objectId']}" />
</f:verbatim>
Then, suddenly all my links worked as they should, all actions being fired..
Can someone explain me if I did something wrong here, or if I've misunderstood the use of the <t:inputHidden> component? Or what can have caused this behavior?
I use the 1.1.5 version of both myfaces and tomahawk.
Regards,
Eivind
Re: Possible "bug" in tag/component?
Posted by Christian Kaltepoth <li...@kaltepoth.de>.
Hi Eivind,
> Suddenly all my commandLinks and commandButtons didn't work anymore, I
> could press them and the form would submit (causing a reload of the page),
> but no actions would be fired, and the updateActionListeners stopped
> working as well.
Did you use the <h:messages/> tag in your page to display potential validation
errors? Perhaps some validation error occurred that is not displayed. This
would cause your action method and the listeners to be ignored because of the
failure in the validation phase.
Kind regards
Christian
--
Christian Kaltepoth <ch...@kaltepoth.de>
GnuPG Key: http://www.kaltepoth.de/gnupg/pubkey.asc
Fingerprint: 9F04 0A94 CC40 C3EF 1A69 B2BB 51F4 4C84 BEB6 F127
Re: Possible "bug" in tag/component?
Posted by Christian Kaltepoth <ch...@kaltepoth.de>.
Hi Eivind,
> Suddenly all my commandLinks and commandButtons didn't work anymore, I
> could press them and the form would submit (causing a reload of the page),
> but no actions would be fired, and the updateActionListeners stopped
> working as well.
Did you use the <h:messages/> tag in your page to display potential validation
errors? Perhaps some validation error occurred that is not displayed. This
would cause your action method and the listeners to be ignored because of the
failure in the validation phase.
Kind regards
Christian
--
Christian Kaltepoth <ch...@kaltepoth.de>
GnuPG Key: http://www.kaltepoth.de/gnupg/pubkey.asc
Fingerprint: 9F04 0A94 CC40 C3EF 1A69 B2BB 51F4 4C84 BEB6 F127