Indicating edited lines with background color

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

Indicating edited lines with background color

Gerrit Germis-2
Hi all,

We have a form that allows a user to edit detail lines on an invoice. Is
there a way to indicate to the user (change background color of input
fields or line) what values have been edited. Or even better, indicate
the whole row as edited when a value in it has been changed? The detail
lines are within a xforms:repeat loop, and this loop generates a <tr>
html table record. How can I dynamically change the class attribute of
this HTML element?

Thanks in advance,

Cheers,
Gerrit


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Indicating edited lines with background color

Erik Bruchez
Administrator
Gerrit,

That sounds like a valuable thing to do. Orbeon Forms does not feature  
this as a built-in functionality, so you have to build it yourself.

The general strategy would be something like this: as a response to  
xforms-value-changed, you store, possibly in a separate XForms  
instance, information about what controls have changed (for example  
their ids). Then, next to each control, you place a group or other  
control that can change based on that information. This could display  
an image indicating that the control has changed, for example.

Now, to go one step further and change background colors: currently,  
Orbeon Forms does not have the direct ability to change host language  
attributes, i.e. in our case HTML attributes. So you can't easily  
change an HTML class from XForms. This would clearly be the best  
solution I think.

We have a plan to implement an xxforms:attribute construct in the  
future which would allow us to do just that. Possibly, you could work  
around this limitation by using xxforms:script.

-Erik

On Nov 29, 2007, at 6:10 AM, Gerrit Germis wrote:

> Hi all,
>
> We have a form that allows a user to edit detail lines on an  
> invoice. Is
> there a way to indicate to the user (change background color of input
> fields or line) what values have been edited. Or even better, indicate
> the whole row as edited when a value in it has been changed? The  
> detail
> lines are within a xforms:repeat loop, and this loop generates a <tr>
> html table record. How can I dynamically change the class attribute of
> this HTML element?
>
> Thanks in advance,
>
> Cheers,
> Gerrit
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.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
OW2 mailing lists service home page: http://www.ow2.org/wws