Hj é o dia!!! Várias dúvidas:
seguinte… tenho um combo… de acordo com o que será selecionado, deve esconder ou não um tabslider.
No meu exemplo, quando eu seleciono a opção: “Finalizado”… ele deve mostrar o tabslider e isso ele já está fazendo. Porém quando outra opção é selecionada, o tabslider deve ser escondido… e é aí que está dando problema… alguma sugestão???
Laszlo
<?xml version="1.0" encoding="ISO-8859-1" ?>
<canvas width="1000" bgcolor="#C1CDC1">
<greenstyle name="specialstyle"/>
<bluestyle name="bluecolors"/>
<dataset name="dset4" request="true" src="http://10.96.168.4/status.php" />
<!-- lado esquerdo (atendimento) -->
<view name="left" bgcolor="#C1CDC1" y="0"
width="600" height="610" x="0">
</view>
<!-- lado direito (pesquisa) -->
<view name="right" bgcolor="#F0FFFF" y="0"
x="690" width="310" height="610" >
</view>
<view id="divider" x="680" y="0"
width="10" height="610" bgcolor="#838B8B">
</view>
<!-- Super Classe da Borda-->
<class name="box" height="50" width="635" bgcolor="#838B83" x="20" y="12"/>
<class name="box2" height="115" width="770" bgcolor="#838B83" x="20" y="108"/>
<class name="borderedbox" extends="box">
<attribute name="bordersize" value="3"/>
<view bgcolor="#F0FFF0"
x="${parent.bordersize}"
y="${parent.bordersize}"
width="${parent.width - parent.bordersize*2 }"
height="${parent.height - parent.bordersize*2 }"/>
</class>
<class name="borderedbox2" extends="box2">
<attribute name="bordersize" value="3"/>
<view bgcolor="#F0FFF0"
x="${parent.bordersize}"
y="${parent.bordersize}"
width="${parent.width - parent.bordersize*2 }"
height="${parent.height - parent.bordersize*2 }"/>
</class>
<class name="borderedbox3" extends="box">
<attribute name="bordersize3" value="3"/>
<view bgcolor="#F8F8FF"
x="${parent.bordersize3}"
y="${parent.bordersize3}"
width="${parent.width - parent.bordersize3*2 }"
height="${parent.height - parent.bordersize3*2 }"/>
</class>
<class name="mybutton" extends="button">
<attribute name="myattr" type="string" value=""/>
</class>
<class name="atendimentoview" extends="view" visible="true" x="1" height="500">
<borderedbox bordersize="3" y="375"/>
<statictext fontstyle="bold" x="30" y="390" >Status
</statictext>
<combobox id="cb_cod_status" x="90" y="390" name="cb_cod_status"
width="190" editable="false" shownitems="3"
defaulttext="Escolha um status" >
<textlistitem datapath="dset4:/tabela/status" text="$path{'desc_status/text()'}"
value="$path{'cod_status/text()'}" onclick="cb_cod_status.aparece()"/>
<method name="aparece" args="">
<![CDATA[
var ap = cb_cod_status.getText();
var ag = parent.varia.getText();
if (ap == "Finalizado")
{
parent.ts3.setVisible("true");
parent.varia.setText("true");
}
else
{
Debug.write( "Else" +" - "+ ag );
if (ag == "true")
{
parent.ts3.setVisible("!parent.ts3.visible");
parent.varia.setText("false");
}
}
]]>
</method>
</combobox>
<edittext width="70" x="0" y="700"
id="varia" name="varia" visible="false" text="false"/>
<tabslider id="ts3" name="ts3" width="635" height="140"
bgcolor="#838B83"
bordersize="3"
spacing="2"
bordercolor="#838B83"
mintabheight="20"
x="20"
y="427"
visible="false"
>
<tabelement id="tse3" fontstyle="bold" text="Solução" layout="spacing:10" selected="true"
text_x="20" style="$once{specialstyle}">
<view width="620" height="100" >
<edittext name="desc_solucao" id="desc_solucao" multiline="true" width="610"
height="95" >
<scrollbar axis="y"/>
</edittext>
</view>
<view bgcolor="green" placement="header"
width="10" height="12" x="5" y="5" />
</tabelement>
</tabslider>
</class>
<atendimentoview name="newAtendimento" datapath="new:/atendimento">
</atendimentoview>
</canvas>
Dataset - dset4 retorna:
<tabela>
<status>
<cod_status>1</cod_status>
<desc_status>Aguardando</desc_status>
</status>
<status>
<cod_status>2</cod_status>
<desc_status>Pendente</desc_status>
</status>
<status>
<cod_status>3</cod_status>
<desc_status>Finalizado</desc_status>
</status>
</tabela>



