vibhu.mohindra | 12 Jun 13:34 2014
Picon

secure logout

widgets/login.lisp's logout function does not clear the action table. Any actions whose URL's a user may have saved before logging out are still usable after they log out. So always do this in your code in addition to calling logout:
(weblocks:reset-webapp-session)

What I also need to do then to prevent a UI error, maybe only because I use the navigation widget, is:
(redirect (make-webapp-uri "/") :defer :post-action)
but this is less important than the above.

Vibhu

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
vibhu.mohindra | 11 Jun 22:48 2014
Picon

production mode disabling html stack traces

;*show-lisp-errors-p* is set indirectly by (start-weblocks :debug x)
(defmethod handle-error-condition :around ((app weblocks-webapp) c)
  (if *show-lisp-errors-p* (call-next-method) (handle-prod-error app c)))
(defun handle-prod-error (app c)
  (setf (weblocks::return-code*) 500)
  (weblocks::with-error-page-html ("500 Internal Server Error" "Error caught")
    (:p "There was an unexpected error.")))

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
vibhu.mohindra | 11 Jun 22:40 2014
Picon

production mode bugfix

;same as code in request-hooks.lisp except both "when" predicates are inverted.
;i.e. we always want "when" bodies to run else there is an error in non-debug
;mode saying that *parts-md5-context-hash* is unbound.
;an alternative fix is to just patch the original removing the when predicates.
;the correct fix is neither. it is to disable the code causing the "unbound var"
;complaint when in prod mode.
(eval-when (:load-toplevel)
  (pushnew
    (lambda ()
      (when (not (or *weblocks-global-debug*
                     (webapp-debug)))
        (weblocks-util:reset-html-parts-set)))
    (request-hook :application :pre-render))

  (pushnew
    (lambda ()
      (declare (special weblocks-util:*parts-md5-hash* weblocks-util:*parts-md5-context-hash*))
      (when (not (or *weblocks-global-debug*
                     (webapp-debug)))
        (progn
          (weblocks-util:update-html-parts-connections)
          (setf (webapp-session-value 'parts-md5-hash) weblocks-util:*parts-md5-hash*)
          (setf (webapp-session-value 'parts-md5-context-hash) weblocks-util:*parts-md5-context-hash*))))
    (request-hook :application :post-render)))

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
vibhu.mohindra | 11 Jun 22:38 2014
Picon

production mode performance improvement

;call this in production mode to greatly improve performance
;weblocks utils/html-parts.lisp
;I should probably confirm that this is only debugging code being turned off
(defun prod-tune ()
  (setf *process-html-parts-p* (constantly nil)))

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
vibhu.mohindra | 11 Jun 22:35 2014
Picon

fix for android

;android devices triggered a weblocks bug
;they send X-Requested-With: com.android.browser
;weblocks assumes that existence of any X-Requested-With implies an ajax request
;in fact ajax requests set that header to XMLHttpRequest
;this corrects weblocks
(defun weblocks:ajax-request-p ()
  (equal "XMLHttpRequest" (hunchentoot::header-in* "X-Requested-With")))

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
Fred | 17 Apr 14:57 2014
Picon

Dataedit : translate buttons Add and Delete

Hello,

in the dataedit.lisp file the function

dataedit-update-operations should be modified
to allow translation.

Bellow what i suggest.

The actual code :

(defmethod dataedit-update-operations (obj &key
                                   (delete-fn #'dataedit-delete-items-flow)
                                   (add-fn #'dataedit-add-items-flow))
  "Should be used to update operations the widget supports.

'delete-fn' - a function to be called when delete action is invoked.
'add-fn' - a function to be called when add action is invoked."
  (setf (dataseq-item-ops obj)
        (remove 'delete (dataseq-item-ops obj)
                :key #'car :test #'string-equal))
  (setf (dataseq-common-ops obj)
        (remove 'add (dataseq-common-ops obj)
                :key #'car :test #'string-equal))
  (when (and (dataedit-allow-delete-p obj)
             (> (dataseq-data-count obj) 0))
    (pushnew (cons 'delete delete-fn)
             (dataseq-item-ops obj)
             :key #'car))
  (when (dataedit-allow-add-p obj)
    (pushnew `(add . ,add-fn)
             (dataseq-common-ops obj)
:key #'car)))

New code :

(defmethod dataedit-update-operations (obj &key
(delete-fn #'dataedit-delete-items-flow)
(add-fn #'dataedit-add-items-flow))
"Should be used to update operations the widget supports.

'delete-fn' - a function to be called when delete action is invoked.
'add-fn' - a function to be called when add action is invoked."
(setf (dataseq-item-ops obj)
(remove 'delete (dataseq-item-ops obj)
:key #'car :test #'string-equal))
(setf (dataseq-common-ops obj)
(remove 'add (dataseq-common-ops obj)
:key #'car :test #'string-equal))
(when (and (dataedit-allow-delete-p obj)
(> (dataseq-data-count obj) 0))
(pushnew (cons (widget-translate obj :delete-items) delete-fn)
(dataseq-item-ops obj)
:key #'car))
(when (dataedit-allow-add-p obj)
(pushnew (cons (widget-translate obj :add-new-item) add-fn)
(dataseq-common-ops obj)
:key #'car)))



(defmethod widget-translation-table append ((obj dataedit-mixin) &rest args)
(list*
(cons :add-new-item "Add")
(cons :delete-items "Delete")
(cons :choose-items-for-deletion-message
(format nil
(translate "Please select ~A to delete.")
(translate
(humanize-name (dataseq-data-class obj))
:plural-p t
:accusative-form-p t)))
(append
(loop for count-keyword in (locale-number-forms (current-locale))
collect
(cons
(concatenate-keywords :items-deleted-message- count-keyword)
(format nil
(translate
"Deleted ~~A ~A."
:preceding-gender (determine-gender (humanize-name (dataseq-data-class obj)))
:preceding-count count-keyword)
(translate
(humanize-name (dataseq-data-class obj))
:items-count count-keyword
:accusative-form-p t))))
(loop for count-keyword in (locale-number-forms (current-locale))
collect
(cons
(concatenate-keywords :items-delete-question-for- count-keyword)
(format nil
(translate "Delete ~~A ~A?")
(translate
(humanize-name (dataseq-data-class obj))
:items-count count-keyword
:accusative-form-p t))))
(loop for (key . val) in (widget-translation-table 'do-confirmation :confirmation-type :yes/no)
collect (cons (concatenate-keywords :do-confirmation- key) val)))))


What's your opinion ?


Thnaks.

Best Regards.


--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
Fred | 4 Apr 14:25 2014
Picon

call-in-webapp execution over 7s

Hello,

my weblocks application use MySQL as data store.

In a widget, i use a gridedit to display some of 1600 entries
stored in a table of the DB.

With the on-query function, i apply a filter in order to only get a subset of these entries.

i have configured the gridedit to disallow pagination.

When the gridedit has to display 150 entries in the same window, it takes over 7s :(

When i profile the execution (slime-profile-package weblocks),
call-in-webapp takes 7s.

Any ideas ?

Best regards.

Thanks.

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
petter | 27 Mar 16:42 2014
Picon

Debugging datagrid?

I'm trying to use a datagrid which is connected to a clsql table. 

But I don't seem to get any HTML generated as the output is empty. If I run a query in the REPL I do get data:

.
REGRESSION> (clsql:with-database (db tables:*database-spec*) (clsql:select 'tull :database db :flatp t))
(#<TULL {100755D733}>)

Any suggestions for functions to trace or data to inspect?


--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/d/optout.
Shawna Sumerlin | 6 Mar 18:07 2014

Salvage and Asset Recovery

Hello,

Are you currently looking to sell any cargo or salvage from claims, or that is considered damaged/abandoned? Salvex has one of the largest networks of salvage buyers and more than 1,800 active salvage sales in over 100 countries. We can help large corporations, wholesalers, claims agents, transportation companies and marine surveyors sell all types of cargo and inventories, no matter what type of item or location. In most cities and ports, we have physical agents who can assist with logistics and local issues to complete that sale.

Salvex is successful due to repeat business and the consistent high recoveries from salvage sales. Please let us know what you have or if you have any questions regarding our services. Have a good day.

Regards,

Shawna Sumerlin
Salvex, Inc.
723 Main St. Ste. 600
Houston, TX 77002
713-229-9000 x114 - Phone
973-556-1328 - Fax
shawna-T1tSJ773ByzQT0dZR+AlfA@public.gmane.org - E-mail
www.salvex.com - Web Site

To unsubscribe from this email click here.

THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL TO WHOM IT IS ADDRESSED AND CONTAINS INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. IF YOU ARE NOT THE INTENDED RECIPIENT, OR THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY UNAUTHORIZED DISCLOSURE, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, OR ARE NOT SURE WHETHER IT IS PRIVILEGED, PLEASE IMMEDIATELY NOTIFY US BY REPLY E-MAIL AT cwilson-T1tSJ773ByzQT0dZR+AlfA@public.gmane.org THANK YOU.

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/groups/opt_out.

Guillermo Ithier | 24 Feb 10:27 2014
Picon

Weblocks error, Please can someone help.

Hello, and thank-you for your help. I am getting the following error and cannot get around it:

[package optima]
debugger invoked on a SB-KERNEL:SIMPLE-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {1002978C93}>:
  no symbol named "DESTRUCTURING-CASE" in "ALEXANDRIA.0.DEV"

This happens when I try the simple using quicklisp example. Your help will be greatly appreciated.
Thank you
Guillo

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/groups/opt_out.
petter | 18 Feb 15:26 2014
Picon

Does weblocks still require the hacked CLSQL-FLUID library?

Does the clsql postgresql-socket backend still require the hacked CLSQL-FLUID library?

--
You received this message because you are subscribed to the Google Groups "weblocks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weblocks+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to weblocks-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/weblocks.
For more options, visit https://groups.google.com/groups/opt_out.

Gmane