Re: Fill a table form with only the current user's info? - trying to make a user control panel

27 views
Skip to first unread message

andrew b

unread,
Jan 21, 2013, 1:18:52 PM1/21/13
to turbo...@googlegroups.com
Well I found the solution to display limited fields. Here it tells you a way to limit fields, but it was more than I needed: http://sprox.org/tutorials/table.html

What I did was set the tmpl_context.widget to my user table class instance. And then set a variable with my filler class instance and used get_value(user_name = 'somethingHere'). Instead of 'user_name' you could use other attributes of your DB object like user_id which was the primary key for my User DB. To get my user object I used 'request.identity['user']' :
tmpl_context.widget = tUser_Table
fillerValue = tUser_Table_Value.get_value(user_name = currentUserObject.user_name)

Then in my template used: 
${tmpl_context.widget(value=fillerValue)}
Message has been deleted

andrew b

unread,
Jan 21, 2013, 3:07:41 PM1/21/13
to turbo...@googlegroups.com
Another note is I don't think this works in the CrudRestController class format. Looks like you have to use RestController.
Reply all
Reply to author
Forward
0 new messages