/** *@desc Generate page, processing yours childs. *@param DOMNode $current *@return function */ public function generateObject($current) { if ($this->_readonly) { $deliLeft = strlen($this->_readOnlyDeli) != 0 ? $this->_readOnlyDeli[0] : ""; $deliRight = strlen($this->_readOnlyDeli) != 0 ? $this->_readOnlyDeli[1] : ""; // XmlInputLabelField $ic; if ($this->_inputextboxtype == InputTextBoxType::TEXT) { $ic = new XmlInputLabelField($this->_caption, $deliLeft . $this->_value . $deliRight); } else { $ic = new XmlInputLabelField($this->_caption, $deliLeft . "**********" . $deliRight); } $ic->generateObject($current); // XmlInputHidden $ih $ih = new XmlInputHidden($this->_name, $this->_value); $ih->generateObject($current); } else { if ($this->_inputextboxtype == InputTextBoxType::TEXT) { $nodeWorking = XmlUtil::CreateChild($current, "textbox", ""); } else { $nodeWorking = XmlUtil::CreateChild($current, "password", ""); } if (intval($this->_maxlength) != 0) { XmlUtil::AddAttribute($nodeWorking, "maxlength", $this->_maxlength); } XmlUtil::AddAttribute($nodeWorking, "caption", $this->_caption); XmlUtil::AddAttribute($nodeWorking, "name", $this->_name); XmlUtil::AddAttribute($nodeWorking, "value", $this->_value); XmlUtil::AddAttribute($nodeWorking, "size", $this->_size); if ($this->_autosuggestUrl != "") { $url = new XmlnukeManageUrl(URLTYPE::MODULE, $this->_autosuggestUrl); $urlStr = $url->getUrlFull(); if (strpos($urlStr, "?") === false) { $urlStr .= "?"; } else { $urlStr .= "&"; } XmlUtil::AddAttribute($nodeWorking, "autosuggesturl", str_replace("&", "&", $urlStr)); XmlUtil::AddAttribute($nodeWorking, "autosuggestparamreq", $this->_autosuggestParamReq); if ($this->_autosuggestCallback) { XmlUtil::AddAttribute($nodeWorking, "autosuggestcallback", $this->_autosuggestCallback); } XmlUtil::AddAttribute($nodeWorking, "autosuggest_array", $this->_autosuggestJsonArray); XmlUtil::AddAttribute($nodeWorking, "autosuggest_objid", $this->_autosuggestJsonObjKey); XmlUtil::AddAttribute($nodeWorking, "autosuggest_objvalue", $this->_autosuggestJsonObjValue); XmlUtil::AddAttribute($nodeWorking, "autosuggest_objinfo", $this->_autosuggestJsonObjInfo); } if ($this->getMask() == "") { if ($this->getDataType() == INPUTTYPE::DATE) { $this->setMask("99/99/9999"); } elseif ($this->getDataType() == INPUTTYPE::DATETIME) { $this->setMask("99/99/9999 99:99:99"); } } if ($this->getMask() != "") { XmlUtil::AddAttribute($nodeWorking, "mask", $this->_maskText); } if ($this->_disableAutoComplete) { XmlUtil::AddAttribute($nodeWorking, "autocomplete", "off"); } parent::generateObject($nodeWorking); } }
protected function redirProcessPage($full) { $url = new XmlnukeManageUrl(URLTYPE::MODULE, $this->_module); $url->addParam("acao", self::ACTION_MSG); $url->addParam(self::PARAM_MSG, $this->_currentAction); //$url->addParam("filter", $this->_filter); //$url->addParam("sort", $this->_sort); $url->addParam("curpage", $this->_curPage); $url->addParam("offset", $this->_qtdRows); foreach ($this->_parameter as $key => $value) { $url->addParam($key, $value); } //if ($full) //{ return $url->getUrlFull(); //} //else //{ // return $url->getUrl(); //} }
/** * EditList * */ protected function actionEditList() { $blockCenter = new XmlBlockCollection($this->_myWords->Value("EDITLIST"), BlockPosition::Center); $breakLine = new XmlnukeBreakLine(); $firstParagraph = new XmlParagraphCollection(); $firstParagraph->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("DESCEDITLISTTEXT"))); $firstParagraph->addXmlnukeObject(new XmlnukeText($this->_myWords->Value("DESCEDITLISTTEXT2"), true, false, false)); $firstParagraph->addXmlnukeObject($breakLine); $guestbookFile = new AnydatasetFilenameProcessor("guestbook"); $guestbook = new AnyDataset($guestbookFile->FullQualifiedNameAndPath()); $iterator = $guestbook->getIterator(); $thirdParagraph = new XmlParagraphCollection(); $editList = new XmlEditList($this->_context, $this->_myWords->Value("CONTENTBOOK"), $this->_url); $editList->setDataSource($iterator); $editList->addParameter("op", "3"); $field = new EditListField(); $field->fieldData = "frommail"; $editList->addEditListField($field); $field = new EditListField(); $field->fieldData = "fromname"; $field->editlistName = $this->_myWords->Value("TXT_NAME"); $editList->addEditListField($field); $field = new EditListField(); $field->fieldData = "frommail"; $field->editlistName = $this->_myWords->Value("TXT_EMAIL"); $editList->addEditListField($field); $field = new EditListField(); $field->fieldData = "message"; $field->editlistName = $this->_myWords->Value("MESSAGE"); $editList->addEditListField($field); $customButton = new CustomButtons(); $customButton->action = "acaocustomizada"; $customButton->enabled = true; $customButton->alternateText = "Texto alternativo da ação"; $url = new XmlnukeManageUrl(URLTYPE::MODULE, "Xmlnuke.Sample"); $url->addParam("op", 3); $customButton->url = $url->getUrlFull(); $customButton->icon = "common/editlist/ic_custom.gif"; $editList->setCustomButton($customButton); $editList->setPageSize(3, 0); $editList->setEnablePage(true); $thirdParagraph->addXmlnukeObject($editList); $secondParagraph = new XmlParagraphCollection(); $secondParagraph->addXmlnukeObject(new XmlnukeText("Ação selecionada: ", true, false, false)); $secondParagraph->addXmlnukeObject(new XmlnukeText($this->_action)); $secondParagraph->addXmlnukeObject($breakLine); $secondParagraph->addXmlnukeObject(new XmlnukeText("Valor selecionado: ", true, false, false)); $secondParagraph->addXmlnukeObject(new XmlnukeText($this->_context->get("valueid"))); $blockCenter->addXmlnukeObject($firstParagraph); $blockCenter->addXmlnukeObject($thirdParagraph); if ($this->_action != "") { $blockCenter->addXmlnukeObject($secondParagraph); } $this->_document->addXmlnukeObject($blockCenter); }