You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Joseph <pj...@yahoo.com> on 2004/11/13 00:09:37 UTC

replace booleanfield checkbox in repeater with a gif

Hi,

I have a boolean field as part of my repeater widget
group.

    <fd:booleanfield id="is_late" >
      <fd:label></fd:label>
    </fd:booleanfield>

It works nicely - only thing I'd like to do is enhance
it - i.e. replace it with a graphic (in this case a
Clock gif) if it is checked, and by nothing or a blank
gif, if it is unchecked.

I have tried various ways but don't know how to it -
any pointers would be much appreciated.

TIA!
Paul

=====
This communication, including attachments, is for the exclusive use of 
the addressee and may contain proprietary, confidential, or privileged
information.  If you are not the intended recipient, any use, copying,
disclosure, dissemination, or distribution is strictly prohibited.  If 
you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: replace booleanfield checkbox in repeater with a gif

Posted by Joerg Heinicke <jo...@gmx.de>.
On 13.11.2004 00:25, Paul Joseph wrote:

> I should also mention that I actually have two booean
> fields in the repeater and would like to show a
> different image for the second boolean field...
> 
> the second boolean field is 
>      <fd:booleanfield id="is_flagged" >
>        <fd:label></fd:label>
>      </fd:booleanfield>
> 
> and I would like to show an image of a small flag, if
> it is true.  
> 
> I say this so that we dont go the way of xslt (?)

What does this sentence mean? You have to go the XSLT way. For the two 
different checkbox stylings put a property into your template on fi:styling:

<ft:widget id="boolean_field1">
   <fi:styling type="image"/>
</ft:widget>

<ft:widget id="boolean_field2">
   <fi:styling type="flag"/>
</ft:widget>

Extend the default stylesheets by adding two stylesheets:

<xsl:template match="fi:boolean-field[@type='image']">
   your implementation
</xsl:template>

<xsl:template match="fi:boolean-field[@type='flag']">
   your implementation
</xsl:template>

Joerg

>>Hi,
>>
>>I have a boolean field as part of my repeater widget
>>group.
>>
>>    <fd:booleanfield id="is_late" >
>>      <fd:label></fd:label>
>>    </fd:booleanfield>
>>
>>It works nicely - only thing I'd like to do is
>>enhance
>>it - i.e. replace it with a graphic (in this case a
>>Clock gif) if it is checked, and by nothing or a
>>blank
>>gif, if it is unchecked.
>>
>>I have tried various ways but don't know how to it -
>>any pointers would be much appreciated.
>>
>>TIA!
>>Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: replace booleanfield checkbox in repeater with a gif

Posted by Paul Joseph <pj...@yahoo.com>.
I should also mention that I actually have two booean
fields in the repeater and would like to show a
different image for the second boolean field...

the second boolean field is 
     <fd:booleanfield id="is_flagged" >
       <fd:label></fd:label>
     </fd:booleanfield>

and I would like to show an image of a small flag, if
it is true.  

I say this so that we dont go the way of xslt (?)

thx
Paul

--- Paul Joseph <pj...@yahoo.com> wrote:

> Hi,
> 
> I have a boolean field as part of my repeater widget
> group.
> 
>     <fd:booleanfield id="is_late" >
>       <fd:label></fd:label>
>     </fd:booleanfield>
> 
> It works nicely - only thing I'd like to do is
> enhance
> it - i.e. replace it with a graphic (in this case a
> Clock gif) if it is checked, and by nothing or a
> blank
> gif, if it is unchecked.
> 
> I have tried various ways but don't know how to it -
> any pointers would be much appreciated.
> 
> TIA!
> Paul
> 
> =====
> This communication, including attachments, is for
> the exclusive use of 
> the addressee and may contain proprietary,
> confidential, or privileged
> information.  If you are not the intended recipient,
> any use, copying,
> disclosure, dissemination, or distribution is
> strictly prohibited.  If 
> you are not the intended recipient, please notify
> the sender by return mail and delete this
> communication and destroy all copies.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 


=====
This communication, including attachments, is for the exclusive use of 
the addressee and may contain proprietary, confidential, or privileged
information.  If you are not the intended recipient, any use, copying,
disclosure, dissemination, or distribution is strictly prohibited.  If 
you are not the intended recipient, please notify the sender by return mail and delete this communication and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org