ItEr14S13RFComportamentoGraficoPlanificador: Datebox loaded with intro.

This commit is contained in:
Óscar González Fernández 2009-06-29 14:36:09 +02:00 committed by Javier Moran Rua
parent 060fdc76d0
commit 63d16fbc7b
2 changed files with 9 additions and 9 deletions

View file

@ -79,12 +79,12 @@ public class TaskDetail extends HtmlMacroComponent implements AfterCompose {
}
/**
* When a text box associated to a datebox receives focus, the corresponding
* datebox is shown
* When a text box associated to a datebox is requested to show the datebox,
* the corresponding datebox is shown
* @param component
* the component that has received focus
*/
public void hasReceivedFocus(Component component) {
public void userWantsDateBox(Component component) {
if (component == startDateTextBox) {
showDateBox(startDateBox, startDateTextBox);
}
@ -97,6 +97,7 @@ public class TaskDetail extends HtmlMacroComponent implements AfterCompose {
associatedTextBox.setVisible(false);
dateBox.setVisible(true);
dateBox.setFocus(true);
dateBox.setOpen(true);
}
/**
@ -170,5 +171,4 @@ public class TaskDetail extends HtmlMacroComponent implements AfterCompose {
this.endDateTextBox = endDateTextBox;
}
}

View file

@ -4,11 +4,11 @@
]]>
</zscript>
<hbox>
<textbox id="nameBox" value="" onChange="top.updateBean();"/>
<textbox id="startDateTextBox" value="" onChange="top.updateBean();" onFocus="top.hasReceivedFocus(self);" />
<textbox id="nameBox" value="" onChange="top.updateBean();" />
<textbox id="startDateTextBox" value="" onChange="top.updateBean();" onOK="top.userWantsDateBox(self);" />
<datebox id="startDateBox" compact="true" onChange="top.updateBean();" visible="${false}" onBlur="top.dateBoxHasLostFocus(self);"/>
<textbox id="endDateTextBox" value="" onChange="top.updateBean();" onFocus="top.hasReceivedFocus(self);"/>
<datebox id="endDateBox" compact="true" onChange="top.updateBean();" visible ="${false}" onBlur="top.dateBoxHasLostFocus(self);"/>
<textbox id="endDateTextBox" value="" onChange="top.updateBean();" onOK="top.userWantsDateBox(self);"/>
<datebox id="endDateBox" compact="true" onChange="top.updateBean();" visible ="${false}" onBlur="top.dateBoxHasLostFocus(self);" ctrlKeys="#down" onCtrlKey="top.userWantsDateBox(self)"/>
</hbox>
<zscript><![CDATA[
@ -19,4 +19,4 @@
top.endDateTextBox = endDateTextBox;
]]>
</zscript>
</zk>
</zk>