Author: mvitenkov
Date: 2008-10-25 09:48:45 -0400 (Sat, 25 Oct 2008)
New Revision: 10906
Modified:
trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java
Log:
Modified: trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java
===================================================================
---
trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java 2008-10-25
13:48:24 UTC (rev 10905)
+++
trunk/test-applications/jsp/src/main/java/util/componentInfo/ComponentInfo.java 2008-10-25
13:48:45 UTC (rev 10906)
@@ -8,12 +8,10 @@
import java.util.ArrayList;
import javax.el.ValueExpression;
-import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
-import org.richfaces.component.UICalendar;
-
+import util.parser.Attribute;
import util.parser.TLDParser;
public class ComponentInfo {
@@ -76,8 +74,12 @@
String richName = null;
if(component.getClass().getName().startsWith("org.richfaces.component.html.Html")){
- richName =
component.getClass().getName().substring("org.richfaces.component.html.Html".length()).toLowerCase();
- } else {
+ richName =
component.getClass().getName().substring("org.richfaces.component.html.Html".length());
+ richName = richName.substring(0, 1).toLowerCase() + richName.substring(1,
richName.length());
+ } else
if(component.getClass().getName().startsWith("org.richfaces.component.UI")){
+ richName =
component.getClass().getName().substring("org.richfaces.component.UI".length());
+ richName = richName.substring(0, 1).toLowerCase() + richName.substring(1,
richName.length());
+ }else {
try {
throw new Exception("Unknown class for component!!!");
} catch (Exception e) {
@@ -85,9 +87,9 @@
}
}
TLDParser parser = new TLDParser(richName);
- ArrayList<String> allAttributes = parser.getAllAttributes();
- for(String s:allAttributes){
- System.out.println(s);
+ ArrayList<Attribute> allAttributes = parser.getAllAttributes();
+ for(Attribute s:allAttributes){
+ System.out.println(s.toString());
}
AccessibleObject.setAccessible(fields, true);
Show replies by date