jruby 1.1.3 + activescaffold 1.1.1 generating RJS error
-------------------------------------------------------

                 Key: JRUBY-2918
                 URL: http://jira.codehaus.org/browse/JRUBY-2918
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1.3
         Environment: windows XP, jruby 1.1.3, active scaffold 1.1.1, RoR 2.0, 
WEBrick
            Reporter: Jin Lee
            Assignee: Thomas E Enebo


FYI - This did not happen in 1.1.2 

When creating a new row or editing an existing row for a table using 
active_scaffold, the insert/update is performed successfully, however on the 
webpage, two javascript popups are generated. Here is the result from one of my 
active_scaffolds on an AR model personnel_type:

Popup 1:

RJS error:

TypeError: $$("#admin__personnel_type-create--form a.cancel").first().link is 
undefined

Popup 2:

new Insertion.Top("admin__personnel_type-tbody", "\n\u003Ctr class=\"record \" 
id=\"admin__personnel_type-list-10-row\"\u003E\n  \n    \n    \u003Ctd 
class=\"name-column \" \u003E\n      test\n    \u003C/td\u003E\n      \u003Ctd 
class=\"actions\"\u003E\n    \u003Ctable cellpadding=\"0\" 
cellspacing=\"0\"\u003E\r\n  \u003Ctr\u003E\r\n    \u003Ctd 
class=\"indicator-container\"\u003E\r\n      \u003Cimg alt=\"loading 
indicator\" class=\"loading-indicator\" 
id=\"admin__personnel_type-record-10-loading-indicator\" 
src=\"/images/active_scaffold/default/indicator.gif?1218649774\" 
style=\"visibility:hidden;\" /\u003E\r\n    \u003C/td\u003E\r\n    \r\n      
\r\n      \u003Ctd\u003E\r\n        \u003Ca 
href=\"/admin/personnel_type/edit/10?_method=get\u0026amp;authenticity_token=fc44acb46157c6fb4ea2a696a962b9678eeb2930\"
 class=\"edit action\" id=\"admin__personnel_type-edit-10-link\" 
position=\"replace\"\u003EEdit\u003C/a\u003E\r\n      \u003C/td\u003E\r\n    
\r\n      \r\n      \u003Ctd\u003E\r\n        \u003Ca 
href=\"/admin/personnel_type/destroy/10?_method=delete\u0026amp;authenticity_token=fc44acb46157c6fb4ea2a696a962b9678eeb2930\"
 class=\"destroy action\" id=\"admin__personnel_type-destroy-10-link\" 
onclick=\"return confirm('Are you sure?');\"\u003EDelete\u003C/a\u003E\r\n      
\u003C/td\u003E\r\n    \r\n      \r\n      \u003Ctd\u003E\r\n        \u003Ca 
href=\"/admin/personnel_type/show/10?_method=get\u0026amp;authenticity_token=fc44acb46157c6fb4ea2a696a962b9678eeb2930\"
 class=\"show action\" id=\"admin__personnel_type-show-10-link\" 
position=\"replace\"\u003EShow\u003C/a\u003E\r\n      \u003C/td\u003E\r\n    
\r\n  \u003C/tr\u003E\r\n\u003C/table\u003E\n  \u003C/td\u003E\n  
\u003C/tr\u003E\n\n\u003Cscript type=\"text/javascript\"\u003E\nactions = new 
ActiveScaffold.Actions.Record(\n  $$('#admin__personnel_type-list-10-row 
a.action'),\n  $('admin__personnel_type-list-10-row'),\n  
$('admin__personnel_type-record-10-loading-indicator'),\n  {refresh_url: 
'/admin/personnel_type/row/10?_method=get\u0026authenticity_token=fc44acb46157c6fb4ea2a696a962b9678eeb2930'}\n);\n\u003C/script\u003E\n");
ActiveScaffold.stripe($('admin__personnel_type-tbody'))
ActiveScaffold.hide_empty_message('admin__personnel_type-tbody','admin__personnel_type-empty-message');
ActiveScaffold.increment_record_count('admin__personnel_type-active-scaffold');
$$("#admin__personnel_type-create--form a.cancel").first().link.close();

Also Please Note - 

My controller, personnel_type (named the same as my AR model), lives in a 
subdirectory 'admin'. so the full path to it is localhost/admin/personnel_type. 
I don't know if that makes any difference. Finally - I am able to delete rows 
without any problems.

Thank you - 
Jin

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to