kaspars
unread,Jan 11, 2009, 6:10:12 PM1/11/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Skeletonz CMS
Hi!
I begun to experiment with Skeletonz a week ago, and i like it.
Thanks, this is a nice product!
I would like to ask your help in the following question. How to handle
page reloading?
I have a plugin, which structure looks like this:
==========================================================================
.....
class RegGood(GenericPlugin):
...........
def __init__(self):
self.controller = Controller()
getFormatManager().registerMLPlugin('reg_good', self.handler)
..............
def handler(self, args, edit_mode, page_id):
if args.has_key('data') and args.has_key('reg_good'):
................
main_page=render("site_plugins/reg_good/view/main.tmpl", args)
return False, main_page
class Controller(Singleton):
......................
@amiweb.expose
def show(self, reg_nr, rec_type, error=None, formvars={}):
..................
x=render("site_plugins/reg_good/view/show.tmpl", ns)
return x
..............
@amiweb.expose
@amiweb.customHandler
def register(self, path_info, formvars):
......................
ns = {
'header': self.template.getHeader(),
'footer': self.template.getFooter()
}
return render("site_plugins/reg_good/view/done.tmpl", ns)
==========================================================================
E.g., i have main page, which contains data from database and is
loaded, when i choose tab from the main menu.
When i want to add a record, i press button [Add], function
Controller.show() is called, and i can input record attributes. Then i
press button [Save], form action is executed and "done" screen appears
(actually, i copied it from Register form plugin :) ).
I press button [Close], and return in the main page.
The problem is that data in the main page is not updated, i.e.,
RegGood.handler() function is not fired. Could You advice, how to
handle the page reload event?
Thanks in advance!
Kaspars