Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

[HOW TO] Autorefresh web UI after a state change ?

Hi you all,

I have looked for and have read the manuals but i dont know how to (if possible) autorefresh web ui to show/hide attributes depending on the actual state.

In some states i need to show a specific custom enumeration and to hide another. Now, i have to refresh the page manually to redraw the user interface...

Do i need to use scripts?
Is there any formal or generic way to do this ???

Thank you very much.

0 votes



2 answers

Permanent link
In some states i need to show a specific custom enumeration and to hide another. Now, i have to refresh the page manually to redraw the user interface...

Do i need to use scripts?

Well, you could use some JavaScript. For instance, the Status selection is:
// ...

<div class="EnumerationWidget NarrowWidget" id="com_ibm_team_workitem_web_ui_internal_view_editor_parts_StatusAttributePart_0" widgetid="com_ibm_team_workitem_web_ui_internal_view_editor_parts_StatusAttributePart_0">
// ...
<select dojoattachpoint="_select" dojoattachevent="onkeyup: _handleKeyUp, onchange: _handleSelectChange, onclick:_handleSelectClick, onfocus:_handleSelectFocus, onblur: _handleSelectBlur" class="Select">
<option value="Release.state.s14">New Release</option>
// ...
</select>
// ...
</div>
// ...

Then, you could show/hide HTML fields via an "onchange=foo();" in <select>. The "foo()" function could be:
<script type="text/javascript">

function foo() {
if (document.getElementById("com_ibm_team_workitem_web_ui_internal_view_editor_parts_StatusAttributePart_0").getElementsByClass("Selectvalue")[0].value == "Release.state.s14") {
document.getElementById("field_01").style.display = "none";
// ...
} else {
document.getElementById("field_01").style.display = "inline";
// ...
}
</script>

Cheers.

0 votes


Permanent link
Thank you very much !!!

ill try!

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 22 '11, 6:59 a.m.

Question was seen: 5,154 times

Last updated: Sep 22 '11, 6:59 a.m.

Confirmation Cancel Confirm