> > The frustration level is getting pretty high here. This ought to be a > simple form update, and I've been working on it for three days now. >
Take it easy ;). I'm afraid that you are using a Hobo version there is no specific tutorial for. The old tutorials where for Hobo 1.0 (with Prototype!!) and the new one for Hobo 2.0. So you are in limbo. But not to worry, I've dug a Hobo 1.3 app and I have tried to build a similar example. Here's a webm video demo: http://ubuntuone.com/346FWoYlhbIVEFPctz3A3R When creating a new animation_pane, depending on the animation selected, some fields are enabled/disabled (the data from the animation is copied). I hope I understood you correctly :). This is the code: animation_panes_controller.rb: ------------------------------ def new @animation_pane = AnimationPane.new if request.xhr? && !params[:animation_id].blank? @animation_pane.animation = Animation.find(params[:animation_id]) hobo_ajax_response end end animation_panes/new.dryml: -------------------------- <new-page> <form:> <field-list: fields="name, animation, color, size"> <animation-view:><select-animation-input/></animation-view:> <color-view:><check-animation-input myfield="color" part="color"/></color-view:> <size-view:><check-animation-input myfield="size" part="size"/></size-view:> </field-list:> </form:> </new-page> <def tag="check-animation-input" attrs="myfield"> <% animation_attribute = eval "@animation_pane.animation.#{myfield}" if @animation_pane.animation %> <if test="&animation_attribute && !animation_attribute.blank?"> <input type="text" name="animation_pane[#{myfield}]" disabled value="&animation_attribute"/> </if> <else> <input type="text" name="animation_pane[#{myfield}]"/> </else> </def> <def tag="select-animation-input"> <select-one onchange="Hobo.ajaxRequest( '/animation_panes/new?animation_id='+this.value, ['color', 'size'], {method: 'get'})"/> </def> Regards, Ignacio > pjm > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/groups/opt_out. -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
bin7fkBDs8yLU.bin
Description: Binary data
