Hurray! Thanks Mone, that works much better.
Hurray! Thanks Mone, that works much better.
Thanks for you information i newly join and so nice post I agree with you. Your complement is so informative…
Hi everybody.
is there a way, instead of having this:
i get the my group from my DataProvider ?Code:var group = "item1 item16 item3";
because i have so many items that i will display, that my js file (containing the items i wil display) gets bigger.
and also that group of items is variable (can be 10 items to display today, 20 items tomorrow...)
Hi,
on the server side the getItems method of MetadataProvider translates the received string in a list of items. In this example we split the string on the space character, but you may use any string as group and translate in as many items as you want on the metadataadapter.Those variables will be two strings. For this demo those will be space-separated lists of items and fields. By the way the Client doesn't know about this and will interpret them as a group and a schema name (i.e. the Client doesn't know how many items/fields we are subscribing to).
HTH
Sorry, but I didin't understand what you said
espacially, what did you mean byand, if i choose to make this, will i have to make changes in the adapter, or the metadataadapter ? (because you talked about the two of them)but you may use any string as group and translate in as many items as you want on the adapter
sorry for saying adapter at the end of my previous post, now it's correct.
What I mean is that it is the getItems method of the metadata adapter (see the MetadataProvider interface) that translates the group name into a list of items.
The LiteralBasedProvider is an implementation of MetadataProvider that splits the group name on the space character and use the results as items.
The FileBasedProvider is an implementation of MetadataProvider that appends ".items" to the group name and searches for a file with that name. It then reads a list of items from that file
So, you can implement your own getItems on your own MetadataProvider implementation with your own logic
hmmm. i did understand what you're saying.
i think that is difficult for me (because i'm still a novice) to implement my own MetadataProvider, that's why i prefer using the FileBasedProvider, so that the size of my javascript won't be that big.i'll try that, and i hope i will succeed
thank you again Mone.
Bookmarks