The best place to ask programming/development questions, imo. UPDATE: stackoverflow is the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but a great reference for finding answers.

My Music (Nickleus)

20130920

how to generically find "this" richfaces rich:modalPanel's jsf non-html-rendered id, i.e. the id in the jsf/xhtml code (-"Container")

when this code is run in a browser:
<rich:modalPanel id="changePwdPanel" onshow="alert(this.id)">
...
</rich:modalPanel>

it outputs the following:
changePwdPanelContainer

and the resulting html code looks like this:
<div id="changePwdPanel" style="display: none;"><input autocomplete="off" id="changePwdPanelOpenedState" name="changePwdPanelOpenedState" type="hidden" /><div class="rich-modalpanel " id="changePwdPanelContainer" ...


if you want to get the actual modalPanel coded id, i.e. changePwdPanel, you can e.g. do this:

<rich:modalPanel id="changePwdPanel" onshow="alert((this.id).replace(/Container/,''))">
...
</rich:modalPanel>


No comments:

Post a Comment