This page last changed on May 20, 2011 by cortextual.

Good afternoon.

Reading panel-2.0-M7.xsd for the link element suggests that localized text (rather than images) for switches can be specified:

        <xsd:element name="link">
                                A Element used to link a sensor with sensor states, take a sensor for switch for example:
                                <link type="sensor" ref="5">
                                        <state name="on" value="on"/>
                                        <state name="off" value="off"/>
                                value here is a localized string for switch.
                                <xsd:element ref="state" minOccurs="0" maxOccurs="unbounded" />
                        <xsd:attribute name="type" type="xsd:string" use="required" />
                        <xsd:attribute name="ref" type="idType" use="required" />

this is from, which was last changed in revision 2499.

The Android console code appears to always assume the the "value" attributes here are filenames for images, using "ON" and "OFF" if no images could be loaded based on those filenames. Is this correct behavior?

There probably isn't a 'correct' behavior right now, but we can define one.

If the value cannot be resolved to an image resource, display the text value as label instead?

(checked the designer, there's no way to specify non-image values right now)

Posted by juha at May 26, 2011 23:21

In the current implementation for iOS, this is done as a 2 state button. So I can use label if images are not found.

This got me thinking about whether we want the UI to be in accordance with the platforms guidelines or at least be able to use platform "specific" widgets.
For instance, on iOS a switch has a specific look and feel, you cannot provide any images or text, it's handled by the system and automatically localized. At this stage, there is no way to have that type of element in an OR panel design.
No opinion at this stage on this topic, just a thought...

Posted by ebariaux at May 27, 2011 09:32

Yeah thought about it somewhat... if we do want to go that way, I think we should first fix the UI designer to support design modes for specific platforms – switches with iOS behavior only made available when designing iOS panel, etc.

That's sort of the SWT approach to things.

Alternative is we design a "cross-platform" UI for all panels. That's sort of the Swing philosophy of things.

Both approaches have their fans.

Posted by juha at May 27, 2011 09:38
Document generated by Confluence on Jun 05, 2016 09:30