Marc

I was unable to get the fd:output to work...

What I have done is to add a class styling to
the fields I want in the form template, so:

<fi:styling class="readonly" />

and in the stylesheet:

<!-- overwrite -->
<xsl:template match="fi:*" mode="common">
  <!-- validation message -->
  <xsl:apply-templates select="fi:validation-message"/>
  <!-- required mark -->
  <xsl:if test="@required='true'">
    <xsl:choose>
      <xsl:when test="fi:styling/@class='readonly'"></xsl:when>
      <xsl:otherwise><span class="forms-field-required"> *
</span></xsl:otherwise>
    </xsl:choose>
  </xsl:if>
  <!-- readonly mark -->
  <xsl:if test="fi:styling/@class='readonly'">
    <span class="forms-field-required"> # </span>
  </xsl:if>A    
</xsl:template>

I can then color code the fields as:

.readonly {
  color: silver;
  background-color: #EFEFEF;
}

To give a "greyed out" effect... it would be really
have been better if read-only fields were supported
as part of the HTML forms spec, though!

Derek

>>> [EMAIL PROTECTED] 2004/07/19 02:21:18 PM >>>
why don't you just make them fd:output?
and if that is not an option add a <fi:styling /> with specific 
attributes you'll act upon

note that none of the information specific to the binding will be 
available to your xslt

regards,
-marc=

Derek Hohls wrote:

> Hi
> 
> I am looking for any *simple to implement*
> suggestions that will allow me add to styling
> to those fields that are essentially "read only"
> (i.e. are specified as direction="load" in the 
> binding file).  
> 
> I was thinking of following something along the 
> lines of the Cocoon samples, where:
> * = required field
> ! = error in the submitted data
> and having:
> # = read-only
> 
> (Of course, it would be nice to add color coding
> as well...)
> 
> Derek
> 

-- 
Marc Portier                            http://outerthought.org/ 
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/ 
[EMAIL PROTECTED]                              [EMAIL PROTECTED] 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to