[
http://team.andromda.org:8080/jira/browse/BPM-118?page=comments#action_10452 ]
Carlos Cuenca commented on BPM-118:
-----------------------------------
here is a patch:
Index:
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/Bpm4StrutsProfile.java
===================================================================
RCS file:
/cvsroot/andromda/cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/Bpm4StrutsProfile.java,v
retrieving revision 1.24
diff -u -r1.24 Bpm4StrutsProfile.java
---
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/Bpm4StrutsProfile.java
23 Nov 2004 19:41:52 -0000 1.24
+++
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/Bpm4StrutsProfile.java
28 Nov 2004 23:39:38 -0000
@@ -65,6 +65,8 @@
public static final boolean TAGGEDVALUE_TABLE_EXPORTABLE_DEFAULT_VALUE =
true;
public static final String TAGGEDVALUE_HYPERLINK = "hyperlinkModel";
+
+ public static final String
TAGGEDVALUE_TABBULATIONINDEX="@andromda.struts.tabbulationIndex";
private Bpm4StrutsProfile()
{
Index:
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsActionLogicImpl.java
===================================================================
RCS file:
/cvsroot/andromda/cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsActionLogicImpl.java,v
retrieving revision 1.42
diff -u -r1.42 StrutsActionLogicImpl.java
---
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsActionLogicImpl.java
24 Nov 2004 11:26:36 -0000 1.42
+++
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsActionLogicImpl.java
28 Nov 2004 23:40:02 -0000
@@ -757,4 +757,24 @@
}
};
}
+
+ /* (non-Javadoc)
+ * @see
org.andromda.cartridges.bpm4struts.metafacades.StrutsActionLogic#handleGetTabbulationIndex()
+ */
+ protected int handleGetTabbulationIndex() {
+ final String tabIndex =
String.valueOf(findTaggedValue(Bpm4StrutsProfile.TAGGEDVALUE_TABBULATIONINDEX));
+
+ if (tabIndex == null)
+ {
+ return -1;
+ }
+ try
+ {
+ return Integer.parseInt(tabIndex);
+ }
+ catch (NumberFormatException e)
+ {
+ return -1;
+ }
+ }
}
Index:
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsParameterLogicImpl.java
===================================================================
RCS file:
/cvsroot/andromda/cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsParameterLogicImpl.java,v
retrieving revision 1.67
diff -u -r1.67 StrutsParameterLogicImpl.java
---
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsParameterLogicImpl.java
23 Nov 2004 19:41:08 -0000 1.67
+++
cartridges/andromda-bpm4struts/src/java/org/andromda/cartridges/bpm4struts/metafacades/StrutsParameterLogicImpl.java
28 Nov 2004 23:38:46 -0000
@@ -1394,4 +1394,24 @@
String[] tokens = string.split("[\\s]+", limit);
return (index >= tokens.length) ? null : tokens[index];
}
+
+ /* (non-Javadoc)
+ * @see
org.andromda.cartridges.bpm4struts.metafacades.StrutsParameterLogic#handleGetTabbulationIndex()
+ */
+ protected int handleGetTabbulationIndex() {
+ final String tabIndex =
String.valueOf(findTaggedValue(Bpm4StrutsProfile.TAGGEDVALUE_TABBULATIONINDEX));
+
+ if (tabIndex == null)
+ {
+ return -1;
+ }
+ try
+ {
+ return Integer.parseInt(tabIndex);
+ }
+ catch (NumberFormatException e)
+ {
+ return -1;
+ }
+ }
}
Index: cartridges/andromda-bpm4struts/src/templates/StrutsJSP.vm
===================================================================
RCS file:
/cvsroot/andromda/cartridges/andromda-bpm4struts/src/templates/StrutsJSP.vm,v
retrieving revision 1.44
diff -u -r1.44 StrutsJSP.vm
--- cartridges/andromda-bpm4struts/src/templates/StrutsJSP.vm 23 Nov 2004
19:39:04 -0000 1.44
+++ cartridges/andromda-bpm4struts/src/templates/StrutsJSP.vm 29 Nov 2004
00:07:10 -0000
@@ -6,6 +6,7 @@
##
#macro ( renderHyperlink $action $indent )
#set ($roles = $action.actionRoles)
+#set ($tabbulationIndex = $action.tabbulationIndex)
#set ($trigger = $action.actionTrigger)
#set ($triggerKey = $trigger.triggerKey)
#set ($parameters = $action.actionParameters)
@@ -22,7 +23,7 @@
#set ($requestPath =
"${requestPath}${separator}${parameter.name}=${${propertyName}}")
#end
${indent} <p>
-${indent} <html:link action="${requestPath}"
#if($hints)onmouseover="hints.show('${trigger.name}')"
onmouseout="hints.hide()"#end>
+${indent} <html:link action="${requestPath}"
#if($hints)onmouseover="hints.show('${trigger.name}')"
onmouseout="hints.hide()"#end #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <bean:message key="$triggerKey"/>
${indent} </html:link>
${indent} </p>
@@ -40,6 +41,7 @@
##
##
#macro ( renderFormButtons $action $indent )
+#set ($tabbulationIndex = $action.tabbulationIndex)
#set ($messageKey = $action.messageKey)
#set ($trigger = $action.actionTrigger)
#set ($roles = $action.actionRoles)
@@ -47,22 +49,22 @@
#if ($securityEnabled)
${indent}<logic:present role="$roles">
#end
-${indent} <html:submit
#if($hints)onmouseover="hints.show('${trigger.name}')"
onmouseout="hints.hide()"#end>
+${indent} <html:submit
#if($hints)onmouseover="hints.show('${trigger.name}')"
onmouseout="hints.hide()"#end #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <bean:message key="$trigger.triggerKey"/>
${indent} </html:submit>
#if ($action.resettable)
-${indent} <html:reset
#if($hints)onmouseover="hints.show('${trigger.name}_reset')"
onmouseout="hints.hide()"#end>
+${indent} <html:reset
#if($hints)onmouseover="hints.show('${trigger.name}_reset')"
onmouseout="hints.hide()"#end #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <bean:message key="$trigger.resetMessageKey"/>
${indent} </html:reset>
#end
#if ($securityEnabled)
${indent}</logic:present>
${indent}<logic:notPresent role="$roles">
-${indent} <html:submit
#if($hints)onmouseover="hints.show('${trigger.name}_no')"
onmouseout="hints.hide()"#end disabled="true">
+${indent} <html:submit
#if($hints)onmouseover="hints.show('${trigger.name}_no')"
onmouseout="hints.hide()"#end disabled="true" #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <bean:message key="$trigger.triggerKey"/>
${indent} </html:submit>
#if ($action.resettable)
-${indent} <html:reset
#if($hints)onmouseover="hints.show('${trigger.name}_noreset')"
onmouseout="hints.hide()"#end disabled="true">
+${indent} <html:reset
#if($hints)onmouseover="hints.show('${trigger.name}_noreset')"
onmouseout="hints.hide()"#end disabled="true" #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <bean:message key="$trigger.resetMessageKey"/>
${indent} </html:reset>
#end
@@ -77,6 +79,7 @@
##
#macro ( renderFormField $action $field $indent)
#set ($fieldName = $field.name)
+#set ($tabbulationIndex = $field.tabbulationIndex)
#set ($widgetType = $field.widgetType)
#set ($formBeanName = "form")
#if ($field.readOnly)
@@ -97,7 +100,7 @@
#foreach ($optionKey in $field.optionKeys)
${indent} <tr>
${indent} <td>
-${indent} <html:$widgetType name="$formBeanName"
property="$fieldName" value="$optionKey"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled/>
+${indent} <html:$widgetType name="$formBeanName"
property="$fieldName" value="$optionKey"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
${indent} <bean:message key="$optionKey"/>
${indent} </td>
${indent} </tr>
@@ -107,12 +110,12 @@
## C H E C K B O X
##
#elseif ($widgetType == 'checkbox')
-${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled/>
+${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
##
## M U L T I B O X
##
#elseif ($widgetType == 'multibox')
-${indent}<html:$widgetType name="$formBeanName"
property="$field.multiboxPropertyName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled>
+${indent}<html:$widgetType name="$formBeanName"
property="$field.multiboxPropertyName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
#set ($multiboxBody = "${formBeanName}.${fieldName}")
${indent} ${${multiboxBody}}
${indent}</html:$widgetType>
@@ -120,7 +123,7 @@
## T E X T F I E L D & P A S S W O R D
##
#elseif ( ($widgetType == 'text') || ($widgetType == 'password') )
-${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $readonly/>
+${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $readonly #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
#if ( ($widgetType == 'text') && $field.calendarRequired )
${indent}<html:link
href="javascript:${action.formBeanName}_${fieldName}Calendar.popup();">
${indent} <html:img page="/layout/calendar/calendar.gif"
styleClass="calendar" #if($hints)onmouseover="hints.show('calendar.popup')"
onmouseout="hints.hide()"#end/>
@@ -130,12 +133,12 @@
## T E X T A R E A
##
#elseif ($widgetType == 'textarea')
-${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $readonly/>
+${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $readonly #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
##
## H I D D E N
##
#elseif ($widgetType == 'hidden')
-${indent}<html:$widgetType name="$formBeanName" property="$fieldName"/>
+${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($tabbulationIndex!=-1) #end/>
##
## C O M B O B O X & L I S T
##
@@ -152,12 +155,12 @@
#end
${indent}<c:choose>
${indent} <c:when test="${!empty ${formBeanName}.${field.backingListName}}">
-${indent} <html:select name="$formBeanName" property="$selectProperty"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled $multiple>
+${indent} <html:select name="$formBeanName" property="$selectProperty"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end $disabled $multiple #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end>
${indent} <html:optionsCollection name="$formBeanName"
property="$field.backingListName" label="label" value="value"/>
${indent} </html:select>
${indent} </c:when>
${indent} <c:otherwise>
-${indent} <html:text name="$formBeanName" property="$selectProperty"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end readonly="true"/>
+${indent} <html:text name="$formBeanName" property="$selectProperty"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()"#end readonly="true" #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
${indent} </c:otherwise>
${indent}</c:choose>
##
@@ -178,7 +181,7 @@
#set ($requestPath = "${requestPath}&${parameter.name}=${${propertyName}}")
#end
#end
-${indent}<html:link action="${requestPath}">
+${indent}<html:link action="${requestPath}" #if($tabbulationIndex!=-1)
tabindex=="$tabbulationIndex" #end>
#set ($linkName = "row.${field.tableLinkColumnName}")
${indent} ${${linkName}}
${indent}</html:link>
@@ -186,7 +189,7 @@
## F I L E
##
#elseif ($widgetType == 'file')
-${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()" $disabled#end/>
+${indent}<html:$widgetType name="$formBeanName" property="$fieldName"
#if($hints)onmouseover="hints.show('$field.titleKey')"
onmouseout="hints.hide()" $disabled#end #if($tabbulationIndex!=-1)
tabindex="$tabbulationIndex" #end/>
##
## P L A I N T E X T
##
Index: cartridges/andromda-bpm4struts/src/uml/BPM4StrutsMetafacadeModel.xml.zip
===================================================================
RCS file:
/cvsroot/andromda/cartridges/andromda-bpm4struts/src/uml/BPM4StrutsMetafacadeModel.xml.zip,v
retrieving revision 1.77
diff -u -r1.77 BPM4StrutsMetafacadeModel.xml.zip
Binary files /tmp/cvsLS4Vl3 and BPM4StrutsMetafacadeModel.xml.zip differ
> tab index for page elements
> ---------------------------
>
> Key: BPM-118
> URL: http://team.andromda.org:8080/jira/browse/BPM-118
> Project: Bpm4Struts Cartridge
> Type: Improvement
> Reporter: Carlos Cuenca
> Assignee: Wouter Zoons
>
>
> a tagged value could contain the tab-index of the element in the page. This
> tab-index will be implemented via Struts element with the tabindex property.
> Elements that will contain the tab index will be:
> form fields
> form buttons (including submit)
> hyperlinks
> Carlos
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://team.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel