mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Ticket #307: Added missing 'value' parameter to the boolean checkbox parameters from the source xml through to the webapp.
This commit is contained in:
@@ -76,6 +76,11 @@ public class ProtocolParameter {
|
|||||||
*/
|
*/
|
||||||
private Type type;
|
private Type type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value of this parameter, for boolean parameters.
|
||||||
|
*/
|
||||||
|
private String value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A collection of all associated parameter options.
|
* A collection of all associated parameter options.
|
||||||
*/
|
*/
|
||||||
@@ -119,6 +124,24 @@ public class ProtocolParameter {
|
|||||||
this.title = title;
|
this.title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the value associated with this protocol parameter.
|
||||||
|
* @return The value associated with this protocol parameter.
|
||||||
|
*/
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the value associated with this protocol parameter. The value must
|
||||||
|
* be a human-readable string which describes accurately this parameter.
|
||||||
|
*
|
||||||
|
* @param value A human-readable string describing this parameter.
|
||||||
|
*/
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type of this parameter.
|
* Returns the type of this parameter.
|
||||||
* @return The type of this parameter.
|
* @return The type of this parameter.
|
||||||
|
@@ -158,6 +158,7 @@ public class List extends AuthenticatingHttpServlet {
|
|||||||
// Boolean parameter
|
// Boolean parameter
|
||||||
case BOOLEAN:
|
case BOOLEAN:
|
||||||
xml.writeAttribute("type", "boolean");
|
xml.writeAttribute("type", "boolean");
|
||||||
|
xml.writeAttribute("value", param.getValue());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Enumerated parameter
|
// Enumerated parameter
|
||||||
|
@@ -40,6 +40,7 @@ public class ParamTagHandler implements TagHandler {
|
|||||||
|
|
||||||
protocolParameter.setName(attributes.getValue("name"));
|
protocolParameter.setName(attributes.getValue("name"));
|
||||||
protocolParameter.setTitle(attributes.getValue("title"));
|
protocolParameter.setTitle(attributes.getValue("title"));
|
||||||
|
protocolParameter.setValue(attributes.getValue("value"));
|
||||||
|
|
||||||
// Parse type
|
// Parse type
|
||||||
String type = attributes.getValue("type");
|
String type = attributes.getValue("type");
|
||||||
|
@@ -17,8 +17,8 @@
|
|||||||
<option value="32">True color (32-bit)</option>
|
<option value="32">True color (32-bit)</option>
|
||||||
</param>
|
</param>
|
||||||
|
|
||||||
<param name="console" type="boolean" title="Administrator console"/>
|
<param name="console" type="boolean" title="Administrator console" value="true"/>
|
||||||
<param name="console-audio" type="boolean" title="Support audio in console"/>
|
<param name="console-audio" type="boolean" title="Support audio in console" value="true"/>
|
||||||
<param name="disable-audio" type="boolean" title="Disable audio"/>
|
<param name="disable-audio" type="boolean" title="Disable audio" value="true"/>
|
||||||
|
|
||||||
</protocol>
|
</protocol>
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
<param name="port" type="numeric" title="Port"/>
|
<param name="port" type="numeric" title="Port"/>
|
||||||
<param name="password" type="password" title="Password"/>
|
<param name="password" type="password" title="Password"/>
|
||||||
|
|
||||||
<param name="read-only" type="boolean" title="Read-only"/>
|
<param name="read-only" type="boolean" title="Read-only" value="true"/>
|
||||||
<param name="swap-red-blue" type="boolean" title="Swap red/blue components"/>
|
<param name="swap-red-blue" type="boolean" title="Swap red/blue components" value="true"/>
|
||||||
|
|
||||||
<param name="color-depth" type="enum" title="Color depth">
|
<param name="color-depth" type="enum" title="Color depth">
|
||||||
<option value="8">256 color</option>
|
<option value="8">256 color</option>
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Context antiJARLocking="true" path=""/>
|
<Context antiJARLocking="true" path="/guacamole"/>
|
||||||
|
@@ -767,10 +767,11 @@ GuacamoleService.Protocol = function(name, title, parameters) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A parameter belonging to a protocol. Each parameter has a name which
|
* A parameter belonging to a protocol. Each parameter has a name which
|
||||||
* identifies the parameter to the protocol, a human-readable title, and a type
|
* identifies the parameter to the protocol, a human-readable title,
|
||||||
* which dictates its presentation to the user.
|
* a value for boolean parameters, and a type which dictates
|
||||||
|
* its presentation to the user.
|
||||||
*/
|
*/
|
||||||
GuacamoleService.Protocol.Parameter = function(name, title, type, options) {
|
GuacamoleService.Protocol.Parameter = function(name, title, type, value, options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of this parameter.
|
* The name of this parameter.
|
||||||
@@ -787,6 +788,11 @@ GuacamoleService.Protocol.Parameter = function(name, title, type, options) {
|
|||||||
*/
|
*/
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value of this parameter.
|
||||||
|
*/
|
||||||
|
this.value = value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All available options, if applicable, in desired order of presentation.
|
* All available options, if applicable, in desired order of presentation.
|
||||||
* @type GuacamoleService.Protocol.Parameter.Option[]
|
* @type GuacamoleService.Protocol.Parameter.Option[]
|
||||||
@@ -924,6 +930,7 @@ GuacamoleService.Protocols = {
|
|||||||
// Boolean parameter
|
// Boolean parameter
|
||||||
case "boolean":
|
case "boolean":
|
||||||
parameter.type = GuacamoleService.Protocol.Parameter.BOOLEAN;
|
parameter.type = GuacamoleService.Protocol.Parameter.BOOLEAN;
|
||||||
|
parameter.value = paramElement.getAttribute("value");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Enumerated parameter
|
// Enumerated parameter
|
||||||
|
Reference in New Issue
Block a user