You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Bob Paige <bo...@gmail.com> on 2009/02/09 16:18:35 UTC

checkboxes?

I'd like an opinion about a feature I think would be useful for JSPWiki.

In TiddlyWiki (a single-user wiki) they have the concept of checkboxes in a
page. You might use it for a to-do list or something similar. The point is,
when you write the markup you can include checkboxes and these checkboxes
have state that is also expressed in the markup. The syntax they user
conflicts with JSPWiki's markup, but that is a separate issue.

I could use this today for things like meeting notes in a wiki page or a
todo list of tasks for a project. Instead of me editing the page to change a
word from 'in process' to 'done' or something similar, I would like to be
able to simply check a box and know the state is changed and the page is
updated on the server.

Assuming that make sense, this becomes a question of implementation. I see a
few options here.

1) Every click on a checkbox immediately sends a message to the server to
modify the page and save the state.
The advantage to this solution is accuracy.

2) A click on a checkbox starts a Javascript timer (say, 10 seconds or
whatever is reasonable) that will trigger the message later
The advantage to this solution is fewer updates if you are clicking several
items.

3) Define a Javascript handler that sends the update when you leave the page
(I think this is possible)
This solution sends the fewest updates to the server (fewer version changes
on the server) but the disadvantage is that you may lose an update if the
browser crashes or is closed, etc.

All of this assumes that changing the state of a checkbox is something that
can be done even if the page has been updated on the server (i.e. the
message to update a checkbox identifies the checkbox to be updated and that
change is applied to the copy of the page on the server; the entire page
need not be sent in every message).

Does this sound useful, or dangerous? Is there anything out there already
like this?

Thanks.

-- 
Bobman

Re: checkboxes?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
> Google Docs, anyone?

Exactly, not impossible but loads of work :-D

/Janne

Re: checkboxes?

Posted by Derek Hohls <DH...@csir.co.za>.
Google Docs, anyone?

>>> On 2009/02/10 at 03:32, in message <20...@ecyrd.com>, Janne Jalkanen <ja...@iki.fi> wrote:
> The approach taken by VotePlugin, or even persistent metadata, could be
> useful but separates the state of the checkboxes from the content. Perhaps
> an example (from TiddlyWiki) would help illustrate what I mean:

Yup, and that's the whole idea.  *If* you modify the content of the
page, you can't really avoid possible conflicts, which I understood to
be your requirement.

Locking doesn't help either, because in your model there is no "start
of edit", which would lock the page.

So the real solution would be a true collaborative editor, in which
all changes to a page would be reflected to everyone currently viewing
the page.  This is not impossible, though a lot of work :-)

/Janne


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Re: checkboxes?

Posted by Janne Jalkanen <ja...@iki.fi>.
> The approach taken by VotePlugin, or even persistent metadata, could be
> useful but separates the state of the checkboxes from the content. Perhaps
> an example (from TiddlyWiki) would help illustrate what I mean:

Yup, and that's the whole idea.  *If* you modify the content of the
page, you can't really avoid possible conflicts, which I understood to
be your requirement.

Locking doesn't help either, because in your model there is no "start
of edit", which would lock the page.

So the real solution would be a true collaborative editor, in which
all changes to a page would be reflected to everyone currently viewing
the page.  This is not impossible, though a lot of work :-)

/Janne

Re: checkboxes?

Posted by Bob Paige <bo...@gmail.com>.
The approach taken by VotePlugin, or even persistent metadata, could be
useful but separates the state of the checkboxes from the content. Perhaps
an example (from TiddlyWiki) would help illustrate what I mean:

----------- example page ---------------------
! This is my todo list
[ ]first item
[ ]second item
[x]third item
----------- end example -------------------

(In TiddlyWiki, links are surrounded by [[ ]] instead of just [ ] as in
JSPWiki)

Each "[ ]" is displayed as a checkbox. When the user ticks the box, the "[
]" in the page is replaced with "[x]". Thus, it is easy to both see the
status of a checkbox while editing, and to even create a list of checkboxes
with some pre-ticked.

If the state of the checkboxes was not in the content, it becomes much more
confusing.

Hope this helps.

-- 
Bobman


On Mon, Feb 9, 2009 at 2:13 PM, Janne Jalkanen <ja...@ecyrd.com>wrote:

>
>> All of this assumes that changing the state of a checkbox is something
>> that
>> can be done even if the page has been updated on the server (i.e. the
>> message to update a checkbox identifies the checkbox to be updated and
>> that
>> change is applied to the copy of the page on the server; the entire page
>> need not be sent in every message).
>>
>> Does this sound useful, or dangerous? Is there anything out there already
>> like this?
>>
>
> If you're worried about page corruption, you could do what VotePlugin does
> and store it in a local attachment in whatever format you fancy.
>
> In 3.0, pages will have persistent metadata, so that should help *a lot* in
> these things.
>
> /Janne
>

Re: checkboxes?

Posted by Janne Jalkanen <ja...@ecyrd.com>.
>
> All of this assumes that changing the state of a checkbox is  
> something that
> can be done even if the page has been updated on the server (i.e. the
> message to update a checkbox identifies the checkbox to be updated  
> and that
> change is applied to the copy of the page on the server; the entire  
> page
> need not be sent in every message).
>
> Does this sound useful, or dangerous? Is there anything out there  
> already
> like this?

If you're worried about page corruption, you could do what VotePlugin  
does and store it in a local attachment in whatever format you fancy.

In 3.0, pages will have persistent metadata, so that should help *a  
lot* in these things.

/Janne