ŽËÓÊŒþʹÓà MIME žñÊœ¡£ÓÉÓÚÓÊŒþÔĶÁ³ÌÐò²»ÄÜʶ±ð
ŽËžñÊœ£¬ÒòŽË£¬¿ÉÄÜÎÞ·šÊ¶±ðžÃÓÊŒþµÄ·Ö²¿»ò²¿·ÖÄÚÈÝ¡£
--B_3490696647_898390
Content-type: text/plain;
charset="GB2312"
Content-transfer-encoding: quoted-printable
Hi, everyone:
I add a button, named backup in the Template Tab,
And the click event is ok.
Now I want add a dialog after clicked the button,
So, I add a model , but the dialog didn=A1=AFt display at all.
So, I want to know is there some necessary class need
To modify or add?
The model code is like this:
TemplateBackupModel.java
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
public class TemplateBackupModel extends Model {
private EntityModel privatePassword;
public EntityModel getPassword()
{
return privatePassword;
}
public void setPassword(EntityModel value)
{
privatePassword =3D value;
}
public TemplateBackupModel(){
setPassword(new EntityModel());
AsyncQuery _asyncQuery =3D new AsyncQuery();
_asyncQuery.setModel(this);
_asyncQuery.asyncCallback =3D new INewAsyncCallback() {
@Override
public void onSuccess(Object model, Object result)
{
}
};
}
@Override
public void eventRaised(Event ev, Object sender, EventArgs args) {
super.eventRaised(ev, sender, args);
}
public boolean validate(){
return true;
}
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
And created a model in the backup button click callback like this=A3=BA
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
public void backup()
{
if (getWindow() !=3D null)
{
return;
}
TemplateBackupModel model =3D new TemplateBackupModel();
setWindow(model);
model.setTitle("TemplateBackup");//$NON-NLS-1$
model.setHashName("TemplateBackup");//$NON-NLS-1$
UICommand tempVar =3D new UICommand("OnBackup", this); //$NON-NLS-1$
=20
tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok());
tempVar.setIsDefault(true);
model.getCommands().add(tempVar);
UICommand tempVar2 =3D new UICommand("Cancel", this); //$NON-NLS-1$
=20
tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel());
tempVar2.setIsCancel(true);
model.getCommands().add(tempVar2);
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--B_3490696647_898390
Content-type: text/html;
charset="GB2312"
Content-transfer-encoding: quoted-printable
<html><head></head><body style=3D"word-wrap: break-word;
-webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size:=
14px; font-family: =CB=CE=CC=E5, sans-serif;"><div>Hi,
everyone:</div><div><span cl=
ass=3D"Apple-tab-span" style=3D"white-space:pre"> </span>I
add a button, named b=
ackup in the Template Tab, </div><div>And the click event is
ok. <=
/div><div><span class=3D"Apple-tab-span"
style=3D"white-space:pre"> </span>Now I=
want add a dialog after clicked the button,</div><div>So, I add a model , b=
ut the dialog didn’t display at
all.</div><div><br></div><div><span cl=
ass=3D"Apple-tab-span" style=3D"white-space:pre"> </span>So,
I want to know is t=
here some necessary class need </div><div>To modify or
add?</div><div><=
br></div><div><span class=3D"Apple-tab-span"
style=3D"white-space:pre"> </span>T=
he model code is like
this:</div><div>TemplateBackupModel.java</div><div>=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</div><div><div>public
=
class TemplateBackupModel extends Model
{</div><div><br></div><div> &n=
bsp; private EntityModel
privatePassword;</div><div><br></div><div>
&n=
bsp; public EntityModel getPassword()</div><div>
{</div><div>&n=
bsp; return
privatePassword;</div><div> }<=
/div><div><br></div><div> public void
setPassword(EntityModel v=
alue)</div><div> {</div><div>
privat=
ePassword =3D value;</div><div>
}</div><div><br></div><div> =
public
TemplateBackupModel(){</div><div><br></div><div>
=
setPassword(new
EntityModel());</div><div><br></div><div>&nbs=
p; AsyncQuery _asyncQuery =3D new
AsyncQuery();</div><div=
_asyncQuery.setModel(this);</div><div> &n=
bsp;
_asyncQuery.asyncCallback =3D new INewAsyncCallback() {</di=
v><div>
@Override</div><div> =
public void onSuccess(Object model,
Objec=
t result)</div><div>
{</div><div><b=
r></div><div>
}</div><div> &n=
bsp;
};</div><div><br></div><div>
}</div><div><br=
</div><div>
@Override</div><div> public void even=
tRaised(Event ev, Object sender, EventArgs args) {</div><div>
&=
nbsp; super.eventRaised(ev, sender, args);</div><div>
}<=
/div><div><br></div><div> public boolean
validate(){</div><div>=
return true;</div><div>
}</div><div=
}</div></div><div>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=
/div><div><br></div><div>And created a model in the
backup button click call=
back like
this=A3=BA</div><div>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D</div><div><div>public void
backup()</div><div> {</div><=
div><br></div><div> if
(getWindow() !=3D null)</div=
<div>
{</div><div> &n=
bsp;
return;</div><div>
}</div><div><br></=
div><div> TemplateBackupModel model
=3D new Templat=
eBackupModel();</div><div>
setWindow(model);</div=
<div>
model.setTitle("TemplateBackup");//$NON-NL=
S-1$</div><div>
model.setHashName("TemplateBackup=
");//$NON-NLS-1$</div><div><br></div><div><br></div><div>
 =
; UICommand tempVar =3D new UICommand("OnBackup", this);
//$NON-NLS-1$<=
/div><div>
tempVar.setTitle(ConstantsManager.getI=
nstance().getConstants().ok());</div><div>
tempVa=
r.setIsDefault(true);</div><div>
model.getCommand=
s().add(tempVar);</div><div>
UICommand tempVar2 =3D=
new UICommand("Cancel", this); //$NON-NLS-1$</div><div>
=
tempVar2.setTitle(ConstantsManager.getInstance().getConstants().canc=
el());</div><div>
tempVar2.setIsCancel(true);</di=
v><div>
model.getCommands().add(tempVar2);</div><=
div><br></div><div>
}</div></div><div>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</div></body></html>
--B_3490696647_898390--