Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do this by adding attributes to the UIViewRoot component:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &lt;xp:this.attrs&gt; &lt;!-- if browser is IE 7 or smaller --&gt; &lt;xp:attr name="class" value="no-js lt-ie9 lt-ie8 lt-ie7" rendered="#{javascript:context.getUserAgent().isIE(0,7)}"&gt; &lt;/xp:attr&gt; &lt;!-- if browser is NOT IE 7 or smaller --&gt; &lt;xp:attr name="class" value="no-js lt-ie9 lt-ie8 lt-ie7" rendered="#{javascript:!(context.getUserAgent().isIE(0,7))}"&gt; &lt;/xp:attr&gt; &lt;/xp:this.attrs&gt; &lt;/xp:view&gt; </code></pre> <p>The <em>lang</em> attribute is computed by current language settings of the XPage. To do this application / server wide you have to add this to a theme.</p> <p><strong>EDIT:</strong></p> <p>The theme has to look like this:</p> <pre><code>&lt;control&gt; &lt;name&gt;ViewRoot&lt;/name&gt; &lt;property&gt; &lt;name&gt;attrs&lt;/name&gt; &lt;complex type="xp_attr"&gt; &lt;property&gt; &lt;name&gt;name&lt;/name&gt; &lt;value&gt;class&lt;/value&gt; &lt;/property&gt; &lt;property&gt; &lt;name&gt;value&lt;/name&gt; &lt;value&gt;#{javascript: if (context.getUserAgent().isIE(0,6)) { return 'no-js lt-ie9 lt-ie8 lt-ie7'; } if (context.getUserAgent().isIE(7,7)) { return 'no-js lt-ie9 lt-ie8'; } if (context.getUserAgent().isIE(8,8)) { return 'no-js lt-ie9'; } return ''; }&lt;/value&gt; &lt;/property&gt; &lt;/complex&gt; &lt;/property&gt; &lt;/control&gt; </code></pre> <p>The empty return is required, otherwise the theme will fail.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload