Re: Simple template-based editing

----- Original Message ----- 
From: "Dimitri Glazkov" <dimitri.glazkov@gmail.com>


| On 10/3/05, Andrew Fedoniouk <news@terrainformatica.com> wrote:
| >
| > ----- Original Message -----
| > From: "Daniel Glazman" <daniel.glazman@disruptive-innovations.com>
| > >
| > > Dimitri Glazkov wrote:
| > >
| > >> There is not question they are both lists. However, the <select> list
| > >> has inherent input semantics that are not present in a <ul>|<ol>.
| > >
| > > No, it has no "input semantics". It has a different input behavior, while
| > > a <ul> has no input behavior by default.
| > >
| >
| > Agree.
|
| Hmm... Maybe I didn't say it right, but what I meant is that "select"
| communicates to the UA what are expected input choices are for a given
| POST or GET query parameter. That's not something ordinary lists can
| do.
|
| Is this what you mean by input behavior? I would think that term
| should refer to how the actual UI element works in the browser.
|

As you know these two lists being placed in form will produce exactly
the same GET/POST request to the server:

<select size=3 name="list">
   <option value="1" selected>One</option>
   <option value="2" >Two</option>
   <option value="3" >Three</option>
</select>
-and-
<ul style="overflow:auto">
    <li><input type=radio name="list" value="1" checked />One</li>
    <li><input type=radio name="list" value="2" />Two</li>
    <li><input type=radio name="list" value="3" />Three</li>
<li>

These lists differ only by presentational style and, again, very slightly
by behavior ( e.g. second one enumerates items by tab, first one by arrow 
keys ).

"...That's not something ordinary lists can do..."

Imagine that you have something like this:

ul { overflow:auto; }
ul > li { behavior:radio; role:form-field; }

<ul name="list">
    <li value="1" checked>One</li>
    <li value="2">Two</li>
    <li value="3">Three</li>
<li>

Then on submit smart UA can enumerate all elements
in the form(or other container) with role == "form-field" and send them to the 
server.

Some comments on 'role'/'behavior' attributes:

'behavior' defines interaction style of the element.
'role' defines its purpose e.g. form-field.

Another example:
in-place WYSIWYG editing may require something like:
<span style="behavior:checkbox; role:observer" name="strong-state" />
near some <htmlarea> to show strong/non-strong state at its caret position.
Having role:observer defined will ommit sending its value to the server on 
Submit.

Theoretically yours,

Andrew Fedoniouk.
http://terrainformatica.com

Received on Monday, 3 October 2005 20:01:53 UTC