English 中文(简体)
Zend Dojo表格中的Tas
原标题:Tags in the Zend Dojo Form

我愿与这种 st流的形式一样。 我的表态是zen的 do,在形成tag形概念方面,我存在问题。 当用户投入价值时,以及在系统应当作为不同价值使用的词之间有空间时,标记应当自动填写。 因此,任何人都能够帮助我处理这种情况?

问题回答

I would suggest :

之后,你可以自行 w。 您可以首先使用类似模板(见关于如何界定植被模板的链接1):

<div>
    <div class="${baseClass}" data-dojo-attach-point="containerNode"></div>
</div>

而贵重的 j子手法则可能照此办理(使用第17条):

define("ps/Tag", 
["dojo/_base/declare", 
 "dijit/_WidgetBase", 
 "dijit/_WidgetsInTemplateMixin",
 "dijit/_TemplatedMixin",
 "dojo/text!ps/templates/Tag.html",
 "dijit/InlineEditBox",
 "dijit/form/FilteringSelect"
 ], function(declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, template, InlineEditBox, FilteringSelect) {

declare("ps.Tag", [_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {

    baseClass : "tag",

    templateString : template,

    store : null,

    searchAttr : null,

    value : null,

    postCreate : function() {
        var widget = this;
        eb = new InlineEditBox({
            editor: "dijit.form.FilteringSelect",
            editorParams : {
                store : widget.store,
                searchAttr: widget.searchAttr,
                value : widget.value
            },
            autoSave: true
        }, this.containerNode);
    }
iii
return ps.Tag;

iii

I ll leave the css to you (you can find it in the example of link 2 and tweak it with firebug).

之后,你可以在您的html中利用你这样的植被:

var stateStore = new Memory({
                    data: [
                        {name:"Alabama", id:"AL"},
                        {name:"Alaska", id:"AK"},
                        {name:"American Samoa", id:"AS"},
                        {name:"Arizona", id:"AZ"},
                        {name:"Arkansas", id:"AR"},
                        {name:"Armed Forces Europe", id:"AE"},
                        {name:"Armed Forces Pacific", id:"AP"},
                        {name:"Armed Forces the Americas", id:"AA"},
                        {name:"California", id:"CA"},
                        {name:"Colorado", id:"CO"},
                        {name:"Connecticut", id:"CT"},
                        {name:"Delaware", id:"DE"}
                    ]
                iii
                var tag = new Tag({store : stateStore, searchAttr : "name", value : "CA"iii
                dojo.place(tag.domNode, "yourTagContainerDivId", "last");

我希望它能够提供帮助。





相关问题
Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

PHP Framework: Ebay Like Site

I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

Tagging with Zend Framework

I m trying to create the same solutions as below, but using a simple MySQL query (instead of the static version used below where the words/tags are implemented in the code). The name of the MySQL ...

dynamicaly adding textboxes to zend_form

I hope that this is a quick question to answer. I am developing a form using Zend_Form, I have a number of Zend_Dojo_Form_Element_Textboxs to add to this form dynamically. These are added from rows ...

热门标签