You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, an asker function cannot "see" the node it is being invoked on. This can be a problem, for example if you are writing a custom asker function, a value picker where the options offered depend on the value of some attribute or some such. So, we need asker functions to be able to access the current node (via a surrogate object).
The text was updated successfully, but these errors were encountered:
I just started using xonomy and already ran into this issue. The documentation says when it comes to custom asker functions:
The third argument is a surrogate object representing the attribute the asker function is being
invoked on. For surrogate objects see Chapter 10. From this you can traverse the entire XML
document. You can use this to customize the contents of the asker depending on the value of
some other attribute, say, or indeed on anything else in the XML document.
That's simply not true, the actual surrogate object you receive looks like this:
I too, just started using Xonomy and quickly ran into this issue. I need to write a custom picker that has a variant list based on the name of the parent node.
based on the documentation I added the function below. Which does not work, mind you I also can't get the "onchange" or "validate" calls to be invoked, so I might be doing something more fundamental wrong (but based on the comments here, it doesn't appear as if the following code would work).
Currently, an asker function cannot "see" the node it is being invoked on. This can be a problem, for example if you are writing a custom asker function, a value picker where the options offered depend on the value of some attribute or some such. So, we need asker functions to be able to access the current node (via a surrogate object).
The text was updated successfully, but these errors were encountered: