You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alexandros Karypidis <ak...@yahoo.gr> on 2011/04/29 01:38:06 UTC

Repeating two tags at the same level (i.e. without a container)

Hello,

Can anybody recommend how to achieve the following:

I need to repeat two tags at the same level, without placing them in a  
container. For example, the below markup shows a static <div> containing  
two dynamic <div> tags(one for the repeater and one for the two tags I  
need alongside each other):

	<div id="onlyThisContainerNeeded">
		<div wicket:id="repeaterContainer_NOT_wanted">
			<div wicket:id="items"/>
		</div>
	</div>

For the "items" I use the following component to place my 2 tags (a header  
and a div):

	<wicket:panel>
		<h4 wicket:id="title"></h4>
		<div>
			<p>some text</p>
		</div>
	</wicket:panel>

When the repeater is rendered I get:

	<div id="onlyThisContainerNeeded">
		<div> <-- I need to find a way to remove this container -->
			<h4>some title</h4>
			<div>
				<p>some text</p>
			</div>
		</div>
		<div> <-- I need to find a way to remove this container -->
			<h4>some other title</h4>
			<div>
				<p>some other text</p>
			</div>
		</div>
	</div>

So, what can I do to get the following instead:

	<div id="onlyThisContainerNeeded">
		<h4>some title</h4>
		<div>
			<p>some text</p>
		</div>
		<h4>some other title</h4>
		<div>
			<p>some other text</p>
		</div>
	</div>

Thank you in advance!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Repeating two tags at the same level (i.e. without a container)

Posted by Alexandros Karypidis <ak...@yahoo.gr>.
I am absolutely amazed that I had not used this tag until today. Thanks  
for pointing it out.

On Fri, 29 Apr 2011 02:48:33 +0300, Zilvinas Vilutis <ci...@gmail.com>  
wrote:

> It's described  
> here:https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket'XHTMLtags-Elementwicket:container
>
>
> Žilvinas Vilutis
>
> E-mail:   cikasfm@gmail.com
>
>
>
> On Thu, Apr 28, 2011 at 4:47 PM, Zilvinas Vilutis <ci...@gmail.com>  
> wrote:
>> use <wicket:container> tag instead
>>
>> Regards
>>
>> Žilvinas Vilutis
>>
>> E-mail:   cikasfm@gmail.com
>>
>>
>>
>> On Thu, Apr 28, 2011 at 4:38 PM, Alexandros Karypidis  
>> <ak...@yahoo.gr> wrote:
>>> Hello,
>>>
>>> Can anybody recommend how to achieve the following:
>>>
>>> I need to repeat two tags at the same level, without placing them in a
>>> container. For example, the below markup shows a static <div>  
>>> containing two
>>> dynamic <div> tags(one for the repeater and one for the two tags I need
>>> alongside each other):
>>>
>>>        <div id="onlyThisContainerNeeded">
>>>                <div wicket:id="repeaterContainer_NOT_wanted">
>>>                        <div wicket:id="items"/>
>>>                </div>
>>>        </div>
>>>
>>> For the "items" I use the following component to place my 2 tags (a  
>>> header
>>> and a div):
>>>
>>>        <wicket:panel>
>>>                <h4 wicket:id="title"></h4>
>>>                <div>
>>>                        <p>some text</p>
>>>                </div>
>>>        </wicket:panel>
>>>
>>> When the repeater is rendered I get:
>>>
>>>        <div id="onlyThisContainerNeeded">
>>>                <div> <-- I need to find a way to remove this container  
>>> -->
>>>                        <h4>some title</h4>
>>>                        <div>
>>>                                <p>some text</p>
>>>                        </div>
>>>                </div>
>>>                <div> <-- I need to find a way to remove this container  
>>> -->
>>>                        <h4>some other title</h4>
>>>                        <div>
>>>                                <p>some other text</p>
>>>                        </div>
>>>                </div>
>>>        </div>
>>>
>>> So, what can I do to get the following instead:
>>>
>>>        <div id="onlyThisContainerNeeded">
>>>                <h4>some title</h4>
>>>                <div>
>>>                        <p>some text</p>
>>>                </div>
>>>                <h4>some other title</h4>
>>>                <div>
>>>                        <p>some other text</p>
>>>                </div>
>>>        </div>
>>>
>>> Thank you in advance!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Repeating two tags at the same level (i.e. without a container)

Posted by Zilvinas Vilutis <ci...@gmail.com>.
It's described here:https://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket'XHTMLtags-Elementwicket:container


