On Fri, Sep 14, 2012 at 2:47 PM, Mike Karp <[email protected]> wrote:
> It appears you cannot run a select-one-or-new-dialog for a phantom row like
> input-many creates...
>
> I am thinking about having the "+" sign on the hjq-input-many actually
> commit the new row, so then I can run the dialog on it. Just not sure how
> to do that yet.
>
> Any idea on how to make the "+"/"-"s commit and delete in realtime, so then
> I can use the dialog on it?
That would be a lot of work. You'd essentially have to rewrite the
input-many tag, which is definitely the heaviest tag in Hobo.
One hack that i used in a new app was to use after-submit with an
additional submit button that sent the browser to the new page.
Try something like this:
<before-field-list:>
<after-submit uri="&persons_path"/>
</before-field-list:>
...
<company-view:>
<select-one/>
<submit label="Save Person and Create New Company"
onclick="$('input[name=after_submit]').val('#{new_company_path}');
return true;"/>
</company-view:>
And then have the new company form after-submit back.
This won't work as well for you as it did for me because I was using a
select-many, and the item being created was an owned item, so it got
added to the list automatically on creation.
Bryan
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en.