IMarkupResourceStreamProvider? On Fri, Mar 25, 2016 at 12:19 PM, andre seame <[email protected]> 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
