开发者

Possible to implement an XForms Color Picker? (Not using Orbeon)

I'm looking to implement an XForms Color Picker/S开发者_StackOverflow中文版elector/Control (you know where it shows boxes or shades of colors in a dropdown type control).

Is it possible to do this in XForms (without using Orbeon; I am using XSLTForms)? Is so, how is it implemented, or can anyone point me to (simple) code examples that do?


The best approach will depend on what XForms implementation you are using. If Orbeon Forms, I would create an XBL component that encapsulate the YUI color picker:

http://developer.yahoo.com/yui/colorpicker/


If you're using the Firefox plugin exclusively, then you can create new xform extension components by wrapping any combination of HTML, JavaScript, XForms and XUL widgets in XBL.

This is probably the best resource I've found for Mozilla XBL xforms extensions: https://developer.mozilla.org/en/XForms/Custom_Controls

In your case, probably the most efficient way to get this working would be to wrap the XUL colour picker component in XBL, ( https://developer.mozilla.org/en/XUL/colorpicker ) then write a little bit of JavaScript to link the picker's "onchange" event back to your model.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