This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static final String VERSION_KEY = "version"; | |
| private static final String POM_PROPS_PATH_MF = "/META-INF/maven/{0}/{1}/pom.properties"; | |
| public static String getMavenWarVersion(ServletContext context, String groupId, String artifactId) { | |
| String resourceName = MessageFormat.format(POM_PROPS_PATH_MF, new Object[]{groupId, artifactId}); | |
| Properties properties = loadProperties(context.getResourceAsStream(resourceName)); | |
| if (properties != null) { | |
| return properties.getProperty(VERSION_KEY); | |
| } | |
| return "unknown"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.context.annotation.Scope; | |
| import org.springframework.stereotype.Component; | |
| import javax.servlet.ServletContext; | |
| import javax.ws.rs.GET; | |
| import javax.ws.rs.Path; | |
| import javax.ws.rs.Produces; | |
| import javax.ws.rs.core.Context; | |
| import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependency> | |
| <groupId>com.sun.jersey.contribs</groupId> | |
| <artifactId>jersey-spring</artifactId> | |
| <version>1.8</version> | |
| <exclusions> | |
| <exclusion> | |
| <groupId>org.springframework</groupId> | |
| <artifactId>spring</artifactId> | |
| </exclusion> | |
| <exclusion> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.commons.lang.StringUtils; | |
| import org.joda.time.DateMidnight; | |
| import org.joda.time.format.DateTimeFormat; | |
| import org.springframework.stereotype.Component; | |
| import javax.faces.component.UIComponent; | |
| import javax.faces.context.FacesContext; | |
| import javax.faces.convert.Converter; | |
| @Component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <p:row> | |
| <p:column> | |
| <p:outputLabel value="Date"/> | |
| </p:column> | |
| <p:column> | |
| <p:calendar pattern="dd/MMM/yyyy" navigator="true" showButtonPanel="true" | |
| converter="#{dateMidnightConverter}" | |
| value="#{myBean.selected.date}"/> | |
| </p:column> | |
| </p:row> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import net.thucydides.core.pages.PageObject; | |
| import org.apache.commons.lang3.StringUtils; | |
| import org.openqa.selenium.By; | |
| import org.openqa.selenium.WebDriver; | |
| public abstract class AbstractPage extends PageObject { | |
| public AbstractPage(WebDriver driver) { | |
| super(driver); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div id="myForm:state" class="ui-selectonemenu ui-widget ui-state-default ui-corner-all ui-helper-clearfix" style="width: 147px;"> | |
| <div class="ui-helper-hidden"> | |
| <select id="myForm:state_input" name="myForm:state_input"> | |
| <option value="">- Select One -</option> | |
| <option value="Enabled">Enabled</option> | |
| <option value="Disabled">Disabled</option> | |
| </select> | |
| </div> | |
| <div class="ui-helper-hidden-accessible"> | |
| <input id="myForm:state_focus" name="myForm:state_focus" type="text"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| The facelets code uses the id "state" | |
| <p:selectOneMenu id="state" value="#{myBean.state}"> | |
| ... | |
| </p:selectOneMenu> | |
| */ | |
| // sample invocation to select element |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In section 2 of the documentation (http://www.primefaces.org/documentation.html), it shows how you can define the primefaces repository in your maven pom.xml (or ~/.m2/settings.xml): | |
| <repository> | |
| <id>prime-repo</id> | |
| <name>Prime Repo</name> | |
| <url>http://repository.primefaces.org</url> | |
| </repository> | |
| If you are using maven in an organisation you would be better off setting up a repository manager such as NEXUS and configuring that with the primefaces repository. Then, your developers just configure this nexus repository as a mirror of everything in their ~/.m2/settings.xml and everything is transparent. |