Ticket #679 (closed defect: fixed)

Opened 16 months ago

Last modified 8 months ago

TActiveLabel can't be shown from inside TRepeater. TActiveRadioButton cant be unchecked

Reported by: pudlo Owned by: tof
Priority: urgent Milestone: 3.1.2
Component: Prado Framework v3 Version: 3.1
Severity: minor Keywords: TActiveRadioButton, TActiveLabel
Cc:

Description

I found two related bugs. Please look at the examples below:

<?PHP

Prado::using( 'System.Web.UI.ActiveControls.*' ) ;

class actions extends TPage
{
        // repeater bug
        public function OnLoad()
        {
                $dataArray[0][ 'id' ] = '1' ;

                if( !$this->Page->IsPostBack )
                {
                        $this->Repeater->DataSource = $dataArray ;
                        $this->Repeater->dataBind() ;
                }
        }

        public function changeText( $sender, $param )
        {
                $obj = $this->myLabel ;
                $obj->Text = $sender->Text ;
                $obj->Display = "Dynamic" ;

                // solution
                //$this->CallBackClient->show($obj, true);
        }


        // activeradiobutton bug
        public function checkRadioButton($sender, $param){
               $this->myRadioButton->checked = true;
        }
        public function uncheckRadioButton($sender, $param){
               $this->myRadioButton->checked = false;
                
               // solution 
               //$this->CallbackClient->check($this->myRadioButton, false);
        }

}

?>
<body>

<com:TForm>

repeater bug<br>
  
<com:TActiveButton Text="outside" OnCallback="Page.changeText" />

<com:TActiveLabel ID="myLabel" Text="Some Text" Display="None" />

<com:TRepeater ID="Repeater" EnableViewState="true" >
 <prop:ItemTemplate>
        <com:TActiveButton Text="inside" OnCallback="Page.changeText" />
</prop:ItemTemplate>
</com:TRepeater>

<br><br>

radiobutton bug<br>

<com:TActiveRadioButton ID="myRadioButton"/>

<com:TActiveButton Text="check RadioButton" OnCallback="Page.checkRadioButton" />
<com:TActiveButton Text="uncheck RadioButton" OnCallback="Page.uncheckRadioButton" />


<br><br>
<com:TCallback />
<com:TJavascriptLogger />
</com:TForm>
</body>

Attachments

TActiveRadioButton.diff (0.8 kB) - added by pudlo 16 months ago.

Change History

Changed 16 months ago by pudlo

Reproduceable on Linux, Windows, FF, Opera Prado 3.1 (stable) Prado 3.1 (snapshot July 26, 2007)

Changed 16 months ago by pudlo

Changed 15 months ago by xue

  • milestone set to 3.1.1

Changed 15 months ago by xue

  • owner changed from xue to tof

Changed 14 months ago by xue

  • milestone changed from 3.1.1 to 3.1.2

Changed 8 months ago by tof06

  • status changed from new to closed
  • resolution set to fixed

in [2240] and [2419]

Note: See TracTickets for help on using tickets.