Žilvinas Vilutis

E-mail:   cikasfm@gmail.com



On Thu, Apr 28, 2011 at 4:47 PM, Zilvinas Vilutis <ci...@gmail.com> wrote:
> use <wicket:container> tag instead
>
> Regards
>
> Žilvinas Vilutis
>
> E-mail:   cikasfm@gmail.com
>
>
>
> On Thu, Apr 28, 2011 at 4:38 PM, Alexandros Karypidis <ak...@yahoo.gr> wrote:
>> Hello,
>>
>> Can anybody recommend how to achieve the following:
>>
>> I need to repeat two tags at the same level, without placing them in a
>> container. For example, the below markup shows a static <div> containing two
>> dynamic <div> tags(one for the repeater and one for the two tags I need
>> alongside each other):
>>
>>        <div id="onlyThisContainerNeeded">
>>                <div wicket:id="repeaterContainer_NOT_wanted">
>>                        <div wicket:id="items"/>
>>                </div>
>>        </div>
>>
>> For the "items" I use the following component to place my 2 tags (a header
>> and a div):
>>
>>        <wicket:panel>
>>                <h4 wicket:id="title"></h4>
>>                <div>
>>                        <p>some text</p>
>>                </div>
>>        </wicket:panel>
>>
>> When the repeater is rendered I get:
>>
>>        <div id="onlyThisContainerNeeded">
>>                <div> <-- I need to find a way to remove this container -->
>>                        <h4>some title</h4>
>>                        <div>
>>                                <p>some text</p>
>>                        </div>
>>                </div>
>>                <div> <-- I need to find a way to remove this container -->
>>                        <h4>some other title</h4>
>>                        <div>
>>                                <p>some other text</p>
>>                        </div>
>>                </div>
>>        </div>
>>
>> So, what can I do to get the following instead:
>>
>>        <div id="onlyThisContainerNeeded">
>>                <h4>some title</h4>
>>                <div>
>>                        <p>some text</p>
>>                </div>
>>                <h4>some other title</h4>
>>                <div>
>>                        <p>some other text</p>
>>                </div>
>>        </div>
>>
>> Thank you in advance!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

Re: Repeating two tags at the same level (i.e. without a container)

Posted by Zilvinas Vilutis <ci...@gmail.com>.
use <wicket:container> tag instead

Regards

Žilvinas Vilutis

E-mail:   cikasfm@gmail.com



On Thu, Apr 28, 2011 at 4:38 PM, Alexandros Karypidis <ak...@yahoo.gr> wrote:
> Hello,
>
> Can anybody recommend how to achieve the following:
>
> I need to repeat two tags at the same level, without placing them in a
> container. For example, the below markup shows a static <div> containing two
> dynamic <div> tags(one for the repeater and one for the two tags I need
> alongside each other):
>
>        <div id="onlyThisContainerNeeded">
>                <div wicket:id="repeaterContainer_NOT_wanted">
>                        <div wicket:id="items"/>
>                </div>
>        </div>
>
> For the "items" I use the following component to place my 2 tags (a header
> and a div):
>
>        <wicket:panel>
>                <h4 wicket:id="title"></h4>
>                <div>
>                        <p>some text</p>
>                </div>
>        </wicket:panel>
>
> When the repeater is rendered I get:
>
>        <div id="onlyThisContainerNeeded">
>                <div> <-- I need to find a way to remove this container -->
>                        <h4>some title</h4>
>                        <div>
>                                <p>some text</p>
>                        </div>
>                </div>
>                <div> <-- I need to find a way to remove this container -->
>                        <h4>some other title</h4>
>                        <div>
>                                <p>some other text</p>
>                        </div>
>                </div>
>        </div>
>
> So, what can I do to get the following instead:
>
>        <div id="onlyThisContainerNeeded">
>                <h4>some title</h4>
>                <div>
>                        <p>some text</p>
>                </div>
>                <h4>some other title</h4>
>                <div>
>                        <p>some other text</p>
>                </div>
>        </div>
>
> Thank you in advance!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Repeating two tags at the same level (i.e. without a container)

Posted by "robert.mcguinness" <ro...@gmail.com>.
setRenderBodyOnly(true)  on <div wicket:id="repeaterContainer_NOT_wanted"> 

or

<wicket:container wicket:id="repeaterContainer_NOT_wanted">

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Repeating-two-tags-at-the-same-level-i-e-without-a-container-tp3482548p3482566.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org