0

How to get custom attributes with fulfill in combobox?

asked 2017-09-08 08:26:10 +0800

dfar gravatar image dfar
1

updated 2017-09-13 11:35:25 +0800

cor3000 gravatar image cor3000
3446 1 7
ZK Team

In the simple way without fulfill parameter all works fine.

<combobox><custom-attributes a="A" /></combobox>

I can get custom attribute value: combobox.getAttribute("a");

But if use fulfill, I have no custom attributes even after handling onOpen event:

<combobox fulfill="onOpen">
  <custom-attributes a="A" />
</combobox>

combobox.getAttribute("a"); // returns null

What is the right way to get custom attributes with fulfill parameter using? Thanks.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-13 11:49:08 +0800

cor3000 gravatar image cor3000
3446 1 7
ZK Team

updated 2017-09-13 11:51:28 +0800

I tried what you describe in this zkfiddle. For both a normal and a combobox with fulfill the custom-attribute is logged as expected.

Are you trying something different in your case? (esp: when are you calling getAttribute - I do it in an onSelect listener). Do you use a specific (maybe older) ZK version where this happens?

Feel free to update the zkfiddle to reproduce your scenario then I can have a second look.

Robert

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2017-09-08 08:26:10 +0800

Seen: 7 times

Last updated: Sep 13