You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stav <cc...@yahoo.com> on 2003/03/04 17:01:47 UTC

Propagation of errors from Visit object to UI?

Hi,

is it possible to reference the current page from
within the Visit object.

The reason is that I am using the Visit object to
generate some dynamic option/select lists, depending
on roles and various business requirements.

The operations may generate certain errors like "no
connection to database", etc that I would like to flow
back up to the UI.

What is the best way of approaching this in Tapestry?

In Struts the ActionErrors component was the ideal
foil for this kind of problem. Is there an equivalent
mechanism in Tapestry?

To a limited extent I have used an extension of the
ValidationDelegate object as I ahve see it used in the
Virtual Library sample, but it seems that this is only
accessible from within a Page component.

Am I totally of base here?

Thanks in advance for all assistance.

Cheers,
Stav.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

RE: Palette Select cell sort order

Posted by Travis McCauley <tw...@virginia.edu>.
>Are you setting the sort parameter of the Palette?

Yes I'm setting it to org.apache.tapestry.contrib.palette.SortMode.USER

>Actually, there may be a bug.  I think the items end up in the order
>specified by the model even when manual sorting is enabled.

Yes that seems to be the case. If it matters, I'm using the 
EntitySelectionModel for the model.

>You'll need to
>add a bug (to BugZilla).

done.

Travis McCauley
University of Virginia Library

RE: Palette Select cell sort order

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Are you setting the sort parameter of the Palette?

Actually, there may be a bug.  I think the items end up in the order
specified by the model even when manual sorting is enabled.  You'll need to
add a bug (to BugZilla).

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Travis McCauley [mailto:twm4g@virginia.edu] 
> Sent: Tuesday, March 04, 2003 1:49 PM
> To: Tapestry users
> Subject: Palette Select cell sort order
> 
> 
> Hi,
> 
> I am using the Palette component with great glee.  It's really neat. 
> But I need help with the sort order in the Select cell. When the form 
> is submitted the resulting selectedItems List correctly reflects the 
> sort order specified by the user in the Palette. But when the Palette 
> renders a second time with the same List bound to Palette's 
> 'selected' parameter, the items go back to being ordered by 'value'. 
> How do I get the correct order to come back up?
> 
> Travis McCauley
> University of Virginia Library
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


Palette Select cell sort order

Posted by Travis McCauley <tw...@virginia.edu>.
Hi,

I am using the Palette component with great glee.  It's really neat. 
But I need help with the sort order in the Select cell. When the form 
is submitted the resulting selectedItems List correctly reflects the 
sort order specified by the user in the Palette. But when the Palette 
renders a second time with the same List bound to Palette's 
'selected' parameter, the items go back to being ordered by 'value'. 
How do I get the correct order to come back up?

Travis McCauley
University of Virginia Library

RE: Propagation of errors from Visit object to UI?

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
How about listener methods like:

public void doSomething(IRequestCycle cycle)
{

  try
  {
    Visit visit = (Visit)getVisit();

    visit.doSomething(...);
 }
 catch (VisitException ex)
 {
    IValidationDelegate delegate = ...;
    delegate.record(ex.getMessage(), null, null);
 }

(Slight errors --- this is from memory).

In other words, have the Visit throw an exception and have your listener
catch the exception and tell the validation delegate about it.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



> -----Original Message-----
> From: Stav [mailto:cclunis@yahoo.com] 
> Sent: Tuesday, March 04, 2003 11:02 AM
> To: Tapestry mailing lists
> Subject: Propagation of errors from Visit object to UI?
> 
> 
> Hi,
> 
> is it possible to reference the current page from
> within the Visit object.
> 
> The reason is that I am using the Visit object to
> generate some dynamic option/select lists, depending
> on roles and various business requirements.
> 
> The operations may generate certain errors like "no
> connection to database", etc that I would like to flow
> back up to the UI.
> 
> What is the best way of approaching this in Tapestry?
> 
> In Struts the ActionErrors component was the ideal
> foil for this kind of problem. Is there an equivalent
> mechanism in Tapestry?
> 
> To a limited extent I have used an extension of the 
> ValidationDelegate object as I ahve see it used in the 
> Virtual Library sample, but it seems that this is only 
> accessible from within a Page component.
> 
> Am I totally of base here?
> 
> Thanks in advance for all assistance.
> 
> Cheers,
> Stav.
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more 
http://taxes.yahoo.com/

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