Franko,

My guess is that in the execute method of your custom rule cfc, you have
a <cfoutput></cfoutput> outputting your content.  But the built-in
containers do not do it this way.

Instead, do as the built-in containers do:  Append the content you want
to output into the request.aInvocations array like this:
arrayAppend(request.aInvocations, someContent);
,where 'someContent' is a variable containing the text/html/whatever
that your component wants to output.

Here's a general idea of why it works this way:  Farcry goes through the
list of rules in your container calling the execute method on each, in
the order they are listed in the container.  At some later point in
processing, Farcry goes through the request.aInvocations array and
outputs each element, in order.

The built-in rules put their output in request.aInvocations, but yours
is just outputting when execute() is called, so the output of your rule
ends up displaying first.

A simple fix would be to wrap a <cfsavecontent
variable="someContent"></cfsavecontent> around the content your rule
outputs and then call arrayAppend() as mentioned earlier.

I hope this is useful to you.  I think it would have been useful to me,
I had the same problem when I first got started with custom rules.

Tyler Ham
[EMAIL PROTECTED]
Special Projects Office
College of Natural Sciences
The University of Texas at Austin

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Franko
> Sent: Thursday, June 16, 2005 9:41 PM
> To: FarCry Developers
> Subject: [farcry-dev] Rule sorting in a container
> 
> Hi, 
> 
> it seems the custom rules I create are not subject to the 
> ordering set in a containers "configure rules list" tab.
> 
> For example if I have a container and and I assign it 2 out 
> of the box rules and one of my custom rules in the following order:
> 
> - Out of the box rule 1
> 
> - my custome rule
> 
> - Out of the box rule 2
> 
> When I view the page with the container, my custom rule 
> always appears first no matter where I order it in the 
> "configure rules list" tab.
> 
> Is there something I need to set in the cfc to make surte it 
> works in the ordering?
> 
> Reagrds,
> Franko
> 
> ---
> You are currently subscribed to farcry-dev as: 
> [EMAIL PROTECTED] To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 

---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to