So I started trying to make something like what we described and had a
few questions.  My changes are at http://bitbucket.org/saikat/weblocks-saikat/
.

1) Currently, I want the events to be able to either take backquoted
scripts that will be transformed into javascript calls made entirely
on the client-side or a lisp function that would be called with AJAX.
For example, if you pass `(test-fun) to on-keyup, it will just output
that using ps* in onKeyUp for the input.  I was going to do this by
putting this transformation code in the initialize-instance of my
event-presentation-mixin, but this led to me keeping on getting errors
that said ("The variable HUNCHENTOOT:*SESSION* is unbound."
"   [Condition of type UNBOUND-VARIABLE]" nil).  The only way I got it
to end up working was by putting the nasty transformation code in
render-view-field-value.  It would be nice though to be able to have
this code happen automatically in the initialize instance (so all the
presentations using this mixin won't have to remember to call this
transformation code) - do you have any ideas on this/know why the
*session* variable is unbound?

2) Is the approach I am taking similar to what you were imagining?  I
am just working with what little I know, so it is entirely likely that
I am missing some obviously better way of doing this - it feels like I
am ending up doing what you said I wouldn't have to do (setting up
actions on the server side that will be marking my widget dirty and
passing them to my on-keyup function).

3) I am also not entirely sure how to pass the widget that this
formview is part of as an argument to the function that will be callen
on-keyup, if it is a lisp function.  Is there a way from a form to get
it's owning widget?  Is there a way right now that you pass arguments
to actions called using AJAX?

Thanks a lot.

Saikat

On Mar 9, 3:52 am, "Leslie P. Polzer" <[email protected]>
wrote:
> > No, I think that is satisfactory, just making sure I understood
> > correctly.  And to call this function as a user enters values (before
> > hitting submit), I suppose I could extend form-view-field to take an
> > onchange function that runs using AJAX when the user enters a value in
> > the field (or not at all since it might be annoying to have a refresh
> > everytime the user changes a value in the form field)?
>
> Yes, that sounds appropriate.
>
> It would be great to integrate this into upstream, too.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to