Hi,
I suggest using ERXWOTemplate. With these, you can create multiple content zone
for a single component. The AjaxInPlace component uses these to define the edit
and view templates. In you component, you can have the regular content and
inside this content, you define a special zone like this:
<wo:ERXWOTemplate templateName = "bottomContent">
The html to put in bottom
</wo:ERXWOTemplate>
In your Page container, you replace the WOComponentContent with this to skip
the special template:
<wo:ERXWOComponentContent/>
And place this in the bottom of the page where the bottomContent template
content should appear:
<wo:ERXWOComponentContent templateName = "bottomContent"/>
If you use it often, I suggest to create a ERXWOTemplate subcomponent like the
AjaxInPlaceEditTemplate so you do not have to specify the template name in all
places.
Samuel
> Le 2015-07-17 à 09:48, Daniele Corti <[email protected]> a écrit :
>
> Hi list,
>
> I need an advice about a thing that I would like to do:
>
> I'm trying to create a component that works like a generic container, the
> difference is that it doesn't inject the inner HTML where the component is
> defined, but in the bottom of the page. I want to do this, because I would
> like to use in with the Bootstrap Modal Container.
>
> Example:
>
> <wo:form class="form-horizontal">
> .. other form fields...
> <wo:MyModalContainer linkText = "Click Me" classLink="btn btn-default"
> id="MyModal">
> <wo:form>
> ... logic for another form...
> </wo:form>
> </wo:MyModalContainer>
> ... other form fields...
> </wo:form>
>
> I would like the result:
>
> <form action="WEBOBJECT_URL" method="post">
> .. other form fields...
> <a href="#" class="btn bnt-default" data-toggle="modal"
> data-target="#MyModal">Click Me</a>
> .. other form fields...
> </form>
> ... other page HTML...
> <div class="modal fade" id="MyModal" tabindex="-1" role="dialog" >
> <div class="modal-dialog" role="document">
> <div class="modal-content">
> <from action="OTHER_WEBOBJECT_URL" method="post">
> ... logic for another form...
> </form>
> </div>
> </div>
> </div>
> </body>
>
> That's the idea: the code contained in the container is appended to the
> bottom of the page (with the appropriate changes), but the form still work
> inside the component it is defined.
> I need to do this, because, if i put the code where the component is defined,
> the second form is removed, changing the HTML DOM, and the fields in the
> second form inherit the class "form-horizontal" from the first form.
>
> Is there a way to do this?
>
> Thanks!
> --
>
> Daniele Corti
> --
> I DON'T DoubleClick
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/samuel%40samkar.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]