Hi all,
i searching for the best solution of Ajax, JSON, HTML combination.
Now my solution looks like:
View::
executeHtml
executeJson
templates
IndexSuccess
Json.IndexSuccess
--------------------------
When app receives Ajax request he will output Json template. Json
template looks like that:
....
'"place":"' . $template['place'] . '",' .
'"html":' . json_encode( $template['html'] ) . ',' .
....
And there i got this solution after Ajax request:
Action::executeRead()
// this executes when output type is 'json'
// selfaction/module is because many of actions will be called with ajax.
executes ...->createExecutionContainer(SelfModule, SelfAction, 'xhtml');
$html = &$cntnr->execute()->getContent();
$this->setAttribute('place', 'main_content');
$this->setAttributeByRef('html', $html );
And Vualia i got Json output with self Html in it.
So is this best/good/notbad/bad solution?
Thanx!
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users