You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mariano Petrakovsky <mp...@tecnonexo.com> on 2005/06/07 15:37:39 UTC
[Shale] Validation Server-Side
If use the tag like this
<s:commonsValidator type="mask" mask="[0-9*#NPX]$" arg="To"
message="#{messages['lcrArsNplNode.nplNumberNotMatch']}"
server="true" client="true" />
I need implement the server side validation ? or this is inside de shale?
Thanxs
--
Mariano G. Petrakovsky
Programmer · Software Factory
AXG Tecnonexo - www.tecnonexo.com
Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.
Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · ·
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Shale] AbstractJsfTestCase - Eclipse
Posted by Craig McClanahan <cr...@gmail.com>.
On 6/9/05, Carlos Fernandez <ca...@digitalfocus.com> wrote:
> AbstractJsfTestCase, implements a public Test suite() method. Eclipse
> checks for this method when you tell it to run a class as a unit test. If
> this method it exists it will use the returned Test class to determine what
> tests to run. Since the Test returned only includes AbstractJsfTestCase -
> Eclipse chokes and throws:
>
> junit.framework.AssertionFailedError: No tests found in
> org.apache.shale.test.base.AbstractJsfTestCase
>
The intent wasn't that you run AbstractJsfTestCase itself as a test
case -- as it's name implies, it is an *abstract* base class. The
convenience it brings is automatically setting up the mock environment
suitable for testing something like a ViewController implementation.
The suite() method is primarily a reminder that you need to
reimplement the method in your concrete classes.
> Granted, I can just subclass suite() in my concrete test cases . . . but I
> am lazy and would rather not do this. Just wondering why the base test
> class implements this method, since most IDEs and ant can work just fine
> without it.
>
I don't always use an IDE -- it's nice to have the visual clue.
> Also, why does this class not include a no-arg constructor? Again, I am
> just lazy ;)
>
According to the TestCase JavaDocs, you're still supposed to call
setName() if you use the TestCase no-args constructor. It's easier to
avoid mistakes by letting the compiler catch the fact that you didn't
implement a constructor.
> BTW - the shale test classes make JSF much easier to test! That might be an
> understatement.
>
That is definitely the goal :-).
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[Shale] AbstractJsfTestCase - Eclipse
Posted by Carlos Fernandez <ca...@digitalfocus.com>.
AbstractJsfTestCase, implements a public Test suite() method. Eclipse
checks for this method when you tell it to run a class as a unit test. If
this method it exists it will use the returned Test class to determine what
tests to run. Since the Test returned only includes AbstractJsfTestCase -
Eclipse chokes and throws:
junit.framework.AssertionFailedError: No tests found in
org.apache.shale.test.base.AbstractJsfTestCase
Granted, I can just subclass suite() in my concrete test cases . . . but I
am lazy and would rather not do this. Just wondering why the base test
class implements this method, since most IDEs and ant can work just fine
without it.
Also, why does this class not include a no-arg constructor? Again, I am
just lazy ;)
BTW - the shale test classes make JSF much easier to test! That might be an
understatement.
So
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Shale] Validation Server-Side
Posted by Craig McClanahan <cr...@gmail.com>.
On 6/7/05, Mariano Petrakovsky <mp...@tecnonexo.com> wrote:
> If use the tag like this
>
> <s:commonsValidator type="mask" mask="[0-9*#NPX]$" arg="To"
> message="#{messages['lcrArsNplNode.nplNumberNotMatch']}"
> server="true" client="true" />
>
> I need implement the server side validation ? or this is inside de shale?
>
It is done for you (by JSF, actually ... from the JSF perspective this
is just another validator).
Craig
> Thanxs
>
> --
> Mariano G. Petrakovsky
> Programmer · Software Factory
> AXG Tecnonexo - www.tecnonexo.com
>
> Development facilities:Av. Maipú 1252 8º (C1006ACT) · Buenos Aires ·
> Argentina.
> Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.
>
> Headquarters: 1604 Spring Hill Road, Suite 160 Vienna · VA 22182 · USA.
> Tel.: (202) 986-7541 - Fax: (202) 787-3891.
>
>
> · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
> · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
> · · · ·
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org