Make sure that your Cache Method or ClassMethod has the [ ZenMethod ] keyword.
If you're within a %ZEN.Component.page this should work: Method MyMethod() [ ZenMethod ] { // Within ZEN Pages // Set with client code &js< zenPage.currentTableRow = "test" > // Set with server code S %page.currentTableRow = "test" }
If you're within a %ZEN.Component.composite and the variable is also within the composite, this should work: Method MyMethod() [ ZenMethod ] { // Within Composite Components, here's one way that works as long as your <composite> has an id // Set with client code S ID = ..id &js< zen("#(ID)#").currentTableRow = "test" > // Set with server code S $this.currentTableRow = "test" }
I left out the ClientMethod versions for brevity, but basically just use zenPage.currentTableRow within ZenPages, and this.currentTableRow within Composite Components.
go to post
Make sure that your Cache Method or ClassMethod has the [ ZenMethod ] keyword.
If you're within a %ZEN.Component.page this should work:
Method MyMethod() [ ZenMethod ]
{
// Within ZEN Pages
// Set with client code
&js<
zenPage.currentTableRow = "test"
>
// Set with server code
S %page.currentTableRow = "test"
}
If you're within a %ZEN.Component.composite and the variable is also within the composite, this should work:
Method MyMethod() [ ZenMethod ]
{
// Within Composite Components, here's one way that works as long as your <composite> has an id
// Set with client code
S ID = ..id
&js<
zen("#(ID)#").currentTableRow = "test"
>
// Set with server code
S $this.currentTableRow = "test"
}
I left out the ClientMethod versions for brevity, but basically just use zenPage.currentTableRow within ZenPages, and this.currentTableRow within Composite Components.
Hope this helps!