<font face="arial" size="2">Greetings:<br><br>I've been working on a pretty basic CRUD application using GROK and decided that Viewlets were the way to go for having a common layout and swapping in and out UI elements depending on the context.<br><br>So far so good, though the code used to wrap a built-in grok form in a viewlet is the first bit of ugly code I've been forced to write.&nbsp; We'll just chalk that up to growing pains.<br><br>I'm at a loss at how to provide two different forms for a particular context/content object.&nbsp; I'd like to have a viewlet register a grok.DisplayForm by default, but to show an edit form when the user asks for it.&nbsp; I have no problem creating viewlets for both forms, and having one or the other or both&nbsp; both display for one of my domain objects. This is what the hierachy of contexts in my app looks like.&nbsp; A Title is one of my domain objects.<br><br>Ledger (Container)<br>|<br>Titles (Container)<br>|<br>Title<br><br>So I can edit or view my domain object using a url like:<br><br>http://localhost:8080/ledger/titles/One<br><br>but I want to be able to edit the item like this:<br><br>http://localhost:8080/ledger/titles/One/edit<br><br>This is easy using views (it's the default way to do this), but I can't figure out how to accomplish this using viewlets. Someone mentioned that you can add and remove viewlets on the fly, but I'm having difficulty in wrapping my head around how.<br><br>Any pointers would be greatly appreciated.<br><br><br><br>Thanks and regards,<br><br><br>&nbsp;&nbsp; <br><br><!--WM_COMPOSE_SIGNATURE_START-->_______________<br>Robert Moskal<br>Most Media<br>Brooklyn, USA<br>347-529-4744<!--WM_COMPOSE_SIGNATURE_END--></font>