Re: Exception with T5 checkbox

2010-04-09 Thread jaques robert
I've already tried that but IE  FF when meeting checked= or 
checked=checked are considerating that the checkbox are checked :( ...

I'm using this html component because if I use the T5 component, I've got type 
coercion error (see my other posts inside this ML)

So the idea is to use a IF to display checked or not. However the test to use 
can be of that sort : 
t:if test=documentField.checked ?
/t:if

Regards,
Mondes.


--- En date de : Jeu 8.4.10, Thiago H. de Paula Figueiredo thiag...@gmail.com 
a écrit :

De: Thiago H. de Paula Figueiredo thiag...@gmail.com
Objet: Re: Exception with T5  checkbox
À: Tapestry users users@tapestry.apache.org
Date: Jeudi 8 avril 2010, 19h00

On Thu, 08 Apr 2010 13:42:28 -0300, jaques robert mondes_englou...@yahoo.fr 
wrote:

 input type=checkbox name=selectedDocumentFields 
 value=${documentField.documentFieldDN} ${documentField.checked}/

The ${documentField.checked} part is valid HTML but not valid XML, and Tapestry 
templates must be valid XML even when outputting HTML. If you really want not 
to use the Checkbox component, use checked=${checked} and add this method to 
your class:

public String getChecked() {
    return documentField.checked ? checked : ;
}



--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, Ars Machina Tecnologia da Informação 
Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




  

Re: Exception with T5 checkbox

2010-04-09 Thread jaques robert
Another question is how to traduce : 
input type=checkbox name=selectedDocumentFields 
value=${documentField.documentFieldDN} checked=checked/

to tapestry component ?

--- En date de : Ven 9.4.10, jaques robert mondes_englou...@yahoo.fr a écrit :

De: jaques robert mondes_englou...@yahoo.fr
Objet: Re: Exception with T5  checkbox
À: Tapestry users users@tapestry.apache.org
Date: Vendredi 9 avril 2010, 9h34

I've already tried that but IE  FF when meeting checked= or 
checked=checked are considerating that the checkbox are checked :( ...

I'm using this html component because if I use the T5 component, I've got type 
coercion error (see my other posts inside this ML)

So the idea is to use a IF to display checked or not. However the test to use 
can be of that sort : 
t:if test=documentField.checked ?
/t:if

Regards,
Mondes.


--- En date de : Jeu 8.4.10, Thiago H. de Paula Figueiredo thiag...@gmail.com 
a écrit :

De: Thiago H. de Paula Figueiredo thiag...@gmail.com
Objet: Re: Exception with T5  checkbox
À: Tapestry users users@tapestry.apache.org
Date: Jeudi 8 avril 2010, 19h00

On Thu, 08 Apr 2010 13:42:28 -0300, jaques robert mondes_englou...@yahoo.fr 
wrote:

 input type=checkbox name=selectedDocumentFields 
 value=${documentField.documentFieldDN} ${documentField.checked}/

The ${documentField.checked} part is valid HTML but not valid XML, and Tapestry 
templates must be valid XML even when outputting HTML. If you really want not 
to use the Checkbox component, use checked=${checked} and add this method to 
your class:

public String getChecked() {
    return documentField.checked ? checked : ;
}



--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, Ars Machina Tecnologia da Informação 
Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




      


  

Re: Exception with T5 checkbox

2010-04-09 Thread Thiago H. de Paula Figueiredo
On Fri, 09 Apr 2010 04:34:45 -0300, jaques robert  
mondes_englou...@yahoo.fr wrote:


I've already tried that but IE  FF when meeting checked= or  
checked=checked are considerating that the checkbox are checked :( ...


Please try again, but checked= means not checked as per the HTML  
standard.


I'm using this html component because if I use the T5 component, I've  
got type coercion error (see my other posts inside this ML)


Please post the exception here again.

So the idea is to use a IF to display checked or not. However the test  
to use can be of that sort :

t:if test=documentField.checked ?
/t:if


Yes.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Exception with T5 checkbox

2010-04-09 Thread Thiago H. de Paula Figueiredo
On Fri, 09 Apr 2010 04:57:13 -0300, jaques robert  
mondes_englou...@yahoo.fr wrote:



Another question is how to traduce :
input type=checkbox name=selectedDocumentFields  
value=${documentField.documentFieldDN} checked=checked/


input type=checkbox t:type=checkbox  
value=documentField.documentFieldDN/


documentField.documentFieldDN should be a boolean property

If documentField.documentFieldDN is true, the checkbox will be rendered  
checked.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Exception with T5 checkbox

2010-04-08 Thread jaques robert
Hi,

I'm using the following html code inside my tml file :

input type=checkbox name=selectedDocumentFields 
value=${documentField.documentFieldDN} ${documentField.checked}/


And got the following exception :

Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 
$ (code 34) (expected a name start character)
 at [row,col {unknown-source}]: [37,120]
    at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:612)
    at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1720)
    at 
com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2959)
    at 
com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2910)
    at 
com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2786)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:443)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:407)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.processBody(StaxTemplateParser.java:449)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.possibleTapestryComponent(StaxTemplateParser.java:736)
    at 
org.apache.tapestry5.internal.services.StaxTemplateParser.element(StaxTemplateParser.java:428)


Do you know how to resolve that ?

Regards,
Mondes.



  

Re: Exception with T5 checkbox

2010-04-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Apr 2010 13:42:28 -0300, jaques robert  
mondes_englou...@yahoo.fr wrote:



Hi,


Hi!


I'm using the following html code inside my tml file :
input type=checkbox name=selectedDocumentFields  
value=${documentField.documentFieldDN} ${documentField.checked}/


Why aren't you using the Checkbox component? Are the lines above the ones  
in row 37?


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Exception with T5 checkbox

2010-04-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Apr 2010 13:42:28 -0300, jaques robert  
mondes_englou...@yahoo.fr wrote:


input type=checkbox name=selectedDocumentFields  
value=${documentField.documentFieldDN} ${documentField.checked}/


The ${documentField.checked} part is valid HTML but not valid XML, and  
Tapestry templates must be valid XML even when outputting HTML. If you  
really want not to use the Checkbox component, use checked=${checked}  
and add this method to your class:


public String getChecked() {
return documentField.checked ? checked : ;
}

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org