You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2005/12/20 21:22:23 UTC
svn commit: r358092 - in /incubator/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/component/
tobago-core/src/main/java/org/apache/myfaces/tobago/util/
tobago-example/tobago-example-demo/
Author: bommel
Date: Tue Dec 20 12:21:56 2005
New Revision: 358092
URL: http://svn.apache.org/viewcvs?rev=358092&view=rev
Log:
removed usages of LabeledInputLayout
fixed bug in tabgroup
Modified:
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIDefaultLayout.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITabGroup.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
incubator/tobago/trunk/tobago-example/tobago-example-demo/pom.xml
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Tue Dec 20 12:21:56 2005
@@ -612,12 +612,12 @@
return script;
}
- public static UIComponent createLabeledInputLayoutComponent() {
+ /*public static UIComponent createLabeledInputLayoutComponent() {
UIComponent component = createComponent(UILabeledInputLayout.COMPONENT_TYPE,
RENDERER_TYPE_LABELED_INPUT_LAYOUT);
component.setId(FacesContext.getCurrentInstance().getViewRoot().createUniqueId());
return component;
- }
+ } */
public static UIComponent createComponent(String componentType, String rendererType) {
final FacesContext facesContext = FacesContext.getCurrentInstance();
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIDefaultLayout.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIDefaultLayout.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIDefaultLayout.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIDefaultLayout.java Tue Dec 20 12:21:56 2005
@@ -46,6 +46,7 @@
public void layoutBegin(FacesContext facesContext, UIComponent component) {
super.layoutBegin(facesContext, component);
+ //TODO why is this needed?
for (Object child : component.getChildren()) {
((UIComponent)child).getAttributes().remove(ATTR_INNER_WIDTH);
((UIComponent)child).getAttributes().remove(ATTR_INNER_HEIGHT);
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java Tue Dec 20 12:21:56 2005
@@ -42,11 +42,12 @@
}
public void encodeBegin(FacesContext facesContext) throws IOException {
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
UILayout.getLayout(this).layoutBegin(facesContext, this);
super.encodeBegin(facesContext);
}
- public void encodeChildren(FacesContext facesContext) throws IOException {
+ /*public void encodeChildren(FacesContext facesContext) throws IOException {
UILayout layout = UILayout.getLayout(this);
if (layout instanceof UILabeledInputLayout) {
if (isRendered() ) {
@@ -55,13 +56,14 @@
} else {
super.encodeChildren(facesContext);
}
- }
+ } */
+
+ /*public void encodeEnd(FacesContext facesContext) throws IOException {
- public void encodeEnd(FacesContext facesContext) throws IOException {
- if (! (UILayout.getLayout(this) instanceof UILabeledInputLayout)) {
+ //if (! (UILayout.getLayout(this) instanceof UILabeledInputLayout)) {
super.encodeEnd(facesContext);
- }
- }
+ //}
+ } */
public void encodeAjax(FacesContext facesContext) throws IOException {
AjaxUtils.encodeAjaxComponent(facesContext, this);
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java Tue Dec 20 12:21:56 2005
@@ -92,7 +92,8 @@
// ///////////////////////////////////////////// code
public void encodeBegin(FacesContext facesContext) throws IOException {
- UILayout.getLayout(this).layoutBegin(facesContext, this);
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
+ UILayout.getLayout(this).layoutBegin(facesContext, this);
super.encodeBegin(facesContext);
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UIPanel.java Tue Dec 20 12:21:56 2005
@@ -29,6 +29,7 @@
public void encodeBegin(FacesContext facesContext) throws IOException {
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
UILayout.getLayout(this).layoutBegin(facesContext, this);
super.encodeBegin(facesContext);
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectMany.java Tue Dec 20 12:21:56 2005
@@ -35,11 +35,12 @@
public void encodeBegin(FacesContext facesContext) throws IOException {
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
UILayout.getLayout(this).layoutBegin(facesContext, this);
super.encodeBegin(facesContext);
}
- public void encodeChildren(FacesContext facesContext) throws IOException {
+ /*public void encodeChildren(FacesContext facesContext) throws IOException {
UILayout layout = UILayout.getLayout(this);
if (layout instanceof UILabeledInputLayout) {
if (isRendered() ) {
@@ -48,11 +49,12 @@
} else {
super.encodeChildren(facesContext);
}
- }
+ } */
+
+ /*public void encodeEnd(FacesContext facesContext) throws IOException {
- public void encodeEnd(FacesContext facesContext) throws IOException {
- if (! (UILayout.getLayout(this) instanceof UILabeledInputLayout)) {
+ //if (! (UILayout.getLayout(this) instanceof UILabeledInputLayout)) {
super.encodeEnd(facesContext);
- }
- }
+ //}
+ } */
}
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UISelectOne.java Tue Dec 20 12:21:56 2005
@@ -39,11 +39,12 @@
public void encodeBegin(FacesContext facesContext) throws IOException {
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
UILayout.getLayout(this).layoutBegin(facesContext, this);
super.encodeBegin(facesContext);
}
- public void encodeChildren(FacesContext facesContext) throws IOException {
+ /*public void encodeChildren(FacesContext facesContext) throws IOException {
UILayout layout = UILayout.getLayout(this);
if (layout instanceof UILabeledInputLayout) {
if (isRendered() ) {
@@ -52,13 +53,13 @@
} else {
super.encodeChildren(facesContext);
}
- }
+ } */
- public void encodeEnd(FacesContext facesContext) throws IOException {
+ /*public void encodeEnd(FacesContext facesContext) throws IOException {
if (! (UILayout.getLayout(this) instanceof UILabeledInputLayout)) {
super.encodeEnd(facesContext);
}
- }
+ }*/
public void validate(FacesContext facesContext) {
if (ComponentUtil.getBooleanAttribute(this, ATTR_REQUIRED)) {
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITabGroup.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITabGroup.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITabGroup.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITabGroup.java Tue Dec 20 12:21:56 2005
@@ -38,23 +38,16 @@
public class UITabGroup extends UIPanel implements AjaxComponent {
-// ///////////////////////////////////////////// constant
-
private static final Log LOG = LogFactory.getLog(UITabGroup.class);
public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.TabGroup";
public static final String RENDERED_INDEX
= "org.apache.myfaces.tobago.component.UITabGroup.RENDERED_INDEX";
-// ///////////////////////////////////////////// attribute
private int activeIndex;
private int renderedIndex;
-// ///////////////////////////////////////////// constructor
-
-// ///////////////////////////////////////////// code
-
@Override
public boolean getRendersChildren() {
return true;
@@ -93,9 +86,7 @@
private void resetTabLayout() {
for (UIPanel tab : getTabs()) {
tab.getAttributes().remove(ATTR_LAYOUT_WIDTH);
-// tab.getAttributes().remove(TobagoConstants.ATTR_INNER_WIDTH);
tab.getAttributes().remove(ATTR_LAYOUT_HEIGHT);
-// tab.getAttributes().remove(TobagoConstants.ATTR_INNER_HEIGHT);
}
}
@@ -130,12 +121,9 @@
}
UIPanel renderedTab = getTabs()[getRenderedIndex()];
renderedTab.processDecodes(context);
- try
- {
+ try {
decode(context);
- }
- catch (RuntimeException e)
- {
+ } catch (RuntimeException e) {
context.renderResponse();
throw e;
}
@@ -198,10 +186,10 @@
}
public Object saveState(FacesContext context) {
- Object[] state = new Object[2];
+ Object[] state = new Object[3];
state[0] = super.saveState(context);
state[1] = new Integer(renderedIndex);
- // activeIndex don't need to be saved
+ state[2] = new Integer(activeIndex);
return state;
}
@@ -209,6 +197,7 @@
Object[] values = (Object[]) state;
super.restoreState(context, values[0]);
renderedIndex = ((Integer)values[1]).intValue();
+ activeIndex = ((Integer)values[2]).intValue();
}
public void encodeAjax(FacesContext facesContext) throws IOException {
@@ -240,8 +229,7 @@
UIComponent child = (UIComponent) facetsAndChildren.next();
if (child instanceof AjaxComponent) {
((AjaxComponent)child).processAjax(facesContext);
- }
- else {
+ } else {
AjaxUtils.processAjax(facesContext, child);
}
if (facesContext.getResponseComplete()) {
@@ -251,7 +239,6 @@
}
}
-// ///////////////////////////////////////////// bean getter + setter
public int getActiveIndex() {
return activeIndex;
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/component/UITreeListbox.java Tue Dec 20 12:21:56 2005
@@ -68,6 +68,7 @@
public void encodeBegin(FacesContext facesContext)
throws IOException {
+ // TODO change this should be renamed to DimensionUtils.prepare!!!
UILayout.getLayout(this).layoutBegin(facesContext, this);
// debugStates(facesContext);
fixSelectionType();
Modified: incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java (original)
+++ incubator/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/LayoutUtil.java Tue Dec 20 12:21:56 2005
@@ -167,12 +167,12 @@
return getDefaultLabelWidth(FacesContext.getCurrentInstance(), null);
}
-
+ //TODO Change this to DimensionUtils.getWidth?
public static Integer getLayoutWidth(UIComponent component) {
return getLayoutSpace(component, ATTR_WIDTH,
ATTR_LAYOUT_WIDTH);
}
-
+ //TODO Change this to DimensionUtils.getHeight?
public static Integer getLayoutHeight(UIComponent component) {
return getLayoutSpace(component, ATTR_HEIGHT,
ATTR_LAYOUT_HEIGHT);
@@ -280,9 +280,6 @@
}
return height;
}
-
-
- // ////////////////////////////////////////////////////////////////
public static Dimension getMinimumSize(
FacesContext facesContext, UIComponent component) {
Modified: incubator/tobago/trunk/tobago-example/tobago-example-demo/pom.xml
URL: http://svn.apache.org/viewcvs/incubator/tobago/trunk/tobago-example/tobago-example-demo/pom.xml?rev=358092&r1=358091&r2=358092&view=diff
==============================================================================
--- incubator/tobago/trunk/tobago-example/tobago-example-demo/pom.xml (original)
+++ incubator/tobago/trunk/tobago-example/tobago-example-demo/pom.xml Tue Dec 20 12:21:56 2005
@@ -47,7 +47,7 @@
<configuration>
<server>tomcat</server>
<update>true</update>
- <!--url>change if not http://localhost:8080/manager</url-->
+ <!--url>http://mononoke:8080/manager</url-->
</configuration>
</plugin>
</plugins>