How can I predict which Wicket components will have their tags rendered in the final page? -


for wicket components, if call setoutputmarkupid(true) warn when rendered.

markup id set on component not rendered markup. 

i'd output id every component end in html in order can find them xpath testing. how can predict class or properties of component whether sensible setoutputmarkupid(true)?


more detail - in application i'm overriding

protected void init() {     super.init();     addcomponentinstantiationlistener(new icomponentinstantiationlistener() {         public void oninstantiation(component component) {             if (!(component instanceof webmarkupcontainer)) return;             if (component instanceof webmarkupcontainerwithassociatedmarkup) return;             if (component instanceof border.borderbodycontainer) return;             webmarkupcontainer container = (webmarkupcontainer) component;             if (container.istransparentresolver()) return;              component.setoutputmarkupid(true);         }}); 

for sample of pages, arbitrary gubbins trick, seem pretty arbitrary!

repeater components dataview , listview don't have own markup, repeat markup items. can check if component instanceof repeatingview.

this problem shown following, wrong, example:

listview<person> people = new listview<person>("people", list) {     protected void onpopulateitem(listitem<person> item) {         add(new label("name", item.getmodelobject().getname()));     } } 

here don't add label list item, rather listview. , fails. code should've been:

listview<person> people = new listview<person>("people", list) {     protected void onpopulateitem(listitem<person> item) {         item.add(new label("name", item.getmodelobject().getname()));     } } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -