You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Raj Saini <ra...@gmail.com> on 2006/03/06 12:46:20 UTC

Form field Validation messages in JSF portlet

Hi,

I am developing portlets based on jsf bridge. I have a form with input
text  field and it's required attirbute set to true.  When I submit
this form with empty input value, validation error message should be
printed at <h:messge> tag location. This seems to be not working in
jsf bridge based portlets.

It looks to me that fields are being validated as I don't see the
action handler's process action method called however,  validation
messages is not printed.

Have someone experienced similar problem or I am missing something?

Regards,

Raj

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Form field Validation messages in JSF portlet

Posted by "Dr. Michael Lipp" <Mi...@danet.de>.
Hello Raj,

> I had a look on code CVS repository of and certainly would like to use
> your work. There are no build instructions for the code. Can you help
> me to find what I would need to build this code? Is this code
> independent of MyFaces and Jetspeed Portal bridges?
> 
> It would also be nice if I can get a jar file of you patched code for
> quick testing.

as you can see, the code is part of a larger util library. We have no
plans to release this as an independant library. But there is really no
magic involved. Just copy the classes into some utility library of your
own, change the package statements and make sure that you have the
myfaces jars on your compile classpath. Then use MyFacesAdaptedPortlet
instead of MyFacesPortlet in your portlet.xml.

Regards,

    Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Form field Validation messages in JSF portlet

Posted by Raj Saini <ra...@gmail.com>.
Hi Michael,

Thanks for your quick reply. I have also switched to
MyFacesGenericPortlet. However, it also gives unpredictable weired
results.

I had a look on code CVS repository of and certainly would like to use
your work. There are no build instructions for the code. Can you help
me to find what I would need to build this code? Is this code
independent of MyFaces and Jetspeed Portal bridges?

It would also be nice if I can get a jar file of you patched code for
quick testing.

Looking forward to your kind help.

Regards,

Raj

On 3/7/06, Dr. Michael Lipp <Mi...@danet.de> wrote:
> Raj Saini wrote:
> > Hi,
> >
> > I am developing portlets based on jsf bridge. I have a form with input
> > text  field and it's required attirbute set to true.  When I submit
> > this form with empty input value, validation error message should be
> > printed at <h:messge> tag location. This seems to be not working in
> > jsf bridge based portlets.
> >
> > It looks to me that fields are being validated as I don't see the
> > action handler's process action method called however,  validation
> > messages is not printed.
> >
> > Have someone experienced similar problem or I am missing something?
>
> It is a known issue, see https://issues.apache.org/jira/browse/PB-7.
>
> When I evaluated the JSF bridge from the bridges project and the
> MyFacesGenericPortlet from MyFaces last year, I found that
> MyFacesGenericPortlet caused less problems. I'm now using a heaviliy
> fixed MyFacesGenericPortlet; you can find the sources in
> http://cvs.sourceforge.net/viewcvs.py/wfmopen/wfmopen/src/de/danet/an/util/jsf/.
>
> Using JSF based Portlets seems to put you some no man's land. The error
> reported to portals bridges is unassigned since Sep 2005 and my patches
> for MyFacesGenericPortlet didn't receive much interest. My conclusion
> is: JSF based portlets are great to work with, but currently you have to
> maintain your own bridge code. This isn't too hard, and you gain good
> understanding of the JSF lifecycle. Of course, it is not as it should be...
>
>
>     Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: Form field Validation messages in JSF portlet

Posted by "Dr. Michael Lipp" <Mi...@danet.de>.
Raj Saini wrote:
> Hi,
> 
> I am developing portlets based on jsf bridge. I have a form with input
> text  field and it's required attirbute set to true.  When I submit
> this form with empty input value, validation error message should be
> printed at <h:messge> tag location. This seems to be not working in
> jsf bridge based portlets.
> 
> It looks to me that fields are being validated as I don't see the
> action handler's process action method called however,  validation
> messages is not printed.
> 
> Have someone experienced similar problem or I am missing something?

It is a known issue, see https://issues.apache.org/jira/browse/PB-7.

When I evaluated the JSF bridge from the bridges project and the
MyFacesGenericPortlet from MyFaces last year, I found that
MyFacesGenericPortlet caused less problems. I'm now using a heaviliy
fixed MyFacesGenericPortlet; you can find the sources in
http://cvs.sourceforge.net/viewcvs.py/wfmopen/wfmopen/src/de/danet/an/util/jsf/.

Using JSF based Portlets seems to put you some no man's land. The error
reported to portals bridges is unassigned since Sep 2005 and my patches
for MyFacesGenericPortlet didn't receive much interest. My conclusion
is: JSF based portlets are great to work with, but currently you have to
maintain your own bridge code. This isn't too hard, and you gain good
understanding of the JSF lifecycle. Of course, it is not as it should be...


    Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org