Here's a snippet: object parentOrganization extends SessionVar[Box[Organization]](Empty)
def create(xhtml: NodeSeq): NodeSeq = { var name: String = "" def processAdd() = { if (name.isEmpty) S.error("Please provide a name") else { val organization = new Organization() organization.setName(name) organization.addPartyRole(new ParentOrganization()); organization.addPartyRole(new InternalOrganization()); Model.em.getTransaction().begin(); Model.em.persist(organization) Model.em.getTransaction().commit(); //Now that I've got the parent organization, and it's going to be heavily used and modified, I'd like easy access to it. So how do I set it? parentOrganization(organization) Then once I've set it I should be able to do something like: org match { case Empty=>S.redirectTo("/eeek") case Full => full.is.getName() //To access the underlying organizatino object I think } I think.... but it's not working like I thought. If someone could give the right code, and an explanation of what's going on, I'd appreciate it! -- James A Barrows --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---