Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct. 11, 2008, 04:06:34 PM
47672 Posts in 10455 Topics by 5339 Members
Latest Member: phamlehoaian
News: New to PRADO? The PRADO blog tutorial is a good start point.
 
The PRADO Community » Prado v3.x » Bug Reports » Strange rendering behaviour with TActivePanel « previous next »
Pages: [1] Print
Author Topic: Strange rendering behaviour with TActivePanel  (Read 1533 times)
vincedev
Senior Member
***

Karma: 12
Offline Offline

Posts: 349


Weather seems cold today...


View Profile
« on: Jun. 20, 2007, 12:39:29 PM »

Hi,
I noticed something strange when i try to render the content of  a TActivePanel:

I've made a sample with 3 test, each test is made of a TEST button which render an active panel which contain:
   - 1 A textbox and another TActivePanel containing a textbox   
         => loaded with the page
   - 2 the same                              
         => loaded on callback :bug-> the nested active panel is rendering the whole main panel content (but only one time, a second callback makes a good render...)
   - 3 A textbox and a normal TPanel containing a textbox   
         => loaded on callback :OK

So, it works good with a TPanel not with a TActivePanel

Sample.page:
Code:
<com:TForm ID="form1">
<com:THyperLink Text="1 - Test without callback" NavigateUrl="<%= $_SERVER['REQUEST_URI'] %>" /><br />
<com:TActiveLinkButton Text="2 - Test callback with 2nd ActivePanel" OnCallback="Page.load1" /><br />
<com:TActiveLinkButton Text="3 - Test callback without 2nd ActivePanel" OnCallback="Page.load2" /><br />
<hr />

<com:TActivePanel ID="panel1">
<com:TMultiView ID="multiView" ActiveViewIndex="0">
<com:TView>
1 - Test without callback
<pre style="color:#006600">
&lt;com:TActivePanel ID=&quot;panel2&quot;&gt;
&lt;com:TActiveTextBox ID=&quot;tb1&quot; Columns=&quot;30&quot; Text=&quot;ActiveTextBox&quot; /&gt;
&lt;com:TActivePanel ID=&quot;panel3&quot;&gt;
&lt;com:TTextBox ID=&quot;tb2&quot; Columns=&quot;30&quot; Text=&quot;TextBox in ActivePanel&quot; /&gt;
&lt;/com:TActivePanel&gt;
&lt;/com:TActivePanel&gt;
</pre>

<com:TActiveButton Text="Test" OnCallback="Page.test1" /><br />
<com:TActivePanel ID="panel2">
<com:TActiveTextBox ID="tb1" Columns="30" Text="ActiveTextBox" />
<com:TActivePanel ID="panel3">
<com:TTextBox ID="tb2" Columns="30" Text="TextBox in ActivePanel" />
</com:TActivePanel>
</com:TActivePanel>
</com:TView>
<com:TView>
2 - Test callback with 2nd ActivePanel
<pre style="color:#006600">
&lt;com:TActivePanel ID=&quot;panel4&quot;&gt;
&lt;com:TActiveTextBox ID=&quot;tb3&quot; Columns=&quot;30&quot; Text=&quot;ActiveTextBox&quot; /&gt;
&lt;com:TActivePanel ID=&quot;panel5&quot;&gt;
&lt;com:TTextBox ID=&quot;tb4&quot; Columns=&quot;30&quot; Text=&quot;TextBox in ActivePanel&quot; /&gt;
&lt;/com:TActivePanel&gt;
&lt;/com:TActivePanel&gt;
</pre>
<com:TActiveButton Text="Test" OnCallback="Page.test2" /><br />
<com:TActivePanel ID="panel4">
<com:TActiveTextBox ID="tb3" Columns="30" Text="ActiveTextBox" />
<com:TActivePanel ID="panel5">
<com:TTextBox ID="tb4" Columns="30" Text="TextBox in ActivePanel" />
</com:TActivePanel>
</com:TActivePanel>
</com:TView>

