We are currently trying to convert an existing framework (originally based on struts-jsp) to Wicket. The framework contains custom tags for complex input components (f.e. a seach field with a proper label, an inputField and a combo to select the required operator for the search). These custom tags render the markup for any of these subcomponents dynamically based on configuration attributes of the tag or default values for the corresponding entity. No markup is rendered if f.i. no label is required, or if the operator cannot be selected.
We want to create this kind of components with Wicket, but the problem is that we cannot generate the markup for the subcomponents dynamically. To our knowledge, there are 2 ways to solve this in Wicket: (1) create all subcomponents (having a corresponding id in the markup file), and mark those that should not display as invisible. This has the disadvantage that we are creating more components than we really need, because the markup is fixed and it requires a component for every wicket-id defined in the markup. (2) use a repeating view, to which we can add the subcomponents that should display dynamically. This has the disadvantage that repeating views only accept markup containers, so we have to create a wrapper around all subcomponents if we want to add them dynamically. Question: is there a way we can build a component where we can dynamically define the markup for the subcomponents, so that we don't have to generate any components that are not required or wrap components in markup containers to be able do add them dynamically ? Jan Vermeulen. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user