Hi,

is there a way I can find specific html tag in markup?

I have this html structure:
<ul class="mymenu">
  <li>
    <a href="./mypage.html?cid=menu">menu</a>
  <ul>
    <li>
      <a href="./mypage.html?cid=menu/submenu">submenu</a>
    <ul>
      <li>
        <a href="./mypage.html?cid=menu/submenu/subsubmenu1">subsubmenu1</a>
      </li>
      <li>
        <a href="./mypage.html?cid=menu/submenu/subsubmenu2">subsubmenu2</a>
      </li>
      <li>
        <a href="./mypage.html?cid=menu/submenu/subsubmenu3">subsubmenu3</a>
      </li>
    </ul>
  </ul>
</ul>

I'm processing clicks on anchors with my page:
public PageTest(PageParameters parameters){
  //cid = category id
  String category = parameters.get("cid").toString();
  ...
}

Now I need some way I can add atribute into parent <li> tag of <a> tag on which 
I do click.
Somethink like (pseudocode):
public PageTest(PageParameters parameters){
  //cid = category id
  String category = parameters.get("cid").toString();
  //find corresponding <a> tag
  Tag anchorTag = go_from_top_ul_tag_and_find_a_tag_by_category(category)
  //have corresponding anchor tag, get parrent tag of the anchor tag
  Tag anchorParentTag = anchorTag.getParent();
  //and now I can do my mysterious things with menu...
}

But I don't know where to start my search and I totaly don't know whot to look 
for in docu.

Please, help :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to