You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Anbazhagan <an...@snovabits.net> on 2012/08/07 08:10:34 UTC

restrict button refresh When i click

Hi 

I using loop component to display the list of items. Each items have
separate button. I have designed when i click the button the title of items
will display on the same page. Here when i click that button the page was
refreshed. so i cannot maintain the current index. Hence can't display the
title of content for next next items. 
  
Any one say how  restrict the refresh when i click the button or d u have
any possible solutions pls post.

Thank you



--
View this message in context: http://tapestry.1045711.n5.nabble.com/restrict-button-refresh-When-i-click-tp5715114.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: restrict button refresh When i click

Posted by Anbazhagan <an...@snovabits.net>.
Thanks 

its working to display the title of content of first item only i.e. every
action,  current index return 0 only.


My tml page coding is,

 <t:form>
 Preview  
</t:form>


java page,


	@InjectComponent
	private Zone title;

	@Inject
	private AjaxResponseRenderer ajaxResponseRenderer;

       void onActionFromPreview() {
		video = new VideoItemCollections("url");
		list = video.videoItem;
		videoTitle = list.get(currIndex).getTitle();
		ajaxResponseRenderer.addRender(title);
	}

	public String getImageTitle() {
		return videoTitle;
	}


How to maintain current index. if click that link current index of items
also refreshed. How to maintain current index of items.



Thank you 




--
View this message in context: http://tapestry.1045711.n5.nabble.com/restrict-button-refresh-When-i-click-tp5715114p5715139.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: restrict button refresh When i click

Posted by Christian Riedel <cr...@googlemail.com>.
So basically what you're trying to do is a zone-refresh instead of a page refresh?
If your button is an actionlink or eventlink just add this property:
	 t:zone="yourzoneId" 

Use AjaxResponseRenderer (e.g. #addRender(ClientBodyElement zone)) in your corresponding eventhandler to (re-)render the zone that contains the title you were talking about.


Am 07.08.2012 um 08:10 schrieb Anbazhagan:

> Hi 
> 
> I using loop component to display the list of items. Each items have
> separate button. I have designed when i click the button the title of items
> will display on the same page. Here when i click that button the page was
> refreshed. so i cannot maintain the current index. Hence can't display the
> title of content for next next items. 
> 
> Any one say how  restrict the refresh when i click the button or d u have
> any possible solutions pls post.
> 
> Thank you
> 
> 
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/restrict-button-refresh-When-i-click-tp5715114.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
> 


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