You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by nazarhussain_s <na...@gmail.com> on 2011/04/19 14:02:59 UTC

How to implement AJAX for "Insert" jwcid in Tapestry 4.1 ?

Hi,
      I have been trying to implement AJAX for "Insert" component but have
been unable to do it.I had tried using "TextArea" type instead and it worked
out. Now I need to know what was the problem with "Insert" before

The Home.html page should accept a given input and on click of OK button
should display the value asynchronously .This is happening if i am giving
the userOut as TextArea but no value is getting displayed if i am using
userOut as "Insert" . Can anybody please clarify how to do this for Insert?

Home.html [with Insert]
-----------------------
html jwcid="@Shell" title="User Page" >
<body jwcid="@Body">
<form jwcid="@Form" listener="listener:onClick"  updateComponents="userOut"
async="true" >
<input type="text" jwcid="userIn" />
<input type="submit" jwcid="@Submit"/>
<br/>
<input type="Insert" jwcid="userOut"  renderTag="true" />
</form>
</body>
</html>

Home.page
-----------
<page-specification class="com.tapestry.User" >
	
    
    
	<component id="userIn" type="TextField">
		<binding name="value" value="userIn" />
	</component>
	
    <component id="userOut" type="Insert">
        <binding name="value" value="userOut" />
	</component>
    
</page-specification>

Home.html [for TextArea]
--------------------------
html jwcid="@Shell" title="User Page" >
<body jwcid="@Body">
<form jwcid="@Form" listener="listener:onClick"  updateComponents="userOut"
async="true" >
<input type="text" jwcid="userIn" />
<input type="submit" jwcid="@Submit"/>
<br/>
<input type="textarea" jwcid="userOut"  renderTag="true" />
</form>
</body>
</html>


Home.page
----------
<page-specification class="com.tapestry.User" >
	
    
    
	<component id="userIn" type="TextField">
		<binding name="value" value="userIn" />
	</component>
	
    <component id="userOut" type="TextArea">
        <binding name="value" value="userOut" />
	</component>
    
</page-specification>

Please help me out as I need to know how it is done badly 



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-implement-AJAX-for-Insert-jwcid-in-Tapestry-4-1-tp4313095p4313095.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: How to implement AJAX for "Insert" jwcid in Tapestry 4.1 ?

Posted by Andreas Andreou <an...@gmail.com>.
try surrounding the area to be updated with a div, i.e.
<div jwcid="area@Any">
...(input goes here)...
</div>

and then use updateComponents="area"

On Tue, Apr 19, 2011 at 15:02, nazarhussain_s <na...@gmail.com> wrote:
> Hi,
>      I have been trying to implement AJAX for "Insert" component but have
> been unable to do it.I had tried using "TextArea" type instead and it worked
> out. Now I need to know what was the problem with "Insert" before
>
> The Home.html page should accept a given input and on click of OK button
> should display the value asynchronously .This is happening if i am giving
> the userOut as TextArea but no value is getting displayed if i am using
> userOut as "Insert" . Can anybody please clarify how to do this for Insert?
>
> Home.html [with Insert]
> -----------------------
> html jwcid="@Shell" title="User Page" >
> <body jwcid="@Body">
> <form jwcid="@Form" listener="listener:onClick"  updateComponents="userOut"
> async="true" >
> <input type="text" jwcid="userIn" />
> <input type="submit" jwcid="@Submit"/>
> <br/>
> <input type="Insert" jwcid="userOut"  renderTag="true" />
> </form>
> </body>
> </html>
>
> Home.page
> -----------
> <page-specification class="com.tapestry.User" >
>
>
>
>        <component id="userIn" type="TextField">
>                <binding name="value" value="userIn" />
>        </component>
>
>    <component id="userOut" type="Insert">
>        <binding name="value" value="userOut" />
>        </component>
>
> </page-specification>
>
> Home.html [for TextArea]
> --------------------------
> html jwcid="@Shell" title="User Page" >
> <body jwcid="@Body">
> <form jwcid="@Form" listener="listener:onClick"  updateComponents="userOut"
> async="true" >
> <input type="text" jwcid="userIn" />
> <input type="submit" jwcid="@Submit"/>
> <br/>
> <input type="textarea" jwcid="userOut"  renderTag="true" />
> </form>
> </body>
> </html>
>
>
> Home.page
> ----------
> <page-specification class="com.tapestry.User" >
>
>
>
>        <component id="userIn" type="TextField">
>                <binding name="value" value="userIn" />
>        </component>
>
>    <component id="userOut" type="TextArea">
>        <binding name="value" value="userOut" />
>        </component>
>
> </page-specification>
>
> Please help me out as I need to know how it is done badly
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-implement-AJAX-for-Insert-jwcid-in-Tapestry-4-1-tp4313095p4313095.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

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


Re: How to implement AJAX for "Insert" jwcid in Tapestry 4.1 ?

Posted by LLTYK <LL...@mailinator.com>.
I don't know.

However, T5 can be run alongside T4. I have an old T4 app, and write all the
new pages in T5.

--
View this message in context: http://tapestry-users.832.n2.nabble.com/How-to-implement-AJAX-for-Insert-jwcid-in-Tapestry-4-1-tp6286999p6287572.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

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