Re: background with span and default value with select

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: background with span and default value with select

Mark Waschkowski
OK, thanks for the info Aaron.

I think I will add this as a RFE, as this is common and should be
relatively easy to implement.

Cheers,

Mark

On Mar 27, 4:33 pm, Aaron Reed <[hidden email]> wrote:

> No.  If you'd like to see something like that in a future version of our
> processor, you can make a request for enhancement via:http://developer.mozilla.org/en/docs/XForms:RFE
>
> There are a couple of ways to handle what you'd like to do.  You could
> write a custom control (which will only work in the mozilla xforms
> processor) that would display the text you specify via attribute or
> child element if there is no currently selected item.  That shouldn't be
> too hard.  More info here:http://developer.mozilla.org/en/docs/XForms:Custom_Controls
>
> You could also write a constraint on the node that the select1 is bound
> to to make it invalid if there is no currently selected value (i.e. it
> is empty) and then put an inline alert on the select1 that will display
> your message.  The message won't appear in the actual select1 input
> field, but it will appear next to it whenever there is no currently
> selected item.
>
> Hope that this helps,
> --Aaron
>
> mwaschkowski wrote:
> > Hi Aaron,
>
> > Thanks for the info!
>
> > One quick followup - I guess that means that for a select1 its not
> > possible to have a default display like 'Select Owner' in the dropdown
> > without having an entry called 'Select Owner' in the xml data?
>
> > Thanks,
>
> > Mark
>
> > On Mar 26, 2:40 pm, Aaron Reed <[hidden email]> wrote:
> >> Hi Mark,
>
> >> As for span and div, I don't know.  Those are xhtml elements that we
> >> don't control.  All I can suggest is to look in bugzilla to see if it is
> >>   a known bug.  I saw a couple in there that mention span and
> >> background, but they were pretty specific and I didn't know your scenario.
>
> >> The value that a select1 shows when collapsed is the currently selected
> >> value.  The value that the select1 is bound to.  But that value must
> >> also exist in one of the contained items, otherwise the select1 is out
> >> of range.  This assumes @selection="closed" (the default).  So if you
> >> don't see a value in the select1 on page load, that means that the value
> >> in the node 'investorOwner' at the time of xforms-ready doesn't match
> >> any of the values /investorOwners/owner/ownerId values.
>
> >> Please let me know if you have any more questions,
> >> --Aaron
>
> >> mwaschkowski wrote:
> >>> Hi,
> >>> Quick comment and question:
> >>> -background on a span did not display for me using .7.0.1 plugin -
> >>> displayed fine when changed to div
> >>> How do I show a default value for a dropdown (ie. using select1)? This
> >>> is what I'm using now, and the default is blank:
> >>>                         <xf:select1 ref="investorOwner"
> >>> appearance="minimal">
> >>>                            <xf:itemset class="tableCell"
> >>> model="investorOwnerList"
> >>>                               nodeset="/investorOwners/owner">
> >>>                               <xf:label ref="ownerDisplayName"/>
> >>>                               <xf:value ref="ownerId"/>
> >>>                            </xf:itemset>
> >>>                         </xf:select1>
> >>> Thanks!
> >>> Mark


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms