You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by mateen <ma...@gmail.com> on 2012/12/20 20:36:16 UTC
JQuery PopUp on the Grid.
Hi,
I have a Grid that is bound to a underline list as follows
<t:zone t:id="searchTransactionZone" id="searchTransactionZone">
<div class="tableDv ">
<t:grid t:source="pickupQuotes" t:row="selectedQuote"
t:rowsPerPage="50" t:add="action"
t:inPlace="true" t:pagerPosition="top" exclude="prop:excludes">
<p:actionCell>
<t:jquery.dialogajaxlink t:id="link2" t:dialog="myDialog"
t:zone="prcessTellerTransactionZone"
t:context="selectedQuote.pickupQuoteID.id" class="process">
Process Teller
</t:jquery.dialogajaxlink>
</p:actionCell>
<p:empty>
</p:empty>
</t:grid>
</div>
</t:zone>
now clicking on the link in the action cell opens a alert dialog as follows
<t:jquery.dialog t:clientId="myDialog" params="params">
<t:zone t:id="prcessTellerTransactionZone"
id="prcessTellerTransactionZone">
<div class="popup">
<div class="popup-header">
<${context:/statics/images/logo-popup.png}>
Processing Remittance
</div>
<t:if t:test="transactionQuote">
${message:date-sent}
${transactionQuote.dateOfTransaction}
${message:recipient}
${transactionQuote.recipientName}
${message:amount}
${transactionQuote.transactionAmount}
${message:unique-id}
${transactionQuote.transactionId}
${message:sender}
${transactionQuote.senderName}
${message:location}
${transactionQuote.senderCountry}
<t:form t:id="processQuoteForm">
<div style="visibility: hidden; display:inline;">
<input t:type="textField" t:id="dispenseCashForQuoteID" />
</div>
<p class="transaction-chk"><input name="confirm" type="checkbox"
value="" /> Confirm recipient's identity by reviewing ID </p>
<p class="transaction-Fld" style="margin:0 auto; width: 360px;">
<label>Transaction Code </label>
<input t:type="textField" t:id="dispenseCashForTransactionID"
class="txtFld" style="display:block;"/>
</p>
<input type="submit" value="Dispense Cash" class="search-btn" />
</t:form>
</t:if>
</div>
</t:zone>
</t:jquery.dialog>
Now what happens that when i press the sumit button on grid popup, the
underlying Lists gets blank. Now i also want to close the Popup once the
Sumit function has finished. This is my underlying function for the Popup
submit button
public Object onSubmitFromprocessQuoteForm( )
{
try
{
QuoteID temp = new QuoteID( )
{
public Long getId( )
{
return dispenseCashForQuoteID;
}
};
pickupManager.processQuotePickup( temp );
}
catch ( Exception e )
{
e.printStackTrace( );
}
return null;
}
Now what i want is
1) When i press submit button on the Popup, it should close, but the
underlying Grid should be affected.
What am i doing wrong ?
--
View this message in context: http://tapestry.1045711.n5.nabble.com/JQuery-PopUp-on-the-Grid-tp5718897.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: JQuery PopUp on the Grid.
Posted by Emmanuel DEMEY <de...@gmail.com>.
I think for closing the dialog you should add a javascript handler and
close the pop with dialig('close') . Check the jquery ui doc.
You form of yojr dialog should not be mapped to a zone ? I did not see it.
Le 20 déc. 2012 20:36, "mateen" <ma...@gmail.com> a écrit :
> Hi,
>
> I have a Grid that is bound to a underline list as follows
>
> <t:zone t:id="searchTransactionZone" id="searchTransactionZone">
> <div class="tableDv ">
> <t:grid t:source="pickupQuotes" t:row="selectedQuote"
> t:rowsPerPage="50" t:add="action"
> t:inPlace="true" t:pagerPosition="top" exclude="prop:excludes">
> <p:actionCell>
> <t:jquery.dialogajaxlink t:id="link2" t:dialog="myDialog"
> t:zone="prcessTellerTransactionZone"
> t:context="selectedQuote.pickupQuoteID.id" class="process">
> Process Teller
> </t:jquery.dialogajaxlink>
> </p:actionCell>
> <p:empty>
> </p:empty>
> </t:grid>
> </div>
> </t:zone>
>
> now clicking on the link in the action cell opens a alert dialog as follows
>
>
> <t:jquery.dialog t:clientId="myDialog" params="params">
> <t:zone t:id="prcessTellerTransactionZone"
> id="prcessTellerTransactionZone">
> <div class="popup">
> <div class="popup-header">
> <${context:/statics/images/logo-popup.png}>
>
> Processing Remittance
>
> </div>
> <t:if t:test="transactionQuote">
>
>
>
>
> ${message:date-sent}
> ${transactionQuote.dateOfTransaction}
>
>
>
> ${message:recipient}
> ${transactionQuote.recipientName}
>
>
>
> ${message:amount}
> ${transactionQuote.transactionAmount}
>
>
>
> ${message:unique-id}
> ${transactionQuote.transactionId}
>
>
>
> ${message:sender}
> ${transactionQuote.senderName}
>
>
>
> ${message:location}
> ${transactionQuote.senderCountry}
>
>
>
>
> <t:form t:id="processQuoteForm">
> <div style="visibility: hidden; display:inline;">
> <input t:type="textField" t:id="dispenseCashForQuoteID" />
> </div>
> <p class="transaction-chk"><input name="confirm" type="checkbox"
> value="" /> Confirm recipient's identity by reviewing ID </p>
> <p class="transaction-Fld" style="margin:0 auto; width: 360px;">
> <label>Transaction Code </label>
> <input t:type="textField" t:id="dispenseCashForTransactionID"
> class="txtFld" style="display:block;"/>
> </p>
> <input type="submit" value="Dispense Cash" class="search-btn" />
> </t:form>
> </t:if>
> </div>
> </t:zone>
> </t:jquery.dialog>
>
> Now what happens that when i press the sumit button on grid popup, the
> underlying Lists gets blank. Now i also want to close the Popup once the
> Sumit function has finished. This is my underlying function for the Popup
> submit button
>
> public Object onSubmitFromprocessQuoteForm( )
> {
>
> try
> {
> QuoteID temp = new QuoteID( )
> {
> public Long getId( )
> {
> return dispenseCashForQuoteID;
> }
> };
>
> pickupManager.processQuotePickup( temp );
> }
> catch ( Exception e )
> {
> e.printStackTrace( );
> }
>
> return null;
> }
>
>
> Now what i want is
>
> 1) When i press submit button on the Popup, it should close, but the
> underlying Grid should be affected.
>
> What am i doing wrong ?
>
>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/JQuery-PopUp-on-the-Grid-tp5718897.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
>
>