<com:TView>
3 - Test callback without 2nd ActivePanel
<pre style="color:#006600">
&lt;com:TActivePanel ID=&quot;panel6&quot;&gt;
&lt;com:TActiveTextBox ID=&quot;tb5&quot; Columns=&quot;30&quot; Text=&quot;ActiveTextBox&quot; /&gt;
&lt;com:TPanel ID=&quot;panel7&quot;&gt;
&lt;com:TTextBox ID=&quot;tb6&quot; Columns=&quot;30&quot; Text=&quot;TextBox in Panel&quot; /&gt;
&lt;/com:TPanel&gt;
&lt;/com:TActivePanel&gt;
</pre>
<com:TActiveButton Text="Test" OnCallback="Page.test3" /><br />
<com:TActivePanel ID="panel6">
<com:TActiveTextBox ID="tb5" Columns="30" Text="ActiveTextBox" />
<com:TPanel ID="panel7">
<com:TTextBox ID="tb6" Columns="30" Text="TextBox in Panel" />
</com:TPanel>
</com:TActivePanel>
</com:TView>
</com:TMultiView>
</com:TActivePanel>
</com:TForm>

Sample.php
Code:
<?php
class Sample extends TPage
{
public function load1($sender,$param)
{
$this->multiView->setActiveViewIndex(1);
$this->panel1->renderControl($param->getNewWriter());
}
public function load2($sender,$param)
{
$this->multiView->setActiveViewIndex(2);
$this->panel1->renderControl($param->getNewWriter());
}
public function test1($sender,$param)
{
$this->tb1->setText($this->tb1->getText().' +1');
$this->tb2->setText($this->tb2->getText().' +1');
$this->panel2->renderControl($param->getNewWriter());
}
public function test2($sender,$param)
{
$this->tb3->setText($this->tb3->getText().' +1');
$this->tb4->setText($this->tb4->getText().' +1');
$this->panel4->renderControl($param->getNewWriter());
}
public function test3($sender,$param)
{
$this->tb5->setText($this->tb5->getText().' +1');
$this->tb6->setText($this->tb6->getText().' +1');
$this->panel6->renderControl($param->getNewWriter());
}
}
?>

Logged

.......Vince.......
vincedev
Senior Member
***

Karma: 12
Offline Offline

Posts: 349


Weather seems cold today...


View Profile
« Reply #1 on: Jul. 13, 2007, 06:47:10 AM »

can someone confirm me this bug?
Logged

.......Vince.......
tof06
PRADO v3.x Developer
Platinum Member
*****

Karma: 66
Offline Offline

Posts: 733



View Profile
« Reply #2 on: Jul. 13, 2007, 08:12:48 AM »

Hi vince,

I think you can consider this as a bug...
I can reproduce with your test, but I really can't explain it !
I think we'll have to wait for Wei's return before this can be corrected... He's the specialist with ActiveControls.
May be post a ticket, just as a reminder for future release

Logged
vincedev
Senior Member
***

Karma: 12
Offline Offline

Posts: 349


Weather seems cold today...


View Profile
« Reply #3 on: Jul. 17, 2007, 06:32:38 AM »

ok, done: ticket #669 http://trac.pradosoft.com/prado/ticket/669
Logged

.......Vince.......
eirikhm
Platinum Member
****

Karma: 27
Offline Offline

Posts: 778



View Profile WWW
« Reply #4 on: Jul. 17, 2007, 09:50:42 AM »

I had some weirdness like this once, but setting a property called  ActiveControl.EnableUpdate to false on the problematic panels solved it.
Logged

vincedev
Senior Member
***

Karma: 12
Offline Offline

Posts: 349


Weather seems cold today...


View Profile
« Reply #5 on: Jul. 18, 2007, 06:33:20 AM »

Yes, it works, yhanks for this tip eirikhm!  Grin
Logged

.......Vince.......
tof06
PRADO v3.x Developer
Platinum Member
*****

Karma: 66
Offline Offline

Posts: 733



View Profile
« Reply #6 on: Mar. 14, 2008, 06:06:52 PM »

Fixed.

To be tested, of course, but it shouldn't break anything Cheesy
Logged
Pages: [1] Print 
« previous next »
Jump to: