Self-writting into HTML page
Status: Alpha
Brought to you by:
cbonar
Currently, the ui code of Ballad is written by hand in
the HTML page. This means including <script/>, <input/>
and <style/> tags and that means the page is quite static.
Those things should be done by the player itself, at
instanciation time, so that the web admin has only to
include something like :
<script type="text/javascript">
var jwsreader = new
barde_log_reader_JSW(log,startDate,channels,sources,locale);
var ballad = new
barde_gui_ballad_Player("ballad","balladTable",jwsreader,style.getRenderer());
</script>
at the place where he wants the player to be inserted.
Logged In: YES
user_id=555057
Problem :
--------------
The instanciation code is dependent on the place in the page
because Javascript is very sensitive to the order of
declaration. For instance, a controller need a player
(view), so it must be instanciated after the view (and so be
after it in the page, it cannot be place above). The
solution would be to add an instanciation method to the
controller and trigger it by hand but it's prone to errors
and requires more understanding of the library.
Solution ?
---------------
ActiveWidget overwrites the toString() method (native one ?)
and then call document.write(myObject) to insert into the
page the code for the control :
http://www.activewidgets.com/general.doc.html