Skip to content

Instantly share code, notes, and snippets.

@Test
@RunWith(Arquillian.class)
@QUnit(html={"src/main/qunit/test.html"})
public class Test() {
}
@Test
@RunWith(Arquillian.class)
@lfryc
lfryc / gist:2845977
Created May 31, 2012 20:27
The Pernament and Named assertions
// invokable from e.g. JavaScript unit tests by the name
@NamedAssertion("named")
public void Pernament extends ServerAssertion {
}
// will be invoked each time the lifecycle event happens
// including push events
// the assertion will be delivered to client on first possible moment
@PernamentAssertion
public void Pernament extends ServerAssertion {
public interface TestAttributeInterface {
/**
* Documentation for attr
*
* @return attr
*/
@Attribute
abstract public String getAttr();
}
taglib.xml:
<attribute>
<description>Documentation for attr @return attr</description>
<name>attr</name>
<type>java.lang.String</type>
</attribute>
faces-config.xml:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
<?xml version="1.0" encoding="UTF-8"?>
<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite">
<cc:interface>
<cdk:class>org.richfaces.renderkit.TestComponentRenderer</cdk:class>
<cdk:superclass>org.richfaces.renderkit.TestComponentRendererBase</cdk:superclass>
<cdk:component-family>org.richfaces.TestComponentFamily</cdk:component-family>
<cdk:renderer-type>org.richfaces.TestComponentRenderer</cdk:renderer-type>
<?xml version="1.0" encoding="UTF-8"?>
<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite">
<cc:interface>
<cdk:class>org.richfaces.bootstrap.renderkit.CommandButtonRenderer</cdk:class>
<cdk:superclass>org.richfaces.bootstrap.renderkit.CommandButtonRendererBase</cdk:superclass>
<cdk:renderer-type>org.richfaces.bootstrap.CommandButtonRenderer</cdk:renderer-type>
<cdk:renders-children>true</cdk:renders-children>
package org.richfaces.bootstrap.function;
import java.text.MessageFormat;
import javax.faces.component.UIComponent;
import org.ajax4jsf.javascript.ScriptUtils;
import org.richfaces.bootstrap.component.Toggleable;
import org.richfaces.bootstrap.javascript.BootstrapJSPlugin;
import org.richfaces.cdk.annotations.Function;
<b:script name="saveCompleted">
if(#{not facesContext.isValidationFailed()}) {
#{rich:jQuery('modalCreate')}.modal('hide');
}
</b:script>
<b:commandButton ... oncomplete="#{saveCompleted}" />
<!-- USE CASE 1 -->
<h:form>
<b:modal>
<!-- Inputs -->
<f:facet name="footer">
<!-- Buttons -->
</f:facet>