Thanks Bryan. 

Sorry to go around again, but assuming we have the dialog plumbing working, 
what would be the recommended Hobo 1.4 way to retrieve the data from the 
server-side db? 

In 1.3 we've used Hobo.ajaxRequest as follows, but it's always seemed like 
hard work to me, and CHANGES-1.4.txt note suggests you've dropped this for 
1.4 anyway

  Hobo.ajaxRequest( "/items/" + item_id + "/ajax_item",
                    [],
                    { params: { item_id: item_id },
                      action: 'ajax_item',
                      controller: 'items',
                      method: 'get',
                      message: "Please wait",

                      onSuccess: function(transport) {
                        jQuery("#edit-item-dialog").empty();
                        
jQuery("#edit-item-dialog").append(transport.responseText);

                        
jQuery("#edit-item-dialog").find('.hjq-annotated').each(function() {
                          var annotations = hjq.getAnnotations.call(this);
                          if (annotations.init) {
                            
hjq.util.createFunction(annotations.init).call(this, annotations);
                          };
                        });

                        hjq.dialog_opener.click(this, 
jQuery('#item-dialog-s' + item_id));
                      },

                      onFailure: function(transport) {
                        jQuery("#edit-item-dialog").empty();
                      }
                    } );
}

On Wednesday, July 4, 2012 5:18:29 PM UTC+1, Bryan Larsen wrote:
>
> Here's the promised example: 
>
> <dialog-box id="mydialog"> 
>   <div id="message"/> 
> </dialog-box> 
>
> <dialog-open-button dialog="#mydialog" 
> onclick="$('#message').text('hello')"/> 
>
> Replace .text('hello') with whatever DOM manipulation is required to 
> get the desired results. 
>
> Bryan 
>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/J07D5x7fDj0J.
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/hobousers?hl=en.

Reply via email to