This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jun 1, 2012, 5:40 PM
31 Posts

Read only on Edit Box loses CSS settings

  • Category: Styles and Themes
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: CSS
  • Replies: 2
The CSS I have applied to an Edit Box is fine and displays as intended. But when I mark that field to be Read Only the intended CSS is lost. Instead it looks like the basic Times Roman looking text. I tried putting span or div tags around the edit box field with the styleClass within those tags but still no success. Here is a snip:
 
<div styleClass = "priceText">
        <xp:inputText id="inputText3"
                                value="#{docOrder.edCityState2}" readonly="true"
                                styleClass="priceText">
         </xp:inputText>
</div>
 
Thanks!
Kendra
Jun 1, 2012, 7:33 PM
40 Posts
Re: Read only on Edit Box loses CSS settings
 Yup, it's a "bug" unfortunately - a read only field will only render a span and the value inside it ... not very useful I agree.
Jun 2, 2012, 5:41 AM
129 Posts
Re: Read only on Edit Box loses CSS settings
You can set the html readonly attribute using custom attributes. This is a new feature in Domino 8.5.3.
 
In all properties for the field, there should be something named attrs. Add a new attribute, name readonly and value readonly.
 
E.g. 
<xp:inputText>
    <xp:this.attrs>
      <xp:attr name="readonly" value="readonly"></xp:attr>
    </xp:this.attrs>
</xp:inputText> 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal