Author: konstantin.mishin
Date: 2010-12-28 15:16:31 -0500 (Tue, 28 Dec 2010)
New Revision: 20833
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
trunk/examples/input-demo/src/main/webapp/examples/fileupload.xhtml
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
trunk/ui/input/ui/src/main/templates/fileupload.template.xml
Log:
RF-10082
Modified: trunk/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
===================================================================
---
trunk/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-12-28
20:02:52 UTC (rev 20832)
+++
trunk/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-12-28
20:16:31 UTC (rev 20833)
@@ -39,7 +39,7 @@
public class FileUploadBean {
private String acceptedTypes;
- private boolean enabled = true;
+ private boolean disabled = false;
private boolean noDuplicate = false;
private UploadedFile file;
@@ -55,12 +55,12 @@
file = event.getUploadedFile();
}
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
}
- public boolean isEnabled() {
- return enabled;
+ public boolean isDisabled() {
+ return disabled;
}
public void setNoDuplicate(boolean noDuplicate) {
Modified: trunk/examples/input-demo/src/main/webapp/examples/fileupload.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/fileupload.xhtml 2010-12-28
20:02:52 UTC (rev 20832)
+++ trunk/examples/input-demo/src/main/webapp/examples/fileupload.xhtml 2010-12-28
20:16:31 UTC (rev 20833)
@@ -65,7 +65,7 @@
};
//-->
</script>
- <fu:fileUpload id="fu"
acceptedTypes="#{fileUploadBean.acceptedTypes}"
enabled="#{fileUploadBean.enabled}"
+ <fu:fileUpload id="fu"
acceptedTypes="#{fileUploadBean.acceptedTypes}"
disabled="#{fileUploadBean.disabled}"
fileUploadListener="#{fileUploadBean.listener}"
noDuplicate="#{fileUploadBean.noDuplicate}"
onfilesubmit="onfilesubmit(event)"
onuploadcomplete="onuploadcomplete(event)"/>
<h:outputText value="File name:" />
@@ -84,8 +84,8 @@
<f:ajax render="fu"/>
</h:inputText>
<br />
- <h:outputText value="Enabled: " />
- <h:selectBooleanCheckbox value="#{fileUploadBean.enabled}">
+ <h:outputText value="Disabled: " />
+ <h:selectBooleanCheckbox value="#{fileUploadBean.disabled}">
<f:ajax render="fu"/>
</h:selectBooleanCheckbox>
<br />
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-12-28
20:02:52 UTC (rev 20832)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-12-28
20:16:31 UTC (rev 20833)
@@ -53,8 +53,8 @@
@Attribute
public abstract String getAcceptedTypes();
- @Attribute(defaultValue = "true")
- public abstract boolean isEnabled();
+ @Attribute(defaultValue = "false")
+ public abstract boolean isDisabled();
@Attribute(defaultValue = "false")
public abstract boolean isNoDuplicate();
Modified: trunk/ui/input/ui/src/main/templates/fileupload.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/fileupload.template.xml 2010-12-28 20:02:52 UTC
(rev 20832)
+++ trunk/ui/input/ui/src/main/templates/fileupload.template.xml 2010-12-28 20:16:31 UTC
(rev 20833)
@@ -39,14 +39,14 @@
</cc:interface>
<cc:implementation>
<cdk:object name="attributes"
value="#{component.attributes}"/>
- <cdk:object name="enabled"
value="#{attributes['enabled']}"/>
+ <cdk:object name="disabled"
value="#{attributes['disabled']}"/>
<div id="#{clientId}" class="rf-fu
#{attributes['styleClass']}"
cdk:passThroughWithExclusions="">
<div class="rf-fu-hdr">
<span class="rf-fu-btns-lft">
- <span class="rf-fu-btn-add#{enabled ? '' :
'-dis'}">
- <span class="rf-fu-btn-cnt-add#{enabled ? '' :
'-dis'}">
- <c:if test="#{enabled}">
+ <span class="rf-fu-btn-add#{disabled ? '-dis' :
''}">
+ <span class="rf-fu-btn-cnt-add#{disabled ? '-dis' :
''}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7
only. -->
<input type="file" class="rf-fu-inp"/>
</span>
@@ -55,14 +55,14 @@
#{addLabel != null ? addLabel : 'Add...'}
</span>
</span>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-btn-upl">
<cdk:object name="uploadLabel"
value="#{attributes['uploadLabel']}"/>
<span class="rf-fu-btn-cnt-upl">#{uploadLabel != null ?
uploadLabel : 'Upload'}</span>
</span>
</c:if>
</span>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-btns-rgh">
<span class="rf-fu-btn-clr">
<cdk:object name="clearAllLabel"
value="#{attributes['clearAllLabel']}"/>
@@ -72,7 +72,7 @@
</c:if>
</div>
<div class="rf-fu-lst"/>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<div class="rf-fu-cntr-hdn">
<iframe name="#{clientId}"/>
<cdk:object name="progressBar"
value="#{component.facets['progress']}"/>
Show replies by date