Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by ErikVullings: http://wiki.apache.org/tapestry/PopupLinkSubmit ------------------------------------------------------------------------------ This is a solution for submitting a form and at the same time open a popup with an external link. It is a little lousy since it requires alot of copy paste from Tapestry code. I hope this can look better with future Tapestry versions. - === Example=== + === Example === {{{ <a href="#" jwcid="@PopupLinkSubmit" parameters="ognl:article" listener="listener:acheterArticle" popuppage="PopupPanier" popupparameters="ognl:article.AR_Design">Acheter</a> }}} + === PopupLinkSubmit.jwc === + {{{ + <!DOCTYPE component-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> + <component-specification class="actualis.web.tapestry.components.PopupLinkSubmit" allow-body="yes" allow-informal-parameters="yes" deprecated="no"> + + <description> + Creates a hyperlink that submits its enclosing form using JavaScript. + </description> + + <parameter name="disabled"/> + <parameter name="selected"/> + <parameter name="tag"/> + <parameter name="id" property="idParameter" default-value="id"/> + + <parameter name="listener"> + <description> + A listener that is notified if this component is triggered. + </description> + </parameter> + <parameter name="action"> + <description> + A listener that is notified if this component is triggered + just before the form's listener, after all components + enclosed by the Form have had a chance to update their properties. + </description> + </parameter> + <parameter name="parameters"> + <description> + An object, or list of objects, gathered when the link is triggered and + made available as listener parameters in the request cycle, making + the parameters available to a deferred listener. + </description> + </parameter> + + <parameter name="popuppage" property="popupPage" required="yes"/> + + <parameter name="popupparameters" property="popupParameters" required="no"/> + + <reserved-parameter name="name"/> + <reserved-parameter name="href"/> + + <inject property="listenerInvoker" object="infrastructure:listenerInvoker"/> + <inject property="script" type="script" object="PopupLinkSubmit.script"/> + + </component-specification> + + }}} + + === PopupLinkSubmit.script === + {{{ + <?xml version="1.0"?> + <!DOCTYPE script PUBLIC + "-//Apache Software Foundation//Tapestry Script Specification 3.0//EN" + "http://jakarta.apache.org/tapestry/dtd/Script_3_0.dtd"> + <script> + + <input-symbol key="name" class="java.lang.String" required="yes"/> + <input-symbol key="popupLink" class="java.lang.String" required="yes"/> + <input-symbol key="form" class="org.apache.tapestry.IForm" required="yes"/> + + <let key="href"> + javascript:submitPopupLink('${form.name}', '${name}','${popupLink}'); + </let> + + </script> + }}} {{{ package actualis.web.tapestry.components; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
