title: HTML Id Naming Convention in Java/WICKET for Automation and Design Purpose
body: <p>The base Idea behind is to produce HTML ID that would have the following pattern ClassName_MethodName_ControlName and ClassName_MethodName_RepeaterName_RepeaterCounterZeroBased[999]_FeldControlName_FeldCounterZeroBased[999]
  that Backend Developers, Automation Engineer as well Designers and Fronted developers that are dealing with Bootstrap 3 and jQuery on the client side and we want to use a Naming Convention as a backbone. The same could be applied for any Software Development Technology. </p>
  
  <p>In my opinion it would generate a unique set of IDs for HTML Elements, because you normally have controls with same name and same types just in different methods. It could appear in the same class but in different Methods. In that case they would be on the UI redundant, such as ProductID, ManufacturingID, OrderID with different provenience and meanings but as HTML Identifiers they are the same and we want to create Unique patterns for them.</p>
  
  <p>As you know WICKET use Id to deal with its elements.</p>
  
  <p>It that matter the obvious solution is to set:</p>
  
  <pre><code>Component.setOutputMarkupId(true); // set the HTML Id attribute
  Component.setMarkupId("ClassName_MethodName_ControlName"); // Unique id attribute
  </code></pre>
  
  <p>but Instead the challenge is to produce them dynamically. My Idea was to do it overriding the onConfigure event in WICKET's Java part and to actually place it in COMMON project that would be available for all other Projects. What is in your opinion the best practice and solution?</p>
  
  <p>The more challenging problem here might be: how do you want to generate those IDs? For frontend testing purposes I would suppose that those IDs should be as constant over time as possible. Plus: they must be unique, at least per page. Having multiple instances of a Wicket component of the same class on one page should then result in different IDs, which could be a rather non-trivial management task. Has anyone experience with such an ID generating strategy? </p>