Deleting database value using spring - spring-mvc

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Select type of material<select id="mySelect" onchange="myFunction()">
<option value="mango">mango
<option value="grape">grape
</select>
Select weight type<select id="mySelect" onchange="myFunction()">
<option value="Tons">Tons
<option value="KG">KG
</select>
Enter Value<input type="text" >
<input type="button" value="Enter">
</body>
</html>
I want to delete database value in Spring based programming. How can I do
this. I want to do this operation in backend. What is the process?

In a Spring based application, database operations such as delete are performed by Repository classes. Based on your question, I suppose you are "too far" from repository layer. So I suggest you take a step-by-step tutorial. It will guide you through all the way down to the business logic and data access.
Another great way to get started with Spring is Spring Boot: here and here

Related

Telegram web apps for bot: input type="file" multiple not work

I tried to upload multiple files with telegram web apps for bot. It worked fine on IOS and PC but not on android, it can't select multiple files (Nothing happen after select multiple files)
My telegram version (android): v9.0.2 (2808)
Any suggest are welcome!
<!DOCTYPE html>
<html>
<head>
<title>demo</title>
</head>
<body>
<form method="post" enctype="multipart/form-data">
<label for="files">Select files:</label>
<input type="file" name="files[]" multiple="multiple"><br><br>
<input type="submit">
</form>
</body>
</html>

Angular select (change) method not working when plugin (niceselect) applied to it

Hi Hope everyone is doing fine unlike me as I am stuck in this problem since quite a while and seek your answer on this. I am using angular version 9
I have a an HTML like:
<div class="view-product d-flex align-items-center">
<p>View</p>
<select (change)="check()">
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20">20</option>
</select>
</div>
and in Component.ts I have code
check(){
console.log(1)
}
when my page gets loaded it forms 2 select (one is hidden and other with the styles applied to it).
So when I choose any option "check" doesnot gets called. If I inspect the 'select' and remove its 'display:none' in dev tools and then select an option 'check' gets triggered.
So point is after the css or styles gets applied to it change doesnot work. Please Help me out !!
This is happening because of a js plugin file(niceselect plugin) which is beautifying the select control. If I exclude that js file the control becomes NORMAL AND FUNCTIONAL
I am including that file in my HTML Like
<html>
<body>
<app-root></app-root>
</body>
<!-- Plugins js -->
<script src="assets/js/plugins.js"></script>
</html>

how to add custom HTML form in drupal

I have HTML5 form with text box and a submit button,like below
<!DOCTYPE html>
<html>
<body>
<form action="/action_page.php">
First name:<br>
<input type="text" name="firstname" value="Mickey">
<br>
Last name:<br>
<input type="text" name="lastname" value="Mouse">
<br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
and how can I use above html code in drupal??
Well, easiest way for creating forms would be by using webform module. It's easy to use, intuitive, but again powerful:
https://www.drupal.org/project/webform
https://www.drupal.org/docs/8/modules/webform/webform-features
So, my suggestion is to use it and add some CSS if you need to style your form.
Second way, would be by using Drupal's form api. For this you'll have to check on documentation, read some tutorial or similar.Requires some programming skills.
https://www.drupal.org/docs/8/api/form-api/introduction-to-form-api
Third way would be creating totally custom page end-point, where you can literally copy-paste your code as it is:
https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-page

Here-API : How to create own Layer with custom places

I would like to get more info on how to create his own layer with custom places for using it on a corridor request like in this example : http://developer.here.com/api-explorer#cls/route-search
In all these Here examples, the layerId = 30 is used. Is there any example how to upload cml or json data to create its own layer ? Thanks for your help.
Nicolas
Importing data is covered in the Custom Location Extension User Guide. You will need to make a post request sending an attached file.
A minimal HTML web-page for data import can be found below:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>HERE - [Custom Location Service] - XML File Upload Example</title>
</head>
<body>
<h1>XML File Upload Example</h1>
<form action="http://stg.api.customlocation.nokia.com/v1/file/import/async/xml" enctype="multipart/form-data" method="post">
<label>xmlfile</label>
<input type="file" name="xmlfile"><br/>
<input type="submit" value="Send">
</form>
</body>
</html>
The administration of a layer is described in the Administrator's User Guide available here.

how to get Uploaded multiple files using multiple attribute in spring mvc

provide some sample code to upload multiple files in spring framework.
when i search solution for this everyone wrote jsp page like this :
<input type='file' name='files[]' multiple />
but this was not the scenario what i am really want
Here my jsp page code : multiFileSelect.jsp
<%# page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form action="upload" enctype="multipart/form-data" method="post">
<input name="files" type="file" multiple/>
<button type="submit"/>
</form>
</body>
</html>
Please help me...
I think Chann has given the solution to your question.
<input type="file" name="img" multiple>
for more general one
<input type="file" multiple/>
Since you have asked an example usage of that, please refer this SO question (I don't know why you missed this) and the sample code example by SO user Costa.

Resources