<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:"Consolas","serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Many thanks for your answer.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">In fact, I thought to a workaround : I can have only one string Parameter with three choices instead of two : “none”, “create”, “update”. But it
 is not so “pretty” as what I want!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Many thanks to Edward for your comment about the parameter names / fields names : I did not know this constraint.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jacqueline<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Christopher Brooks [mailto:cxh@eecs.berkeley.edu]
<br>
<b>Envoyé :</b> vendredi 30 novembre 2012 20:55<br>
<b>À :</b> SIGNORET Jacqueline 139795<br>
<b>Cc :</b> kepler-users@kepler-project.org<br>
<b>Objet :</b> Re: [kepler-users] Optional Parameter<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">As Edward says, there is no easy way to do this.<br>
One idea would be to set the visibility to expert:<br>
<br>
method.setVisibility(Settable.EXPERT);<br>
<br>
You would do this in attributeChanged().<br>
This would make method not visible the next time the <br>
EditParameters dialog was rendered.  This is not really what<br>
you want.<br>
<br>
_Christopher<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 11/30/12 10:13 AM, Edward A. Lee wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><br>
There is no way that I know of to do this easily... <br>
<br>
A couple of notes: <br>
<br>
The parameter names should match the field names. <br>
Otherwise, you will have problems if you use the actor <br>
in actor-oriented classes. If you want the user to see <br>
a different name, I suggest: <br>
<br>
enableOperation = new Parameter(this, "enableOperation"); <br>
enableOperation.setDisplayName("enableCatalogUpdate"); <br>
<br>
Edward <br>
<br>
<br>
On 11/30/12 1:42 AM, SIGNORET Jacqueline 139795 wrote: <br>
<br>
<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Dear All, <br>
<br>
I am a beginner trying to develop an actor. I apologize for asking a <br>
silly question. <br>
<br>
I need two parameter : the first is a Boolean and the second one a String : <br>
<br>
public Parameter enableOperation; <br>
<br>
public StringParameter method; <br>
<br>
enableOperation = new Parameter(this, "enableCatalogUpdate"); <br>
<br>
enableOperation.setTypeEquals(BaseType.BOOLEAN); <br>
<br>
enableOperation.setExpression("false"); <br>
<br>
method = new StringParameter(this, "populationRequest"); <br>
<br>
method.setTypeEquals(BaseType.STRING); <br>
<br>
method.setExpression("create"); <br>
<br>
method.addChoice("create"); <br>
<br>
method.addChoice("update"); <br>
<br>
I should like that the second parameter be available only when the user <br>
checks the first one. Is it possible to do that easily? <br>
<br>
Many thanks for any help. <br>
<br>
Jacqueline <br>
<br>
<br>
<br>
_______________________________________________ <br>
Kepler-users mailing list <br>
<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a>
<br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
<o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Kepler-users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><o:p></o:p></pre>
<pre><a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Christopher Brooks, PMP                       University of California<o:p></o:p></pre>
<pre>CHESS Executive Director                      US Mail: 337 Cory Hall<o:p></o:p></pre>
<pre>Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774<o:p></o:p></pre>
<pre>ph: 510.643.9841                                (Office: 545Q Cory)<o:p></o:p></pre>
<pre>home: (F-Tu) 707.665.0131 cell: 707.332.0670 <o:p></o:p></pre>
</div>
</body>
</html>