How to combine thymeleaf with element ui? - spring-boot

Recently my boss asked me to complete a view use thymeleaf, this view contains an input box has autocomplete function, and my boss expect me to accomplish this feature using element ui input box which has autocomplete function, so I'm wondering that how can I combine thymeleaf with element ui so that I could use it's conponent.
Please help solve problem, I'll be so grateful for that.

Related

Is it possible to render Adaptive Cards with Autocomplete Input Text Field in MS Teams

I have the bot which working in MS Teams channel. I use it for creating some FTP groups and other stuff. The key problem, that now i have the large number of that groups and i wanna to filter them, before creating a new one. Is it possible to implement autocomplete for input text-box? I'm trying to use input choice set as a drop down list, but is not good solution, because I have about 200-300 groups, and its very annoying to scroll them down. If you have any solutions, please share it!:)
This is not possible yet. The Adaptive Cards roadmap can be found here.
What you are looking for is 'dynamic searchable select menu (like select2), which is on the roadmap, but currently not planned.
Yes, as #Mick said this feature was not implemented yet. But I hv some workaround to acheive this. We can convert the normal dropdown to the searchable dropdown using select2 jquery plugin.This helps the user to search the value in the dropdown without scrolling for a long time.
I hv attatched the images
1.before plugin how dropdown looks like
2. after plugin how it looks like
below which U can find the difference here
U can simply use jquery cdn and select2 cdn for getting these features.
Now inside the script tag u can write like this
$('select').select2();
So that all te dropdowns will changes to searchable/filterable dropdowns.
Refer this link https://select2.org/getting-started/basic-usage if u have any doubts on how to use this.
This worked for me.

Richfaces 4 autocomplete new value

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

Can I create quiz GUI with Django-Forms?

I'm new to django, and I'm working on a quiz project. The idea is to create something similar to this (http://www.stylemint.com/quiz). Basically, there will be a question on each page and the user clicks on an image with the answer. I was planning on using a django form with a radio select input type, however, I'd like the image to act as the radio button (ie, be clickable) and also a click on the image will take you to the next question (instead of having to click submit after each). Is this possible with django, or do I need java?
it's perfectly possible - if you just want a series of images, and clicking on them to take you to the next question you might achieve that by:
Having multiple input fields of type "image" which all submit the form. If you go down that route you'll have to template the forms out yourself or make your own widget.
Using javascript to replace radio buttons with images dynamically. If you do that, it'd be a good idea to make it fall back to a straight list selection for people who don't have javascript.
Ignoring forms altogether and just using a view with a parameter of what the choice is.
Yes, it's completely possible. My suggestion is if you want to save the result in the db use model and model form in django. So, my next suggestion is you can customize model field for combine radio button functionality and image together. But actually you must programming and use a little jquery and javascript to do it.
You may want to see:
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
https://docs.djangoproject.com/en/dev/howto/custom-model-fields/

People Picker for MVC3

I am looking for People Picker Control similar to SharePoint one for MVC3 applications.
Can you please suggest if there are any such controls available?
What is the best approach to pick the people from AD in MVC3?
Requirement: On one of the Views, I need to select a user from AD.
I was thinking about People Picker kind of control.
Thanks
Arun
I know this is quite old so I doubt you still need this answered but perhaps it will be useful to someone else.
Just last week I had to build a control like does this for us. It's basically two main parts, a JSON service that accepts partial text and returns a list of suggestions and the HTML/CSS/jQuery+UI control.
The service is pretty straightforward so we'll skip over that here.
I'm in the process of doing a write-up on the web side but basically we wrapped the jQuery autocomplete with some custom CSS to make an input that is similar to the address line in GMail. This was done by styling a container div to look like a long input field. The actual input field is within that container and styled to be essentially invisible. Clicking in the container moves focus to the input box. Upon selecting a suggested name, I create a new container to insert before the 'cloaked' autocomplete input which contains the user name and a hidden input with our desired value to send along when the form is submitted. I had to do some other overloads on the autocomplete to get it to act consistently but essentially this is all there was to it.
The control looks at the container for a data-input-name attribute to figure out what 'name' to set the hidden inputs to when they are created with each user pick. When the form is submitted the default model binder rolls all the users of a particular picker (since you can have multiple on a page) into string arrays of the values - assuming your model has string array properties with the same name as used by the input controls - which we can then process on the server side.
By far the hardest part was figuring out the right HTML + CSS to get the look and feel right. I'm not a very strong UI person so this took me forever and still falls down in Chrome which seems to add an accent around input boxes even with (or because of?) styles which make it blend into the parent control.
For our purposes it's been working great over the last week.
UPDATE: It's now on GitHub with a Demo.

Updating data with information received from the view (Grails)

I am writing a Grails app and I have a quick question about the best way to do something. My controller has 2 lists of data, both of which are displayed on the view in separate HTML tables. What I want to do is to have a button that will allow you to move an item from one list to the other. What is the best way to do this?
I have done some research and using some form of AJAX seems to be the general consensus on the best way to do this. Is there any other way? The heart of the problem is that I can't figure out how to update the data contained in the contoller based on the button the user presses in the view.
Thanks
I solved this by just updating the model to reflect the new lists and rerendering the page

Resources