Good morning,

The two RJS Error (TypeError: element is null) are still there with
the last commit of AS master from github (01/07/09) (rails 2.2.2):
- when you go from 1:n to n:1 as  Kumala explained
- and when you go from an embedded scaffold to a n:1 as I mention

(With the new commit I not any more need the patch in /frontends/
default/views/list.rhtml and thus I let the code as it is in this last
commit)

Thanks in advance.

On 7 jan, 16:12, "mr.gaffo" <[email protected]> wrote:
> What version of AS?
> What version of Rails?
>
> On Jan 5, 9:45 am, Kumala <[email protected]> wrote:
>
> > Sounds complicated but easy to replicate.
> > I have 3 classes:  Building, Room, Operator
> > Building has many rooms / Room Belongs to Building
> > Operator has many rooms / Room belongs to Operator
>
> > I use
> >     config.columns[:building].form_ui = :select
> >     config.columns[:operator].form_ui = :select
> > in the room controller to show a link to the building and the operator
> > in the list view. If I click on the operator link, I get the error
> > message:
> > RJS Error
> > TypeError: element is null
>
> > Element.update("room-messages","\n \n\n \n\n \n\n");
>
> > Once I close the dialog box, everything continues as normal.
>
> > How do I get rid of those error dialog boxes? Is this a bug?
>
> > Here the code I have:
> > class BuildingController < ApplicationController
> >   layout "standard"
> >   active_scaffold :building do |config|
> >     config.nested.add_link("Rooms", [:rooms])
> >   end
> > end
> > class RoomController < ApplicationController
> >   layout "standard"
> >   active_scaffold :room do |config|
> >     config.list.columns = [:name, :building,:operator]
> >     config.columns[:building].form_ui = :select
> >     config.columns[:operator].form_ui = :select
> >   end
> > end
> > class OperatorController < ApplicationController
> >   layout "standard"
> >   active_scaffold :operator do |config|
> >     config.list.columns = [:name]
> >   end
> > end
> > class Building < ActiveRecord::Base
> >   has_many :rooms
> > end
> > class Room < ActiveRecord::Base
> >   belongs_to :building
> >   belongs_to :operator
> > end
> > class Operator < ActiveRecord::Base
> >   has_many :rooms
> > end
>
> > Regards
> > Andreas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to