on 10-11-2011 5:21 PM
Hi,
i use a DDBI in a Table. How can i make this field editable?
String[] ddbi = new String [] { "value1", "value2" };
List lDdbiList = new ArrayList();
for (int i = 0; i < ddbi.length; i++) {
IDDBIElement ddbiElem = wdContext.createDDBIElement();
ddbiElem.setText(ddbi<i>);
lDdbiList.add(ddbiElem);
}
wdContext.nodeDDBIr().bind(lDdbiList);
wdContext.nodeDDBI().setLeadSelection(-1);
regards,
Sid
What do you mean by 'editable'?
Are you not able to select a value from the dropdown, or do you want to manually enter text in the field, in addition to the already available selections?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
yes i want to enter manually a text into the DDBI field in addition to the already available selections.
I try it also with this code, but it doesn't work.
NodeProperties:
collection cardinality: 0..n
initialize leadselection: true
selection cardinality: 1..n
singleton: true
Typed Acces required: true
IDDBI_SeriennummerElement ele = null;
ele = wdContext.createDDBI_SeriennummerElement();
ele.setText("Field 1");
wdContext.nodeDDBI_Seriennummer().addElement(ele);
regards,
Sid
Hi,
I don't think there is a way of achieving this when using a DropDownByIndex (or -Key) UI element...
If you're on NW 7.02 or above, I would go with a simple InputField instead and set the 'suggestValues' accordingly (Your NWDS will actually have a code snippet which will iplement this for you)
This way, your inputfield looks like a dropdown UI element, and behaves like a suggestion or auto-complete when entering text
Best,
Robin
Hello Sid,
Is there any specific reason you are going to DDBI? You can try DDBK in table, Because if you DDBI in table, then the values of 1st element will be copied to other elements also if you select. But DDBK will avoid this, we dont want do anything extra like get the current value and pass it if we use DDBK.
try and reply.
Regards
Nizamudeen SM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you chk the cardinality ?
Set it to 1:n
Regards,
Vijay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
i set the cardinality to 1:n but cannot edit the DropDownByIndex UI.
my code
String ddbi = wdThis.wdGetAPI().getTextAccessor().getText("comp1");
List lDdbiList = new ArrayList();
IDDBI_SeriennummerElement ddbiElem = wdContext.createDDBI_SeriennummerElement();
ddbiElem.setText(ddbi);
lDdbiList.add(ddbiElem);
wdContext.nodeDDBI_Seriennummer().bind(lDdbiList);
Do you have an idea?
Best regards,
Sid
Hi Sid,
Can you try this way ?
IPrivate<view>.I<Contextnode>Element ele = null;
for(int i=0;i<<Contextnode>.size();i++)
{
ele = wdContext.create<Contextnode>Element();
ele.set<attribute>(<list value>);
wdContext.node<Contextnode>.addElement(ele);
}
I guess the last line should have addElement(ddbiElem)
Regards,
Vijay.
Hi Sid,
Can you try this way ?
IPrivate<view>.I<Contextnode>Element ele = null;
for(int i=0;i<<Contextnode>.size();i++)
{
ele = wdContext.create<Contextnode>Element();
ele.set<attribute>(<list value>);
wdContext.node<Contextnode>.addElement(ele);
}
I guess the last line should have addElement(ddbiElem)
Regards,
Vijay.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.