Skip to content

CodeAction to insert expected input for renarde #form #778

@angelozerr

Description

@angelozerr

Given the manualLogin method of renarde controller:

public class Login extends ControllerWithUser<User> {

    @POST
    public Response manualLogin(@NotBlank @RestForm String userName,
            @RestForm String password,
            @BeanParam WebAuthnLoginResponse webAuthnResponse,
            RoutingContext ctx) 
...
}

According @notblank @RestForm annotations:

  • userName is an input form which is required
  • password is an input form which is optional

Given this #form in qute template:

{#form uri:Login.manualLogin() id="login"}

{/form}

We should have a warning on #form location which says that some input should be defined inside the #form. After that we can bind code action of this warning:

  • Insert required input forms
  • Insert all input forms

Click on Insert required input forms code action will insert in:

{#input name="userName" /}

Click on Insert all inputinput forms code action will insert in:

{#input name="userName" /} {#input name="password" /}

@FroMage I noticed that in your sample renarde application you are using simple HTML input element (<input name=""), I wonder if it is better to use #input ?

In your parser we can get those Qute #input user tag, but we don't parse HTML content (it is a text node for us). If you think it is very important to take care of <input HTML element, it will require for our parser to have the capability to parse HTML.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions