Issue #4 new

checkbox/grid id serialization

Phil Marneweck
created an issue

Weblocks (checkbox/grid) expects an integer as the key of the data object. I looked into changing this behavior in the following function

{{{ (defun/cc dataseq-operations-action (obj &rest args) (declare (ignore args)) (dataseq-clear-selection obj) (loop for i in (request-parameters) when (string-starts-with (car i) "item-") do (dataseq-select-item obj (parse-integer (substring (car i) 5)))) (loop for i in (append (dataseq-item-ops obj) (dataseq-common-ops obj)) when (member (attributize-name (car i)) (request-parameters) :key (compose #'attributize-name #'car) :test #'string-equal) do (funcall (cdr i) obj (dataseq-selection obj))) (dataseq-clear-selection obj)) }}}

If the parse-integer is removed the code does not crash any more but attributize mangles the id value and by the time it gets back to the store to be used for deleting an item it is no longer recognizable.

This seems to be the only place that and integer is required so if the attributize can be changed to not mangle the id completely this can be sorted out.

Comments (0)

  1. Log in to comment