Re: improving xforms dispatch

Roland,

I can answer with a similar use case.

What this request gets to is the ability to take one of a set of actions
based on some condition, basically an if/then/else.
For example, we have an XForm with a set of <xf:select(1)>'s, but these
only appear when relevant, and only when they are relevant to be want to
getch the instance data that forms the <xf:itemset>. Now if the user
changes their mind and a selection becomes irrelevant and relevant again, I
don't really want to go out to the server to fetch that itemset data again.

That is, I want to get instance data on demand, but I only want to do it
the first time, if(count() = 0).

The request for an XPath expression in @name could achieve this, because
you could dispatch to an empty action or a "real" action.

Now I do have a complicated workaround that involves constraints and form
controls in an explicit display:none block, but this is not pretty or
elegant.

Andy




                                                                           
             Roland Merrick                                                
             <roland_merrick@u                                             
             k.ibm.com>                                                 To 
             Sent by:                  "mottagio@libero.it"                
             www-forms-request         <mottagio@libero.it>                
             @w3.org                                                    cc 
                                       "www-forms-editor"                  
                                       <www-forms-editor@w3.org>,          
             12/03/2004 02:00          www-forms-editor-request@w3.org,    
             AM                        www-forms@w3.org                    
                                                                   Subject 
                                       Re: improving xforms dispatch       
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           





Greetings, we have a future requirement that might be satisfied by enabling
the use of XPath attribute value templates in a number of XForms attributes
but not, so far, for @name on the dispatch action. We like to see our
requirements more in the form of use cases that cannot presently be
addressed, or perhaps the solutions are more difficult than one would like,
as opposed to simple requests for additional function.

Could you articulate a use case that leads you to request that
dispatch/@name should allow an XPath expression?

Regards, Roland

                                                                           
 "mottagio\@libero\.it"                                                    
 <mottagio@libero.it>                                                      
 Sent by:                                                                  
 www-forms-editor-request@w3.org                                        To 
                                               "www-forms-editor"          
                                               <www-forms-editor@w3.org>   
 03/12/2004 08:52                                                       cc 
                                                                           
                                                                   Subject 
                                               improving xforms dispatch   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           






I would like to suggest to the xforms working group to consider the
possibility of improving xforms 1.1 schema by accepting in attribute "name"
of element "xforms:dispatch" an xpath expression. This will allow
programmers more flexibility on construction of dynamic forms, implementing
the possibility to dispatch different events depending on instance data
values. It seems to me this is a big feature not so difficult to implement.
Thank you to everyone that will respond something about.
Best regards.
Giovanni Motta.



____________________________________________________________
Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega, senza costi di
attivazione.
Abbonati subito su http://www.libero.it

Received on Friday, 3 December 2004 16:37:59 UTC