Does anyone have an article on how to add dynamic content such that the
content isn't defined in the markup at compile time.  It is generated at
runtime.
 
For example.
 
Old Way - Listing1
 
<div wicket:id="containers">     
  <div wicket:id="container1">
  </div>
  <div wicket:id="container2"> 
  </div>
</div>
 
...
With dynamic content - Listing2
 
<div wicket:id="containers">     
   <!-- Dynamic Content Wicket Ids, container1, container2 -->
</div>
...
 
I could use an offline, compile time tool to generate the markup and
then add it to my project. But I wanted to see if there is something
more dynamic.
 
I also, could use something like a ListView or Repeater, but I wanted to
avoid that because of legacy java code.  
 
The Java code is structured such that 'containers' has sub-components
'container1' ***
 
It is easier refactor the Java code or have some system to add some kind
of dynamic content that would look like the HTML in Listing1.
 
UseCase: For Igor,
 
The use-case is just as I described, there are some cases where you have
legacy Wicket Java code.   It costs more to modify the Java code and
retest the logic so I wanted to be able to 'refactor' my markup and
clean at least the markup without making major changes to the Java
hierarchy structure.
 
 I want to have a HTML markup that looks like this but would act like
the listing in listing1 above. 
<div wicket:id="containers">     
   <!-- Dynamic Content Wicket Ids, container1, container2 -->
</div>
 
 
 
 

Reply via email to