You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jim O'Callaghan <ji...@peritussolutions.com> on 2011/04/19 13:27:00 UTC

Custom field, fckEditor, rendering order

I'm having some trouble with the rendering of a custom field - I'm hoping someone can give me a steer on the order of interpretation / execution during rendering.

When I use the T5EasyFCKEditor in a .tml as follows:

<textarea t:type="easyfck/fckeditor" width="800px" height="400px" value="xyz" configuration="customConf"/>

... it works as expected and the textarea is decorated / enhanced.  When I try to use the easyFCK in a custom field however, it renders as a standard textarea, albeit with the attribute t:type="easyfck/fckeditor".

In the custom field beginRender method I have:

    boolean beginRender(MarkupWriter writer) {
       .
       .
       .
		} else if (useFCKEditor){
			writer.element("textarea", 
					"t:type", "easyfck/fckeditor",
	                "name", getControlName(),
	                "id", getClientId(),
	                "width", "800px",
	                "height", "400px",
	                "configuration", "customConf");
			writer.write(value == null ? null : value.getText());
       .
       .
       .
    }

Any ideas on why the second approach doesn't work?

Thanks,
Jim.


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


RE: Custom field, fckEditor, rendering order

Posted by Jim O'Callaghan <jc...@yahoo.co.uk>.
Thanks Thiago - working now - simple when you know how!

Regards,
Jim.


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


Re: Custom field, fckEditor, rendering order

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 19 Apr 2011 08:27:00 -0300, Jim O'Callaghan  
<ji...@peritussolutions.com> wrote:

> In the custom field beginRender method I have:
>     boolean beginRender(MarkupWriter writer) {
>        .
>        .
>        .
> 		} else if (useFCKEditor){
> 			writer.element("textarea",
> 					"t:type", "easyfck/fckeditor",

A component can only be declared in a component or page template, never  
through MarkupWriter. Any content generated by MarkupWriter is passed as  
is. Don't forget that you can mix template and MarkupWriter-generated HTML  
in the same component.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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