I remember read somewhere that doing a redirect or making the call
with ajaxp nill the problem must be solved, but i am doing something
bad and dont works, how can i solve this, thanks

On 14 ago, 15:53, salva <[email protected]> wrote:
> yes sorry,
>
> (defun make-admin-widget ()
> (make-instance 'composite :widgets
>                  (list
>           (make-widget "Administracion de tienda web")
>          (make-navigation 'navigation-admin
>                           'tienda (make-admin-tienda)
>                           'crm (make-admin-crm)
>                           'prensa (make-admin-news)
>                           'marketing (make-admin-marketing))
>
>          )))
>
> ;And de login widget
> ;http://teddyb.org/rlp/tiki-index.php?page=Learning+About
> +Weblocks#Wrapping_Things_In_Login_Widgets_A_Better_Way
>
> (defwidget login-maybe (login)
>            ((child-widget :accessor login-maybe-child-widget
>                           :initarg :child-widget
>                           :documentation "The widget to render if we
> are already logged in.  Must be wrapped in (lambda () ...) so
> that the bits inside can use auth information.  The lambda will be run
> exactly once.")
>             (real-child-widget
>               :documentation "Where the result of the child-widget
> lambda gets put."))
>            (:documentation "Render login form only if not logged
> in."))
>
> (defmethod initialize-instance ((self login-maybe) &key &allow-other-
> keys)
>   (call-next-method)
>   (setf (widget-continuation self)
>         (lambda (&optional auth)
>           (declare (ignore auth))       ;unless you care...
>           (mark-dirty self))))
>
> (defmethod render-widget-body ((self login-maybe) &key &allow-other-
> keys)
>   (cond
>     ((authenticatedp)
>      (render-widget (slot-value self 'real-child-widget) :inlinep t))
>     (t (call-next-method))))
>
> (defun check-login (login-widget obj)
>   "Check the user's login credentials"
>   (declare (ignore login-widget))
>   (cond
>     ; For now, we accept anything
>     (( ks-check-identity (webapp-session-value 'my-session) (slot-
> value obj 'email) (slot-value obj 'password))
>      (when
>         (login-maybe-child-widget login-widget)
>         (setf (slot-value login-widget 'real-child-widget) (funcall
> (login-maybe-child-widget login-widget)))
>         (setf (login-maybe-child-widget login-widget) nil))
>       t)))
>
> thanks ,
> Salva
>
> On 14 ago, 13:16, "Leslie P. Polzer" <[email protected]> wrote:
>
>
>
> > Hi Salva,
>
> > welcome to Weblocks!
>
> > Your code is missing some essential part -- the error is about
> > navigation-admin, but it's not there.
>
> >   Leslie

-- 
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