problem with a bind to a readonly instance ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with a bind to a readonly instance ?

Doug Young

Hi,

 

We have a problem when we set a xxforms:readonly instance to be bind readonly  I know it seems an odd thing to do but it happens in our application when we want to make a printable version of the page we set all the instances to readonly,

 

Is this a bug or a feature ?

 

Also it would be really helpful if the “Cannot modify read-only instance” message told you which instance it was.

 

  The attached file shows the problem.

 

regards

Doug

 

Doug Young

Software Engineer

 

Teleflex IT

1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

+44 (0) 1506 407107

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

bind-readonly-instance-bug.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Erik Bruchez
Administrator
Doug,

Well, hard to say if it's really a feature, but the answer is that at
the moment you can't use model item properties with a read-only instance:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly

-Erik

Doug Young wrote:

> Hi,
>
>  
>
> We have a problem when we set a xxforms:readonly instance to be bind
> readonly  I know it seems an odd thing to do but it happens in our
> application when we want to make a printable version of the page we set
> all the instances to readonly,
>
>  
>
> Is this a bug or a feature ?
>
>  
>
> Also it would be really helpful if the “Cannot modify read-only
> instance” message told you which instance it was.
>
>  
>
>   The attached file shows the problem.
>
>  
>
> regards
>
> Doug
>
>  
>
> Doug Young
>
> Software Engineer
>
>  
>
> Teleflex IT
>
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>
> +44 (0) 1506 407107
>
>  
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Ryan Puddephatt
Erik,
    Seeing as the instance is marked as readonly using the xxforms:readonly rather than using a xforms:bind shouldn't the xxforms:readonly-appearance="static" act the same?

Ryan

Erik Bruchez wrote:
Doug,

Well, hard to say if it's really a feature, but the answer is that at the moment you can't use model item properties with a read-only instance:

  http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly

-Erik

Doug Young wrote:
Hi,

 

We have a problem when we set a xxforms:readonly instance to be bind readonly  I know it seems an odd thing to do but it happens in our application when we want to make a printable version of the page we set all the instances to readonly,

 

Is this a bug or a feature ?

 

Also it would be really helpful if the “Cannot modify read-only instance” message told you which instance it was.

 

  The attached file shows the problem.

 

regards

Doug

 

Doug Young

Software Engineer

 

Teleflex IT

1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

+44 (0) 1506 407107

 




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Erik Bruchez
Administrator
Ryan,

You mean that a read-only instance should behave as if all of its nodes
had a readonly MIP? That may be a reasonable behavior to implement.

-Erik

Ryan Puddephatt wrote:

> Erik,
>     Seeing as the instance is marked as readonly using the
> xxforms:readonly rather than using a xforms:bind shouldn't the
> xxforms:readonly-appearance="static" act the same?
>
> Ryan
>
> Erik Bruchez wrote:
>> Doug,
>>
>> Well, hard to say if it's really a feature, but the answer is that at
>> the moment you can't use model item properties with a read-only instance:
>>
>>   http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly
>>
>> -Erik
>>
>> Doug Young wrote:
>>> Hi,
>>>
>>>  
>>>
>>> We have a problem when we set a xxforms:readonly instance to be bind
>>> readonly  I know it seems an odd thing to do but it happens in our
>>> application when we want to make a printable version of the page we
>>> set all the instances to readonly,
>>>
>>>  
>>>
>>> Is this a bug or a feature ?
>>>
>>>  
>>>
>>> Also it would be really helpful if the “Cannot modify read-only
>>> instance” message told you which instance it was.
>>>
>>>  
>>>
>>>   The attached file shows the problem.
>>>
>>>  
>>>
>>> regards
>>>
>>> Doug
>>>
>>>  
>>>
>>> Doug Young
>>>
>>> Software Engineer
>>>
>>>  
>>>
>>> Teleflex IT
>>>
>>> 1 Michaelson Square
>>> Livingston
>>> West Lothian
>>> Scotland
>>> EH54 7DP
>>>
>>> +44 (0) 1506 407107
>>>
>>>  
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>  
>
> --
>
> Ryan Puddephatt
> Software Engineer
>  
> Teleflex Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotland
> EH54 7DP
>  
> e> [hidden email] <mailto:[hidden email]>
> t> +44(0)1506 407 110
> f> +44(0)1506 407 108
> w> www.teleflex.com <http://www.teleflex.com>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Erik Bruchez
Administrator
FYI I fixed this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306793&group_id=168&atid=350207

-Erik

Erik Bruchez wrote:

