--- In [email protected], Tom Chiverton <[EMAIL PROTECTED]> 
wrote:
>
> On Thursday 07 Jun 2007, nhp_ny wrote:
> > this is my OnClick function:
> 
> This has an xmlFile argument that isn't set in the inital code you 
posted, 
> I'll assume it's a page variable.
> 
> > private function onClickCanali(obj:Object, xmlFile:String):void
> > {
> >     var lb:LinkButton;
> >
> >     for each (lb in lbCanali)
> >     {
> >             lb.enabled = true
> >     }
> >     obj.enabled = false;
> >
> >         LoadXmlFile(xmlFile);
> > }
> >
> > as you can see, i need to pass parameters to it, don't see another
> > way to do it. 
> 
> Right. Ya see, you post code and it all becomes much easier.
> 
> private function onClickCanali(event:MouseEvent):void{
>        selectOnly(event.target.label);
> }
> 
> private function selectOnly(lab:String){
>        var lb:LinkButton;
> 
>         for each (lb in lbCanali)
>         {
>              if (lb.label==lb){
>                  lb.enabled = true       ;
>               }else{
>                       lb.enabeled=false;      
>               }               
>         }
> 
>         LoadXmlFile(xmlFile); 
> }
> 
> in initApp():
>       selectOnly("someLabel");//you could get this string from the 
dataProvider of 
> the repeater too.
> 
> 
> > I have vertical linkbuttons that i'm using like if i 
> > had a vertical linkbar. when i disable a linkbutton, the others 
get
> > enabled. just like the linkbar does.
> >
> > and this is the xml that calls the func:
> >
> > <mx:Repeater id="rCanali" dataProvider="{xmlCanali.canale}">
> > <mx:LinkButton id="lbCanali" label="{rCanali.currentItem.title}"
> > width="100%" textAlign="left" click="onClickCanali
> > (event.currentTarget, event.currentTarget.getRepeaterItem
> > ().xmlfile);"/>
> > </mx:Repeater>
> 
> 
> 
> -- 
> Tom Chiverton
> Helping to enthusiastically facilitate robust models
> on: http://thefalken.livejournal.com
> 
> ****************************************************
> 
> This email is sent for and on behalf of Halliwells LLP.
> 
> Halliwells LLP is a limited liability partnership registered in 
England and Wales under registered number OC307980 whose registered 
office address is at St James's Court Brown Street Manchester M2 
2JF.  A list of members is available for inspection at the registered 
office. Any reference to a partner in relation to Halliwells LLP 
means a member of Halliwells LLP. Regulated by the Law Society.
> 
> CONFIDENTIALITY
> 
> This email is intended only for the use of the addressee named 
above and may be confidential or legally privileged.  If you are not 
the addressee you must not read it and must not use any information 
contained in nor copy it nor inform any person other than Halliwells 
LLP or the addressee of its existence or contents.  If you have 
received this email in error please delete it and notify Halliwells 
LLP IT Department on 0870 365 8008.
> 
> For more information about Halliwells LLP visit www.halliwells.com.
>

great!! got the idea.... but what about the xmlfile string? its a 
string that i need to get from the repeater dataprovider. When the 
user clicks the linkbutton, other than changing its state to 
disabled, i also need to have that string so i can load an external 
xml file.

the data provider is:

<?xml version="1.0"?>
<canali>
    <canale id="1">
        <title>My Title</title>
        <xmlfile>xmldata</xmlfile>
    </canale>
</canali>


Reply via email to