This repository has been archived by the owner on Jan 10, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix for ValidationDecorator
and removed some dead code
- Loading branch information
Showing
9 changed files
with
42 additions
and
1,114 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
14 changes: 11 additions & 3 deletions
14
src/main/java/com/trsvax/bootstrap/services/BootStrapValidationDecoratorFactoryImpl.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
package com.trsvax.bootstrap.services; | ||
|
||
import org.apache.tapestry5.Asset; | ||
import org.apache.tapestry5.MarkupWriter; | ||
import org.apache.tapestry5.ValidationDecorator; | ||
import org.apache.tapestry5.annotations.Path; | ||
import org.apache.tapestry5.internal.DefaultValidationDecorator; | ||
import org.apache.tapestry5.services.Environment; | ||
import org.apache.tapestry5.services.ValidationDecoratorFactory; | ||
import org.slf4j.Logger; | ||
|
||
public class BootStrapValidationDecoratorFactoryImpl implements ValidationDecoratorFactory { | ||
private final Environment environment; | ||
private final Asset spacerImage; | ||
|
||
public BootStrapValidationDecoratorFactoryImpl(Environment environment) { | ||
public BootStrapValidationDecoratorFactoryImpl(Environment environment, @Path("${tapestry.spacer-image}") | ||
Asset spacerImage) { | ||
this.environment = environment; | ||
this.spacerImage = spacerImage; | ||
} | ||
|
||
public ValidationDecorator newInstance(MarkupWriter writer) { | ||
return new BootStrapValidationDecorator(writer,environment); | ||
DefaultValidationDecorator decorator = new DefaultValidationDecorator(environment, spacerImage, writer); | ||
//return new BootStrapValidationDecorator(writer,environment); | ||
|
||
return decorator; | ||
} | ||
|
||
} |
This file contains 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
Oops, something went wrong.