I guess I should just have def showFoo(xhtml: NodeSeq) and use bind to
render A, B, C, D, and E.

--Bryan

On May 30, 9:12 pm, Bryan <germ...@gmail.com> wrote:
> If Foo has 5 methods that I need to show in a Snippet (scattered
> throughout the template), what's a good way to S.error("inactive");
> S.redirectTo("/") whenever Box[Foo] cannot be opened because it is not
> Full, without having to write a bunch of boiler plate code for each of
> the show methods I have defined below.
>
> class SomeSnippet {
>   val foo: Box[Foo] = tryo(session1.get(S.param("id").getOrElse("")))
>
>   def showA(xhtml: NodeSeq): NodeSeq = ...
>   def showB(xhtml: NodeSeq): NodeSeq = ...
>   def showC(xhtml: NodeSeq): NodeSeq = ...
>   def showD(xhtml: NodeSeq): NodeSeq = ...
>   def showE(xhtml: NodeSeq): NodeSeq = ...
>
> }
>
> Thanks,
> Bryan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to