Package javax.faces.convert

Examples of javax.faces.convert.LongConverter


    @Test
    public void testConverterDeltaState6() throws Exception
    {
        UIOutput output = new UIOutput();
        output.setId("output1");
        output.setConverter(new LongConverter());
        output.markInitialState();
       
        //Force parentDelta to be not null
        output.getAttributes().put("style", "style1");
       
        Object[] state1 = (Object[])output.saveState(facesContext);
       
        // null delta expected
        Assert.assertNotNull(state1);
        Assert.assertEquals(state1.length, 1);
       
        UIOutput output2 = new UIOutput();
        output2.setId("output1");
        Converter converter2 = new LongConverter();
        output2.setConverter(converter2);
        output2.markInitialState();
       
        output2.restoreState(facesContext, state1);
       
View Full Code Here


     */
    @Test
    public void testConverterDeltaState11() throws Exception
    {
        Converter[] converters = new Converter[]{
            new LongConverter(),
            new LongSerializableConverter(),
            new LongStateHolderConverter(),
            new LongPartialStateHolderConverter(),
            new LongPartialStateHolderConverter2()
        };
        Converter[] converters2 = new Converter[]{
            new LongConverter(),
            new LongSerializableConverter(),
            new LongStateHolderConverter(),
            new LongPartialStateHolderConverter(),
            new LongPartialStateHolderConverter2()
        };
View Full Code Here

  super.testValueBindings();
  UIOutput test = (UIOutput) component;

  // "converter" property
  request.setAttribute("foo", new LongConverter());
  test.setConverter(null);
  assertNull(test.getConverter());
  test.setValueBinding("converter", application.createValueBinding("#{foo}"));
  assertNotNull(test.getValueBinding("converter"));
  assertTrue(test.getConverter() instanceof LongConverter);
View Full Code Here

        newComp.getAttributes().put("value", null);
        assertNull(vh.getValue());

        assertEquals(vh.getConverter(),
                     (String) newComp.getAttributes().get("converter"));
        vh.setConverter(new LongConverter());
        assertNotNull((Converter) newComp.getAttributes().get("converter"));
        assertTrue(newComp.getAttributes().get("converter")
                   instanceof LongConverter);
        vh.setConverter(null);
        assertNull(newComp.getAttributes().get("converter"));
View Full Code Here

                     "foo.bar", vh.getValue());
        vh.setValue(null);
        assertNull("erased value", vh.getValue());

        // converter
        vh.setConverter(new LongConverter());
        assertTrue("expected converter",
                   vh.getConverter() instanceof LongConverter);
        vh.setConverter(null);
        assertNull("erased converter", vh.getConverter());
    }
View Full Code Here

        newComp.getAttributes().put("value", null);
        assertNull(vh.getValue());

        assertEquals(vh.getConverter(),
                     (String) newComp.getAttributes().get("converter"));
        vh.setConverter(new LongConverter());
        assertNotNull((Converter) newComp.getAttributes().get("converter"));
        assertTrue(newComp.getAttributes().get("converter")
                   instanceof LongConverter);
        vh.setConverter(null);
        assertNull(newComp.getAttributes().get("converter"));
View Full Code Here

                     "foo.bar", vh.getValue());
        vh.setValue(null);
        assertNull("erased value", vh.getValue());

        // converter
        vh.setConverter(new LongConverter());
        assertTrue("expected converter",
                   vh.getConverter() instanceof LongConverter);
        vh.setConverter(null);
        assertNull("erased converter", vh.getConverter());
    }
View Full Code Here

  super.testValueBindings();
  UIOutput test = (UIOutput) component;

  // "converter" property
  request.setAttribute("foo", new LongConverter());
  test.setConverter(null);
  assertNull(test.getConverter());
  test.setValueBinding("converter", application.createValueBinding("#{foo}"));
  assertNotNull(test.getValueBinding("converter"));
  assertTrue(test.getConverter() instanceof LongConverter);
View Full Code Here

    @Test
    public void testConverterDeltaState1() throws Exception
    {
        UIOutput output = new UIOutput();
        output.setId("output1");
        output.setConverter(new LongConverter());
        output.markInitialState();
       
        Object state1 = output.saveState(facesContext);
       
        // null delta expected
        Assert.assertNull(state1);
       
        UIOutput output2 = new UIOutput();
        output2.setId("output1");
        Converter converter2 = new LongConverter();
        output2.setConverter(converter2);
        output2.markInitialState();
       
        output2.restoreState(facesContext, state1);
       
View Full Code Here

    @Test
    public void testConverterDeltaState6() throws Exception
    {
        UIOutput output = new UIOutput();
        output.setId("output1");
        output.setConverter(new LongConverter());
        output.markInitialState();
       
        //Force parentDelta to be not null
        output.getAttributes().put("style", "style1");
       
        Object[] state1 = (Object[])output.saveState(facesContext);
       
        // null delta expected
        Assert.assertNotNull(state1);
        Assert.assertEquals(state1.length, 1);
       
        UIOutput output2 = new UIOutput();
        output2.setId("output1");
        Converter converter2 = new LongConverter();
        output2.setConverter(converter2);
        output2.markInitialState();
       
        output2.restoreState(facesContext, state1);
       
View Full Code Here

TOP

Related Classes of javax.faces.convert.LongConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.