I have a component. The controller is standard:
# controller
def index():
blah
blah
form=crud(db.mytable,record_id)
return dict(form=form)
# view index.html
...
LOAD("index","index.load",ajax=True)
# view index.load
{{=show_form(form)}}
# model
def show_form(form):
return DIV(form)
Later on, in an onclick triggers for a link causes a server-side
callback to select a new record for mytable. I want to get the same
form to load up again but with this new record selected.
The question is, how can I get the callback to force the new form to
get loaded? I tried having the callback return a
URL(r=request,c='mycontroller',f='index',args=[new_record_id]) but
this didn't seem to work.
I figure I could get this to work if I push the form creation onto the
view side, but this somehow seems wrong.
Suggestions are much appreciated.