Thanks Bryan - let me give that a go.

I also had one other idea...see if this makes any sense to you.


   1. Make both the relationship table (i.e. roles) and the final entity
   (i.e. companies) as accessible => true
   2. Use a <select-many> on "roles" for existing companies (and modify the
   select-many to have the role_type dropdown....will need to edit the
   javascript so that the dropdown doesn't get picked up as the action to
   create new rows
   3. Use a <input-many> on "companies" for new companies....will have to
   modify input-many to not show existing rows, only be there for new ones...


Do you think that's feasible?  Are those two modifications possible?  I was
having issues doing #2 above...although I saw that post in 2009 of someone
doing it by changing the class name of the object that triggers the
select-many new rows....

Thanks!

Mike


----
Mike Karp
(m) 650.793.0695
(e) [email protected]


On Fri, Sep 14, 2012 at 3:03 PM, Bryan Larsen <[email protected]> wrote:

> 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.
>
>

-- 
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.

Reply via email to