Ticket #746 (closed enhancement: fixed)

Opened 12 months ago

Last modified 8 months ago

Allow custom tags with new TWebControl('custom').

Reported by: sergeymorkovkin Owned by: xue
Priority: low Milestone: 3.1.2
Component: Prado Framework v3 Version: 3.1
Severity: minor Keywords:
Cc:

Description

TWebControlConstructor isn't used for something. So I propose to let Prado programmers use it's optional parameter for creating webcontrols with custom tags. For example, in my project I need to create legend tag and there is no TLegend control.

It would be very handly to write something like: $this->_tagLegend = new TWebControl('legend');

Am I convincing enough?

Change History

Changed 10 months ago by xue

  • milestone set to 3.1.2

Changed 9 months ago by maddin

We can also add an extra control for that:

class THtmlTag extends TWebControl
{
	public function getTagName()
	{
		return $this->getViewState('TagName',parent::getTagName());
	}
	
	public function setTagName($tag)
	{
		$this->setViewState('TagName',TPropertyValue::ensureString($tag));
	}
}

Changed 8 months ago by xue

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

Added THtmlElement for this purpose.

Note: See TracTickets for help on using tickets.