Merge pull request #876 from gregh3269/fix-for-WW-5396

s:file shows server/file location WW-5396
This commit is contained in:
Lukasz Lenart
2024-02-16 08:29:54 +01:00
committed by GitHub
4 changed files with 8 additions and 4 deletions
@@ -99,4 +99,10 @@ public class File extends UIBean {
public void setSize(String size) {
this.size = size;
}
@Override
@StrutsTagAttribute(description="Ignored during file upload")
public void setValue(String value) {
// ignores provided value
}
}
@@ -371,6 +371,6 @@
<td class="tag-attribute"></td>
<td class="tag-attribute">false</td>
<td class="tag-attribute">String</td>
<td class="tag-attribute">Preset the value of input element.</td>
<td class="tag-attribute">Ignored during file upload</td>
</tr>
</table>
@@ -33,7 +33,6 @@ public class FileHandler extends AbstractTagHandler implements TagGenerator {
a.addDefaultToEmpty("name", params.get("name"))
.add("type", "file")
.addIfExists("size", params.get("size"))
.addIfExists("value", params.get("nameValue"))
.addIfTrue("disabled", params.get("disabled"))
.addIfExists("accept", params.get("accept"))
.addIfExists("tabindex", params.get("tabindex"))
@@ -28,7 +28,6 @@ public class FileTest extends AbstractCommonAttributesTest {
public void testRenderTextField() {
tag.setName("name");
tag.setValue("val1");
tag.setSize("10");
tag.setDisabled("true");
tag.setAccept("accept_");
@@ -43,7 +42,7 @@ public class FileTest extends AbstractCommonAttributesTest {
map.putAll(tag.getParameters());
theme.renderTag(getTagName(), context);
String output = writer.getBuffer().toString();
String expected = s("<input name='name' type='file' size='10' value='val1' disabled='disabled' accept='accept_' tabindex='1' id='id1' class='class1' style='style1' title='title'></input>");
String expected = s("<input name='name' type='file' size='10' disabled='disabled' accept='accept_' tabindex='1' id='id1' class='class1' style='style1' title='title'></input>");
assertEquals(expected, output);
}