myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott O'Bryan" <darkar...@gmail.com>
Subject Re: [Trinidad][API] New Exception tells whether JSF needs to report the exception for TRINIDAD-2038
Date Thu, 17 Feb 2011 00:23:33 GMT
Hogbing,

I'm taking a look at the bug now but just so I understand..  When you
refer to JSF, I assume you mean the Trinidad renderkit.  Is that
correct?

Scott

On Feb 16, 2011, at 4:23 PM, Hongbing <hongbing.wang@oracle.com> wrote:

> Hi Pavitra:
> It can happen in update model phase. For example, Model layer throws exception when attribute
value validation fails, binding layer detects it and re-throwd new exception with the new
interface to JSF. JSF then can handle it accordingly.
>
> thanks,
> Hongbing
>
> On 2/16/2011 2:09 PM, Pavitra Subramaniam wrote:
>> Hello Hongbing,
>>
>> You mentioned that exceptions get thrown by model layer outside of JSF. Can you give
an e.g., of when this might occur?
>> How exactly will the interface get used?
>>
>> Thanks
>> Pavitra
>>
>>
>>
>> On 2/16/2011 1:01 PM, Hongbing wrote:
>>> Hi:
>>> This is for JIRA TRINIDAD-2038, please let me know your suggestion.
>>>
>>> There are cases that exception is thrown in update model phase, like model layer
validation failure, by model outside of JSF and the exception is also handled and reported
outside of JSF. To avoid the component's local value getting reset to null, JSF needs to be
notified when it happens. The proposed solution is to re-throw a special exception to JSF
to notify it and also let JSF know whether it needs to report the exception.
>>>
>>> Here is the interface of the exception:
>>> package org.apache.myfaces.trinidad.context;
>>>
>>> /**
>>> * Interface for exceptions that tells whether the exception needs to be reported.
>>> * If an exception is thrown during JSF lifycycle and aleady reported, then it
should let
>>> * JSF know not to report it again.
>>> *
>>> */
>>> public interface Reportable
>>> {
>>>
>>>  /**
>>>   * Return false if JSF doesn't need to report this exception, otherwise true.
>>>   */
>>>  public boolean isReportingMessage();
>>>
>>> }
>>>
>>> Thanks,
>>> Hongbing
>>>
>>>

Mime
View raw message