4.1.2中Dialog出现的问题????

jame_q 2007-11-12
Html如下:

<a href="" jwcid="@DirectLink" listener="listener:showDialog" updateComponents="testDialog">Show Dialog</a>

<div jwcid="testDialog@Dialog" hidden="ognl:dialogHidden" followScroll="ognl:fs" backgroundColor="literal:#D2691E" renderTag="true" style="display:none;">

<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr valign="top" class="spacer">
<td width="15" height="15"><img src="images/box2_1.gif" width="15" height="15"/></td>
<td width="870" height="15" background="images/bg_5.gif"></td>
<td width="15" height="15">
<img src="images/box2_2.gif" width="15" height="15" /></td>
</tr>

<tr valign="top" class="content">
<td width="15" background="images/bg_6.gif" class="spacer" style="-moz-opacity:0.8;filter:alpha(opacity=80)"></td>
<td width="870" class="content">

<table width="530" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#E9E9E9">
<td width="6" height="5" valign="top" class="spacer">
<img src="images/wbox_1.gif" width="5" height="5"/></td>
<td width="518" height="5" class="spacer"></td>
<td width="6" height="5" valign="top" class="spacer">
<img src="images/wbox_2.gif" width="5" height="5"/></td>
</tr>
<tr bgcolor="#E8E8E8">
<td width="6" height="23" valign="top" bgcolor="#E9E9E9" class="spacer"></td>
<td height="23" bgcolor="#EBEBEB" class="heading"> <strong></strong><font color="#023C6A"><strong>Search Agent</strong></font>
                                       
                                     
<a href="" jwcid="@DirectLink" listener="listener:hiddenDialog" updateComponents="testDialog">Hidden Dialog</a></td>
<td width="6" height="23" valign="top" bgcolor="#E9E9E9" class="spacer"></td>
</tr>
<tr bgcolor="#E9E9E9">
<td height="5" colspan="3" valign="top" class="spacer"></td>
</tr>
<tr>
<td width="6" bgcolor="#F5F5F5" class="spacer"></td>
<td bgcolor="#F7F7F7">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr valign="top" class="remarks">
<td width="16%"><strong>CLIENT CODE</strong></td>
<td width="15%"><strong>AGENT CODE</strong></td>
<td width="69%"><strong>AGENT NAME</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td>JW0000</td>
<td>10220</td>
<td><a href="#" class="remarkshyperlink">A A TRAVEL LTD</a></td>
</tr>
<tr valign="top" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr class="remarks">
<td>AC0001</td>
<td>20035</td>
<td><a href="#" class="remarkshyperlink">A A TRAVEL LTD (PKG)</a></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td>HA0009</td>
<td>20036</td>
<td><a href="#" class="remarkshyperlink">A G C TRAVEL SERVICE- PKG</a></td>
</tr>
<tr valign="top" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr class="remarks">
<td>HA0020</td>
<td>20037</td>
<td><a href="#" class="remarkshyperlink">A I T (PKG)</a></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td>HA0009</td>
<td>20036</td>
<td><a href="#" class="remarkshyperlink">A G C TRAVEL SERVICE- PKG</a></td>
</tr>
<tr valign="top" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr class="remarks">
<td>HA0020</td>
<td>20037</td>
<td><a href="#" class="remarkshyperlink">A I T (PKG)</a></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF" class="remarks">
<td>HA0009</td>
<td>20036</td>
<td><a href="#" class="remarkshyperlink">A G C TRAVEL SERVICE- PKG</a></td>
</tr>
<tr valign="top" class="remarks">
<td height="4" colspan="3" class="table-line"></td>
</tr>
</table></td>
<td width="6" bgcolor="#F5F5F5" class="spacer"></td>
</tr>
<tr>
<td width="6" height="5" valign="bottom" bgcolor="#F2F2F2" class="spacer">
<img src="images/wbox_3.gif" width="5" height="5"/></td>
<td height="5" valign="bottom" bgcolor="#F5F5F5" class="spacer"></td>
<td width="6" height="5" valign="bottom" bgcolor="#F5F5F5" class="spacer">
<img src="images/wbox_4.gif" width="5" height="5"/></td>
</tr>
</table>
<br/>
<table width="530" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#E9E9E9">
<td width="5" height="5" valign="top" class="spacer">
<img src="images/wbox_1.gif" width="5" height="5"/></td>
<td width="386" height="5" class="spacer"></td>
<td width="6" height="5" valign="top" class="spacer">
<img src="images/wbox_2.gif" width="5" height="5"/></td>
</tr>
<tr bgcolor="#E8E8E8">
<td width="5" height="23" valign="top" bgcolor="#E9E9E9" class="spacer"></td>
<td height="23" bgcolor="#EBEBEB" class="heading"><font color="#023C6A">Search Agent</font></td>
<td width="6" height="23" valign="top" bgcolor="#E9E9E9" class="spacer"></td>
</tr>
<tr bgcolor="#E9E9E9">
<td height="5" colspan="3" valign="top" class="spacer"></td>
</tr>
<tr>
<td width="5" bgcolor="#F5F5F5" class="spacer"></td>
<td bgcolor="#F7F7F7">
<table width="510" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="spacer">
<td height="5" colspan="4"></td>
</tr>
<tr class="content">
<td height="27">Agent Code:</td>
<td height="27">
<input type="text" name="textfield1"/>
</td>
<td height="27" class="remarks"><font color="#333333">(leave blank for full list) </font></td>
<td width="17%" height="27" valign="bottom">
</td>
</tr>
<tr class="content">
<td width="16%" height="27">Agent Name:</td>
<td width="33%" height="27">
<input type="text" name="textfield2"/></td>
<td width="36%" height="27" class="remarks"><font color="#333333">(leave blank for full list) </font></td>
<td width="17%" height="27" valign="bottom"></td>
</tr>
<tr class="content">
<td width="16%" height="27">Client Code:</td>
<td height="27" colspan="2">
<input name="textfield2" type="text" size="10"/></td>
<td width="17%" height="27">
<input type="button" name="groovybtn1234" class="groovybutton" value="Search" title="" />
</td>
</tr>
</table>
</td>
<td width="6" bgcolor="#F5F5F5" class="spacer"></td>
</tr>
<tr>
<td width="5" height="5" valign="bottom" bgcolor="#F2F2F2" class="spacer">
<img src="images/wbox_3.gif" width="5" height="5"/></td>
<td height="5" valign="bottom" bgcolor="#F5F5F5" class="spacer"></td>
<td width="6" height="5" valign="bottom" bgcolor="#F5F5F5" class="spacer">
<img src="images/wbox_4.gif" width="5" height="5"/></td>
</tr>
</table>
</td>
<td width="15" background="images/bg_7.gif" class="spacer" style="-moz-opacity:0.8;filter:alpha(opacity=80)"></td>
</tr>
<tr valign="top" class="spacer">
<td width="15" height="15">
<img src="images/box2_3.gif" width="15" height="15" style="-moz-opacity:0.8;filter:alpha(opacity=80)"/></td>
<td width="870" height="15" background="images/bg_8.gif" style="-moz-opacity:0.8;filter:alpha(opacity=80)"></td>
<td width="15" height="15">
<img src="images/box2_4.gif" width="15" height="15" style="-moz-opacity:0.8;filter:alpha(opacity=80)"/></td>
</tr>
</table>

</div>

Java:

private boolean dialogHidden = true;
public void showDialog(IRequestCycle cycle){
System.out.println("show");
this.setDialogHidden(false);
}

public void hiddenDialog(IRequestCycle cycle){
System.out.println("hidden");
this.setDialogHidden(true);
}

设置style="display:none;"后,点击显示Dialog显示不出,要刷新页面才出来;
设置style="display:none;",DIV部分在页面显示一大块空白.
<div jwcid="testDialog@Dialog" hidden="ognl:dialogHidden" followScroll="ognl:fs" backgroundColor="literal:#D2691E" renderTag="true" style="display:none;">

那位知道怎么解决,...谢谢!
jame_q 2007-11-12
急.......
jame_q 2007-11-19
无人用过t4中的Dialog?????
tapestry 2007-11-19
使用dojo.widget.byId('testDialog').hide();
dojo.widget.byId('testDialog').show();来控制显示和隐藏,不需要设置style="display:none;"这个属性吧。你试一下。
jame_q 2007-11-21
呵呵,谢谢高手...
jame_q 2007-11-21
非常谢谢!