Re: Lazy authoring

1. Proposal: We deprecate lazy authoring.

2.
The spec says "The default action for this event happens once, no matter  
how many Models are present:"
(This probably means that the event shouldn't really be dispatched to the  
model, but that ship has sailed).

So, the process as described, walks through the controls one by one; lazy  
authoring happens per control.

No lazy authoring for the control is done:

   "If the instance referenced on the form control existed when the first  
form control was processed:"

Lazy authoring is done for the control:

    "If the instance referenced on the form control did not exist when the  
first form control for the same instance was processed:"

I think it refers to cases like:

   <model/>
   model id="m"/>

   <input ref="a" label="a"/>
   <input ref="b" label="b"/>
   <input ref="a" model="m" label="ma"/>
   <input ref="b" model="m" label="mb"/>

So I think that "for the same instance" is missing from the first case.

Agree?

Steven


> So for a given model, we either initially:
>
> 1. have at least one instance
> 2. or do not have any instance
>
> If #2, then lazy authoring is enabled for that model.
>
> Now my understanding is that if lazy authoring is enabled for a model:
>
> 1. This only handles a single instance automatically ("a default  
> instance is created").
> 2. You can only specify things like `ref="foo"` as control bindings ("An  
> instance data element node is created using the binding expression from  
> >the user interface control as the name").
>
> So you cannot use the `instance()` function in the binding anyway. That  
> would cause a binding error.
>
> So it is very limited but simple.
>
> -Erik
>
>
> On Mon, Nov 14, 2016 at 3:33 AM, Steven Pemberton  
> <steven.pemberton@cwi.nl> wrote:
>> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#The_xforms-model-construct-done_Event
>>
>> This splits initialization into two types 1) when instances are  
>> specified, and 2) when they are not.
>>
>> The conditions for the two sorts are different though:
>>
>>        If the instance referenced on the form control existed when the  
>> first form control was processed:
>>
>>        If the instance referenced on the form control did not exist  
>> when the first form control for the same instance was processed:
>>
>> So which is it? Is Lazy authoring global, or per instance?
>>
>> Is the second input OK or not?
>>
>>  <model>
>>    <instance id='p'><data xmlns=""><i/></data></instance>
>>  </model>
>>
>>  <input ref="instance('p')/i" label="i"/>
>>  <input ref="instance('q')/i" label="i"/>
>>
>> How about if you swap the inputs?
>>
>> Steven

Received on Wednesday, 23 November 2016 11:18:30 UTC