Hello, Yup I have seen it too. I will work on now (after morning coffee :-) )
BTW I have some other issues with indexer, searching doesn't work anymore :-(. Something else I'd like to do is to upgrade to last indexer (asf one) : eating our own dogfood :-) I will open a jira for this. /Olivier 2011/6/22 Marica Tan <marica....@gmail.com>: > Hi Olivier, > > Somehow this fix broke the links of 'Search', 'Find Artifact' and 'Browse' > > > Thanks, > -- > Marica > > > On Wed, Jun 22, 2011 at 12:40 AM, <ol...@apache.org> wrote: > >> Author: olamy >> Date: Tue Jun 21 16:40:39 2011 >> New Revision: 1138081 >> >> URL: http://svn.apache.org/viewvc?rev=1138081&view=rev >> Log: >> push more work on selenium test using id rather than labels >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/pom.xml >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/SearchTest.java >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/upload.jsp >> >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/pom.xml >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/pom.xml?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/pom.xml >> (original) >> +++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/pom.xml >> Tue Jun 21 16:40:39 2011 >> @@ -38,7 +38,7 @@ >> <cargo.install.dir>cargo-installs</cargo.install.dir> >> <maxWaitTimeInMs>60000</maxWaitTimeInMs> >> <!-- TODO: review how appropriate the memory settings are - should work >> with less --> >> - <cargo.jvm.args>-Xmx512m -XX:MaxPermSize=256m >> -Duser.language=en</cargo.jvm.args> >> + <cargo.jvm.args>-Xmx512m -XX:MaxPermSize=256m</cargo.jvm.args> >> <seleniumPluginVersion>2.0-SNAPSHOT</seleniumPluginVersion> >> </properties> >> >> @@ -383,8 +383,6 @@ >> <systemProperties> >> >> <appserver.base>${project.build.directory}/appserver-base</appserver.base> >> >> <appserver.home>${project.build.directory}/appserver-base</appserver.home> >> - <user.language>en</user.language> >> - <user.region>US</user.region> >> </systemProperties> >> </container> >> <configuration> >> @@ -584,7 +582,7 @@ >> <cargo.jvm.args> >> -Xdebug -Xnoagent -Djava.compiler=NONE >> >> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${cargo.debug.port} >> - -Xmx512m -XX:MaxPermSize=256m -Duser.language=en >> + -Xmx512m -XX:MaxPermSize=256m >> </cargo.jvm.args> >> <cargo.debug.port>8000</cargo.debug.port> >> <!-- wait an unusual amount of time (1hr) to allow debugging to >> occur --> >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/ArchivaAdminTest.java >> Tue Jun 21 16:40:39 2011 >> @@ -58,9 +58,8 @@ public class ArchivaAdminTest >> >> getSelenium().open( baseUrl ); >> String title = getSelenium().getTitle(); >> - //assertElementPresent( "adminCreateForm" ); >> + // if not admin user created create one >> if (isElementPresent( "adminCreateForm" )) >> - //if ( title.endsWith( "Create Admin User" ) ) >> { >> assertCreateAdmin(); >> String fullname = getProperty( "ADMIN_FULLNAME" ); >> @@ -69,10 +68,10 @@ public class ArchivaAdminTest >> String password = getProperty( "ADMIN_PASSWORD" ); >> submitAdminData( fullname, mail, password ); >> assertUserLoggedIn( username ); >> - //submit(); >> - //clickLinkWithText( "Logout" ); >> clickLinkWithLocator( "logoutLink" ); >> } >> + >> + // take care about repositories : internal >> } >> >> } >> \ No newline at end of file >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/SearchTest.java >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/SearchTest.java?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/SearchTest.java >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/SearchTest.java >> Tue Jun 21 16:40:39 2011 >> @@ -24,27 +24,32 @@ import java.io.File; >> import org.apache.archiva.web.test.parent.AbstractSearchTest; >> import org.testng.annotations.Test; >> >> -@Test( groups = { "search" }, dependsOnMethods = { >> "testWithCorrectUsernamePassword" } ) >> +@Test( groups = { "search" }, dependsOnGroups = {"about"}, sequential = >> true) >> public class SearchTest >> extends AbstractSearchTest >> { >> >> + @Test(alwaysRun = true) >> public void testSearchNonExistingArtifact() >> throws Exception >> { >> searchForArtifact( getProperty( "SEARCH_BAD_ARTIFACT" ) ); >> - assertTextPresent( "No results found" ); >> + //assertTextPresent( "No results found" ); >> + assertElementPresent( "//span[@class=\'errorMessage\']" ); >> } >> >> // TODO: make search tests more robust especially when >> comparing/asserting number of hits >> + @Test(alwaysRun = true) >> public void testSearchExistingArtifact() >> { >> searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) ); >> - assertTextPresent( "Results" ); >> - assertTextPresent( "Hits: 1 to 1 of 1" ); >> + //assertTextPresent( "Results" ); >> + assertElementPresent( "resultsBox" ); >> + assertTextPresent( "1 to 1 of 1" ); >> assertLinkPresent( "test" ); >> } >> >> + @Test(alwaysRun = true) >> public void testViewSearchedArtifact() >> { >> searchForArtifact( getProperty( "ARTIFACT_ARTIFACTID" ) ); >> @@ -54,7 +59,8 @@ public class SearchTest >> clickLinkWithText( getProperty( "ARTIFACT_VERSION" ) + "/" ); >> assertPage( "Apache Archiva \\ Browse Repository" ); >> } >> - >> + >> + @Test(alwaysRun = true) >> public void testSearchWithMultipleKeywords() >> { >> String groupId = getProperty( "ADD_REMOVE_GROUPID" ); >> @@ -79,18 +85,21 @@ public class SearchTest >> assertTextPresent( "No results found" ); >> } >> >> + @Test(alwaysRun = true) >> public void testSearchNonExistingArtifactInAdvancedSearch() >> { >> searchForArtifactAdvancedSearch( null, getProperty( >> "SEARCH_BAD_ARTIFACT" ), null, null, null, null ); >> assertTextPresent( "No results found" ); >> } >> >> + @Test(alwaysRun = true) >> public void testSearchNoSearchCriteriaSpecifiedInAdvancedSearch() >> { >> searchForArtifactAdvancedSearch( null, null, null, null, null, null >> ); >> assertTextPresent( "Advanced Search - At least one search criteria >> must be provided." ); >> } >> >> + @Test(alwaysRun = true) >> public void testSearchExistingArtifactUsingAdvancedSearchArtifactId() >> { >> searchForArtifactAdvancedSearch( null, getProperty( >> "ARTIFACT_ARTIFACTID" ), null, >> @@ -100,6 +109,7 @@ public class SearchTest >> assertLinkPresent( "test" ); >> } >> >> + @Test(alwaysRun = true) >> public void testSearchExistingArtifactUsingAdvancedSearchGroupId() >> { >> searchForArtifactAdvancedSearch( getProperty( "GROUPID" ), null, >> null, getProperty( "REPOSITORYID" ), null, >> @@ -109,6 +119,7 @@ public class SearchTest >> assertLinkPresent( "test" ); >> } >> >> + @Test(alwaysRun = true) >> public void >> testSearchExistingArtifactAllCriteriaSpecifiedInAdvancedSearch() >> { >> searchForArtifactAdvancedSearch( getProperty( "GROUPID" ), >> getProperty( "ARTIFACT_ARTIFACTID" ) , getProperty( "ARTIFACT_VERSION" ), >> @@ -118,6 +129,7 @@ public class SearchTest >> assertLinkPresent( "test" ); >> } >> >> + @Test(alwaysRun = true) >> public void >> testSearchExistingArtifactUsingAdvancedSearchNotInRepository() >> { >> searchForArtifactAdvancedSearch( null, getProperty( >> "ARTIFACT_ARTIFACTID" ), null, "snapshots", null, null ); >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java >> Tue Jun 21 16:40:39 2011 >> @@ -103,7 +103,6 @@ public abstract class AbstractArchivaTes >> public void goToLoginPage() >> { >> getSelenium().open( baseUrl ); >> - //clickLinkWithText( "Login" ); >> clickLinkWithLocator( "loginLink" ); >> assertLoginPage(); >> } >> @@ -270,7 +269,7 @@ public abstract class AbstractArchivaTes >> >> public void login( String username, String password, boolean valid, >> String assertReturnPage ) >> { >> - if ( isLinkPresent( "Login" ) ) >> + if ( isElementPresent( "loginLink" ) ) >> { >> goToLoginPage(); >> >> @@ -302,8 +301,8 @@ public abstract class AbstractArchivaTes >> { >> checkField( "rememberMe" ); >> } >> - clickButtonWithValue( "Login" ); >> - >> + //clickButtonWithValue( "Login" ); >> + clickButtonWithLocator( "loginSubmit" ); >> if ( validUsernamePassword ) >> { >> assertUserLoggedIn( username ); >> @@ -470,9 +469,14 @@ public abstract class AbstractArchivaTes >> clickButtonWithValue( "Save" ); >> } >> >> + public void goToHomePage() >> + { >> + getSelenium().open( ""); >> + } >> // Upload Artifact >> public void goToAddArtifactPage() >> { >> + // must be logged as admin >> getSelenium().open( "/archiva/upload.action" ); >> assertAddArtifactPage(); >> } >> @@ -504,6 +508,7 @@ public abstract class AbstractArchivaTes >> public void addArtifact( String groupId, String artifactId, String >> version, String packaging, boolean generatePom, >> String artifactFilePath, String repositoryId ) >> { >> + login( getProperty( "ADMIN_USERNAME" ), getProperty( >> "ADMIN_PASSWORD" ) ); >> goToAddArtifactPage(); >> setFieldValue( "groupId", groupId ); >> setFieldValue( "artifactId", artifactId ); >> @@ -534,9 +539,10 @@ public abstract class AbstractArchivaTes >> } >> >> setFieldValue( "artifact", path ); >> - selectValue( "repositoryId", repositoryId ); >> + selectValue( "upload_repositoryId", repositoryId ); >> >> - clickButtonWithValue( "Submit" ); >> + //clickButtonWithValue( "Submit" ); >> + clickButtonWithLocator( "uploadSubmit" ); >> } >> >> public void goToRepositoriesPage() >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSearchTest.java >> Tue Jun 21 16:40:39 2011 >> @@ -25,12 +25,15 @@ public abstract class AbstractSearchTest >> // Search >> public void goToSearchPage() >> { >> - if ( !"Apache Archiva \\ Quick Search".equals( getTitle() ) ) >> + goToHomePage(); >> + //if ( !"Apache Archiva \\ Quick Search".equals( getTitle() ) ) >> + if ( isElementPresent( "quickSearchBox" ) ) >> { >> - clickLinkWithText( "Search" ); >> + //clickLinkWithText( "Search" ); >> + clickLinkWithLocator( "menuSearchLink" ); >> getSelenium().waitForPageToLoad( maxWaitTimeInMs ); >> - >> - assertPage( "Apache Archiva \\ Quick Search" ); >> + assertElementPresent( "quickSearchSubmit" ); >> + //assertPage( "Apache Archiva \\ Quick Search" ); >> } >> } >> >> @@ -38,7 +41,7 @@ public abstract class AbstractSearchTest >> { >> assertPage( "Apache Archiva \\ Quick Search" ); >> assertTextPresent( "Search for" ); >> - assertElementPresent( "quickSearch_q" ); >> + assertElementPresent( "quickSearchSubmit" ); >> assertButtonWithValuePresent( "Search" ); >> // assertLinkPresent( "Advanced Search" ); >> assertTextPresent( "Enter your search terms. A variety of data will >> be searched for your keywords." ); >> @@ -50,11 +53,12 @@ public abstract class AbstractSearchTest >> goToSearchPage(); >> >> getSelenium().type( "dom=document.forms[1].elements[0]", artifactId >> ); >> - clickButtonWithValue( "Search" ); >> + //clickButtonWithValue( "Search" ); >> + clickButtonWithLocator( "quickSearchSubmit" ); >> } >> >> - public void searchForArtifactAdvancedSearch( String groupId, String >> artifactId, String version, >> - String repositoryId, >> String className, String rowCount ) >> + public void searchForArtifactAdvancedSearch( String groupId, String >> artifactId, String version, String repositoryId, >> + String className, String >> rowCount ) >> { >> goToSearchPage(); >> >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java >> Tue Jun 21 16:40:39 2011 >> @@ -72,8 +72,7 @@ public abstract class AbstractSeleniumTe >> >> if ( getSelenium() == null ) >> { >> - DefaultSelenium s = >> - new DefaultSelenium( seleniumHost, seleniumPort, >> browser, baseUrl ); >> + DefaultSelenium s = new DefaultSelenium( seleniumHost, >> seleniumPort, browser, baseUrl ); >> s.start(); >> s.setTimeout( maxWaitTimeInMs ); >> selenium.set( s ); >> @@ -255,6 +254,7 @@ public abstract class AbstractSeleniumTe >> getSelenium().select( locator, "label=" + value ); >> } >> >> + >> public void assertOptionPresent( String selectField, String[] options ) >> { >> assertElementPresent( selectField ); >> @@ -371,6 +371,21 @@ public abstract class AbstractSeleniumTe >> } >> } >> >> + public void clickButtonWithLocator( String locator ) >> + { >> + clickButtonWithLocator( locator, true ); >> + } >> + >> + public void clickButtonWithLocator( String locator, boolean wait ) >> + { >> + assertElementPresent( locator ); >> + getSelenium().click( locator ); >> + if ( wait ) >> + { >> + waitPage(); >> + } >> + } >> + >> public void setFieldValues( Map<String, String> fieldMap ) >> { >> Map.Entry<String, String> entry; >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/decorators/default.jsp >> Tue Jun 21 16:40:39 2011 >> @@ -81,7 +81,7 @@ >> >> <div id="topSearchBox"> >> <s:form method="get" action="quickSearch" namespace="/" >> validate="true"> >> - <s:textfield label="Search for" size="30" name="q"/> >> + <s:textfield id="quickSearchBox" label="Search for" size="30" >> name="q"/> >> </s:form> >> </div> >> >> @@ -91,17 +91,17 @@ >> <h5>Find</h5> >> <ul> >> <li class="none"> >> - <my:currentWWUrl action="index" >> namespace="/">Search</my:currentWWUrl> >> + <my:currentWWUrl action="index" namespace="/" >> id="menuSearchLink">Search</my:currentWWUrl> >> </li> >> >> <s:if test="%{#application['uiOptions'].showFindArtifacts}"> >> <li class="none"> >> - <my:currentWWUrl action="findArtifact" namespace="/">Find >> Artifact</my:currentWWUrl> >> + <my:currentWWUrl action="findArtifact" namespace="/" >> id="menuFindArtifactLink">Find Artifact</my:currentWWUrl> >> </li> >> </s:if> >> >> <li class="none"> >> - <my:currentWWUrl action="browse" >> namespace="/">Browse</my:currentWWUrl> >> + <my:currentWWUrl action="browse" namespace="/" >> id="menuBrowseLink">Browse</my:currentWWUrl> >> </li> >> </ul> >> >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/quickSearch.jsp >> Tue Jun 21 16:40:39 2011 >> @@ -97,7 +97,7 @@ >> <s:form method="get" id="quickSearch" action="quickSearch" >> validate="true"> >> <s:textfield label="Search for" size="50" name="q"/> >> <s:hidden name="completeQueryString" value="%{completeQueryString}"/> >> - <s:submit value="Search"/> >> + <s:submit value="Search" id="quickSearchSubmit"/> >> </s:form> >> <p> >> <s:actionerror/> >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/upload.jsp >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/upload.jsp?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/upload.jsp >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/upload.jsp >> Tue Jun 21 16:40:39 2011 >> @@ -39,7 +39,7 @@ >> >> <s:form action="upload!doUpload" method="post" >> enctype="multipart/form-data" validate="true"> >> <%@ include file="/WEB-INF/jsp/include/uploadForm.jspf" %> >> - <s:submit/> >> + <s:submit id="uploadSubmit"/> >> </s:form> >> </div> >> >> >> Modified: >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag >> URL: >> http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag?rev=1138081&r1=1138080&r2=1138081&view=diff >> >> ============================================================================== >> --- >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag >> (original) >> +++ >> archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag >> Tue Jun 21 16:40:39 2011 >> @@ -21,6 +21,7 @@ >> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> >> <%@ attribute name="action" %> >> <%@ attribute name="namespace" %> >> +<%@ attribute name="id" %> >> <%@ attribute name="url" %> >> <%@ attribute name="useParams" required="false" %> >> >> @@ -35,7 +36,7 @@ >> </c:set> >> <c:if test="${!empty (action) && !empty (namespace)}"> >> <c:set var="url"> >> - <s:url action="%{#attr.action}" namespace="%{#attr.namespace}"/> >> + <s:url action="%{#attr.action}" namespace="%{#attr.namespace}" id="%{# >> attr.id}"/> >> </c:set> >> </c:if> >> <c:set var="text"> >> @@ -46,16 +47,12 @@ Current URL: <c:out value="${currentUrl} >> <c:choose> >> <c:when test="${currentUrl == url}"> >> <b> >> - >> ${text} >> - >> </b> >> </c:when> >> <c:otherwise> >> - <a href="${url}"> >> - >> + <a href="${url}" id="${id}"> >> ${text} >> - >> </a> >> </c:otherwise> >> </c:choose> >> >> >> > -- Olivier Lamy http://twitter.com/olamy | http://www.linkedin.com/in/olamy