You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joshua Jackson <jo...@gmail.com> on 2008/01/18 07:33:21 UTC

T5: How to use the Zone component?

Dear all,

I'm trying to show a div element when an ActionLink component is hitted.

This is the code:

<a id="comment" t:type="ActionLink" zone="zone">${message:comment.add}</a>

    <t:zone visible="false">
    <t:form>
    <table width="90%">
    <tr>
    <td>${message:comment}</td>
    <td><input t:type="TextArea" t:value="prop:backlogNote.note" /></td>
    </tr>
    <tr>
    <td></td>
    <td>
    <input t:type="Submit" t:id="save" value="${message:save}"/>
    </td>
    </tr>
    </table>
    </t:form>
    </t:zone>

---

but instead of showing the div with id="zone" it returned an undefined
text instead.

Is there anything that I've missed?

Thanks in advance

-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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


Re: T5: How to use the Zone component?

Posted by Joshua Jackson <jo...@gmail.com>.
Thanks Geoff,

It worked :)

Best Regards,

On 1/18/08, Geoff Callender <ge...@gmail.com> wrote:
> Off  the top of my head, try this (untested):
>
>        <a id="comment" t:type="ActionLink" zone="myZone">$
> {message:comment.add}</a>
>        <t:zone t:id="myZone" visible="${prop:myZoneVisible}">
>
> And some java:
>
>        private boolean _myZoneVisible = false;
>
>        @Component
>        private Zone _myZone;
>
>        Object onActionFromComment() {
>                _myZoneVisible = !_myZoneVisible;
>                return _myZone;
>        }
>
>        public boolean getMyZoneVisible() {
>                return _myZoneVisible;
>        }
-- 
I'm a coder not a drag-n-dropper

Blog: http://joshuajava.wordpress.com/

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


Re: T5: How to use the Zone component?

Posted by Geoff Callender <ge...@gmail.com>.
Off  the top of my head, try this (untested):

	<a id="comment" t:type="ActionLink" zone="myZone">$ 
{message:comment.add}</a>
	<t:zone t:id="myZone" visible="${prop:myZoneVisible}">

And some java:

	private boolean _myZoneVisible = false;

	@Component
	private Zone _myZone;
	
	Object onActionFromComment() {
		_myZoneVisible = !_myZoneVisible;
		return _myZone;
	}

	public boolean getMyZoneVisible() {
		return _myZoneVisible;
	}

Cheers,

Geoff

On 18/01/2008, at 5:33 PM, Joshua Jackson wrote:

> Dear all,
>
> I'm trying to show a div element when an ActionLink component is  
> hitted.
>
> This is the code:
>
> <a id="comment" t:type="ActionLink" zone="zone">$ 
> {message:comment.add}</a>
>
>    <t:zone visible="false">
>    <t:form>
>    <table width="90%">
>    <tr>
>    <td>${message:comment}</td>
>    <td><input t:type="TextArea" t:value="prop:backlogNote.note" /></ 
> td>
>    </tr>
>    <tr>
>    <td></td>
>    <td>
>    <input t:type="Submit" t:id="save" value="${message:save}"/>
>    </td>
>    </tr>
>    </table>
>    </t:form>
>    </t:zone>
>
> ---
>
> but instead of showing the div with id="zone" it returned an undefined
> text instead.
>
> Is there anything that I've missed?
>
> Thanks in advance
>
> -- 
> I'm a coder not a drag-n-dropper
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>