Closed GoogleCodeExporter closed 9 years ago
Additional information:
If I use firebug and inspect the object postSettings.storeObj before it is sent
to ajax function (save: in form.jquery.js) here is what is in it when the form
has a single checkbox checked.
"[{"qname":"pts_documenttypes","value":"dtChkbox","type":"d_text"},{"qname":"tes
t_checkboxes","value":["a"],"type":"d_text"}]"
If I remove the square bracket around ["a"] then the form is able to save
correctly.
"[{"qname":"pts_documenttypes","value":"dtChkbox","type":"d_text"},{"qname":"tes
t_checkboxes","value":"a","type":"d_text"}]"
But this will not work if there are more than one checkboxes checked. Can you
let me know which file has the procedure that handles the parsing of the data
from postSettings before saving it to the database? Thank you.
Original comment by anhthan...@gmail.com
on 17 Nov 2012 at 1:28
Hi there, in your form design. Make sure you have multiple turned on. This
allows alfresco to store an array of values (the checkbox values).
This is available in the alfresco options when you select the field.
Original comment by mike.pri...@abstractive.ca
on 17 Nov 2012 at 11:55
Please let me know if this solves your issue.
Original comment by mike.pri...@abstractive.ca
on 17 Nov 2012 at 11:56
Thank you for your reply. If I turn on the "Multiple" option for the checkboxes
field the form would save successfully but when I return to view the form the
checkboxes that were checked do not show as selected. So all the checkboxes
show up as blank.
Original comment by anhthan...@gmail.com
on 19 Nov 2012 at 9:23
What version of alfresco and form management are you using. I have tested its
ok with everything up to 4.0.2
I haven't got around to going through everything in 4.2 Community yet.
Sometimes Alfresco doesn't think switching from single to multiple is
"incremental" when going through hot deploy so it doesn't persist.
You could try creating another field and adding multiple right away.
Original comment by mike.pri...@abstractive.ca
on 20 Nov 2012 at 4:13
I've tested it again with clean install and new checkbox test with multiple
option switched on to on. I'm using form management 1.3.4.1, share 2.4,
Alfresco Community 4.0.e.
Also, can you advise on how to clear the message "There was a problem
validating the model, one or more properties maybe in use." every time I make
changes to a form and saving the form in the form administration view? I made
sure that there are no objects using the current form model but that message
always persists. Most of the time I have to recreate a new form every time I
want to make changes to an existing form.
Can you tell me the places to check so that the current model is not in used?
I tried deleting the documents that had the form data previously and removing
it from trash. Should I look into the data in the database as well? I'm not
sure if there are other places I could check to have the form model available
to be updated without that error message popping up. Thank you.
Original comment by anhthan...@gmail.com
on 21 Nov 2012 at 1:50
If you have a look at the console in firebug when the ajax post is made - it
gives you a bit more information.
Most of the time its alfresco that just won't let the change happen; this is
due to the incremental changes to dynamic models. Sadly there's nothing we can
really do about it. On the flip side sometimes its related to the removal of
fields and nodes using that aspect. Typically you would remove the document
from both the doc lib and trash. However, since 4.0.x it seems it just doesn't
like deletion at all (im looking into this issue).
I'm going to see if i can replicate your environment. Does the console give you
anything about the checkboxe's when saving and/or does the GET request for the
node (/alfresco/wcs/form-management/get-properties) have options in the JSON
object?
Mike
Original comment by mike.pri...@abstractive.ca
on 21 Nov 2012 at 4:19
Hi Mike, I figured out the problem. It turns out somehow I had the older
version of the file form.jquery.js on the system. The if statement that checks
for the checked checkboxes did not check when the property is an object. I
think this was from the older version. I have many customizations on the
module and each time it gets updated I have to migrate my customizations over
to the new version but somehow I missed a part of this code. Sorry for the
trouble. Thank you for the support.
Original comment by anhthan...@gmail.com
on 28 Nov 2012 at 12:38
Hey, no problem. I'm glad you found the issue! I will change the bug status to
fixed.
Cheers, Mike
Original comment by mike.pri...@abstractive.ca
on 28 Nov 2012 at 12:56
Original issue reported on code.google.com by
anhthan...@gmail.com
on 7 Nov 2012 at 11:56Attachments: