Ejemplo n.º 1
0
void HtmlImage::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	if(m_url.empty() == false)
		writer.writeAttribute(_S("src"), m_url);

	if(m_title.empty() == false)
		writer.writeAttribute(_S("title"), m_title);
}
Ejemplo n.º 2
0
void HtmlCheckBox::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	writer.writeAttribute(_S("type"), _S("checkbox"));

	if(getCheck())
		writer.writeAttribute(_S("checked"), _S("checked"));

	if(getAutoPostBack())
		writer.writeAttribute(_S("onchange"), _S("javascript:return osAutoPostBack(this);"));
}
Ejemplo n.º 3
0
void IHtmlSelect::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	if(hasID())
	{
		writer.writeAttribute(_S("id"), getTarget());
		writer.writeAttribute(_S("name"), getTarget());
	}

	if(getEventChange()->empty() == false)
		writer.writeAttribute(_S("onchange"), getEventCommand(EVENT_ONCHANGE));
	else if(getAutoPostBack())
		writer.writeAttribute(_S("onchange"), _S("javascript:return osAutoPostBack(this);"));	
}
Ejemplo n.º 4
0
void HtmlOptionGroup::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	if(m_label.empty() == false)
		writer.writeAttribute(_S("label"), m_label);
}
Ejemplo n.º 5
0
void HtmlLinkButton::renderAttributes(HtmlWriter &writer)
{
	ControlBase::renderAttributes(writer);

	if(hasID())
		writer.writeAttribute(_S("href"), getEventCommand(EVENT_ONCLICK));
}
Ejemplo n.º 6
0
void HtmlLinkTag::render(HtmlWriter &writer)
{
	writer.openTag(_S("link"));

	if(m_rel.empty() == false)
        writer.writeAttribute(_S("rel"), m_rel);
	if(m_href.empty() == false)
		writer.writeAttribute(_S("href"), m_href);
	if(m_type.empty() == false)
        writer.writeAttribute(_S("type"), m_type);
	if(m_title.empty() == false)
        writer.writeAttribute(_S("title"), m_title);
	if(m_hreflang.empty() == false)
        writer.writeAttribute(_S("hreflang"), m_hreflang);

	//writer.closeTag();
	writer.selfCloseTag(); // 0.13 RC2
}