I'm trying to validate a multiple ui-select using ng-messages and angular 1.3. The $touched property is not being set on first interaction, i.e. click inside the select and then click outside. However, this works for textarea element.
Including the plnk. Could someone say what is wrong here? TIA.
Seems like it's just a bug in 1.3 since 1.4.7 behaves how you'd expect. The ng-touched and ng-untouched classes on the input box are updating correctly, so that could be a workaround in some cases.
Related
in a Vuetify project I would like to dynamically create all the required fields to perform CRUD Actions:
I prepared a working sample here:
https://codepen.io/jslab-it/pen/KKqyBdX
Everything's working not bad, but when I click on the edit button, the dialog appears but fields are not populated:
I assume that problem is that v-model is "calculated":
:v-model="'editedItem.'+f.name"
in fact in the last field that is not generated but hardcoded and thus has
v-model="editedItem.calories"
the field is automatically populated.
I tried also using a computer property for editedItem, but without success
Can suggest if it is possible and the right path?
Thanks
You can use editedItem[f.name], which is a standard way to access dynamic property in js.
I have a KendoUI Grid that holds records. One of the values in a record is a boolean that I am using to show/hide a command (delete). I was trying to follow the instructions here:
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.command.visible
I then realized, if you click on the "Preview" it doesn't even work for them. I know I can use a template to set the class of the div tag and then hide it with some jQuery, but would rather do it with their built in feature...if it even work. Has anyone had any luck with the command visible command?
The link is working as expected now. I am also pasting a Dojo just in case:
Example
I am trying to implement a dropdown+textbox kind of element in UI. Was using rich:autocomplete to achieve that. It worked, with one issue.
The client requirement is that the textbox should be able to take new values in it. i.e. If the values values are in the dropdown, it will take the dropdown values, otherwise it will take the new values entered.
Is there anyways to achieve that using rich:dropdown? Any other suggestion are also welcome. My application is using JSF2.0 + Richfaces 4.3.4.
Looking at your requirement I can suggest you can use tag input widget, see the reference link url:http://jquery-plugins.net/tag/tag-input
I'm trying to make something like this:
an html form with 5 button (each one with a differn value). if you click one of this button will be dispayed an text input (with a default value depending to the clicked button value, so the buttons call an ajax/javscript function to generate the default value) and a submit button.
I'm unable to create this type of form. have any suggestion for me ? Thx in advance.
I wouldn't use CakePHP's AJAX features, just write it yourself. Cake's features are useful in limited situations (e.g. pagination) but as soon as you need flexibility, it becomes a limiting factor. I believe the JsHelper is actually being removed in future versions.
To get this done without Cake, take a look at http://jsfiddle.net/mjxWg/8/. It's not a complete working example (e.g. there is no <form> tag), but it should show you enough to get started on your own.
I have two dependent dropdowns on a JSF page that work fine. I use a valueChangeListener on the first dropdown that populates the List backing the second dropdown.
However when I try to submit my form it's failing JSF validation. From testing I think the problem is that when the page loads my dependent dropdown list is empty, then I populate it after the first dropdown has a selection made. However none of the values now in the dependent list were in the list when the page loaded so it's fails validation. I have confirmed this by using a constructor to set up the list with all the possible values when the page loads and it makes my problem go away however this isn't a possible solution as loading up all the values would kill the performance of my page.
Any ideas how I can get it working?
Regards,
Kevin.
This is EXACTLY the use case for a view scoped bean. Using a request scoped bean in such case is going against the grain of JSF (possible, but painful - like using a hedgehog as a bath sponge).
If there are any problems with such solutions, then tell us, there should be a way of mitigating them; the point is, you should use the view scope and solve any problems you might have with that, and not try to run away from it.