Yes, your are right.  My plan was for each user to have an instance of this
class (which is just a sql data viewer) in their home folder.  Then the
change of views would not affect other users.  But I like the idea of that
redirect.  I'm definatly going to try that out.  Thanks for all the replies.

Craig


Eric Brehault wrote:
> 
> hello,
> 
> this should work:
> self.setLayout("yourview")
> 
> but if you just want to redirect to a specific view, you do not
> necessarily need to modify the default layout, you may just call the
> view:
> REQUEST.RESPONSE.redirect(self.absolute_url()+"/yourview")
> 
> eric
> 
> On Tue, Aug 12, 2008 at 9:39 PM, cswank <[EMAIL PROTECTED]> wrote:
>>
>> Hello All,
>> When you change the view of a content item (via the 'Display' drop down),
>> the selected view is stored and used the next time the content is
>> visited.
>> My question is, how can I change the view programmatically?
>>
>> I have a content item that has a formlib form as its default view.  When
>> the
>> user submits the form, I want the browser to redirect to the same content
>> item, but now with a different view.  The chosen view is based on the
>> user's
>> input into the form.
>>
>> Craig
>>
>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Change-view-programmatically-tp720329p720329.html
>> Sent from the Product Developers mailing list archive at Nabble.com.
>>
>>
>> _______________________________________________
>> Product-Developers mailing list
>> [email protected]
>> http://lists.plone.org/mailman/listinfo/product-developers
>>
> 
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Change-view-programmatically-tp720329p721979.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to