You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by ma...@apache.org on 2006/08/02 18:35:05 UTC
svn commit: r428081 [8/12] - in /incubator/adffaces/trunk/trinidad:
trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/
trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/core/layout/
trinidad-api/src/test/java/org/apache/myfa...
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ProcessTrainRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ProcessTrainRenderer.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ProcessTrainRenderer.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/ProcessTrainRenderer.java Wed Aug 2 11:34:29 2006
@@ -1,890 +0,0 @@
-/*
- * Copyright 2000-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.trinidadinternal.ui.laf.base.desktop;
-
-import java.io.IOException;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.faces.context.ResponseWriter;
-
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-import org.apache.myfaces.trinidad.component.UIXHierarchy;
-
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
-import org.apache.myfaces.trinidadinternal.share.url.URLEncoder;
-import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
-import org.apache.myfaces.trinidadinternal.ui.UINode;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.FormValueRenderer;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.ProcessUtils;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafUtils;
-
-/**
- * @version $Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/desktop/ProcessTrainRenderer.java#0 $) $Date: 10-nov-2005.18:56:11 $
- * @author The Oracle ADF Faces Team
-
- */
-public class ProcessTrainRenderer extends HtmlLafRenderer
-{
-
- protected UIXHierarchy getHierarchyBase(
- UIXRenderingContext context,
- UINode node
- )
- {
- return (UIXHierarchy) node.getUIComponent();
- }
-
-
- protected UINode getStamp(
- UIXRenderingContext context,
- UINode node
- )
- {
- return node.getNamedChild(context, NODE_STAMP_CHILD);
- }
-
-
- protected boolean setNewPath(
- UIXRenderingContext context,
- UINode node,
- UIXHierarchy component
- )
- {
- Object focusPath = component.getFocusRowKey();
- component.setRowKey(focusPath);
- return true;
-
-
- }
-
-
- protected void renderAttributes(
- UIXRenderingContext context,
- UINode node
- ) throws IOException
- {
- super.renderAttributes(context, node);
- renderLayoutTableAttributes(context, "0", null);
- context.getResponseWriter().writeAttribute("align", "center", null);
- }
-
- /* this is how we can render both the user defined styleClass and our
- * component style class
- */
- protected void renderStyleAttrs(
- UIXRenderingContext context,
- UINode node
- ) throws IOException
- {
- renderStyleAttrs(context, node, AF_PROCESS_TRAIN_STYLE_CLASS);
- }
-
- protected String getElementName(
- UIXRenderingContext context,
- UINode node
- )
- {
- return "table";
- }
-
- /**
- * Overrride to render in two passes. The first pass is the graphical
- * elements. The second pass is the text elements.
- */
- protected void renderContent(
- UIXRenderingContext context,
- UINode node
- ) throws IOException
- {
- UIXHierarchy component = getHierarchyBase(context, node);
- UINode stamp = getStamp(context, node);
-
- if(stamp != null)
- {
- Object oldPath = component.getRowKey();
- boolean isNewPath = setNewPath(context, node, component);
- if (isNewPath)
- {
-
- ProcessTrainRenderer.TrainState state =
- getTrainState(context, node, component);
-
-
- renderHiddenFields( context, node, state);
-
- renderContent(context, node, component, stamp, state);
-
- component.setRowKey(oldPath);
- }
- }
- }
-
- protected void logProcessTrainModelTypeError()
- {
- if (_LOG.isFine())
- _LOG.fine("The value model type for process components " +
- "must be a List of Page objects");
- }
-
- protected void renderHiddenFields(
- UIXRenderingContext context,
- UINode node,
- TrainState state
- )throws IOException
- {
-
- if ((state.formName != null) && supportsScripting(context))
- {
- // render hidden fields to hold the form data
- FormValueRenderer.addNeededValue( context,
- state.formName,
- state.eventKey,
- state.sourceKey,
- state.valueKey,
- state.sizeKey);
-
- // Render script submission code.
- ProcessUtils.renderNavSubmitScript(context);
- }
- }
-
- /**
- * Gather up the train state: selectedIndex, maxVisitedIndex, startIndex,
- * isSubTrain, readOnly, formName, id, eventKey, sourceKey, valueKey
- * This way all the parameters we need to pass around to various methods
- * are all in one place, the TrainState
- * @param context RenderingContext
- * @param node the processTrain node.
- * @param pages a List of Page objects.
- * @return
- */
- protected TrainState getTrainState(
- UIXRenderingContext context,
- UINode node,
- UIXHierarchy component
- )
- {
- ProcessTrainRenderer.TrainState state =
- new ProcessTrainRenderer.TrainState();
- state.selectedIndex = component.getRowIndex();
-
- // get highest node in train visited
- state.maxVisitedIndex = _getMaxVisitedIndex(context, node);
- //
- // default to selectedIndex if it wasn't set
- // or if it was set to be greater than selectedIndex
- if (state.maxVisitedIndex == NO_CHILD_INDEX ||
- state.maxVisitedIndex < state.selectedIndex)
- {
- state.maxVisitedIndex = state.selectedIndex;
- }
-
- int totalPages = component.getRowCount();
- state.startIndex = _getStartIndex(totalPages,
- state.selectedIndex);
-
- state.subTrain = _isSubTrain(context, node);
-
- state.readOnly = _isReadOnly(context, node);
-
- state.formName = XhtmlLafUtils.getSubmitFormName(context, node);
- Object id = getID(context, node);
- state.id = (id != null) ? id.toString() : null;
-
- URLEncoder encoder = context.getURLEncoder();
- state.eventKey = encoder.encodeParameter(EVENT_PARAM);
- state.sourceKey = encoder.encodeParameter(SOURCE_PARAM);
- state.valueKey = encoder.encodeParameter(VALUE_PARAM);
- state.sizeKey = encoder.encodeParameter(SIZE_PARAM);
-
- return state;
- }
-
-
- /**
- * return what the starting index into the stations List.
- */
- private int _getStartIndex(
- int numPages,
- int originalSelectedIndex)
- {
- int currentMinIndex = 0;
-
- if (numPages <= _MAX_NUM_LINK_INDEX)
- return currentMinIndex;
-
- int selectedIndex = originalSelectedIndex;
-
-
- int currentMaxIndex = _MAX_NUM_LINK_INDEX - 1;
-
- if(selectedIndex < currentMaxIndex)
- {
- return currentMinIndex; //0
- }
- // the algorithm below works, but I thought it was too cryptic
- // return (selectedIndex -
- // (((selectedIndex-1)%(_MAX_NUM_LINK_INDEX-2))+1));
-
- // loop until the selectedIndex range is found or
- // we have gone past the number of nodes in the train.
- // Then we'll know what index to start the visible portion of the train.
- while(numPages > currentMaxIndex)
- {
- currentMinIndex = currentMaxIndex-1;
- currentMaxIndex += (_MAX_NUM_LINK_INDEX-2);
- if(selectedIndex > currentMinIndex && selectedIndex < currentMaxIndex)
- return currentMinIndex;
- }
-
- return currentMinIndex;
-
- }
-
-
- /**
- * Get the subTrain attribute from the node and return it.
- */
- private boolean _isSubTrain(
- UIXRenderingContext context,
- UINode node)
- {
- UIXHierarchy component = getHierarchyBase(context, node);
- Object focusRowKey = component.getFocusRowKey();
- if ( focusRowKey != null && (component.getDepth(focusRowKey) > 0))
- return true;
-
- return false;
- }
-
- /**
- * Returns true if READ_ONLY_ATTR is set to Boolean.TRUE
- */
- private static boolean _isReadOnly(
- UIXRenderingContext context,
- UINode node
- )
- {
- return
- getBooleanAttributeValue(context, node, READ_ONLY_ATTR, Boolean.FALSE);
- }
-
- /**
- * Returns the MAX_VISITED_ATTR
- * @todo =-=jmw Hopefully the controller will tell us this someday.
- */
- protected static Object _getMaxVisited(
- UIXRenderingContext context,
- UINode node
- )
- {
- // return node.getAttributeValue(context, MAX_VISITED_ATTR);
- return null;
- }
-
- /**
- * Get the maxVisited attribute from the node and return it.
- */
- private int _getMaxVisitedIndex(
- UIXRenderingContext context,
- UINode node)
- {
- int maxVisitedIndex = NO_CHILD_INDEX;
- Integer maxVisited = (Integer)_getMaxVisited(context, node);
- if (maxVisited != null)
- {
- maxVisitedIndex = maxVisited.intValue();
- }
- return maxVisitedIndex;
- }
-
-
-
-
-
- /**
- *
- *
- */
- protected void renderContent(
- UIXRenderingContext context,
- UINode node,
- UIXHierarchy component,
- UINode stamp,
- TrainState train
- ) throws IOException
- {
-
- int length = component.getRowCount();
- if (length == 0)
- return;
-
- ResponseWriter writer = context.getResponseWriter();
-
- // start FOR SUBTRAIN
- // If subTrain, add a row and on the first and last cells, render
- // a border which looks like a sub-train
- if (train.subTrain)
- {
- _renderSubTrainRow(context, train, length, writer);
-
- writer.startElement("tr", null);
- writer.startElement("td", null);
- writer.endElement("td");
- }
- else
- {
- writer.startElement("tr", null);
- }
-
- // loop through each rendered station.
-
- int lastTrainIndex = train.startIndex + getMaxLinks(context, node);
- if (length <= lastTrainIndex)
- lastTrainIndex = length;
- else
- lastTrainIndex++; // length of train is larger than the visible
- // number of train stations, so make room for the more
- // by adding one to the lastTrainIndex.
-
- int currVisChildIndex = Math.max(0, train.startIndex - 1);
- boolean isPrevVisChildDisabled = false;
- boolean isCurrVisChildDisabled = false;
- boolean isNextVisChildDisabled = false;
-
- component.setRowIndex(currVisChildIndex);
- isCurrVisChildDisabled = getBooleanAttributeValue(context,
- stamp,
- DISABLED_ATTR,
- false);
- for (; currVisChildIndex < lastTrainIndex; currVisChildIndex++)
- {
- //
- // get index of the child and
- // determine if it is within the range in which it will be rendered.
- //
- int prevVisChildIndex = ((currVisChildIndex == 0)
- ? NO_CHILD_INDEX
- : currVisChildIndex - 1);
- int nextVisChildIndex = ((currVisChildIndex == length - 1)
- ? NO_CHILD_INDEX
- : currVisChildIndex + 1);
-
- component.setRowIndex(nextVisChildIndex);
- isNextVisChildDisabled = getBooleanAttributeValue(context,
- stamp,
- DISABLED_ATTR,
- false);
-
- component.setRowIndex(currVisChildIndex);
-
- // initialized state of the station
- ProcessTrainRenderer.StationState station = train.station;
- initializeStationState(
- context,
- train,
- station,
- currVisChildIndex,
- prevVisChildIndex,
- nextVisChildIndex,
- isCurrVisChildDisabled,
- isPrevVisChildDisabled,
- isNextVisChildDisabled
- );
-
- // set up for next pass
- isPrevVisChildDisabled = isCurrVisChildDisabled;
- isCurrVisChildDisabled = isNextVisChildDisabled;
-
- Object label = stamp.getAttributeValue(context, TEXT_ATTR);
-
- String currVisChildText = null;
-
- // Get text from link, or Previous or More text if appropriate
- currVisChildText = getTextForStation(context, station, label);
-
- String currVisChildID = null;
-
- component.setRowIndex(currVisChildIndex);
- renderLink(context,
- stamp,
- writer,
- train,
- currVisChildText,
- currVisChildID,
- station);
-
- }
-
- if (train.subTrain)
- {
- writer.startElement("td", null);
- writer.endElement("td");
- }
-
- writer.endElement("tr");
- }
-
-
-
- /**
- * Renders the link under the train node
- *
- */
- protected void renderLink(
- UIXRenderingContext context,
- UINode stamp,
- ResponseWriter writer,
- ProcessTrainRenderer.TrainState train,
- String currVisChildText,
- String currVisChildID,
- ProcessTrainRenderer.StationState station
- ) throws IOException
- {
-
-
- //
- // Write the link under the train node.
- //
- writer.startElement("td", null);
- writer.writeAttribute("colspan", "2", null);
-
- String styleClass = (station.isSelected)
- ? AF_PROCESS_TRAIN_ACTIVE_STYLE_CLASS
- : (station.isDisabled && !station.isMoreLink)
- ? AF_PROCESS_TRAIN_DISABLED_STYLE_CLASS
- : (station.isVisited)
- ? AF_PROCESS_TRAIN_VISITED_STYLE_CLASS
- : AF_PROCESS_TRAIN_UNVISITED_STYLE_CLASS;
-
- renderStyleClassAttribute(context, styleClass);
-
- Map originalResourceKeyMap = context.getSkinResourceKeyMap();
- try
- {
- context.setSkinResourceKeyMap(_RESOURCE_KEY_MAP);
- renderChild(context, stamp);
- }
- finally
- {
- context.setSkinResourceKeyMap(originalResourceKeyMap);
- }
-/*
- // if there should be a link, render it
- // If the processTrain is read-only, then don't render the link, but
- // still render the text.
- if (!train.readOnly && (
- station.isPreviousLink ||
- (station.isMoreLink&&station.isVisited) ||
- (!station.isSelected && !station.isDisabled &&
- (station.isVisited || station.isNext) )))
- {
-
- UINode currLink = null;
-
- // If we don't support navigation (e.g., printable pages),
- // lie and claim we support scripting (even though we probably don't).
- // This will give us the highest fidelity output - that is,
- // we avoid creating submit buttons.
-
- if (supportsScripting(context) ||
- !supportsNavigation(context))
- {
-
- String destination =
- ProcessUtils.getSubmitScriptCall(
- context,
- train.formName,
- train.eventKey,
- train.sourceKey,
- train.id,
- train.valueKey,
- station.index,
- train.sizeKey,
- (station.index > train.selectedIndex)
- ? 1 : 0,// 0 means back, 1 means next
- false, null, null);
-
- currLink = _createSingleItemLink(
- currVisChildText,
- currVisChildID,
- destination);
- }
- else
- {
- currLink= ProcessUtils.createSubmitButton(
- context,
- currVisChildText,
- null,
- currVisChildID,
- train.formName,
- false,
- train.eventKey,
- train.sourceKey,
- train.id,
- train.valueKey,
- station.index,
- train.sizeKey,
- (station.index > train.selectedIndex)
- ? 1 : 0);
-
- }
-
-
- currLink.render(context);
- }
- else
- {
- writer.startElement(SPAN_ELEMENT, null);
- renderID(context, currVisChildID, false);
- writer.writeText(currVisChildText, null);
- writer.endElement(SPAN_ELEMENT);
- }*/
-
- writer.endElement("td");
- }
-
-
- /**
- * return the string to use for the text of the station
- * it is the text of the link or "Previous" or "More"
- */
- protected String getTextForStation(UIXRenderingContext context,
- ProcessTrainRenderer.StationState station,
- Object textObj)
- {
- String textValue = (textObj == null) ? null : textObj.toString();
- final String currText;
-
- if (textValue != null && !station.isPreviousLink && !station.isMoreLink)
- {
- // if we are in screen reader mode, then we must render more descriptive
- // text.
- // see bug 1801348 REMOVE ONE SET OF TRAIN TEXT IN ACCESSIBLE MODE
- if (isScreenReaderMode(context))
- {
- currText = _getDisabledUserText(context, station, textValue);
- }
- else
- {
- currText = textValue;
- }
- }
- else if(station.isPreviousLink)
- {
- currText = getTranslatedString(context, _PREVIOUS_KEY);
- }
- else if(station.isMoreLink)
- {
- currText = getTranslatedString(context, _MORE_KEY);
- }
- else
- currText = null;
-
- return currText;
- }
-
- /**
- * return the string to use for the text of the station
- * it is the text of the link or "Previous" or "More"
- */
- protected static String getIDForStation(
- UIXRenderingContext context,
- ProcessTrainRenderer.StationState station,
- Object idValue)
- {
-
- if (idValue != null && !station.isPreviousLink && !station.isMoreLink)
- {
- return idValue.toString();
- }
-
- return null;
- }
-
- private String _getDisabledUserText(UIXRenderingContext context,
- ProcessTrainRenderer.StationState station,
- String textString)
- {
- String altTextKey = station.isSelected
- ? _ACTIVE_KEY
- : station.isVisited
- ? _VISITED_KEY
- : _NEXT_KEY;
-
- String[] parameters = new String[]
- {
- textString
- };
-
- String altText = formatString(context,
- getTranslatedString(context, altTextKey),
- parameters);
- return altText;
- }
-
- protected String getAltText(
- UIXRenderingContext context,
- ProcessTrainRenderer.StationState station,
- String textString)
- {
- // if we are in screen reader mode, then we must not render any alt text
- // on the image. However, we can't return null since OAC will
- // complain, so return "":
- // see bug 1801348 REMOVE ONE SET OF TRAIN TEXT IN ACCESSIBLE MODE
-
- return isInaccessibleMode(context)
- ? null
- : isScreenReaderMode(context)
- ? ""
- : _getDisabledUserText(context, station, textString);
- }
-
- /**
- * Returns the max number of links to show
- */
- protected int getMaxLinks(
- UIXRenderingContext context,
- UINode node
- )
- {
- return _MAX_NUM_LINK_INDEX;
- }
-
- /**
- * Initialize the station state
- */
- protected void initializeStationState(
- UIXRenderingContext context,
- ProcessTrainRenderer.TrainState train,
- ProcessTrainRenderer.StationState station,
- int currVisChildIndex,
- int prevVisChildIndex,
- int nextVisChildIndex,
- boolean isCurrChildDisabled,
- boolean isPrevChildDisabled,
- boolean isNextChildDisabled
-)
- {
-
-
- station.isPreviousLink = false;
- station.isMoreLink = false;
- station.isDisabled = false;
- station.isNextDisabled = false;
- station.isPrevDisabled = false;
- station.index = currVisChildIndex;
-
- // train.startIndex is the index into the List that is the
- // start of the train. The algorithm is dependent upon the BLAF spec.
- if( currVisChildIndex == train.startIndex-1)
- {
- station.isPreviousLink = true;
- }
- else if (currVisChildIndex == train.startIndex+_MAX_NUM_LINK_INDEX)
- {
- station.isMoreLink = true;
- }
-
- // selected nodes cannot be disabled,
- // so don't bother getting disabled attribute for the selected node
-
- if (currVisChildIndex != NO_CHILD_INDEX &&
- currVisChildIndex != train.selectedIndex)
- {
- station.isDisabled = isCurrChildDisabled;
- }
-
-
- // get disabled information about the previous and the next child.
- // selectedIndex cannot act disabled
- //
- if (prevVisChildIndex != NO_CHILD_INDEX &&
- prevVisChildIndex != train.selectedIndex)
- {
- station.isPrevDisabled = isPrevChildDisabled;
- }
-
- if (nextVisChildIndex != NO_CHILD_INDEX &&
- nextVisChildIndex != train.selectedIndex)
- {
- station.isNextDisabled = isNextChildDisabled;
-
- }
-
- //
- // get the selected and visited flags for our node
- //
- station.isSelected = (currVisChildIndex == train.selectedIndex);
- station.isVisited = (currVisChildIndex <= train.maxVisitedIndex);
- station.isNextVisited = (currVisChildIndex < train.maxVisitedIndex);
- station.isNext = (currVisChildIndex == (train.maxVisitedIndex+1));
- // if previous station is "next", and disabled, mark this as "next".
- if ((currVisChildIndex-1 == (train.maxVisitedIndex+1)) &&
- (station.isPrevDisabled))
- {
- station.isNext = true;
- }
- }
-
- protected static class TrainState
- {
- public TrainState()
- {
- station = new ProcessTrainRenderer.StationState();
- }
- public int startIndex;
- public int maxVisitedIndex;
- public int selectedIndex;
- public boolean subTrain;
- public boolean readOnly;
- public String formName;
- public String id;
- public String eventKey;
- public String sourceKey;
- public String valueKey;
- public String sizeKey;
- public ProcessTrainRenderer.StationState station;
- }
-
- protected static class StationState
- {
-
- public boolean isSelected;
- // is this the station that is right AFTER the selected station.
- public boolean isNext;
- public boolean isVisited;// has this station been visited already?
- public boolean isPreviousLink; // is this the Previous link?
- public boolean isMoreLink; // is this the More link?
- public boolean isDisabled; // is this station disabled?
- public boolean isNextDisabled; // is the next station disabled?
- public boolean isPrevDisabled;// is the previous station disabled?
- public boolean isNextVisited; // is the next station visited?
- public int index; // the index of this node
- } //end StationState
-
- private void _renderSubTrainRow(
- UIXRenderingContext context,
- ProcessTrainRenderer.TrainState train,
- int length,
- ResponseWriter writer
- ) throws IOException
- {
- boolean isRTL = isRightToLeft(context);
-
- writer.startElement("tr", null);
-
- if (isRTL)
- _renderSubTrainCell(context, TRAIN_SUB_RIGHT_STYLE_CLASS, writer);
- else
- _renderSubTrainCell(context, AF_PROCESS_TRAIN_SUB_START_STYLE_CLASS, writer);
-
- _renderSubTrainBlankCells(train, length, writer);
-
- if (isRTL)
- _renderSubTrainCell(context, AF_PROCESS_TRAIN_SUB_START_STYLE_CLASS, writer);
- else
- _renderSubTrainCell(context, TRAIN_SUB_RIGHT_STYLE_CLASS, writer);
-
- writer.endElement("tr");
- }
-
- private void _renderSubTrainCell(
- UIXRenderingContext context,
- String style,
- ResponseWriter writer
- ) throws IOException
- {
- writer.startElement("td", null);
- renderStyleClassAttribute(context, style);
- renderSpacer(context, "14", "2");
- writer.endElement("td");
- }
- /**
- * renders a td with colSpan equal to the number of visible stations
- * including the Previous and More if they are there.
- * @param context
- * @param length
- * @param output
- * @param train
- * @throws IOException
- */
- private void _renderSubTrainBlankCells(
- ProcessTrainRenderer.TrainState train,
- int length,
- ResponseWriter writer
- ) throws IOException
- {
- writer.startElement("td", null);
-
- // figure out the number of stations
- int startIndex = Math.max(0, train.startIndex - 1);
- int lastTrainIndex = train.startIndex + _MAX_NUM_LINK_INDEX;
- if (length <= lastTrainIndex)
- lastTrainIndex = length;
- else
- {
- // when the length of train is larger than the visible
- // number of train stations, we render a More link.
- // so make room for the more
- // by adding one to the lastTrainIndex.
- lastTrainIndex++;
- }
- String numberOfStations = Integer.toString((lastTrainIndex - startIndex)*2);
- writer.writeAttribute("colspan", numberOfStations, null);
- writer.endElement("td");
- }
-
-
-
- private static final int _MAX_NUM_LINK_INDEX = 6; //number of visible links
-
- /**
- * The following keys are used to get at the corresponding translated
- * strings.
- */
- private static final String _VISITED_KEY = "af_processTrain.VISITED_TIP";
- private static final String _ACTIVE_KEY = "af_processTrain.ACTIVE_TIP";
- private static final String _NEXT_KEY = "af_processTrain.NEXT_TIP";
- private static final String _MORE_KEY = "af_processTrain.MORE";
- private static final String _PREVIOUS_KEY = "af_processTrain.PREVIOUS";
-
-
- static private final TrinidadLogger _LOG =
- TrinidadLogger.createTrinidadLogger(ProcessTrainRenderer.class);
-
- // for now keep the OraLink/OraDisabledLink styles on the 'a', and
- // append train link style class.
- private static final Map _RESOURCE_KEY_MAP = new HashMap();
- private static final String _TRAIN_DISABLED_LINK =
- XhtmlConstants.LINK_DISABLED_STYLE_CLASS +
- " " + XhtmlConstants.AF_PROCESS_TRAIN_LINK_STYLE_CLASS;
- private static final String _TRAIN_ENABLED_LINK =
- XhtmlConstants.LINK_STYLE_CLASS +
- " " + XhtmlConstants.AF_PROCESS_TRAIN_LINK_STYLE_CLASS;
- static
- {
- _RESOURCE_KEY_MAP.put(
- XhtmlConstants.LINK_DISABLED_STYLE_CLASS,
- _TRAIN_DISABLED_LINK);
- _RESOURCE_KEY_MAP.put(
- XhtmlConstants.LINK_STYLE_CLASS,
- _TRAIN_ENABLED_LINK);
- }
-
-}
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/SubTabBarRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/SubTabBarRenderer.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/SubTabBarRenderer.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/SubTabBarRenderer.java Wed Aug 2 11:34:29 2006
@@ -76,7 +76,7 @@
)
throws IOException
{
- renderRelatedLinksBlockStart(context, "af_showOneTab.BLOCK_TITLE");
+ renderRelatedLinksBlockStart(context, "af_panelTabbed.BLOCK_TITLE");
super.prerender(context, node);
// Disable default link style classes - subTabBar items
@@ -248,8 +248,8 @@
/**
* Override of renderBetweenIndexedChildren() which renders a separator
- * style on the td. The style will be af|showOneTab::separator-before-selected,
- * af|showOneTab::separator-after-selected, or af|showOneTab::separator.
+ * style on the td. The style will be af|panelTabbed::separator-before-selected,
+ * af|panelTabbed::separator-after-selected, or af|panelTabbed::separator.
*/
protected void renderBetweenIndexedChildren(
UIXRenderingContext context,
@@ -285,18 +285,18 @@
// style classes used in this showOneTabs renderer.
private static final String _SEPARATOR_AFTER_SELECTED_STYLE =
- "af|showOneTab::separator-after-selected";
+ "af|panelTabbed::separator-after-selected";
private static final String _SEPARATOR_BEFORE_SELECTED_STYLE =
- "af|showOneTab::separator-before-selected";
+ "af|panelTabbed::separator-before-selected";
private static final String _SEPARATOR_STYLE =
- "af|showOneTab::separator";
+ "af|panelTabbed::separator";
private static final String _CELL_START_STYLE =
- "af|showOneTab::cell-start";
+ "af|panelTabbed::cell-start";
private static final String _CELL_END_STYLE =
- "af|showOneTab::cell-end";
+ "af|panelTabbed::cell-end";
private static final String _ORIENTATION_BOTTOM_STYLE =
- "af|showOneTab::orientation-bottom";
+ "af|panelTabbed::orientation-bottom";
private static final String _ORIENTATION_TOP_STYLE =
- "af|showOneTab::orientation-top";
+ "af|panelTabbed::orientation-top";
}
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/ProcessTrainRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/ProcessTrainRenderer.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/ProcessTrainRenderer.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/pda/ProcessTrainRenderer.java Wed Aug 2 11:34:29 2006
@@ -1,145 +0,0 @@
-/*
- * Copyright 2000-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.trinidadinternal.ui.laf.base.pda;
-
-import java.io.IOException;
-
-import javax.faces.context.ResponseWriter;
-
-import org.apache.myfaces.trinidad.component.UIXHierarchy;
-
-import org.apache.myfaces.trinidadinternal.ui.UIXRenderingContext;
-import org.apache.myfaces.trinidadinternal.ui.UINode;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.ModelRendererUtils;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer;
-import org.apache.myfaces.trinidadinternal.util.IntegerUtils;
-
-
-/**
- * @version $Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/pda/ProcessTrainRenderer.java#0 $) $Date: 10-nov-2005.18:55:03 $
- * @author The Oracle ADF Faces Team
- */
-public class ProcessTrainRenderer extends XhtmlLafRenderer
-{
-
- protected UIXHierarchy getHierarchyBase(
- UIXRenderingContext context,
- UINode node
- )
- {
- return (UIXHierarchy) node.getUIComponent();
- }
-
-
- protected UINode getStamp(
- UIXRenderingContext context,
- UINode node
- )
- {
- return node.getNamedChild(context, NODE_STAMP_CHILD);
- }
-
-
- protected boolean setNewPath(
- UIXRenderingContext context,
- UINode node,
- UIXHierarchy component
- )
- {
- int startDepth = getIntAttributeValue(context, node, START_DEPTH_ATTR, 0);
- return ModelRendererUtils.setNewPath(component, startDepth,
- component.getFocusRowKey(), false);
-
-
- }
-
- /**
- * Render Step x of z for process Train components.
- */
- protected void renderContent(
- UIXRenderingContext context,
- UINode node
- ) throws IOException
- {
-
- UIXHierarchy component = getHierarchyBase(context, node);
- UINode stamp = getStamp(context, node);
-
- if(stamp != null)
- {
- Object oldPath = component.getRowKey();
- boolean isNewPath = setNewPath(context, node, component);
- if (isNewPath)
- {
-
- int selectedIndex = component.getRowIndex();
- int length = component.getRowCount();
- String pattern;
- String[] parameters;
-
- selectedIndex++;
-
- if (length == MAX_VALUE_UNKNOWN)
- {
- pattern = getTranslatedString(context,
- _SINGLE_RANGE_FORMAT_NO_TOTAL_STRING);
-
- parameters = new String[]
- {
- getTranslatedString(context, _STEP_TEXT_KEY),
- IntegerUtils.getString(selectedIndex)
- };
-
- }
- else
- {
- pattern = getTranslatedString(context,
- _SINGLE_RANGE_FORMAT_TOTAL_STRING);
-
- parameters = new String[]
- {
- getTranslatedString(context, _STEP_TEXT_KEY),
- IntegerUtils.getString(selectedIndex),
- IntegerUtils.getString(length)
- };
- }
-
- ResponseWriter writer = context.getResponseWriter();
-
- writer.writeText(formatString(context, pattern, parameters), null);
-
- component.setRowKey(oldPath);
- }
- }
- }
-
-
- protected String getElementName(
- UIXRenderingContext context,
- UINode node
- )
- {
- return null;
- }
-
-
- static private final String _STEP_TEXT_KEY =
- "af_processTrain.STEP";
- static private final String _SINGLE_RANGE_FORMAT_TOTAL_STRING =
- "af_processTrain.FORMAT_TOTAL";
- static private final String _SINGLE_RANGE_FORMAT_NO_TOTAL_STRING =
- "af_processTrain.FORMAT_NO_TOTAL";
-}
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafConstants.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafConstants.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafConstants.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/xhtml/XhtmlLafConstants.java Wed Aug 2 11:34:29 2006
@@ -246,19 +246,19 @@
// panelForm's styles
public static final String AF_PANEL_FORM_STYLE_CLASS =
- "af|panelForm";
+ "af|panelFormLayout";
public static final String AF_PANEL_FORM_COLUMN_STYLE_CLASS =
- "af|panelForm::column";
+ "af|panelFormLayout::column";
public static final String AF_PANEL_FORM_SEPARATOR_STYLE_CLASS =
- "af|panelForm::separator";
+ "af|panelFormLayout::separator";
public static final String AF_PANEL_FORM_LABEL_CELL_STYLE_CLASS =
- "af|panelForm::label-cell";
+ "af|panelFormLayout::label-cell";
public static final String AF_PANEL_FORM_LABEL_STACKED_CELL_STYLE_CLASS =
- "af|panelForm::label-stacked-cell";
+ "af|panelFormLayout::label-stacked-cell";
public static final String AF_PANEL_FORM_CONTENT_CELL_STYLE_CLASS =
- "af|panelForm::content-cell";
+ "af|panelFormLayout::content-cell";
public static final String AF_PANEL_FORM_MESSAGE_CELL_STYLE_CLASS =
- "af|panelForm::message-cell";
+ "af|panelFormLayout::message-cell";
// Link style classes
public static final String LINK_STYLE_CLASS =
@@ -517,21 +517,21 @@
// processTrain styles
public static final String AF_PROCESS_TRAIN_STYLE_CLASS =
- "af|processTrain";
+ "af|train";
public static final String AF_PROCESS_TRAIN_ACTIVE_STYLE_CLASS =
- "af|processTrain::step-active";
+ "af|train::step-active";
public static final String AF_PROCESS_TRAIN_VISITED_STYLE_CLASS =
- "af|processTrain::step-visited";
+ "af|train::step-visited";
public static final String AF_PROCESS_TRAIN_UNVISITED_STYLE_CLASS =
- "af|processTrain::step-unvisited";
+ "af|train::step-unvisited";
public static final String AF_PROCESS_TRAIN_LINK_STYLE_CLASS =
- "af|processTrain::link";
+ "af|train::link";
public static final String AF_PROCESS_TRAIN_DISABLED_STYLE_CLASS =
- "af|processTrain::step-disabled";
+ "af|train::step-disabled";
public static final String AF_PROCESS_TRAIN_SUB_START_STYLE_CLASS =
- "af|processTrain::sub-start";
+ "af|train::sub-start";
public static final String TRAIN_SUB_RIGHT_STYLE_CLASS =
- "af|processTrain::sub-end";
+ "af|train::sub-end";
// HEADER STYLES (panelHeader and messages header)
public static final String AF_PANEL_HEADER_STYLE_CLASS =
@@ -554,95 +554,95 @@
// NAVIGATION LEVEL STYLES
public static final String AF_NAVIGATION_LEVEL_STYLE_CLASS =
- "af|navigationLevel";
+ "af|navigationPane";
public static final String AF_NAVIGATION_LEVEL_BAR_STYLE_CLASS =
- "af|navigationLevelBar";
+ "af|navigationPane::bar";
public static final String AF_NAVIGATION_LEVEL_BAR_ACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevelBar::bar-active-disabled";
+ "af|navigationPane::bar::bar-active-disabled";
public static final String AF_NAVIGATION_LEVEL_BAR_ACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevelBar::bar-active-enabled";
+ "af|navigationPane::bar::bar-active-enabled";
public static final String AF_NAVIGATION_LEVEL_BAR_INACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevelBar::bar-inactive-disabled";
+ "af|navigationPane::bar::bar-inactive-disabled";
public static final String AF_NAVIGATION_LEVEL_BAR_INACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevelBar::bar-inactive-enabled";
+ "af|navigationPane::bar::bar-inactive-enabled";
public static final String AF_NAVIGATION_LEVEL_BAR_CONTENT_STYLE_CLASS =
- "af|navigationLevelBar::bar-content";
+ "af|navigationPane::bar::bar-content";
public static final String AF_NAVIGATION_LEVEL_BAR_SEPARATOR_STYLE_CLASS =
- "af|navigationLevelBar::bar-separator";
+ "af|navigationPane::bar::bar-separator";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_ACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevel::buttons-active-disabled";
+ "af|navigationPane::buttons-active-disabled";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_ACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevel::buttons-active-enabled";
+ "af|navigationPane::buttons-active-enabled";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_INACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevel::buttons-inactive-disabled";
+ "af|navigationPane::buttons-inactive-disabled";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_INACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevel::buttons-inactive-enabled";
+ "af|navigationPane::buttons-inactive-enabled";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_CONTENT_STYLE_CLASS =
- "af|navigationLevel::buttons-content";
+ "af|navigationPane::buttons-content";
public static final String AF_NAVIGATION_LEVEL_BUTTONS_SEPARATOR_STYLE_CLASS =
- "af|navigationLevel::buttons-separator";
+ "af|navigationPane::buttons-separator";
public static final String AF_NAVIGATION_LEVEL_CHOICE_LABEL_STYLE_CLASS =
- "af|navigationLevel::choice-label";
+ "af|navigationPane::choice-label";
public static final String AF_NAVIGATION_LEVEL_CHOICE_OPTIONS_STYLE_CLASS =
- "af|navigationLevel::choice-options";
+ "af|navigationPane::choice-options";
public static final String AF_NAVIGATION_LEVEL_CHOICE_BUTTON_STYLE_CLASS =
- "af|navigationLevel::choice-button";
+ "af|navigationPane::choice-button";
public static final String AF_NAVIGATION_LEVEL_LIST_ACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevel::list-active-disabled";
+ "af|navigationPane::list-active-disabled";
public static final String AF_NAVIGATION_LEVEL_LIST_ACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevel::list-active-enabled";
+ "af|navigationPane::list-active-enabled";
public static final String AF_NAVIGATION_LEVEL_LIST_INACTIVE_DISABLED_STYLE_CLASS =
- "af|navigationLevel::list-inactive-disabled";
+ "af|navigationPane::list-inactive-disabled";
public static final String AF_NAVIGATION_LEVEL_LIST_INACTIVE_ENABLED_STYLE_CLASS =
- "af|navigationLevel::list-inactive-enabled";
+ "af|navigationPane::list-inactive-enabled";
public static final String AF_NAVIGATION_LEVEL_LIST_CONTENT_STYLE_CLASS =
- "af|navigationLevel::list-content";
+ "af|navigationPane::list-content";
public static final String AF_NAVIGATION_LEVEL_LIST_BULLET_STYLE_CLASS =
- "af|navigationLevel::list-bullet";
+ "af|navigationPane::list-bullet";
public static final String AF_NAVIGATION_LEVEL_TABS_STYLE_CLASS =
- "af|navigationLevelTabs";
+ "af|navigationPaneTabs";
public static final String AF_NAVIGATION_LEVEL_TABS_ACTIVE_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-active";
+ "af|navigationPaneTabs::tabs-active";
public static final String AF_NAVIGATION_LEVEL_TABS_INACTIVE_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-inactive";
+ "af|navigationPaneTabs::tabs-inactive";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-start";
+ "af|navigationPaneTabs::tabs-bottom-start";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_CONTENT_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-start-content";
+ "af|navigationPaneTabs::tabs-bottom-start-content";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-end";
+ "af|navigationPaneTabs::tabs-bottom-end";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_CONTENT_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-end-content";
+ "af|navigationPaneTabs::tabs-bottom-end-content";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_JOIN_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-end-join";
+ "af|navigationPaneTabs::tabs-bottom-end-join";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-mid";
+ "af|navigationPaneTabs::tabs-bottom-mid";
public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_CONTENT_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-bottom-mid-content";
+ "af|navigationPaneTabs::tabs-bottom-mid-content";
public static final String AF_NAVIGATION_LEVEL_TABS_END_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-end";
+ "af|navigationPaneTabs::tabs-end";
public static final String AF_NAVIGATION_LEVEL_TABS_END_JOIN_TO_INACTIVE_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-end-join-to-inactive";
+ "af|navigationPaneTabs::tabs-end-join-to-inactive";
public static final String AF_NAVIGATION_LEVEL_TABS_MID_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-mid";
+ "af|navigationPaneTabs::tabs-mid";
public static final String AF_NAVIGATION_LEVEL_TABS_START_JOIN_FROM_ACTIVE_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-start-join-from-active";
+ "af|navigationPaneTabs::tabs-start-join-from-active";
public static final String AF_NAVIGATION_LEVEL_TABS_START_JOIN_FROM_INACTIVE_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-start-join-from-inactive";
+ "af|navigationPaneTabs::tabs-start-join-from-inactive";
public static final String AF_NAVIGATION_LEVEL_TABS_START_JOIN_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-start-join";
+ "af|navigationPaneTabs::tabs-start-join";
public static final String AF_NAVIGATION_LEVEL_TABS_START_STYLE_CLASS =
- "af|navigationLevelTabs::tabs-start";
+ "af|navigationPaneTabs::tabs-start";
public static final String P_AF_DISABLED = "p_AFDisabled";
// BREADCRUMBS STYLES
- // used in tr:navigationPath, tr:treeTable
+ // used in tr:breadCrumbs, tr:treeTable
public static final String AF_NAVIGATION_PATH_STYLE_CLASS =
- "af|navigationPath";
+ "af|breadCrumbs";
public static final String AF_NAVIGATION_PATH_STEP_STYLE_CLASS =
- "af|navigationPath::step";
+ "af|breadCrumbs::step";
public static final String AF_NAVIGATION_PATH_SELECTED_STEP_STYLE_CLASS =
- "af|navigationPath::selected-step";
+ "af|breadCrumbs::selected-step";
public static final String AF_TREE_TABLE_MP_STYLE_CLASS =
"af|treeTable::path";
public static final String AF_TREE_TABLE_MP_SELECTED_STYLE_CLASS =
@@ -685,15 +685,15 @@
public static final String STYLED_LIST_STYLE_CLASS =
"OraStyledList";
- // ShowOneTab STYLES
+ // panelTabbed STYLES
public static final String AF_SHOW_ONE_TAB_STYLE_CLASS =
- "af|showOneTab::tab";
+ "af|panelTabbed::tab";
public static final String AF_SHOW_ONE_TAB_SELECTED_STYLE_CLASS =
- "af|showOneTab::tab-selected";
+ "af|panelTabbed::tab-selected";
public static final String AF_SHOW_ONE_TAB_BODY_STYLE_CLASS =
- "af|showOneTab::body";
+ "af|panelTabbed::body";
// TREE STYLES
public static final String TREE_NODE_ADJUST_STYLE_CLASS =
@@ -724,19 +724,19 @@
// Calendar styles
public static final String AF_SELECT_INPUT_DATE_NAV_STYLE_CLASS =
- "af|selectInputDate::nav";
+ "af|inputDate::nav";
public static final String AF_SELECT_INPUT_DATE_TITLE_STYLE_CLASS =
- "af|selectInputDate::title";
+ "af|inputDate::title";
public static final String AF_SELECT_INPUT_DATE_HEADER_STYLE_CLASS =
- "af|selectInputDate::header";
+ "af|inputDate::header";
public static final String AF_SELECT_INPUT_DATE_DISABLED_STYLE_CLASS =
- "af|selectInputDate::disabled";
+ "af|inputDate::disabled";
public static final String AF_SELECT_INPUT_DATE_ENABLED_STYLE_CLASS =
- "af|selectInputDate::enabled";
+ "af|inputDate::enabled";
public static final String AF_SELECT_INPUT_DATE_SELECTED_STYLE_CLASS =
- "af|selectInputDate::selected";
+ "af|inputDate::selected";
public static final String AF_SELECT_INPUT_DATE_CONTENT_STYLE_CLASS =
- "af|selectInputDate::content";
+ "af|inputDate::content";
// Inline calendar styles
@@ -823,11 +823,33 @@
public static final String AF_SHOWONEACCORDION_TITLE_LINK_DISABLED_STYLE_CLASS =
"af|showOneAccordion::title-disabled-link";
+ // tr:panelAccordion styles
+ public static final String AF_PANELACCORDION_CONTAINER_STYLE_CLASS =
+ "af|panelAccordion::container";
+
+ public static final String AF_PANELACCORDION_HEADER_EXPANDED_STYLE_CLASS =
+ "af|panelAccordion::header-expanded";
+
+ public static final String AF_PANELACCORDION_HEADER_COLLAPSED_STYLE_CLASS =
+ "af|panelAccordion::header-collapsed";
+
+ public static final String AF_PANELACCORDION_HEADER_DISABLED_STYLE_CLASS =
+ "af|panelAccordion::header-disabled";
+
+ public static final String AF_PANELACCORDION_CONTENT_STYLE_CLASS =
+ "af|panelAccordion::content";
+
+ public static final String AF_PANELACCORDION_TITLE_LINK_STYLE_CLASS =
+ "af|panelAccordion::title-link";
+
+ public static final String AF_PANELACCORDION_TITLE_LINK_DISABLED_STYLE_CLASS =
+ "af|panelAccordion::title-disabled-link";
+
// =============PROPERTY NAMES================
public static final String AF_NAVIGATIONPATH_SHOW_LAST_ITEM_PROPERTY_KEY =
- "af|navigationPath-ora-show-last-item";
+ "af|breadCrumbs-ora-show-last-item";
public static final String AF_PANEL_LIST_DEFAULT_COLUMNS =
"af|panelList-ora-default-columns";
public static final String AF_TABLE_SELECTION_BAR_IN_TABLE =
@@ -912,12 +934,12 @@
"AFHeaderConfirmationIcon";
// the alias icon for navigationPath separator icon that is shared
- // by tr:navigationPath and tr:treeTable.
+ // by tr:breadCrumbs and tr:treeTable.
public static final String PATH_SEPARATOR_ICON_ALIAS_NAME =
"AFPathSeparatorIcon";
public static final String AF_NAVIGATION_PATH_SEPARATOR_ICON_NAME =
- "af|navigationPath::separator-icon";
+ "af|breadCrumbs::separator-icon";
public static final String AF_TREE_TABLE_MP_SEPARATOR_ICON_NAME =
"af|treeTable::separator-icon";
@@ -926,7 +948,7 @@
"af|panelPage::separator-icon";
// this renders a button that launches the modal date picker.
public static final String AF_SELECT_INPUT_DATE_LAUNCH_ICON_NAME =
- "af|selectInputDate::launch-icon";
+ "af|inputDate::launch-icon";
// ProcessIndicator icons
public static final String AF_PROGRESS_INDICATOR_INDETERMINATE_ICON_NAME =
@@ -981,13 +1003,13 @@
// Defined in BaseDesktopSkin and OracleDesktopSkinExtension
// not sure under what circumstances the code runs that renders this.
public static final String AF_SELECT_INPUT_COLOR_LAUNCH_ICON_NAME =
- "af|selectInputColor::launch-icon";
+ "af|inputColor::launch-icon";
// (selectInput)
// Doesn't render in pda. Not supported in pda, that's why.
// Defined in BaseDesktopSkin and OracleDesktopSkinExtension
public static final String AF_SELECT_INPUT_COLOR_SWATCH_OVERLAY_ICON_NAME =
- "af|selectInputColor::swatch-overlay-icon";
+ "af|inputColor::swatch-overlay-icon";
// checkbox icons
@@ -1073,7 +1095,7 @@
// , so it picks up base.xhtml's
// and that renders null for the icon.
public static final String AF_SELECT_INPUT_TEXT_BUTTON_ICON_NAME =
- "af|selectInputText::button-icon";
+ "af|inputListOfValues::button-icon";
// SortableHeader Icons (column, sortable=true)
// used by base.desktop and base.pda SortableHeaderRenderer.
@@ -1131,13 +1153,13 @@
"af|chooseDate::next-disabled-icon";
public static final String AF_SELECT_INPUT_DATE_PREV_ICON_NAME =
- "af|selectInputDate::prev-icon";
+ "af|inputDate::prev-icon";
public static final String AF_SELECT_INPUT_DATE_NEXT_ICON_NAME =
- "af|selectInputDate::next-icon";
+ "af|inputDate::next-icon";
public static final String AF_SELECT_INPUT_DATE_PREV_DISABLED_ICON_NAME =
- "af|selectInputDate::prev-disabled-icon";
+ "af|inputDate::prev-disabled-icon";
public static final String AF_SELECT_INPUT_DATE_NEXT_DISABLED_ICON_NAME =
- "af|selectInputDate::next-disabled-icon";
+ "af|inputDate::next-disabled-icon";
/**
* Constant string appended to various IDs to make another related
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/UINodeFacesBean.java Wed Aug 2 11:34:29 2006
@@ -335,7 +335,7 @@
_ALWAYS_RENDER_ID.add(CoreTreeTable.COMPONENT_FAMILY);
_ALWAYS_RENDER_ID.add(CoreMessages.COMPONENT_FAMILY);
_ALWAYS_RENDER_ID.add(CoreSingleStepButtonBar.COMPONENT_FAMILY);
- _ALWAYS_RENDER_ID.add(CoreShowOneTab.COMPONENT_FAMILY);
+ _ALWAYS_RENDER_ID.add(CorePanelTabbed.COMPONENT_FAMILY);
_ALWAYS_RENDER_ID.add(CoreSelectRangeChoiceBar.COMPONENT_FAMILY);*/
_ALWAYS_RENDER_ID.add(UIXInput.COMPONENT_FAMILY);
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/nav/ProcessTrainFacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/nav/ProcessTrainFacesBean.java?rev=428081&r1=428080&r2=428081&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/nav/ProcessTrainFacesBean.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/uinode/nav/ProcessTrainFacesBean.java Wed Aug 2 11:34:29 2006
@@ -1,33 +0,0 @@
-/*
- * Copyright 2004-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.myfaces.trinidadinternal.uinode.nav;
-
-import org.apache.myfaces.trinidadinternal.ui.UIConstants;
-import org.apache.myfaces.trinidadinternal.ui.collection.AttributeMap;
-
-import org.apache.myfaces.trinidadinternal.uinode.UINodeFacesBean;
-
-public class ProcessTrainFacesBean extends UINodeFacesBean
-{
- protected AttributeMap createAttributeMap(String componentFamily)
- {
- AttributeMap attrMap = super.createAttributeMap(componentFamily);
- attrMap.setAttribute(UIConstants.FORM_SUBMITTED_ATTR, Boolean.TRUE);
- attrMap.setAttribute(UIConstants.UNVALIDATED_ATTR, Boolean.TRUE);
-
- return attrMap;
- }
-}