Commit Graph
78 Commits
Author SHA1 Message Date
Marek Habersack 8d39b158e5 [asp.net] Fix for bug #626829. Nodes need to be re-populated on postback, with populate on demand active
When one clicks on the plus sign in the tree with populate on demand active and then clicks on the node's
text, the resulting post back is a plain one, not a callback. In this case all the nodes need to be repopulated
or they will vanish from the rendering. At the same time, the nodes have to be simply marked as populated when
a post back in callback mode is processed.

Disabled one test and a small chunk of code in TreeView.RenderNode - it needs more investigation (nothing critical
though)
2010-08-13 00:12:23 +02:00
Marek Habersack 0d5fccd5a9 2010-07-08 Marek Habersack <[email protected]>
* TreeView.cs: in 4.0, checkbox renders the value of the current
	node's ToolTip, if anything, and not Text.

svn path=/trunk/mcs/; revision=160055
2010-07-08 13:10:25 +00:00
Marek Habersack 6d0b03285c 2010-07-07 Marek Habersack <[email protected]>
* TreeView.cs:
	When using registered CSS classes, the node style must use them in
	reverse order.

More 4.0 test updates (disabled some Menu tests until its rendering is updated)

svn path=/trunk/mcs/; revision=160003
2010-07-07 13:04:50 +00:00
Marek Habersack fd8812fabf This code must be enabled for 2.0 as well
svn path=/trunk/mcs/; revision=159997
2010-07-07 11:29:34 +00:00
Marek Habersack a670985119 2010-07-07 Marek Habersack <[email protected]>
* TreeView.cs: 4.0 rendering changes.

Another batch of 4.0 test updates

svn path=/trunk/mcs/; revision=159996
2010-07-07 11:29:23 +00:00
Marek Habersack 2d668e9583 2010-06-21 Marek Habersack <[email protected]>
* BaseValidator.cs, BulletedList.cs, Calendar.cs, CheckBox.cs,
    	CheckBoxList.cs, DataGrid.cs, DropDownList.cs, GridView.cs,
    	HyperLink.cs, ImageButton.cs, LinkButton.cs, ListBox.cs,
    	ListControl.cs, Menu.cs, RadioButton.cs, RadioButtonList.cs,
    	RepeatInfo.cs, Repeater.cs, TextBox.cs, TreeView.cs,
    	ValidationSummary.cs, WebControl.cs: use WebControl.IsEnabled
    	instead of Enabled wherever necessary.

svn path=/trunk/mcs/; revision=159280
2010-06-21 18:41:51 +00:00
Gonzalo Paniagua Javier 447907f4a3 2010-03-19 Gonzalo Paniagua Javier <[email protected]>
* TreeView.cs: use enums instead of strings for attributes.


svn path=/trunk/mcs/; revision=153917
2010-03-19 20:11:21 +00:00
Marek Habersack e105f08673 2010-03-04 Marek Habersack <[email protected]>
* BuildManager.cs: do less work in the static constructor

2010-03-04  Marek Habersack  <[email protected]>

	* RuntimeHelpers.cs: added. Contains methods moved here from
	HttpRuntime, so that initialization sequence of various objects is
	independent of HttpRuntime.

2010-03-04  Marek Habersack  <[email protected]>

	* HttpRuntime.cs: do less work in the static constructor. Most of
	the code was moved to System.Web.Util.RuntimeHelpers. Properties
	which have been moved: MonoVersion, RunningOnWindows,
	CaseInsensitive, IsDebuggingEnabled

Also:
	- hushed some compiler warnings
	- various classes now use RuntimeHelpers instead of HttpRuntime

svn path=/trunk/mcs/; revision=153038
2010-03-04 19:04:13 +00:00
Marek Habersack 140576e9f4 2010-02-18 Marek Habersack <[email protected]>
* TreeViewTest.cs: added test for bug #580692

2010-02-18  Marek Habersack  <[email protected]>

	* TreeView.cs: RegisterStyle must copy CssClass in addition to
	other style properties. Fixes bug #580692

svn path=/trunk/mcs/; revision=151964
2010-02-18 10:50:31 +00:00
Marek Habersack b58f5b27ba 2009-11-16 Marek Habersack <[email protected]>
* TreeNodeTest.cs: added test for a situation when a
	node already contains children when the PopulateOnDemand property
	is set.

2009-11-16  Marek Habersack  <[email protected]>

	* TreeNodeCollection.cs: whenever a node is added, let the owner
	know about it.

	* TreeNode.cs: added internal property HadChildrenBeforePopulating
	which is used to let TreeView know about an error condition where
	a populate-on-demand node contains children added outside the
	OnTreeNodePopulate event

	* TreeView.cs: if a node has any child nodes and PopulatOnDemand
	is set, throw an exception from RenderNode. This is the behavior
	of .NET

svn path=/trunk/mcs/; revision=146275
2009-11-16 17:09:06 +00:00
Marek Habersack 9a0870f6a1 Hush compilation warnings
svn path=/trunk/mcs/; revision=135050
2009-05-29 07:48:14 +00:00
Marek Habersack 8791646ca9 Code formatting
svn path=/trunk/mcs/; revision=131201
2009-04-07 08:44:21 +00:00
Marek Habersack a8ecbec688 2009-04-07 Marek Habersack <[email protected]>
* TreeView.js: removed nodeText parameter from the JS calls.

	* TreeView.cs: encode | characters into U+007C, so that
	RaiseCallbackEvent doesn't get confused.
	Removed nodeText parameter from the JS calls.

svn path=/trunk/mcs/; revision=131196
2009-04-07 07:05:06 +00:00
Gonzalo Paniagua Javier 1b8ce0ac74 remove CWL
svn path=/trunk/mcs/; revision=131187
2009-04-07 03:38:57 +00:00
Gonzalo Paniagua Javier de03d6a600 2009-04-06 Gonzalo Paniagua Javier <[email protected]>
* TreeNode.cs: reset the path data for all child nodes too.
	* TreeView.cs: HtmlAttribute encode the node text. When rebuilding the
	node tree, set the correct index for the nodes so that the Path is
	correct.


svn path=/trunk/mcs/; revision=131186
2009-04-07 03:38:00 +00:00
Marek Habersack 6026f7a60a 2009-04-06 Marek Habersack <[email protected]>
* HttpRuntime.cs: added a new internal static property
	IsDebuggingEnabled

	* HttpContext.cs: IsDebuggingEnabled now calls
	HttpRuntime.IsDebuggingEnabled

2009-04-06  Marek Habersack  <[email protected]>

	* Page.cs: ProcessRaiseCallbackEvent and ProcessGetCallbackResult
	now return full exception trace if one is caught and we're running
	in debugging mode.

2009-04-06  Marek Habersack  <[email protected]>

	* TreeView.js: TreeView_ToggleExpand now takes more parameters - a
	full definition of treeview's node contents.
	Added new function, TreeView_PopulateNode, which partially takes
	over role of the PopulateNode function generated in
	TreeView.OnPreRender (see below). Fixes bug #492307

	* TreeView.cs: RaiseCallbackEvent needs to recreate the event
	target's parental tree all the way from the root to the node and
	populate only the leaf (requested) node. This avoids calling the
	TreeNodePopulate handler more times than needed. Fixes bug #492307
	OnPreRender: moved the script code to constants and the script
	body is now generated using StringBuilder instead of a series of
	String.Format calls.
	GetClientExpandEvent: adjusted code for new TreeView JavaScript
	API.

svn path=/trunk/mcs/; revision=131137
2009-04-06 18:02:20 +00:00
Marek Habersack 58caa86044 2009-04-02 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: implemented missing converter for
	the ExpandDepth property. Fixes bug #490860

