Hi Scott,

Thanks for your reply.

I did not realize that globalOnly was a property of af:messages. In that case, I say that by default we SHOULD render all messages just like the desktop. The
user can choose to set globalOnly to true for PDAs if they want.  This gives
ultimate control to the user.

In terms of the disclosure, etc., I don't think we have time for that. For now I want to implement it as the desktop does, to limit the number of areas the app developer
might have to configure.

I agree that the renderers for PDAs and Desktop should be different.

Thanks,
Piyush

----- Original Message ----- From: "Scott O'Bryan" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, October 02, 2006 2:16 PM
Subject: Re: "messages" component on PDAs


Piyush,

I don't know why the messages don't display at all. I agree with you that they should.

Beyond that, I don't agree with anything else. I think the rendering of the messages component on a portable device needs some special attention that cannot be "solved" in the base renderer. As for not rendering component level messages, there is an API on the messages tag called "globalOnly". Disregarding this attribute and NEVER displaying the global messages is bad form. Especially since an app developer can adjust this for themselves using an EL expression and some logic to detect formfactor.

A better implementation might be to display global messages and then (if globalOnly is false) put the component level messages in some sort of disclosure or provide a nav icon or something with a way to return back to the original page..

Scott

piyush hari wrote:
Hello,
I have two questions regarding PDA renderers for "messages" component. *1) Can we make one common renderer for PDA and Desktop for a "messages" component ?* Desktop and PDAs have different renderers for a "messages" component. They are both located in org->apache->myfaces>trinidadinternal->ui->laf->base->pda/desktop->MessageboxRenderer.java With current trinidad code, on a desktop, the demo-app renders a message box that displays messageType (like Error) and the message (Label : Conversion Error) in the following format: (see desktop_messages.JPG)

On Pocket PCs (PIE and IE mobile) PDA message box is not rendered and it displays nothing. I did not understand why in the first place we need a different renderer for PDAs ? So, I tried something different. I copied the contents of DESKTOP MessageBoxRenderer.java into the PDA MessageBoxRenderer.java of a PDA. And it worked !!! PDA displays errors in the desired format. Everything appears same as desktop except the skin and the absence of Error Icon (X) on left of Label which I think are skinning issues. (see pda_messages.JSPX) *2) Since, limited screen size is a handicap on a PDA device, it does not make sense to show messages that are specific to a component (in this case an inputText) within "tr:messages" component (Label : Conversion Error) as well as below the component they belong to. (ex: Specified value is not a val....).* *In that case, shall I alter the PDA renderer from 1) to exclude any messages being added to the "messages" component if they are specific to a component?
*
** Sincerely,
Piyush Hari



Reply via email to