精华内容
下载资源
问答
  • selectitem itemvalue="#{null}" itemlabel="Not selected"></selectitem> <selectitem itemvalue="choice1" itemlabel="choice1"></...
  • 参见英文答案 >How to populate options of h:selectOneMenu from database?5个是否可以将对象作为itemValue标记?例如,我有一个类Foo:public class Foo {private int id;private String name;private ...

    参见英文答案 >

    How to populate options of h:selectOneMenu from database?                                    5个

    是否可以将对象作为itemValue标记?

    例如,我有一个类Foo:

    public class Foo {

    private int id;

    private String name;

    private Date date;

    }

    而另一个班吧

    public class Bar {

    private Foo foos;

    }

    public class BarBean {

    private Set foos;

    }

    现在在一个名为BarBean的Bean中,我需要有一个从用户那里得到当前Bar的Foo,如下所示:

    —————编辑:

    my converter:

    package ir.khorasancustoms.g2g.converters;

    import ir.khorasancustoms.g2g.persistance.CatalogValue;

    import java.util.ResourceBundle;

    import javax.faces.application.FacesMessage;

    import javax.faces.component.UIComponent;

    import javax.faces.context.FacesContext;

    import javax.faces.convert.Converter;

    import javax.faces.convert.FacesConverter;

    import org.hibernate.Session;

    import org.hibernate.SessionFactory;

    import org.hibernate.Transaction;

    import org.hibernate.cfg.Configuration;

    @FacesConverter("ir.khorasancustoms.CatalogValueConverter")

    public class CatalogValueConverter implements Converter {

    @Override

    public Object getAsObject(FacesContext context, UIComponent component, String value) {

    SessionFactory factory = new Configuration().configure().buildSessionFactory();

    Session session = factory.openSession();

    try {

    int id = Integer.parseInt(value);

    CatalogValue catalogValue = (CatalogValue) session.load(CatalogValue .class, id);

    return catalogValue;

    } catch (Exception ex) {

    Transaction tx = session.getTransaction();

    if (tx.isActive()) {

    tx.rollback();

    }

    ResourceBundle rb = ResourceBundle.getBundle("application");

    String message = rb.getString("databaseConnectionFailed");

    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, message, message));

    } finally {

    session.close();

    }

    return null;

    }

    @Override

    public String getAsString(FacesContext context, UIComponent component, Object value) {

    return ((CatalogValue) value).getId() + "";

    }

    }

    和我的脸:

    展开全文
  • 代码如下: ... [color=#FF0000]itemLabel="label" itemValue="value"[/color] htmlEscape="false" /> </form:select> 请问 itemLabel="label" itemValue="value" 是什么意思?
  • Oracle Forms之动态List Item Value

    千次阅读 2015-05-14 16:52:50
    the list label the list value Syntax PROCEDURE POPULATE_LIST(list_id ITEM, recgrp_id RecordGroup); PROCEDURE POPULATE_LIST(list_id ITEM, recgrp_name VARCHAR2); PROCEDURE ...

    在Forms开发中,很多时候都会用到List提供特定的值给用户进行选择。

    而本文讨论的是 如何动态的添加List的值。

    原理就是通过record group

    具体可参考官方文档:POPULATE_LIST Built-in

    POPULATE_LIST Built-in

    Description

    Removes the contents of the current list and populates the list with the values from a record group. The record group must be created at runtime and it must have the following two column (VARCHAR2) structure:

    Column 1Column 2:

    the list label the list value


    Syntax

    PROCEDURE POPULATE_LIST(list_id ITEM, recgrp_id RecordGroup);

    PROCEDURE POPULATE_LIST(list_id ITEM, recgrp_name VARCHAR2);

    PROCEDURE POPULATE_LIST(list_name VARCHAR2, recgrp_id RecordGroup);

    PROCEDURE POPULATE_LIST(list_name VARCHAR2, recgrp_name VARCHAR2);

    Built-in Type unrestricted procedure

    Enter Query Mode yes

    Parameters

    list_id  Specifies the unique ID that Oracle Forms assigns when it creates the list item. Use the FIND_ITEM built-in to return the ID to an appropriately typed variable. The data type of the ID is ITEM. 

    list_name  The name you gave to the list item when you created it. The data type of the name is VARCHAR2.

    recgrp_id  Specifies the unique ID that Oracle Forms assigns when it creates the record group. The data type of the ID is RecordGroup. 

    recgrp_name  The VARCHAR2 name you gave to the record group when you created it.

    Usage Notes

                 Do not use the POPULATE_LIST built-in if the Mapping of Other Values property is defined and there are queried records in the block. Doing so may cause Oracle Forms to be unable to display records that have already been fetched.For example, assume that a list item contains the values A, B, and C and the Mapping of Other Values property is defined. Assume also that these values have been fetched from the database (a query is open). At this point, if you populate the list using POPULATE_LIST, an error will occur because Oracle Forms will attempt to display the previously fetched values (A, B, and C), but will be unable to because these values were removed from the list and replaced with new values.

                Before populating a list, close any open queries. Use the ABORT_QUERY built-in to close an open query.

    设置List Item

                   1. 在Property Palette(key:F4)中设置<Item Type> 属性为List Item,<Subclass Information>为List

    新建Record Groups

                   2.Record Groups的数据来源,只能对应List的两列 也就是必须控制为两个栏位


    添加Triggers

                 3.在Block级或Item级的Trigger中添加如下代码:

    BEGIN 
    --RETRIEVE_LIST(list_id, 'RECGRP_ONE'); 
    CLEAR_LIST('Block.Item_name'); 
    POPULATE_LIST('Block.Item_name', 'Group_Name'); 
    END; 






    展开全文
  • 获取类似于 中指定位置的value,name的值 //------------------------------------ //功能描述:在""中取'1'或者'测试' //参数说明 //astr_org:目标字符串 //astr_split:分割字符 //ai_idt:位置计数器 /...
    获取类似于<item value='1' name='测试'/> 中指定位置的value,name的值
    

    //------------------------------------
    //功能描述:在"<item value='1' name='测试'/>"中取'1'或者'测试'
    //参数说明
    //astr_org:目标字符串
    //astr_split:分割字符
    //ai_idt:位置计数器
    //------------------------------------
    string ls_rtn
    integer li_split_len //分割字符串的长度

    integer li_idt_str //第N个分隔符开始和技术循环次数
    long ll_end_pos //实际位置
    //<item value='1' name='测试'/> 取“测试”则li_idt_str=3 li_idt_end=4
    //ll_str_pos=22 ll_end_pos=25

    integer li_cnt //循环计数器
    string ls_org_tmp,ls_tmp

    li_idt_str = ai_idt * 2 - 1


    li_split_len=len(astr_split)

    ls_org_tmp=astr_org
    do while pos(ls_org_tmp,astr_split)>0
    li_cnt = li_cnt + 1
    if li_cnt = li_idt_str then
    //<item value='1' name='测试'/>
    ls_tmp=right(ls_org_tmp,len(ls_org_tmp) - (pos(ls_org_tmp,astr_split) + li_split_len - 1))

    if pos(ls_tmp,astr_split) > 0 then
    ls_rtn=left(ls_tmp,pos(ls_tmp,astr_split) - 1)
    exit
    else
    ls_rtn=''
    exit
    end if
    end if
    ls_org_tmp = right(ls_org_tmp,len(ls_org_tmp) - (pos(ls_org_tmp,astr_split) + li_split_len))
    loop


    return ls_rtn

    展开全文
  • <div><p>Alexander , <p>I think there is a problem with display ITEM.VALUE in grafana-zabbix <p>Side zabbix i have ...
  • var historyList = new Vue({ el: '#historyList', data: { items: [ //{text:'3000吨以下',value:'0-3000'}, //{text:'5000吨 至 1.0w吨',value:'5000-10000'}, ...
    var historyList = new Vue({
        el: '#historyList',
        data: {
            items: [
                //{text:'3000吨以下',value:'0-3000'},
                //{text:'5000吨 至 1.0w吨',value:'5000-10000'},
                //{text:'55吨 至 88吨',value:'55-88'}
            ]
        }
    })
    
    
    <ul id="historyList" >
        <li v-for="item in items" class="tonList">
            <input type="checkbox" :value="item.value"/>
            <label>{{item.text}}</label>
        </li>
    </ul>
    
    
    function getHistory() {
        var data = localStorage.getItem('tonnage_history');
        if (data != '' && data != null) {
            // dataTextAndValue {3000吨 至 5000吨,5000吨 至 1.0w吨,4吨 至 8吨:3000-5000,5000-10000,4-8}
            var dataTextAndValue = data.split(':');
            // dataText [3000吨 至 5000吨,5000吨 至 1.0w吨,4吨 至 8吨]
            var dataText = dataTextAndValue[0].split(',');
            // dataValue [3000-5000,5000-10000,4-8]
            var dataValue = dataTextAndValue[1].split(',');
            var dataItem=new Array();
            for(var i=0;i<dataText.length;i++){
                dataItem[i]={text:dataText[i],value:dataValue[i]}
            }
            // dataItem
            // [ {text:'3000吨以下',value:'0-3000'},
            // {text:'5000吨 至 1.0w吨',value:'5000-10000'},
            // {text:'55吨 至 88吨',value:'55-88'}]
            historyList.items=dataItem;
        } else {
    
        }
    
        console.log(data);
        console.log(dataItem);
        console.log(historyList.items);
    }
    【1】   <input type="checkbox" :value="item.value"/>
          不是用双括号,直接用引号包围就行,前边加个冒号
          【:】相当于【v-bind:】

    【2】   for(var i=0;i<dataText.length;i++){
                dataItem[i]={text:dataText[i],value:dataValue[i]}
             }
          js的数组还可以这样用,牛逼!

    https://cn.vuejs.org/v2/api/#v-bind



     

    转载于:https://www.cnblogs.com/CESC4/p/7761197.html

    展开全文
  • <div><p>Testing Session 2015 04 12 <p><code>Cannot find base )ace_medical_openwounds for /value/Item2/data/value/Item1/data/type/</code></p>该提问来源于开源项目:acemod/ACE3</p></div>
  • 最近需要针对传入的由Object转成的json数据进行解析,然后将其加在url后缀传给服务器。 最初是使用object.item的方式来手动获取值。... path+=item+"="+urlJson[item]+"&"; } 通过对urlJson中
  • for (int i =  0;i&lt;checkedListBox1.CheckedItems.Count;i++)   {   DataRowView dv = ((DataRowView)checkedListBox1.CheckedItems[i]);   ...
  • 当antd formItem结合switch设置initialValue无效时,需要在getFieldDecorator 包装的控件中添加代码 valuePropName:'checked',最后的代码呈现是这样的: <FormItem labelCol={{ span: 5 }} wrapperCol={{ ...
  • Each view controller has access to a UITabBarItem. This is only displayed if the current view controller is part of a UITabBarController. A UITabBarItem has a badge value which is that little red mark
  • 创建新的Sales Order Line的时候,填写完Item,切出焦点,报错:FRM-40212:Invalid Value For Field Ordered_Item_Dsp Solution: Key Flexfield Segments中重新Compile下System Item这个KFF,问题解决
  • ``` <td class="a-item name">出生日期 ...all_a_value = soup.find_all("dd", class_="a-item value") ``` 现在只想要出生日期和死亡日期。如何获取。实在没有悬赏值了,希望看到的大佬能帮助一把。
  • zabbix4.4 的item中没有了store value参数,怎么对网络流量进行
  • Antd Select(设置了labelInValue)在FormItem中设置initialValue时应如下设置方能将原数据正确送显(xxx为隐去项目敏感信息): <FormItem key="XXX" labelCol={{ span: 5 }} wrapperCol={{ span: 15 }} label=...
  • 初学winform的时候,一直以为winform中的combox只能添加简单的仅有text的item,而不象aspx中的listitem那样即有text,又有value,结果很快发现自己错了,以下是一个示例: 先声明一个类 public class ...
  • 问题:There should be exactly one item with [DropdownButton]'s value: Instance of 'EnumValue'. Either zero or 2 or more [DropdownMenuItem]s were detected with the same value 今天在for循环里添加了...
  • DropdownList中item中text和value各代表的什么 text指的是下拉列表中那一项的值, 而value则指的是哪一项。 如果要选中哪一项的text,例selectItem.Text
  • 在使用Picker时,类似下面的代码: class Example extends Component { render() { const values = ['1', '2']; return ( value={this.state.value}
  • <FormItem label="用户" {...formLayout}> { getFieldDecorator('useredit', { initialValue: editUserId })( <Select mode="multiple" onChange={this.handle...
  • Line item causes scrap value of to be violated Message no. AA632 Asset affected: 020302005123-0000 Diagnosi...
  • 这里写自定义目录标题在FormItem中使用Select时设置initialValue时的大坑 在FormItem中使用Select时设置initialValue时的大坑 很多小伙伴在写需求的时候,避免少不了对数据的增删改查,其中在可编辑的表单内往往...
  • 这个功能需要对下拉列表的value值进行遍历。我的下拉列表是直接绑定数据集,只能有个SelectedValue属性,无法遍历。在CSDN、GOOGLE、BAIDU、CODEPROJECT一通翻,也没找到能直接遍历的办法,最后
  • Transaction Historical Summary Report Use the Transaction Historical Summary Report to report past item quantities, past item value, or past inventory balances. The report calculates historical balanc
  • 报错信息: 代码: DropdownButton( //下拉列表 value: _value, items: _downMenu.map((item) { return new DropdownMenuItem( //下拉项 value: item['value'],//下拉项值 child: new Text

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 85,415
精华内容 34,166
关键字:

itemvalue