svn path=/trunk/mcs/; revision=130813
2009-04-01 22:31:58 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Habersack 81c4068d12 2008-10-17 Marek Habersack <[email protected]>
* ImageMap.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in Render ().

	* DropDownList.cs, ListBox.cs: validate the event in LoadPostData ().

	* TextBox.cs: validate the event in LoadPostData ().
	Register for event validation in AddAttributesToRender ().

	* HiddenField.cs: validate the event in RaisePostDataChangedEvent.
	Register for event validation in Render ().

	* RadioButton.cs: validate the event in LoadPostData ().
	Register for event validation in InternalAddAttributesToRender.

	* CheckBox.cs, RadioButtonList.cs: validate the event in
	RaisePostDataChangedEvent.

	* Menu.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in GetClientEvent ().

	* DetailsView.cs, GridView.cs: validate the event in
	RaisePostBackEvent ().
	Register for validation in GetCallbackScript () and in OnPreRender

	* Button.cs, Table.cs, BulletedList.cs, Calendar.cs, LinkButton.cs,
	ImageButton.cs, TreeView.cs: validate the event in RaisePostBackEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* Control.cs: added the ValidateEvent internal method, used by
	classes descending from Control to automatically trigger event
	validation.

	* Page.cs: removed the CheckForValidationSupport method. It moved
	to Control.cs
	RaisePostBackEvent no longer validates the events, this
	functionality has been moved to Control.ValidateEvent.

2008-10-17  Marek Habersack  <[email protected]>

	* HtmlInputHidden.cs: validate the event in LoadPostDataInternal.

	* HtmlInputButton.cs: validate the event in
	RaisePostBackEventInternal ().
	Register for event validation in RenderAttributes ()

	* HtmlTextArea.cs: validate the event in
	RaisePostBackDataChangedEvent ().

	* HtmlButton.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ()

	* HtmlAnchor.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ().

	* HtmlInputRadioButton.cs, HtmlSelect.cs: validate the event in
	LoadPostData.

	* HtmlInputText.cs, HtmlInputImage.cs, HtmlInputCheckBox.cs,
	HtmlInputPassword.cs: validate the event in
	RaisePostDataChangedEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* MenuAdapterTest.cs: work around event validation failure in the
	test environment.

2008-10-17  Marek Habersack  <[email protected]>

	* PageTest.cs: use a custom version of HtmlInputHidden control to
	work around the new event validation code which doesn't work in
	this instance.

svn path=/trunk/mcs/; revision=116231
2008-10-17 14:56:19 +00:00
Marek Safar f3f05c2055 Warnings cleanup
svn path=/trunk/mcs/; revision=111904
2008-08-29 09:48:05 +00:00
Marek Habersack 342a629ca2 2008-07-28 Marek Habersack <[email protected]>
* TreeView.cs: when TreeView is displaying a site map and there is
	no node selected by the user, select the node corresponding to the
	current page, if any.

svn path=/trunk/mcs/; revision=109040
2008-07-28 16:08:02 +00:00
Roei Erez 5ea42ecc8a In case of multiple tree nodes bindings with the same key, select the first one and not the last one.
svn path=/trunk/mcs/; revision=107814
2008-07-13 09:30:15 +00:00
Igor Zelmanovich ee06e666ba 2008-01-29 Igor Zelmanovich <[email protected]>
* TreeView.cs: add XPFileExplorer icon set.

svn path=/trunk/mcs/; revision=94247
2008-01-29 14:04:54 +00:00
Igor Zelmanovich 8ce3a695d6 2008-01-13 Igor Zelmanovich <[email protected]>
* TreeView.cs:
	* TreeView.js:
	upgrade client side script due to changes in webform.js.		


svn path=/trunk/mcs/; revision=92774
2008-01-13 09:41:36 +00:00
Igor Zelmanovich 7cb6f04d5c 2007-12-24 Igor Zelmanovich <[email protected]>
* TreeView.cs: revert changes from r91230


