You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by andre seame <an...@hotmail.fr> on 2016/03/25 12:19:30 UTC

HTML markup file generated by code or HTML markup file with parameter

Hello,

Question?
I would like to create a component.java that is associated to a HTML markup file component.html, but a part of the markup file must be dynamic.

Why?
A standard form is associated to a HTML markup file like:
<form ...>
...
<input wicket:id="Field1" id="Field1" type="text" size="40"/>
...
<input wicket:id="Field1" id="Field2" type="text" size="40"/>
..
<input wicket:id="Field1" id="Field10" type="text" size="40"/>
...
But, I would like to group the input fields with other information, therefore I create panels. So my form is now associated to a HTML markup file like:

<form ...>
...
<span wicket:id="panel_01">panel contents come here - The panel includes <input wicket:id="Field1" id="Field1" type="text" size="40"/> </span>
...
<span wicket:id="panel_02">panel contents come here - The panel includes <input wicket:id="Field2" id="Fiel2" type="text" size="40"/> </span>
..
<span wicket:id="panel_10">panel contents come here - The panel includes <input wicket:id="Field10" id="Fiel10" type="text" size="40"/> </span>
...
How to do that?
Create GenericPanel.java and Panel1.java that extends GenericPanel.java. Panel1.java is associated to the HTML markup file Panel1.html:
...
<wicket:panel>
... <input wicket:id="Field1" id="Fiel1" type="text" size="40"/>
 </wicket:panel>

And do again for iI = 2 to 10. This will probably work, but it is complex. The idea is to create a repeater:
<wicket:panel xmlns:wicket="http://wicket.apache.org">
   <tr class="headers">
       <wicket:container wicket:id="headers">
           <span wicket:id="panel_i">panel contents come here -
             The panel includes  <input wicket:id="Field_i" id="Field_i" type="text" size="40"/>
           </span>
       </wicket:container>
   </tr>
</wicket:panel>

So the question is how to do the association between GenericPanel.java[i] and GenericPanel.htlm[i] that must contain <input wicket:id="Field_i" id="Field_i" type="text" size="40"/> ?

As far as I understand the wicket mechanism, the HTML markup file is a constant file that describes the HTML code of the component.
Is it possible in wicket 6? Wicket 7?

Thanks,
PHL


RE: HTML markup file generated by code or HTML markup file with parameter

Posted by andre seame <an...@hotmail.fr>.
Hello, 

I have not test your suggestion, I need to add "reference or wicket id" in the HTML Markup, like : 
<input wicket:id="Field1" id="Field10" type="text" size="40"/>

So the wicket engine have to do a link between thr input filed10 with a Java object. 

I think, this will be more complex as add "<div><image ... "

Thanks, 
PHL.

________________________________________
De : andrea del bene <an...@gmail.com>
Envoyé : vendredi 25 mars 2016 11:36
À : users@wicket.apache.org
Objet : Re: HTML markup file generated by code or HTML markup file with parameter

https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#advanced_5

On 25/03/2016 12:24, Ernesto Reinaldo Barreiro wrote:
> IMarkupResourceStreamProvider?
>
> On Fri, Mar 25, 2016 at 12:19 PM, andre seame <an...@hotmail.fr> wrote:
>
>> Hello,
>>
>> Question?
>> I would like to create a component.java that is associated to a HTML
>> markup file component.html, but a part of the markup file must be dynamic.
>>
>> Why?
>> A standard form is associated to a HTML markup file like:
>> <form ...>
>> ...
>> <input wicket:id="Field1" id="Field1" type="text" size="40"/>
>> ...
>> <input wicket:id="Field1" id="Field2" type="text" size="40"/>
>> ..
>> <input wicket:id="Field1" id="Field10" type="text" size="40"/>
>> ...
>> But, I would like to group the input fields with other information,
>> therefore I create panels. So my form is now associated to a HTML markup
>> file like:
>>
>> <form ...>
>> ...
>> <span wicket:id="panel_01">panel contents come here - The panel includes
>> <input wicket:id="Field1" id="Field1" type="text" size="40"/> </span>
>> ...
>> <span wicket:id="panel_02">panel contents come here - The panel includes
>> <input wicket:id="Field2" id="Fiel2" type="text" size="40"/> </span>
>> ..
>> <span wicket:id="panel_10">panel contents come here - The panel includes
>> <input wicket:id="Field10" id="Fiel10" type="text" size="40"/> </span>
>> ...
>> How to do that?
>> Create GenericPanel.java and Panel1.java that extends GenericPanel.java.
>> Panel1.java is associated to the HTML markup file Panel1.html:
>> ...
>> <wicket:panel>
>> ... <input wicket:id="Field1" id="Fiel1" type="text" size="40"/>
>>   </wicket:panel>
>>
>> And do again for iI = 2 to 10. This will probably work, but it is complex.
>> The idea is to create a repeater:
>> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>>     <tr class="headers">
>>         <wicket:container wicket:id="headers">
>>             <span wicket:id="panel_i">panel contents come here -
>>               The panel includes  <input wicket:id="Field_i" id="Field_i"
>> type="text" size="40"/>
>>             </span>
>>         </wicket:container>
>>     </tr>
>> </wicket:panel>
>>
>> So the question is how to do the association between GenericPanel.java[i]
>> and GenericPanel.htlm[i] that must contain <input wicket:id="Field_i"
>> id="Field_i" type="text" size="40"/> ?
>>
>> As far as I understand the wicket mechanism, the HTML markup file is a
>> constant file that describes the HTML code of the component.
>> Is it possible in wicket 6? Wicket 7?
>>
>> Thanks,
>> PHL
>>
>>
>


