I stripped the code down for further testing - this is what the minimal action
and jsp look like.
package org.personalitypad.action;
import com.opensymphony.xwork2.ActionSupport;
import java.util.Map;
import java.util.HashMap;
/** in struts.xml:
* <action name="TestSetupAction"
class="org.personalitypad.action.TestSetupAction">
* <result>/WEB-INF/jsp/test.jsp</result>
* </action>
*/
public class TestSetupAction extends ActionSupport {
private char status;
private Map<Character, String> statuses;
@Override
public String execute() {
final char ACTIVE = 'A', INACTIVE = 'I';
statuses = new HashMap<>();
statuses.put(ACTIVE, "Active");
statuses.put(INACTIVE, "Inactive");
status = ACTIVE;
return SUCCESS;
}
public char getStatus() {
return status;
}
public void setStatus(char status) {
this.status = status;
}
public Map<Character, String> getStatuses() {
return statuses;
}
public void setStatuses(Map<Character, String> statuses) {
this.statuses = statuses;
}
}
— test.jsp —
<%@page contentType=“text/html" pageEncoding="UTF-8" errorPage="error.jsp" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="sj" uri="/struts-jquery-tags" %>
<%@taglib prefix="sb" uri="/struts-bootstrap-tags" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Personality Pad | Test</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!-- Struts2 includes -->
<s:head />
<sj:head />
<sb:head includeScripts="true" />
</head>
<body>
<h1>Test Page</h1>
<s:form action="UserUpdateAction" theme="bootstrap"
cssClass="form-vertical">
<s:radio
name="status"
label="Status"
list="statuses" />
</s:form>
</body>
</html>
> On Jan 4, 2023, at 11:39 AM, Lukasz Lenart <[email protected]> wrote:
>
> wt., 3 sty 2023 o 20:40 Ralph Grove <[email protected]> napisał(a):
>> The message is a result of the execution of this tag:
>> <s:radio
>> name="status"
>> label="Status"
>> list="statuses" />
>
> Does any value on the list "statuses" have the value "disabled"?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]