svn path=/trunk/mcs/; revision=91853
2007-12-24 09:42:34 +00:00
Marek Habersack 3476c409c3 2007-12-13 Marek Habersack <[email protected]>
* ClientScriptManager.cs, MasterPageParser.cs, Control.cs,
	Page.cs: speed optimization - use String.Concat instead of
	String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* Menu.cs, TreeView.cs: optimize use of String.Format in
	OnPreRender.
	Speed optimization - use String.Concat instead of String.Format in
	some cases.

	* GridView.cs, DetailsView.cs: optimize use of String.Format in
	OnPreRender.

	* CheckBox.cs, AccessDataSource.cs, WebColorConverter.cs,
	WebControl.cs,TextBox.cs, DropDownList.cs, ValidationSummary.cs,
	ListBox.cs, Panel.cs, BaseValidator.cs, LinkButton.cs: speed
	optimization - use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* HtmlForm.cs, HtmlButton.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* AssemblyResourceLoader.cs: speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SessionId.cs: 
	speed optimization - use String.Concat
	instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* SqlProfileProvider.cs, ProfileParser.cs: speed optimization -
	use String.Concat instead of String.Format in some cases.
2007-12-13  Marek Habersack  <[email protected]>

	* ApplicationManager.cs, ApplicationHost.cs,
	DefaultVirtualPathProvider.cs: speed optimization - use
	String.Concat instead of String.Format in some cases.

svn path=/trunk/mcs/; revision=91230
2007-12-13 13:50:10 +00:00
Vladimir Krasnov 001edb1810 * TreeView.cs: refactoring, used AddAttribute overload without encoding on known attribute values,
used Page.ClientScript.GetWebResourceUrl call instead of AssemblyResourceLoader.GetResourceUrl

svn path=/trunk/mcs/; revision=83580
2007-08-07 11:45:27 +00:00
Igor Zelmanovich 22862a356e 2007-07-24 Igor Zelmanovich <[email protected]>
* TreeView.cs: refactoring:
	* TreeView.js:
	used ClientScriptManager.GetCallbackEventReference API instead calling 
	WebForm_DoCallback explicit.
		
2007-07-24 Igor Zelmanovich <[email protected]>

	* ClientScriptManager.cs: fixed: GetCallbackEventReference method.
		

svn path=/trunk/mcs/; revision=82560
2007-07-24 12:19:00 +00:00
Igor Zelmanovich 7f257ad214 fixed line ending
svn path=/trunk/mcs/; revision=82555
2007-07-24 12:00:17 +00:00
Marek Habersack 83063b42bd More TreeView rendering fixes
2007-05-09  Marek Habersack  <[email protected]>

	* TreeNodeStyleCollection.cs: do not set font's underline flag to
	false, set it to its own value instead.

	* TreeView.cs: if level style exists and has ChildNodesPadding
	set, it takes precedence over the node style setting (if any).

svn path=/trunk/mcs/; revision=77002
2007-05-09 12:14:58 +00:00
Marek Habersack c5f417422d 2007-05-08 Marek Habersack <[email protected]>
* TreeView.cs: children padding is rendered only before and after
	the children are rendered, not between them. Also, render padding
	only if there are any nodes to follow the current one.

svn path=/trunk/mcs/; revision=76905
2007-05-08 09:01:54 +00:00
Marek Habersack af58980fef 2007-05-03 Marek Habersack <[email protected]>
* TreeView.cs: honor ChildNodesPadding of the NodeStyle.

svn path=/trunk/mcs/; revision=76631
2007-05-03 17:37:16 +00:00
Marek Habersack b573b5e1ed 2007-05-03 Marek Habersack <[email protected]>
* TreeViewTest.cs: revert r76541.

2007-05-03  Marek Habersack  <[email protected]>

	* TreeView.cs: revert r76488, it wasn't entirely correct. I need
	to investigate the special cases it solved a bit more.

svn path=/trunk/mcs/; revision=76597
2007-05-03 09:32:27 +00:00
Marek Habersack 4dc04ab9b3 2007-04-30 Marek Habersack <[email protected]>
* TreeView.cs: bring rendering closer to the MS.NET rendering.

svn path=/trunk/mcs/; revision=76488
2007-04-30 12:26:35 +00:00
Konstantin Triger 5cff7fd740 use Invariant culture for string manipulations
svn path=/trunk/mcs/; revision=75433
2007-04-05 12:48:48 +00:00
Konstantin Triger c1360afb03 use Invariant culture for string manipulations
svn path=/trunk/mcs/; revision=75429
2007-04-05 11:43:27 +00:00
Igor Zelmanovich f9c2c8d33f 2007-03-28 Igor Zelmanovich <[email protected]>
* Menu.cs:
	* TreeView:
	avoid Exception if HierarchicalDataSourceView.Select() returns null.

svn path=/trunk/mcs/; revision=75073
2007-03-28 13:36:17 +00:00
Igor Zelmanovich df60a8c6ea svn path=/trunk/mcs/; revision=73496 2007-02-27 17:36:43 +00:00
Eyal Alalouf 9396a91227 add Http callback support for J2EE portlets.
svn path=/trunk/mcs/; revision=73071
2007-02-18 12:28:38 +00:00
Eyal Alalouf d8091d034e Fix NavigateUrl render for J2EE portlets.
svn path=/trunk/mcs/; revision=72350
2007-02-06 12:00:57 +00:00
Igor Zelmanovich b62028a984 2007-02-04 Igor Zelmanovich <[email protected]>
* Page.cs:
	* ClientScriptManager.cs:
	fixed RegisterClientScriptInclude: all includes that was registered before 
	rendering are rendered at begin form.		

2007-02-04 Igor Zelmanovich <[email protected]>

	* Panel.cs: fixed: reverted r71441.
	* TreeView.cs: used internal RegisterWebFormClientScript API 
	to cause the relevant script be included.	

svn path=/trunk/mcs/; revision=72258
2007-02-04 12:02:58 +00:00
Igor Zelmanovich efd08006de 2007-01-30 Igor Zelmanovich <[email protected]>
* TreeView.cs:
	* TreeView.js:
	fixed PopulateOnDemand: used UniqueID to call WebForms_DoCallBack().


svn path=/trunk/mcs/; revision=71969
2007-01-30 16:00:11 +00:00
Vladimir Krasnov 2f8efd3bbc * TreeView.cs: fixed RegisterStyle, style names should be without leading underscore. fixed RenderNode, node icons should be taken also from level styles
svn path=/trunk/mcs/; revision=71196
2007-01-17 14:41:30 +00:00
Igor Zelmanovich d361663aa7 2007-01-10 Igor Zelmanovich <[email protected]>
* TreeView.cs: fixed: SelectedNode, CheckedNodes.
	* TreeNode.cs:
	* TreeNodeCollection.cs:		

svn path=/trunk/mcs/; revision=70784
2007-01-10 16:50:47 +00:00
Igor Zelmanovich f15e9c1872 2006-12-28 Igor Zelmanovich <[email protected]>
* TreeView.cs: 
	ResolveClientUrl used with LineImagesFolder, ExpandImageUrl, 
	CollapseImageUrl and NoExpandImageUrl properties.


svn path=/trunk/mcs/; revision=70170
2006-12-28 16:09:35 +00:00
Igor Zelmanovich 9f1365f28f 2006-12-19 Igor Zelmanovich <[email protected]>
* TreeView.cs:
	* TreeNode.cs:
	TreeNodeCollapsed is not raised for leaf node.		

svn path=/trunk/mcs/; revision=69735
2006-12-19 13:22:19 +00:00
Igor Zelmanovich 5feeb7e28f 2006-12-11 Igor Zelmanovich <[email protected]>
* TreeView.cs: fixed: ResolveClientUrl used with ImageUrl and NavigateUrl


svn path=/trunk/mcs/; revision=69596
2006-12-17 11:20:51 +00:00
Igor Zelmanovich 914c287794 2006-12-06 Igor Zelmanovich <[email protected]>
* TreeView.cs: fixed: support for event validation.


svn path=/trunk/mcs/; revision=69099
2006-12-06 15:06:26 +00:00
Marek Habersack f5869e74d2 more optimizations
svn path=/trunk/mcs/; revision=68450
2006-11-25 02:43:22 +00:00
Igor Zelmanovich bfd235c3ae corrected rendering
svn path=/trunk/mcs/; revision=65298
2006-09-12 12:25:03 +00:00