---------------------------------------------------------------------
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: HTML markup file generated by code or HTML markup file with parameter

Posted by andrea del bene <an...@gmail.com>.
https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#advanced_5

On 25/03/2016 12:24, Ernesto Reinaldo Barreiro wrote:
> IMarkupResourceStreamProvider?
>
> On Fri, Mar 25, 2016 at 12:19 PM, andre seame <an...@hotmail.fr> wrote:
>
>> Hello,
>>
>> Question?
>> I would like to create a component.java that is associated to a HTML
>> markup file component.html, but a part of the markup file must be dynamic.
>>
>> Why?
>> A standard form is associated to a HTML markup file like:
>> <form ...>
>> ...
>> <input wicket:id="Field1" id="Field1" type="text" size="40"/>
>> ...
>> <input wicket:id="Field1" id="Field2" type="text" size="40"/>
>> ..
>> <input wicket:id="Field1" id="Field10" type="text" size="40"/>
>> ...
>> But, I would like to group the input fields with other information,
>> therefore I create panels. So my form is now associated to a HTML markup
>> file like:
>>
>> <form ...>
>> ...
>> <span wicket:id="panel_01">panel contents come here - The panel includes
>> <input wicket:id="Field1" id="Field1" type="text" size="40"/> </span>
>> ...
>> <span wicket:id="panel_02">panel contents come here - The panel includes
>> <input wicket:id="Field2" id="Fiel2" type="text" size="40"/> </span>
>> ..
>> <span wicket:id="panel_10">panel contents come here - The panel includes
>> <input wicket:id="Field10" id="Fiel10" type="text" size="40"/> </span>
>> ...
>> How to do that?
>> Create GenericPanel.java and Panel1.java that extends GenericPanel.java.
>> Panel1.java is associated to the HTML markup file Panel1.html:
>> ...
>> <wicket:panel>
>> ... <input wicket:id="Field1" id="Fiel1" type="text" size="40"/>
>>   </wicket:panel>
>>
>> And do again for iI = 2 to 10. This will probably work, but it is complex.
>> The idea is to create a repeater:
>> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>>     <tr class="headers">
>>         <wicket:container wicket:id="headers">
>>             <span wicket:id="panel_i">panel contents come here -
>>               The panel includes  <input wicket:id="Field_i" id="Field_i"
>> type="text" size="40"/>
>>             </span>
>>         </wicket:container>
>>     </tr>
>> </wicket:panel>
>>
>> So the question is how to do the association between GenericPanel.java[i]
>> and GenericPanel.htlm[i] that must contain <input wicket:id="Field_i"
>> id="Field_i" type="text" size="40"/> ?
>>
>> As far as I understand the wicket mechanism, the HTML markup file is a
>> constant file that describes the HTML code of the component.
>> Is it possible in wicket 6? Wicket 7?
>>
>> Thanks,
>> PHL
>>
>>
>


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


Re: HTML markup file generated by code or HTML markup file with parameter

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
IMarkupResourceStreamProvider?

On Fri, Mar 25, 2016 at 12:19 PM, andre seame <an...@hotmail.fr> wrote:

> Hello,
>
> Question?
> I would like to create a component.java that is associated to a HTML
> markup file component.html, but a part of the markup file must be dynamic.
>
> Why?
> A standard form is associated to a HTML markup file like:
> <form ...>
> ...
> <input wicket:id="Field1" id="Field1" type="text" size="40"/>
> ...
> <input wicket:id="Field1" id="Field2" type="text" size="40"/>
> ..
> <input wicket:id="Field1" id="Field10" type="text" size="40"/>
> ...
> But, I would like to group the input fields with other information,
> therefore I create panels. So my form is now associated to a HTML markup
> file like:
>
> <form ...>
> ...
> <span wicket:id="panel_01">panel contents come here - The panel includes
> <input wicket:id="Field1" id="Field1" type="text" size="40"/> </span>
> ...
> <span wicket:id="panel_02">panel contents come here - The panel includes
> <input wicket:id="Field2" id="Fiel2" type="text" size="40"/> </span>
> ..
> <span wicket:id="panel_10">panel contents come here - The panel includes
> <input wicket:id="Field10" id="Fiel10" type="text" size="40"/> </span>
> ...
> How to do that?
> Create GenericPanel.java and Panel1.java that extends GenericPanel.java.
> Panel1.java is associated to the HTML markup file Panel1.html:
> ...
> <wicket:panel>
> ... <input wicket:id="Field1" id="Fiel1" type="text" size="40"/>
>  </wicket:panel>
>
> And do again for iI = 2 to 10. This will probably work, but it is complex.
> The idea is to create a repeater:
> <wicket:panel xmlns:wicket="http://wicket.apache.org">
>    <tr class="headers">
>        <wicket:container wicket:id="headers">
>            <span wicket:id="panel_i">panel contents come here -
>              The panel includes  <input wicket:id="Field_i" id="Field_i"
> type="text" size="40"/>
>            </span>
>        </wicket:container>
>    </tr>
> </wicket:panel>
>
> So the question is how to do the association between GenericPanel.java[i]
> and GenericPanel.htlm[i] that must contain <input wicket:id="Field_i"
> id="Field_i" type="text" size="40"/> ?
>
> As far as I understand the wicket mechanism, the HTML markup file is a
> constant file that describes the HTML code of the component.
> Is it possible in wicket 6? Wicket 7?
>
> Thanks,
> PHL
>
>


-- 
Regards - Ernesto Reinaldo Barreiro