You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Leffel, Daniel" <dl...@ebay.com> on 2006/12/28 01:50:39 UTC

Problem with UpdateComponets when there is a nested @For

Sorry to bother the list with something that is probably an easy solve. 

I'm trying to use cycle.getResponseBuilder().updateComponent(String
arg0) to update a component on the page. I'm already updating multiple
other @Insert components on the page without any problems.

Now I'm trying to update a component that has a nested @For within it.
I've tried multiple different ways to do this without avail, so I'm
hoping one of you can fix what is probably an easy problem.

Below find all the ways I've tried.

------
If I do this:

<table 
	jwcid="topPlayersList@Any" 
	id="topPlayersList" 
	element="table">
		
		<tr 
			jwcid="topPlayerFor@For" 
			id="topPlayerFor" 
			source="ognl:topPlayers" 
			value="ognl:topPlayer" 
			element="tr">
		

			<td 
				jwcid="@Insert"
value="ognl:topPlayer.user.username" 
				element="td"></td>
		</tr>

</table>


With this Java:
cycle.getResponseBuilder().updateComponent("topPlayersList");

I get a javascript error at this line:
node.innerHTML=tapestry.html.getContentAsString(element);

------------
If I try this:
cycle.getResponseBuilder().updateComponent("topPlayerFor");

Then, nothing appears to update in AJAX and no errors are thrown
(despite the fact other components on the page are getting updated
without problem).

------------
I've even tried taking the table out of the equation completely by
simply trying this:
<span jwcid="topPlayersList@Any" id="topPlayersList">
	<span jwcid="topPlayerFor@For" id="topPlayerFor" 
		source="ognl:topPlayers" 
		value="ognl:topPlayer" >
		
		<span  jwcid="@Insert"
value="ognl:topPlayer.user.username" /><br>
	</span>
</span>


With this java:
cycle.getResponseBuilder().updateComponent("topPlayersList ");

With this solution, again, no javascript errors, no debug information
and NO update of the component.

------------


Can anyone please help me? I've already burned 5 hours on this.

Danny

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


Re: Problem with UpdateComponets when there is a nested @For

Posted by Jesse Kuhnert <jk...@gmail.com>.
The things you are doing "appear" to be correct but it's impossible to
say for sure what the problem is without more debug information.

If you are using the Shell or ScriptIncludes components and set the
browser log level to DEBUG + consoleEnabled = true do you get more
meaningful debug information in FireFox ? (installing the FireBug
plugin will help a lot)

If you turn that on you should see a large amount of debug statements
come out on the client side in your console for each request.

On 12/27/06, Leffel, Daniel <dl...@ebay.com> wrote:
> Sorry to bother the list with something that is probably an easy solve.
>
> I'm trying to use cycle.getResponseBuilder().updateComponent(String
> arg0) to update a component on the page. I'm already updating multiple
> other @Insert components on the page without any problems.
>
> Now I'm trying to update a component that has a nested @For within it.
> I've tried multiple different ways to do this without avail, so I'm
> hoping one of you can fix what is probably an easy problem.
>
> Below find all the ways I've tried.
>
> ------
> If I do this:
>
> <table
>         jwcid="topPlayersList@Any"
>         id="topPlayersList"
>         element="table">
>
>                 <tr
>                         jwcid="topPlayerFor@For"
>                         id="topPlayerFor"
>                         source="ognl:topPlayers"
>                         value="ognl:topPlayer"
>                         element="tr">
>
>
>                         <td
>                                 jwcid="@Insert"
> value="ognl:topPlayer.user.username"
>                                 element="td"></td>
>                 </tr>
>
> </table>
>
>
> With this Java:
> cycle.getResponseBuilder().updateComponent("topPlayersList");
>
> I get a javascript error at this line:
> node.innerHTML=tapestry.html.getContentAsString(element);
>
> ------------
> If I try this:
> cycle.getResponseBuilder().updateComponent("topPlayerFor");
>
> Then, nothing appears to update in AJAX and no errors are thrown
> (despite the fact other components on the page are getting updated
> without problem).
>
> ------------
> I've even tried taking the table out of the equation completely by
> simply trying this:
> <span jwcid="topPlayersList@Any" id="topPlayersList">
>         <span jwcid="topPlayerFor@For" id="topPlayerFor"
>                 source="ognl:topPlayers"
>                 value="ognl:topPlayer" >
>
>                 <span  jwcid="@Insert"
> value="ognl:topPlayer.user.username" /><br>
>         </span>
> </span>
>
>
> With this java:
> cycle.getResponseBuilder().updateComponent("topPlayersList ");
>
> With this solution, again, no javascript errors, no debug information
> and NO update of the component.
>
> ------------
>
>
> Can anyone please help me? I've already burned 5 hours on this.
>
> Danny
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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