SHtml.ajaxEditable renders from unnecessarily
In the following code:
{quote}
<div>
<div id={dispName}>
{displayMarkup}
</div>
<div id={editName} style="display: none;">
{editMarkup}
</div>
</div>
{quote}
editMarkup is called unnecessarily and renders the form too eagerly bloating the output, it will be replaced anyways by subsequent ajax call.
Also, AjaxMapper shouldn't extend MappedField (it's self type should be made MappedField) so it doesn't bloat the code when scala rewraps trait methods when existing field classes mix it in. Extending MixableMappedField is enough (it has the asHtml to override, whereas it only calls toForm).
{quote}
<div>
<div id={dispName}>
{displayMarkup}
</div>
<div id={editName} style="display: none;">
{editMarkup}
</div>
</div>
{quote}
editMarkup is called unnecessarily and renders the form too eagerly bloating the output, it will be replaced anyways by subsequent ajax call.
Also, AjaxMapper shouldn't extend MappedField (it's self type should be made MappedField) so it doesn't bloat the code when scala rewraps trait methods when existing field classes mix it in. Extending MixableMappedField is enough (it has the asHtml to override, whereas it only calls toForm).
Leave a comment
on 2010-02-06 19:51 *
By github.importer
Imported from GitHub: http://github.com/dpp/liftweb/issues/259/find