public function Render($blnPrint = true) { //Render Actions first if applicable $strRendered = parent::Render(); $strRendered .= sprintf("<a id='%s' name='%s' %s>%s</a>", $this->strControlId, $this->strControlId, $this->GetAttrString(), $this->strText); if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true) { $strRendered = parent::Render(); $strRendered .= sprintf("<ul id='%s' name='%s' %s>\n", $this->strControlId, $this->strControlId, $this->GetAttrString()); foreach ($this->arrChildControls as $objListItem) { //render list items $strRendered .= $objListItem->Render(false); } $strRendered .= "</ul>\n"; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true) { $strRendered = parent::Render(); $strRendered .= sprintf("<form id='%s' name='%s' method='POST' %s>\n", $this->strControlId, $this->strControlId, $this->GetAttrString()); //If template is set render template if (!is_null($this->strTemplate)) { if (!file_exists($this->strTemplate)) { throw new QCallerException("Template file (" . $this->strTemplate . ") does not exist"); } global $_CONTROL; $_CONTROL = $this; $_FORM = $this->objForm; if (is_null($this->objForm)) { throw new Exception(get_class($this) . " Form is null"); } $strRendered .= $this->objForm->EvaluateTemplate($this->strTemplate); } //Render Text $strRendered .= $this->strText; //Check/Do autorender children if ($this->blnAutoRenderChildren) { foreach ($this->arrChildControls as $objChildControl) { //TODO: Add render check for controls that have already been rendererd $strRendered .= $objChildControl->Render(false); } } $this->Attr('goBack', 'false'); $this->Attr('transition', ' '); //Only render this on the active form if ($this->IsActive()) { $strRendered .= "<script language='javascript'>"; $strRendered .= $this->objForm->RenderControlJSCalls(false); $strRendered .= $this->objForm->RenderClassJSCalls(false); $strRendered .= $this->objForm->RenderControlRegisterJS(false); $strRendered .= $this->objForm->RenderJSAppCalls(false); $strRendered .= "</script>"; /*_______ALWAYS RENDER THIS LAST________*/ if ($this->IsActive()) { $strRendered .= $this->objForm->RenderFormState(false); } } $strRendered .= "</form>"; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true, $blnRenderAsAjax = false) { if ($blnRenderAsAjax) { $strElementOverride = 'control'; } else { $strElementOverride = 'li'; } $strRendered = parent::Render(); $strHeader = sprintf("<%s id='%s' name='%s' %s>\n", $strElementOverride, $this->strControlId, $this->strControlId, $this->GetAttrString()); //If template is set render template if (!is_null($this->strTemplate)) { if (!file_exists($this->strTemplate)) { throw new QCallerException("Template file (" . $this->strTemplate . ") does not exist"); } global $_CONTROL; $_CONTROL = $this; $_FORM = $this->objForm; $strRendered .= $this->objForm->EvaluateTemplate($this->strTemplate); } //Render Text $strRendered .= $this->strText; //Check/Do autorender children if ($this->blnAutoRenderChildren) { foreach ($this->arrChildControls as $objChildControl) { $strRendered .= $objChildControl->Render(false); } } $strFooter = sprintf("</%s>", $strElementOverride); if (!$blnRenderAsAjax) { $strRendered = $strHeader . $strRendered . $strFooter; } else { $strRendered = $strHeader . QString::XmlEscape(trim($strRendered)) . $strFooter; } $this->blnModified = false; if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }
public function Render($blnPrint = true) { switch ($this->strTextMode) { case MJaxTouchTextMode::MultiLine: $strElementName = 'textarea'; break; case MJaxTouchTextMode::Password: $strElementName = 'input'; $this->Attr('type', 'password'); break; case MJaxTouchTextMode::SingleLine: default: $strElementName = 'input'; break; } $strRendered = parent::Render(); $strRendered .= sprintf("<%s id='%s' name='%s' value='%s' %s/>", $strElementName, $this->strControlId, $this->strControlId, $this->strText, $this->GetAttrString()); if ($blnPrint) { _p($strRendered, false); } else { return $strRendered; } }