Hi Shawn,

The code basically checks if you apply the behavior to a <button> element.

In other words:

<input type=“button”> is considered an “invalid” element for this behavior.

<button> is considered “valid”.

Met vriendelijke groet,
Kind regards,

Bas Gooren

Op 28 juni 2023 bij 15:08:52, Shawn McKinney (smckin...@symas.com) schreef:

Howdy,

I’m a little embarrassed to be asking. It seems so basic, should know it
already.

But, I’ve already spent a fair amount of time digging with no answers.

My usage of Ajax buttons generates this warning in the logs:

```
WARN - 28 Jun 2023 07:35:56,704 - IndicatingAjaxButton -
IndicatingAjaxButton should be applied on a 'button’ tag
```

Looking at the wicket source, I see:


```
public abstract class IndicatingAjaxButton extends AjaxButton
...
@Override
protected void onComponentTag(ComponentTag tag)
{
super.onComponentTag(tag);
if (!"button".equalsIgnoreCase(tag.getName()))
{
LOG.warn("IndicatingAjaxButton should be applied on a 'button' tag”);
}
}
```

A head scratcher to me why that warning is in place.

Obviously, there’s something I’m missing.

Here’s my code. It all “seems" to work just fine (other than the warning).
What am I doing wrong?

```java
public Page1Form( String id )
{
…

add( new IndicatingAjaxButton( "wspage1.button1" )
{
@Override protected void onSubmit( AjaxRequestTarget target )
{
logIt( target, “..." );
}
}
...
```

```html

<form wicket:id="pageForm”>
…
<input type="button"
class="ui-button ui-widget ui-state-default ui-corner-all
ui-button-text-only”
wicket:id="wspage1.button1” value="wspage1.button1"
name="wspage1.button1"/>

```

I’m using the latest Wicket (v10). This behavior (log warnings) was present
on earlier versions as well.

Thanks

—
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to