<s:include b:url="{concat($bpc_controlpath, 'b-listview/b-listview.xml')}"/> <s:execute> <s:task b:action="show" /> </s:execute> <s:behavior b:name="row-delete"> <s:event b:on="command"> <s:task b:action="hide" b:target="../.."/> <s:task b:action="set" b:target="../../@b:changed" b:value="deleted"/> </s:event> </s:behavior> <s:behavior b:name="row-edit"> <s:event b:on="command"> <s:task b:action="set" b:target="../../@b:changed" b:value="edited"/> </s:event> </s:behavior> <s:behavior b:name="row-new"> <s:event b:on="command"> <s:task b:action="set" b:target="../../@b:changed" b:value="new"/> </s:event> </s:behavior> <s:behavior b:name="save-changes"> <s:event b:on="command"> <!-- Copying the changed rows and removing the editing controls from them. --> <s:task b:action="copy" b:source="id('filmdisplay')/tbody/tr[@b:changed]" b:destination="id('delta-container')/tbody" b:mode="aslastchild" /> <s:task b:action="remove" b:target="id('delta-container')/tbody/tr/td[last()]"/> <!-- Sending the changed rows to the server. --> <s:variable b:name="response"/> <s:task b:action="send" b:source="id('delta-container')" b:destination="$response" b:url="save_bxml.php"/> <!--s:task b:action="alert" b:value="{$response}"/--> <!-- Cleaning the local data so the changes cannot be saved twice. --> <s:task b:action="remove" b:target="id('delta-container')/tbody/tr"/> <s:task b:action="remove" b:target="id('filmdisplay')/tbody/tr[@b:changed='deleted']"/> <s:task b:action="remove" b:target="id('filmdisplay')/tbody/tr/@b:changed"/> </s:event> </s:behavior> <div style="margin:50px;"> <div style="width:650px; text-align:left; padding-bottom:20px;"> <h1>XML Databinding - PHP XSLT Engine</h1> In order to load and save the data in this example, PHP5 with XSLT support must be enabled on your server. </div> <table id="delta-container" style="display:none;" xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.backbase.com/b" xmlns:s="http://www.backbase.com/s"><tbody></tbody></table> <div id="filmdisplay-container"> <s:execute> <!-- Load the BXML directly into its container and sort the table. --> <s:task b:action="load" b:url="load_bxml.php" b:destination="id('filmdisplay-container')"/> <s:task b:action="sort" b:target="id('filmdisplay')/thead/tr/th[1]" b:reverse="false"/> </s:execute> </div> <div style="width:650px; text-align:right; margin-bottom:2em;"> <b:button b:behavior="save-changes">Save Changes</b:button> </div> </div>