[JBoss JIRA] Created: (SEAMFACES-17) Support Cross-field form validation
by Lincoln Baxter III (JIRA)
Support Cross-field form validation
-----------------------------------
Key: SEAMFACES-17
URL: https://jira.jboss.org/jira/browse/SEAMFACES-17
Project: Seam Faces
Issue Type: Feature Request
Components: UI Components
Affects Versions: 3.0.0.Alpha1
Reporter: Lincoln Baxter III
Assignee: Lincoln Baxter III
Fix For: 3.0.0.Alpha3
<h:form id="form">
<h:inputText id="cityId" value="#{submitBean.author}" />
<h:inputText id="state" value="#{submitBean.title}" />
<h:inputText id="zip" value="#{submitBean.text}" />
<h:commandButton id="submit" value="Submit" action="#{submitBean.submitPost}" />
<s:validateForm fields="city=cityId state zip" validatorId="postValidator" />
</h:form>
@FacesValidator("postValidator")
public class PostValidator extends FormValidator
{
@Field
private String city;
@Field
private String state;
@Field
private String zip;
@Override
public void validate()
{
throw new ValidatorException(new FacesMessage("Multiple fields-- failed validation!"));
}
}
Should add a global Validation Failure message, and set all affected fields to invalid state, failing validation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[JBoss JIRA] Created: (SEAMFACES-19) NPE at org.jboss.seam.faces.status.MessagesAdapter.convert(MessagesAdapter.java:58)
by Brian Leathem (JIRA)
NPE at org.jboss.seam.faces.status.MessagesAdapter.convert(MessagesAdapter.java:58)
------------------------------------------------------------------------------------
Key: SEAMFACES-19
URL: https://jira.jboss.org/browse/SEAMFACES-19
Project: Seam Faces
Issue Type: Bug
Components: JSF CDI Integration
Environment: Glassfish v3, OS/X jdk6.
Reporter: Brian Leathem
Attachments: mavenproject.zip
Running the attached maven project yields the NPE:
java.lang.NullPointerException
at org.jboss.seam.faces.status.MessagesAdapter.convert(MessagesAdapter.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:228)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:64)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:178)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:204)
at org.jboss.weld.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:903)
at org.jboss.weld.BeanManagerImpl.fireEvent(BeanManagerImpl.java:896)
at org.jboss.weld.BeanManagerImpl.fireEvent(BeanManagerImpl.java:890)
at org.jboss.seam.faces.event.PhaseEventBridge.handlePhase(PhaseEventBridge.java:119)
at org.jboss.seam.faces.event.PhaseEventBridge.beforePhase(PhaseEventBridge.java:129)
at org.jboss.seam.faces.event.DelegatingPhaseListener.beforePhase(DelegatingPhaseListener.java:52)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:637)
Remove the seam faces dependency from the pom.xml, and the project works.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[JBoss JIRA] Created: (JBSEAM-4633) Apply/decorate graphicImage with rounded corners
by Kasper Sørensen (JIRA)
Apply/decorate graphicImage with rounded corners
------------------------------------------------
Key: JBSEAM-4633
URL: https://jira.jboss.org/jira/browse/JBSEAM-4633
Project: Seam
Issue Type: Feature Request
Components: JSF Controls
Reporter: Kasper Sørensen
Priority: Minor
Fix For: 2.2.1.CR2, The future
It would be great with a graphic image transformation that adds rounded corners to an image. Most JavaScript libraries can add rounded corners to DIV-elements and more, but not IMG-elements. This is why it would be great to perform such rounding of edges on the server side.
I've implemented this feature using this code:
{code}
@Override
public void applyTransform(Image image) throws IOException {
Integer height = image.getHeight();
Integer width = image.getWidth();
BufferedImage sourceImage = image.getBufferedImage();
BufferedImage targetImage;
Graphics2D graphics;
if (image.getContentType() == Type.IMAGE_JPEG) {
targetImage = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
graphics = targetImage.createGraphics();
graphics.setBackground(Color.WHITE);
} else {
// transparent background if supported
targetImage = sourceImage.createGraphics().getDeviceConfiguration()
.createCompatibleImage(width, height, Transparency.BITMASK);
graphics = targetImage.createGraphics();
graphics.setBackground(new Color(0, 0, 0, 0));
}
graphics.clearRect(0, 0, width, height);
RoundRectangle2D.Float roundedRectangle = new RoundRectangle2D.Float(0,
0, width, height, radius, radius);
graphics.setClip(roundedRectangle);
graphics.drawImage(sourceImage, 0, 0, null);
graphics.dispose();
image.setBufferedImage(targetImage);
}
private Integer radius = 20;
public void setRadius(Integer radius) {
this.radius = radius;
}
public Integer getRadius() {
return radius;
}
@Override
public Object saveState(FacesContext context) {
Object[] state = new Object[2];
state[0] = super.saveState(context);
state[1] = radius;
return state;
}
@Override
public void restoreState(FacesContext context, Object state) {
Object[] states = (Object[]) state;
super.restoreState(context, states[0]);
radius = (Integer) states[1];
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months
[JBoss JIRA] Created: (JBSEAM-4647) Enhanced sort capabilities Query
by Javier RodrÃguez (JIRA)
Enhanced sort capabilities Query
--------------------------------
Key: JBSEAM-4647
URL: https://jira.jboss.org/jira/browse/JBSEAM-4647
Project: Seam
Issue Type: Patch
Components: Framework
Affects Versions: 2.2.1.CR1
Environment: Seam 2.2.1-CR1, JBoss AS 5.1.0-GA
Reporter: Javier RodrÃguez
Priority: Optional
Improve Query capabilities:
- Allow "propertyPath [propertiDir], propertyPath [propertyDir], ..., propertyPath [propertyDir]" syntax for setOrderColumn(String orderColumn). In this way a single list column can be ordered by one or more entity properties.
- Previous queries order tracking: Remenber previous query ordering and use it as a secondary order criteria for next ones.
Update sen-gen project generation to make it use easy.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 7 months