> Ryan,
>
> You mean that a read-only instance should behave as if all of its nodes
> had a readonly MIP? That may be a reasonable behavior to implement.
>
> -Erik
>
> Ryan Puddephatt wrote:
>> Erik,
>>     Seeing as the instance is marked as readonly using the
>> xxforms:readonly rather than using a xforms:bind shouldn't the
>> xxforms:readonly-appearance="static" act the same?
>>
>> Ryan
>>
>> Erik Bruchez wrote:
>>> Doug,
>>>
>>> Well, hard to say if it's really a feature, but the answer is that at
>>> the moment you can't use model item properties with a read-only
>>> instance:
>>>
>>>   http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly
>>>
>>> -Erik
>>>
>>> Doug Young wrote:
>>>> Hi,
>>>>
>>>>  
>>>>
>>>> We have a problem when we set a xxforms:readonly instance to be bind
>>>> readonly  I know it seems an odd thing to do but it happens in our
>>>> application when we want to make a printable version of the page we
>>>> set all the instances to readonly,
>>>>
>>>>  
>>>>
>>>> Is this a bug or a feature ?
>>>>
>>>>  
>>>>
>>>> Also it would be really helpful if the “Cannot modify read-only
>>>> instance” message told you which instance it was.
>>>>
>>>>  
>>>>
>>>>   The attached file shows the problem.
>>>>
>>>>  
>>>>
>>>> regards
>>>>
>>>> Doug
>>>>
>>>>  
>>>>
>>>> Doug Young
>>>>
>>>> Software Engineer
>>>>
>>>>  
>>>>
>>>> Teleflex IT
>>>>
>>>> 1 Michaelson Square
>>>> Livingston
>>>> West Lothian
>>>> Scotland
>>>> EH54 7DP
>>>>
>>>> +44 (0) 1506 407107
>>>>
>>>>  
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> --
>>> You receive this message as a subscriber of the
>>> [hidden email] mailing list.
>>> To unsubscribe: mailto:[hidden email]
>>> For general help: mailto:[hidden email]?subject=help
>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>>  
>>
>> --
>>
>> Ryan Puddephatt
>> Software Engineer
>>  
>> Teleflex Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotland
>> EH54 7DP
>>  
>> e> [hidden email] <mailto:[hidden email]>
>> t> +44(0)1506 407 110
>> f> +44(0)1506 407 108
>> w> www.teleflex.com <http://www.teleflex.com>
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Adrian Baker
In reply to this post by Erik Bruchez
Hi Erik,

If model item properties could still be applied to xxforms-readonly instances this would expand the number of scenarios it could be used in. For example, we use forms containing only xf:outputs to present data, but we still need the datatype & relevance properties to present the data correctly.

However I suppose in implementing full MIP support you might lose the performance gain of xxforms-readonly, which is the whole point.. ?

Adrian

Erik Bruchez wrote:
Doug,

Well, hard to say if it's really a feature, but the answer is that at the moment you can't use model item properties with a read-only instance:

  http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly

-Erik

Doug Young wrote:
Hi,

 

We have a problem when we set a xxforms:readonly instance to be bind readonly  I know it seems an odd thing to do but it happens in our application when we want to make a printable version of the page we set all the instances to readonly,

 

Is this a bug or a feature ?

 

Also it would be really helpful if the “Cannot modify read-only instance” message told you which instance it was.

 

  The attached file shows the problem.

 

regards

Doug

 

Doug Young

Software Engineer

 

Teleflex IT

1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

+44 (0) 1506 407107

 




-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: problem with a bind to a readonly instance ?

Erik Bruchez
Administrator
Adrian,

The reason is mainly a practical one.

MIPs are currently stored as annotations ("user data") on nodes in the
case of read-write instances implemented with dom4j.

But read-only instances are backed-up by Saxon TinyTree objects, which
do not support adding annotations on nodes (they are, as the code says,
"optimized for size, and for speed of creation").

The alternative would be to:

1. Revert to dom4j when MIPs are used (but as you say that latter
solution would kill most of the benefits of read-only instances).

2. Switch to another tree representation or modify TinyTree to support
annotations.

3. Store MIPs outside the tree (e.g. a Map node id -> MIP information).
This could be promising, but it would be some work.

-Erik

Adrian Baker wrote:

> Hi Erik,
>
> If model item properties could still be applied to xxforms-readonly
> instances this would expand the number of scenarios it could be used in.
> For example, we use forms containing only xf:outputs to present data,
> but we still need the datatype & relevance properties to present the
> data correctly.
>
> However I suppose in implementing full MIP support you might lose the
> performance gain of xxforms-readonly, which is the whole point.. ?
>
> Adrian
>
> Erik Bruchez wrote:
>> Doug,
>>
>> Well, hard to say if it's really a feature, but the answer is that at
>> the moment you can't use model item properties with a read-only instance:
>>
>>   http://www.orbeon.com/ops/doc/reference-xforms-ng#xxforms-readonly
>>
>> -Erik
>>
>> Doug Young wrote:
>>> Hi,
>>>
>>>  
>>>
>>> We have a problem when we set a xxforms:readonly instance to be bind
>>> readonly  I know it seems an odd thing to do but it happens in our
>>> application when we want to make a printable version of the page we
>>> set all the instances to readonly,
>>>
>>>  
>>>
>>> Is this a bug or a feature ?
>>>
>>>  
>>>
>>> Also it would be really helpful if the “Cannot modify read-only
>>> instance” message told you which instance it was.
>>>
>>>  
>>>
>>>   The attached file shows the problem.
>>>
>>>  
>>>
>>> regards
>>>
>>> Doug
>>>
>>>  
>>>
>>> Doug Young
>>>
>>> Software Engineer
>>>
>>>  
>>>
>>> Teleflex IT
>>>
>>> 1 Michaelson Square
>>> Livingston
>>> West Lothian
>>> Scotland
>>> EH54 7DP
>>>
>>> +44 (0) 1506 407107
>>>
>>>  
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email] mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>  

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws