summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxue <>2006-04-12 12:18:24 +0000
committerxue <>2006-04-12 12:18:24 +0000
commit373d8acc503b94ea09823f49e2ab5e395eccc584 (patch)
treeb45dbde451c0a53405aaf9f43ba2dcd6047e044d
parent64cc0b33281efbef56fbd6495f433906eda50636 (diff)
Merge from 3.0 branch till 898.
-rw-r--r--HISTORY14
-rw-r--r--framework/Web/UI/WebControls/TDataList.php5
-rw-r--r--framework/Web/UI/WebControls/TRepeatInfo.php38
-rw-r--r--framework/Web/UI/WebControls/TWizard.php10
4 files changed, 54 insertions, 13 deletions
diff --git a/HISTORY b/HISTORY
index 6917b042..895aa9c5 100644
--- a/HISTORY
+++ b/HISTORY
@@ -10,11 +10,12 @@ NEW: TSessionPageStatePersister (Qiang)
Version 3.0RC2 April 16, 2006
=============================
BUG: Ticket#118 - Variables that may not have been initialized (Qiang)
+BUG: Ticket#129 - TRadioButtonList in TWizard step does not postback correctly (Qiang)
CHG: Moved localize() into PradoBase (Qiang)
-CHG: List controls now use array keys as list item values even if
- the array is integer-indexed (Qiang)
+CHG: List controls now use array keys as list item values even if the array is integer-indexed (Qiang)
CHG: THttpUtility::htmlEncode and htmlDecode now do not deal with & (Qiang)
ENH: Optimized the representation and evaluation of template expressions (Qiang)
+ENH: Added Raw layout to TDataList (Qiang)
Version 3.0RC1 April 5, 2006
============================
@@ -51,16 +52,13 @@ Version 3.0b March 6, 2006
==========================
BUG: fixed many
CHG: event names must be prefixed with 'On' (Qiang)
-CHG: values of properties whose name ends with 'Template' are
- parsed directly by template parser (Qiang)
+CHG: values of properties whose name ends with 'Template' are parsed directly by template parser (Qiang)
ENH: template parser reports exact error location (Qiang)
ENH: cookie HMAC check (Qiang)
NEW: TInlineFrame (Jason)
NEW: TAPCCache (Alban)
-NEW: TColorPicker, TDatePicker, TRatingList, TAdodbProvider,
- TCreoleProvider (Wei)
-NEW: TMultiView, TView, TControlAdapter, TWebControlAdapter,
- TPagedList, TAttributeCollection (Qiang)
+NEW: TColorPicker, TDatePicker, TRatingList, TAdodbProvider, TCreoleProvider (Wei)
+NEW: TMultiView, TView, TControlAdapter, TWebControlAdapter, TPagedList, TAttributeCollection (Qiang)
Version 3.0a January 18, 2006
=============================
diff --git a/framework/Web/UI/WebControls/TDataList.php b/framework/Web/UI/WebControls/TDataList.php
index f5f4b9fa..695d072a 100644
--- a/framework/Web/UI/WebControls/TDataList.php
+++ b/framework/Web/UI/WebControls/TDataList.php
@@ -627,7 +627,7 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
}
/**
- * @param string how the list should be displayed, using table or using line breaks (Table, Flow)
+ * @param string how the list should be displayed, using table or using line breaks (Table, Flow, Raw)
*/
public function setRepeatLayout($value)
{
@@ -825,7 +825,8 @@ class TDataList extends TBaseDataList implements INamingContainer, IRepeatInfoUs
public function renderItem($writer,$repeatInfo,$itemType,$index)
{
$item=$this->getItem($itemType,$index);
- if($repeatInfo->getRepeatLayout()==='Table')
+ $layout=$repeatInfo->getRepeatLayout();
+ if($layout==='Table' || $layout==='Raw')
$item->renderContents($writer);
else
$item->renderControl($writer);
diff --git a/framework/Web/UI/WebControls/TRepeatInfo.php b/framework/Web/UI/WebControls/TRepeatInfo.php
index 5f4fb825..10c49691 100644
--- a/framework/Web/UI/WebControls/TRepeatInfo.php
+++ b/framework/Web/UI/WebControls/TRepeatInfo.php
@@ -57,13 +57,16 @@ interface IRepeatInfoUser
* TRepeatInfo class.
* TRepeatInfo represents repeat information for controls like {@link TCheckBoxList}.
* The layout of the repeated items is specified via {@link setRepeatLayout RepeatLayout},
- * which can be either 'Table' (default) or 'Flow'.
+ * which can be either 'Table' (default), 'Flow' or 'Raw'.
* A table layout uses HTML table cells to organize the items while
* a flow layout uses line breaks to organize the items.
* The number of columns used to display the items is specified via
* {@link setRepeatColumns RepeatColumns} property, while the {@link setRepeatDirection RepeatDirection}
* governs the order of the items being rendered.
*
+ * Note, the Raw layout does not contain any formatting tags and thus ignores
+ * the column and repeat direction settings.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Web.UI.WebControls
@@ -169,11 +172,12 @@ class TRepeatInfo extends TComponent
}
/**
- * @param string how the repeated items should be displayed, using table or using line breaks. Defaults to 'Table'.
+ * @param string how the repeated items should be displayed, using table or using line breaks.
+ * Valid values include 'Table', 'Flow' and 'Raw'.
*/
public function setRepeatLayout($value)
{
- $this->_repeatLayout=TPropertyValue::ensureEnum($value,array('Table','Flow'));
+ $this->_repeatLayout=TPropertyValue::ensureEnum($value,array('Table','Flow','Raw'));
}
/**
@@ -192,6 +196,11 @@ class TRepeatInfo extends TComponent
$control->setCaptionAlign($this->_captionAlign);
}
}
+ else if($this->_repeatLayout==='Raw')
+ {
+ $this->renderRawContents($writer,$user);
+ return;
+ }
else
$control=new TWebControl;
$control->setID($user->getClientID());
@@ -210,6 +219,29 @@ class TRepeatInfo extends TComponent
}
/**
+ * Renders contents in raw format.
+ * @param THtmlWriter writer for the rendering purpose
+ * @param IRepeatInfoUser repeat information user
+ */
+ protected function renderRawContents($writer,$user)
+ {
+ if($user->getHasHeader())
+ $user->renderItem($writer,$this,'Header',-1);
+
+ // render items
+ $hasSeparators=$user->getHasSeparators();
+ $itemCount=$user->getItemCount();
+ for($i=0;$i<$itemCount;++$i)
+ {
+ $user->renderItem($writer,$this,'Item',$i);
+ if($hasSeparators && $i!=$itemCount-1)
+ $user->renderItem($writer,$this,'Separator',$i);
+ }
+ if($user->getHasFooter())
+ $user->renderItem($writer,$this,'Footer',-1);
+ }
+
+ /**
* Renders contents in horizontal repeat direction.
* @param THtmlWriter writer for the rendering purpose
* @param IRepeatInfoUser repeat information user
diff --git a/framework/Web/UI/WebControls/TWizard.php b/framework/Web/UI/WebControls/TWizard.php
index 794fb4da..426fd73d 100644
--- a/framework/Web/UI/WebControls/TWizard.php
+++ b/framework/Web/UI/WebControls/TWizard.php
@@ -735,6 +735,16 @@ class TWizard extends TWebControl implements INamingContainer
}
/**
+ * Loads state into the wizard.
+ * This method is invoked by the framework when the control state is being saved.
+ */
+ public function loadState()
+ {
+ // a dummy call to ensure the step is activated
+ $this->getActiveStep();
+ }
+
+ /**
* Indicates the wizard needs to recreate all child controls.
*/
protected function requiresControlsRecreation()