Open anotomoniz-r7 opened 10 years ago
I've filed this internally. It might take a while for a response since new folks are working on the framework now.
Have you taken a look at the Web Framework Toolkit app?
It include several examples, including ones that describe the population of form inputs. For example:
// Set up choices
var choices = [
{label: " One", value: "One"},
{label:" Two", value: "Two"},
{label:" Three", value: "Three"}];
// Assign them to the button group
splunkjs.mvc.Components.getInstance("example-radiogroup").settings.set("choices", choices);
Hi,
How can I change view from vertical to horizontal for the radio buttons inside the dashboard panels?
I've been trying to set the value of a dropdown in JavaScript, but to no avail. I've tried using both
splunkjs.mvc.Components.getInstance("foo_dropdown").val("foo")
andsplunkjs.mvc.Components.getInstance("foo_dropdown").settings.set("value", "foo")
, but both give me the same error:Uncaught TypeError: Cannot read property 'text' of null
.Other than this, the object seems to be working correctly, including accessing the current value through both
splunkjs.mvc.Components.getInstance("foo_dropdown").val()
andsplunkjs.mvc.Components.getInstance("foo_dropdown").settings.get("value")
. Additionally, setting the initial value in the template tag using{% dropdown id="foo_id" value="foo" %}
works properly. It's just using the JS to change the value that's causing this problem.