[snow-cvs] r62 - trunk/src/lisp/snow
Alessio Stalla
astalla at common-lisp.net
Tue Feb 23 16:42:59 UTC 2010
Author: astalla
Date: Tue Feb 23 11:42:58 2010
New Revision: 62
Log:
with-widget can automatically get the widget from the backing bean if the
widget is a string (taken as the property name).
Modified:
trunk/src/lisp/snow/snow.lisp
Modified: trunk/src/lisp/snow/snow.lisp
==============================================================================
--- trunk/src/lisp/snow/snow.lisp (original)
+++ trunk/src/lisp/snow/snow.lisp Tue Feb 23 11:42:58 2010
@@ -252,9 +252,14 @@
self))
(setf (get ',name 'widget-p) t))))
+(defun maybe-extract-widget-from-backing-bean (widget)
+ (if (and *backing-bean* (stringp widget))
+ (jproperty-value *backing-bean* property-name)
+ widget))
+
(define-widget-macro with-widget
((widget &rest args &key &common-widget-args) &body body)
- `(dont-add ,widget)
+ `(dont-add (maybe-extract-widget-from-backing-bean ,widget))
`(progn
,@(generate-default-children-processing-code id body)
(setup-widget self ,@(filter-unevaluated-widget-args args))))
More information about the snow-cvs
mailing list