Hi,
I have a pop up with a grid. When i click in a line of my grid, i want to
get the object for the clicked row.
here is the parent .tml which call the pop up :
<script type="text/javascript">
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=800,height=600,scrollbars=yes');
return false;
}
</script>
...
<p><t:label for="departure">
${message:search-departure}
</t:label>
<t:textfield t:id="departure" t:value="departure.name"
t:validate="required" />
< a t:type="pagelink" t:page="itinerary/AddressListPopUp"
t:context="'0'"
onClick="return popup(this,'AddressListPopUp');">Listes
d'adresses
</p>
Here is the .tml for the pop up.
sgPoi is an object with : id, name
<div id="poiList">
<h3>${message:sgPoiList-title}</h3>
<table t:id="sgPoiGrid" t:model="sgPoiGridModel" t:type="grid"
t:row="sgPoi" t:source="sgPoiList" t:rowIndex="rowIndex"
t:rowClass="rowClass" t:rowsPerPage="${message:rowsPerPage}"
t:inplace="true">
<t:parameter name="selectCell">
<t:actionlink t:id="selectAddressPoi" t:context="sgPoi.id">
${message:select-label}
</t:actionlink>
</t:parameter>
</table>
</div>
Here is the java controller for my actionlink:
@OnEvent(value = "action", component = "selectAddressPoi")
public void onSelectEvent(Integer id) {
String name = this.sgPoiManager.getSgPoiById(id).getName;
//TODO how to complete the textfield "departure" in the parent
window ???
}
I don't know what is the best way to complete the textfield "departure" in
the parent window with the Name of the SgPoi selected.
How can i get the opener page in my java class ?
Thanks by advance.
--
View this message in context:
http://www.nabble.com/T5-%3A-Pop-up-with-grid-tp26112459p26112459.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]