studs-user Mailing List for Studs MVC Framework+ (Page 6)
Status: Beta
Brought to you by:
mojavelinux
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(13) |
May
(1) |
Jun
(12) |
Jul
(36) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(5) |
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(13) |
Apr
(1) |
May
(28) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(14) |
Dec
(8) |
| 2007 |
Jan
(2) |
Feb
(9) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Dan A. <dan...@gm...> - 2005-07-18 04:56:56
|
The errors that you are getting are the exact errors that occured before 0.9.6 using PHP5. Somehow, I don't think you are actually using the source code from 0.9.6. You should not get the T_INSTANCEOF error in that codebase as that issue was addressed. Please try to follow the documentation closely from the quickstart and report the errors you are getting. If there is a problem in the codebase, we will hunt it down and fix it. /dan On 7/17/05, jow master <jow...@ya...> wrote: > Hi Dan... wazzup ? >=20 > Yes... i had try 0.9.6 version... yesterday.... > without sucess... >=20 > i dont know whats happen here.... its terrible... > hahah >=20 > it never works... >=20 > i =B4ve test with PHPTriad... XAMPP... WAMP... nothing > get it works... >=20 > ahhhhhhhhhhhhhhhhhhhhhhhhhhhhh >=20 > thanks for all... > bye >=20 > --- Dan Allen <dan...@gm...> escreveu: >=20 > > Have you tried version 0.9.6? Likely you are > > experiencing the PHP5 > > compatibility issues that were present prior to that > > version. I > > should also be releasing 0.9.7 sometime tomorrow, so > > if you want to > > hang on to try that version, I can almost ensure you > > that it will work > > out. > > > > Hang in there, Studs is on the verge of hitting a > > nice solid state. > > > > /dan > > > > > Since 0.9.4 version... i had tryng without > > sucess... > > > > > > I so excite to try it... but i dont know whats > > going > > > on that doesnt works here... > > > > > > My configuration is : > > > > > > OS =3D WinXP > > > > > > Server Versions =3D PhpTriad | Apache 1.3.4 | php > > 4.0.3 > > > and > > > Server Version =3D Xampp | Apache 2.0.54 | PHP 5.0.4 > > > > > > I never saw Studs in action... always that i try > > run > > > the application... show some error msgs in > > index.php > > > like : > > > in XAMPP > > > Parse error: parse error in > > > > > > D:\xampplite\htdocs\golflog\WEB-INF\lib\phase\compiler\PhaseParser.php > > > on line 232 > > > > > > or > > > > > > in PHPTRIAD > > > Parse error: syntax error, unexpected > > T_INSTANCEOF, > > > expecting T_STRING in > > > > > > D:\apache\htdocs\golflog\WEB-INF\lib\horizon\lang\Object.php > > > on line 96 > > > > > > > > > so... can anyone tell me whats happening ? just > > anyone > > > get this erros too ? > > > > > > Plz.. helpme... i am i php lover... that get > > > programming with j2ee/struts... and i realy wanna > > try > > > struts funcionalities in php.... > > > > > > Thanks... > > > bye > > > fred > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux > > Migration Strategies > > from IBM. Find simple to follow Roadmaps, > > straightforward articles, > > informative Webcasts and more! Get everything you > > need to get up to > > speed, fast. > > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > > _______________________________________________ > > studs-user mailing list > > stu...@li... > > > https://lists.sourceforge.net/lists/listinfo/studs-user > > >=20 >=20 > __________________________________________________ > Converse com seus amigos em tempo real com o Yahoo! Messenger > http://br.download.yahoo.com/messenger/ >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclic= k > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: jow m. <jow...@ya...> - 2005-07-17 18:57:31
|
Hi Dan... wazzup ? Yes... i had try 0.9.6 version... yesterday.... without sucess... i dont know whats happen here.... its terrible... hahah it never works... i ´ve test with PHPTriad... XAMPP... WAMP... nothing get it works... ahhhhhhhhhhhhhhhhhhhhhhhhhhhhh thanks for all... bye --- Dan Allen <dan...@gm...> escreveu: > Have you tried version 0.9.6? Likely you are > experiencing the PHP5 > compatibility issues that were present prior to that > version. I > should also be releasing 0.9.7 sometime tomorrow, so > if you want to > hang on to try that version, I can almost ensure you > that it will work > out. > > Hang in there, Studs is on the verge of hitting a > nice solid state. > > /dan > > > Since 0.9.4 version... i had tryng without > sucess... > > > > I so excite to try it... but i dont know whats > going > > on that doesnt works here... > > > > My configuration is : > > > > OS = WinXP > > > > Server Versions = PhpTriad | Apache 1.3.4 | php > 4.0.3 > > and > > Server Version = Xampp | Apache 2.0.54 | PHP 5.0.4 > > > > I never saw Studs in action... always that i try > run > > the application... show some error msgs in > index.php > > like : > > in XAMPP > > Parse error: parse error in > > > D:\xampplite\htdocs\golflog\WEB-INF\lib\phase\compiler\PhaseParser.php > > on line 232 > > > > or > > > > in PHPTRIAD > > Parse error: syntax error, unexpected > T_INSTANCEOF, > > expecting T_STRING in > > > D:\apache\htdocs\golflog\WEB-INF\lib\horizon\lang\Object.php > > on line 96 > > > > > > so... can anyone tell me whats happening ? just > anyone > > get this erros too ? > > > > Plz.. helpme... i am i php lover... that get > > programming with j2ee/struts... and i realy wanna > try > > struts funcionalities in php.... > > > > Thanks... > > bye > > fred > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > from IBM. Find simple to follow Roadmaps, > straightforward articles, > informative Webcasts and more! Get everything you > need to get up to > speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user > __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
|
From: Dan A. <dan...@gm...> - 2005-07-17 08:04:18
|
Have you tried version 0.9.6? Likely you are experiencing the PHP5 compatibility issues that were present prior to that version. I should also be releasing 0.9.7 sometime tomorrow, so if you want to hang on to try that version, I can almost ensure you that it will work out. Hang in there, Studs is on the verge of hitting a nice solid state. /dan > Since 0.9.4 version... i had tryng without sucess... >=20 > I so excite to try it... but i dont know whats going > on that doesnt works here... >=20 > My configuration is : >=20 > OS =3D WinXP >=20 > Server Versions =3D PhpTriad | Apache 1.3.4 | php 4.0.3 > and > Server Version =3D Xampp | Apache 2.0.54 | PHP 5.0.4 >=20 > I never saw Studs in action... always that i try run > the application... show some error msgs in index.php > like : > in XAMPP > Parse error: parse error in > D:\xampplite\htdocs\golflog\WEB-INF\lib\phase\compiler\PhaseParser.php > on line 232 >=20 > or >=20 > in PHPTRIAD > Parse error: syntax error, unexpected T_INSTANCEOF, > expecting T_STRING in > D:\apache\htdocs\golflog\WEB-INF\lib\horizon\lang\Object.php > on line 96 >=20 >=20 > so... can anyone tell me whats happening ? just anyone > get this erros too ? >=20 > Plz.. helpme... i am i php lover... that get > programming with j2ee/struts... and i realy wanna try > struts funcionalities in php.... >=20 > Thanks... > bye > fred |
|
From: jow m. <jow...@ya...> - 2005-07-17 04:11:35
|
Hi everyone ! wazz up ? i had tryng to setup up studs, test some examples, start coding... but i cant get do it works here... anyway... Since 0.9.4 version... i had tryng without sucess... I so excite to try it... but i dont know whats going on that doesnt works here... My configuration is : OS = WinXP Server Versions = PhpTriad | Apache 1.3.4 | php 4.0.3 and Server Version = Xampp | Apache 2.0.54 | PHP 5.0.4 I never saw Studs in action... always that i try run the application... show some error msgs in index.php like : in XAMPP Parse error: parse error in D:\xampplite\htdocs\golflog\WEB-INF\lib\phase\compiler\PhaseParser.php on line 232 or in PHPTRIAD Parse error: syntax error, unexpected T_INSTANCEOF, expecting T_STRING in D:\apache\htdocs\golflog\WEB-INF\lib\horizon\lang\Object.php on line 96 so... can anyone tell me whats happening ? just anyone get this erros too ? Plz.. helpme... i am i php lover... that get programming with j2ee/struts... and i realy wanna try struts funcionalities in php.... Thanks... bye fred _______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ |
|
From: Dan A. <dan...@gm...> - 2005-07-13 18:00:01
|
Folks, I have put some time into updating the studs wiki to include a lot of the core information. Hopefully you will find it resourceful for getting started with Studs. If there any important information that you feel is missing, please reply to this mailinglist and let us know. http://studs.sourceforge.net/wiki/ Enjoy! /dan --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-10 04:54:58
|
Details on how to implement form processing and using the html taglibs is now on the studs wiki. http://studs.sourceforge.net/wiki/ On 7/3/05, Adriano Bonat <adr...@gm...> wrote: > Thank you very much :) >=20 > I just put attribute 'scope' with value 'request' in the PSP page and > create a forward element inside the action element of > EditPlayerSubmit. >=20 > There is a documentation of Struts (so applies to Studs too), that > explains those attributes? >=20 > Another question is about security, there is already a case of 'glue' > with Studs? >=20 > Thanks again, > -Adriano >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-08 05:04:36
|
I think that this page should help you to understand the form processing workflow: http://studs.sourceforge.net/wiki/doku.php?id=3Dhowto:form_processing |
|
From: Dan A. <dan...@gm...> - 2005-07-06 03:16:57
|
Okay, I merged this in and then some. I am prototyping the ability to work with multiple values, which has not been a feature of Studs up to this point. It looks like it isn't going to be too much trouble. The checkbox will be in CVS shortly. /dan On 7/2/05, Greg Heartsfield <sc...@im...> wrote: > I've created a new tag for an HTML checkbox. The source is included > below. The only other change required is that you update WEB-INF/tld/ > studs-html.tld to include an extra tag entity: > <tag> > <name>checkbox</name> > <tag-class>studs.taglib.html.HtmlCheckboxTag</tag-class> > </tag> >=20 > I haven't tested it heavily, but it is currently working for my > project. This was a little bit trickier to get working than the > password tag, but not much so. >=20 > In case the text below gets mangled, the source is available at > http://scsibug.com/HtmlCheckboxTag.php.txt >=20 > Thanks, > Greg Heartsfield >=20 >=20 > <?php > /* $Id: HtmlCheckboxTag.php,v 1.2 2005/07/03 02:10:52 ghphoto Exp $ > * > * Copyright 2003-2005 Dan Allen, Mojavelinux.com > (dan...@mo...) > * > * This project was originally created by Dan Allen, but you are > permitted to > * use it, modify it and/or contribute to it. It has been largely > inspired by > * a handful of other open source projects and public specifications, > most > * notably Apache's Jakarta Project and Sun Microsystem's J2EE SDK. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, software > * distributed under the License is distributed on an "AS IS" BASIS, > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or > implied. > * See the License for the specific language governing permissions and > * limitations under the License. > */ >=20 > import('studs.taglib.html.BaseInputTag'); > import('studs.taglib.TagUtils'); >=20 >=20 > /** > * @package studs.taglib.html > * @author Greg Heartsfield > * @author Dan Allen > */ > class HtmlCheckboxTag extends BaseInputTag > { >=20 > function renderTag() > { > if (!is_null($this->value)) > { > $value =3D $this->value; > } > else > { > $value =3D htmlspecialchars(TagUtils::lookup($this- > >pageContext, c('StudsConstants::BEAN_KEY'), $this->property)); > } >=20 > // Set returned value for checked box depending on > existing nomenclature > $on_value =3D 1; > if ($value =3D=3D 'on' || $value =3D=3D 'off') > { > $on_value =3D 'on'; > } > else if ($value =3D=3D 'true' || $value =3D=3D 'false') > { > $on_value =3D 'true'; > } >=20 > if (is_null($this->styleId)) > { > $this->styleId =3D $this->property; > } >=20 > $xhtml =3D '<input type=3D"checkbox" name=3D"' . $this- > >property . '" value=3D"' . $on_value . '"'; >=20 > if ($value =3D=3D '1' || $value =3D=3D 'on') > { > $xhtml .=3D ' checked =3D "checked"'; > } >=20 > $xhtml .=3D $this->renderStyleAttributes(); > $xhtml .=3D $this->renderMetaAttributes(); > $xhtml .=3D ' />'; > return $xhtml; > } > } > ?> >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclic= k > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-06 00:37:39
|
I am going to add a wiki page for this cycle so that is clear to
everyone how it is supposed to work. I am also adding validation as
part of the golflog demo in order to demonstrate how it works. I
figure this will be the best way to document and explain it. Check
the wiki soon.
/dan
On 7/2/05, Adriano Bonat <adr...@gm...> wrote:
> Hello!
>=20
> I'm doing some tests in Golflog sample application, and could not
> implement a validation at the present moment.
>=20
> I looked golflog\WEB-INF\classes\golflog\form\PlayerActionForm.php and
> added the follow method:
>=20
> function validate(&$mapping, &$request)
> {
> $messages =3D& new ActionMessages();
> $message =3D& new ActionMessage('bonat.teste');
> $messages->add(c('ActionMessages::GLOBAL_MESSAGE'), $mess=
age);
> return $messages;
> }
>=20
> Yeah, this always produces an error in the validation process, is just
> for tests.
>=20
> The struts-config.xml part that is important for PlayerActionForm
> validation was modified to this:
> <action
> path=3D"/EditPlayerSubmit"
> type=3D"golflog.action.EditPlayerSubmitAction"
> name=3D"playerForm"
> scope=3D"request"
> validate=3D"true"
> input=3D"Player Editor"
> >
> <forward name=3D"next" path=3D"/ListPlayers.action" redirect=
=3D"true"/>
> </action>
>=20
> I think that value of the 'input' attribute is wrong, but this is the
> unique value that go back to the player editor form, but the
> ActionMessages are not printed.
>=20
> Best regards,
> -Adriano
>=20
>=20
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick
> _______________________________________________
> studs-user mailing list
> stu...@li...
> https://lists.sourceforge.net/lists/listinfo/studs-user
>=20
--=20
Open Source Advocacy
http://www.mojavelinux.com
|
|
From: Dan A. <dan...@gm...> - 2005-07-05 12:44:04
|
If you guys can hang tight, I am going to be populating the wiki with some information that I have in my head that will prove to be extremely useful for developing apps with Studs. While developing Studs, I took for granted my familiarity with the inner workings of Struts and just assumed that a lot of those details were common knowledge. Throughout the week I will jot things down as they come to me and it should bring you all up to speed. /dan --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-04 21:18:03
|
The actionform_generator.php is currently in CVS HEAD only. It will be part of studs 0.9.7, but you can access it in the meantime by downloading it out of the web repository: http://cvs.sourceforge.net/viewcvs.py/studs/studs/src/studs/resources/actio= nform_generator.php?rev=3D1.1&view=3Dlog /dan On 7/1/05, Greg Heartsfield <sc...@im...> wrote: > Dan, > Thanks for putting up the Wiki... I think that will become an > excellent resource. One question though, I'm looking at the > actionform_generator page, but I cannot find the php file it > references in the 0.9.6 release. Are you sure that it got included > in the public release? > Thanks, > Greg Heartsfield >=20 > On Jul 1, 2005, at 2:02 AM, Dan Allen wrote: >=20 > > Juanjo, > > > > Is perhaps this what you are looking for? > > > > http://studs.sourceforge.net/wiki/doku.php > > > > I have put together a wiki for the site and kicked it off by > > documenting the Phase Servlet Pages a bit, though still more needs to > > be done. I will try to continue to add documentation about how to > > develop with Studs. It is definitely all up in my head, but so far > > there isn't a tremendous amount written down. This wiki will change > > that. > > > > /dan > > > > On 6/28/05, Juan J. Mart=EDnez <re...@us...> wrote: > > > >> Hello list, > >> > >> Finally I'm trying studs. > >> > >> I have some experience with PHP programming and OOP and I'm trying to > >> get the MVC approach using this language. Studs is by now my choice. > >> > >> I've been kinda disappointed by the fact that there's no > >> documentation > >> about studs (almost nothing). The quick start document is a good > >> point > >> but.. I want (need) more. The API documentation is not useful for me > >> right know (at least all the times I've browsed it I've found > >> nothing :D). > >> > >> I'm reading code (mainly golflog) and, even I have no idea about > >> struts > >> and I've reading about the topic only two days, I think I'm getting > >> (half) of the whole picture. > >> > >> Right know I miss a tag reference. I've checked the tld files, but is > >> not enough information. I've tried to read the source classes, but I > >> don't feel that is not the way. The code shows me how to call some of > >> them, but I need to know the environment in order to code. > >> > >> There's out there studs docs I'm missing? Any pointer will be nice. > >> > >> Thanks you. > >> > >> regards, > >> > >> Juanjo > >> > >> -- > >> Desarrollo y sistemas: http://www.usebox.net/ > >> P=E1gina Personal: http://www.usebox.net/jjm/ > >> > >> > >> > >> > >> > >> ------------------------------------------------------- > >> SF.Net email is sponsored by: Discover Easy Linux Migration > >> Strategies > >> from IBM. Find simple to follow Roadmaps, straightforward articles, > >> informative Webcasts and more! Get everything you need to get up to > >> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > >> _______________________________________________ > >> studs-user mailing list > >> stu...@li... > >> https://lists.sourceforge.net/lists/listinfo/studs-user > >> > >> > > > > > > -- > > Open Source Advocacy > > http://www.mojavelinux.com > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > > _______________________________________________ > > studs-user mailing list > > stu...@li... > > https://lists.sourceforge.net/lists/listinfo/studs-user > > >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Adriano B. <adr...@gm...> - 2005-07-03 20:07:01
|
Thank you very much :) I just put attribute 'scope' with value 'request' in the PSP page and create a forward element inside the action element of EditPlayerSubmit. There is a documentation of Struts (so applies to Studs too), that explains those attributes? Another question is about security, there is already a case of 'glue' with Studs? Thanks again, -Adriano |
|
From: Timur V. <ti...@e-...> - 2005-07-03 14:06:55
|
Hello, studs-user-request.
Sunday, July 3, 2005, 7:37:50 AM, you wrote:
surlsn> Today's Topics:
surlsn> 1. How to implement validation? (Adriano Bonat)
surlsn> Hello!
surlsn> I'm doing some tests in Golflog sample application, and could not
surlsn> implement a validation at the present moment.
I use a following method:
Abstract class BaseActionForm
<?php
import('studs.action.ActionForm');
import('studs.action.ActionMessages');
import('studs.action.ActionMessage');
=20
class BaseActionForm extends ActionForm
{
var $id;
=20
function setId($value)
{
$this->id =3D $value;
}
=20
function getId()
{
return $this->id;
}
=20
function validate(&$mapping, &$request)
{
if ($this->isSubmited($mapping->name))
{
$errors =3D $this->isValid($mappingm, $requ=
est);
=20
if ($errors)
{
BeanUtils::populate($form, $_REQUES=
T);
=20
return $errors;
}
else
return null;
}
{
$this->firsFormCall($mapping, $request);
=20
return null;
}
}
=20
function isSubmited($frm_name =3D null, $method =3D 'POST')
{
return isset($_REQUEST[$frm_name]) && (is_null($met=
hod) || $_REQUEST[$frm_name] =3D=3D $method); =20
}
function &isValid(&$mapping, &$request)
{
$errors =3D& new ActionMessages();
=20
return $errors;
}
=20
function firsFormCall(&$mapping, &$request)
{
}
=20
function isItemExists($obj)
{
if (is_null($obj))
return false;
=20
return $obj->getId() !=3D $this->getId();
} =20
}
?>
And at the end class NewsForm (for example) I overload isValid method
class NewsForm extends BaseActionForm
{
...
function &isValid(&$mapping, &$request)
{
$errors =3D& parent::isValid($mapping, $request);
=20
if (!$this->getAnno())
$errors->add(c('ActionMessages::GLOBAL_MESS=
AGE'), new ActionMessage('news.errors.anno'));
=20
if (!$this->getText())
$errors->add(c('ActionMessages::GLOBAL_MESS=
AGE'), new ActionMessage('news.errors.text'));
=20
return $errors;
}
...
}
struts-config.xml changes:
<action
path =3D "/admin/news"
type =3D "app.admin.NewsAction"
name =3D "adminNewsForm"
scope =3D "request"
validate =3D "true"
input =3D "edit"
>
<forward name=3D"browse" path=3D"/WEB-INF/content/page/=
admin/news.browse.psp" />
<forward name=3D"edit" path=3D"/WEB-INF/content/page/ad=
min/news.edit.psp" />
<forward name=3D"next" path=3D"/admin/news.html" redire=
ct=3D"true" />
</action>
....
<message-resources parameter=3D"application" />
application.properties:
news.errors.date=3DDate error
news.errors.anno=3DAnno error
news.errors.text=3DText error
And at the psp page errors output:
<html:messages id=3D"message" scope=3D"request">
<div class=3D"error-block"><c:out value=3D"${message}" /></div>
</html:messages>
--
Send plain text only to timurv at e-kazan dot ru
PGP key: http://wwwkeys.us.pgp.net:11371/pks/lookup?op=3Dget&search=3D0x42=
5B9F0F
--
Timur Vafin
|
|
From: Greg H. <sc...@im...> - 2005-07-03 03:50:39
|
I've created a new tag for an HTML checkbox. The source is included
below. The only other change required is that you update WEB-INF/tld/
studs-html.tld to include an extra tag entity:
<tag>
<name>checkbox</name>
<tag-class>studs.taglib.html.HtmlCheckboxTag</tag-class>
</tag>
I haven't tested it heavily, but it is currently working for my
project. This was a little bit trickier to get working than the
password tag, but not much so.
In case the text below gets mangled, the source is available at
http://scsibug.com/HtmlCheckboxTag.php.txt
Thanks,
Greg Heartsfield
<?php
/* $Id: HtmlCheckboxTag.php,v 1.2 2005/07/03 02:10:52 ghphoto Exp $
*
* Copyright 2003-2005 Dan Allen, Mojavelinux.com
(dan...@mo...)
*
* This project was originally created by Dan Allen, but you are
permitted to
* use it, modify it and/or contribute to it. It has been largely
inspired by
* a handful of other open source projects and public specifications,
most
* notably Apache's Jakarta Project and Sun Microsystem's J2EE SDK.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import('studs.taglib.html.BaseInputTag');
import('studs.taglib.TagUtils');
/**
* @package studs.taglib.html
* @author Greg Heartsfield
* @author Dan Allen
*/
class HtmlCheckboxTag extends BaseInputTag
{
function renderTag()
{
if (!is_null($this->value))
{
$value = $this->value;
}
else
{
$value = htmlspecialchars(TagUtils::lookup($this-
>pageContext, c('StudsConstants::BEAN_KEY'), $this->property));
}
// Set returned value for checked box depending on
existing nomenclature
$on_value = 1;
if ($value == 'on' || $value == 'off')
{
$on_value = 'on';
}
else if ($value == 'true' || $value == 'false')
{
$on_value = 'true';
}
if (is_null($this->styleId))
{
$this->styleId = $this->property;
}
$xhtml = '<input type="checkbox" name="' . $this-
>property . '" value="' . $on_value . '"';
if ($value == '1' || $value == 'on')
{
$xhtml .= ' checked = "checked"';
}
$xhtml .= $this->renderStyleAttributes();
$xhtml .= $this->renderMetaAttributes();
$xhtml .= ' />';
return $xhtml;
}
}
?>
|
|
From: Adriano B. <adr...@gm...> - 2005-07-03 02:52:40
|
Hello!
I'm doing some tests in Golflog sample application, and could not
implement a validation at the present moment.
I looked golflog\WEB-INF\classes\golflog\form\PlayerActionForm.php and
added the follow method:
=09function validate(&$mapping, &$request)
=09{
$messages =3D& new ActionMessages();
=09=09$message =3D& new ActionMessage('bonat.teste');
=09=09$messages->add(c('ActionMessages::GLOBAL_MESSAGE'), $message);
=09=09return $messages;
=09}
Yeah, this always produces an error in the validation process, is just
for tests.
The struts-config.xml part that is important for PlayerActionForm
validation was modified to this:
=09=09<action
=09=09=09path=3D"/EditPlayerSubmit"
=09=09=09type=3D"golflog.action.EditPlayerSubmitAction"
=09=09=09name=3D"playerForm"
scope=3D"request"
validate=3D"true"
input=3D"Player Editor"
=09=09>
<forward name=3D"next" path=3D"/ListPlayers.action" redirect=3D=
"true"/>
=09=09</action>
I think that value of the 'input' attribute is wrong, but this is the
unique value that go back to the player editor form, but the
ActionMessages are not printed.
Best regards,
-Adriano
|
|
From: Greg H. <sc...@im...> - 2005-07-01 17:37:11
|
Dan, Thanks for putting up the Wiki... I think that will become an =20 excellent resource. One question though, I'm looking at the =20 actionform_generator page, but I cannot find the php file it =20 references in the 0.9.6 release. Are you sure that it got included =20 in the public release? Thanks, Greg Heartsfield On Jul 1, 2005, at 2:02 AM, Dan Allen wrote: > Juanjo, > > Is perhaps this what you are looking for? > > http://studs.sourceforge.net/wiki/doku.php > > I have put together a wiki for the site and kicked it off by > documenting the Phase Servlet Pages a bit, though still more needs to > be done. I will try to continue to add documentation about how to > develop with Studs. It is definitely all up in my head, but so far > there isn't a tremendous amount written down. This wiki will change > that. > > /dan > > On 6/28/05, Juan J. Mart=EDnez <re...@us...> wrote: > >> Hello list, >> >> Finally I'm trying studs. >> >> I have some experience with PHP programming and OOP and I'm trying to >> get the MVC approach using this language. Studs is by now my choice. >> >> I've been kinda disappointed by the fact that there's no =20 >> documentation >> about studs (almost nothing). The quick start document is a good =20 >> point >> but.. I want (need) more. The API documentation is not useful for me >> right know (at least all the times I've browsed it I've found >> nothing :D). >> >> I'm reading code (mainly golflog) and, even I have no idea about =20 >> struts >> and I've reading about the topic only two days, I think I'm getting >> (half) of the whole picture. >> >> Right know I miss a tag reference. I've checked the tld files, but is >> not enough information. I've tried to read the source classes, but I >> don't feel that is not the way. The code shows me how to call some of >> them, but I need to know the environment in order to code. >> >> There's out there studs docs I'm missing? Any pointer will be nice. >> >> Thanks you. >> >> regards, >> >> Juanjo >> >> -- >> Desarrollo y sistemas: http://www.usebox.net/ >> P=E1gina Personal: http://www.usebox.net/jjm/ >> >> >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: Discover Easy Linux Migration =20 >> Strategies >> from IBM. Find simple to follow Roadmaps, straightforward articles, >> informative Webcasts and more! Get everything you need to get up to >> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick >> _______________________________________________ >> studs-user mailing list >> stu...@li... >> https://lists.sourceforge.net/lists/listinfo/studs-user >> >> > > > --=20 > Open Source Advocacy > http://www.mojavelinux.com > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user > |
|
From: Dan A. <dan...@gm...> - 2005-07-01 16:50:05
|
I have added a page to the wiki that describes how to use the unit testing framework (perhaps a little known feature of Studs). The unit testing framework is very simple and doesn't require a lot of complex setup. The HOWTO should help you to get started writing those tests! /dan --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-07-01 15:45:01
|
I just added some enhancements to the phase taglib reference page that should prove helpful. Yes indeed, this is going to be great for everyone and should help to prove to people that Studs is a very complete and powerful platform. /dan > This documentation will help any studs newcomer. >=20 > Thanks you again. >=20 > regars, >=20 > Juanjo --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Juan J. <re...@us...> - 2005-07-01 07:30:47
|
El vie, 01-07-2005 a las 03:02 -0400, Dan Allen escribi=F3: > Juanjo, >=20 > Is perhaps this what you are looking for? >=20 > http://studs.sourceforge.net/wiki/doku.php Yeees! http://studs.sourceforge.net/wiki/doku.php?id=3Dreference:phase_core_tagl= ib Nice :D Thank you very much! >=20 > I have put together a wiki for the site and kicked it off by > documenting the Phase Servlet Pages a bit, though still more needs to > be done. I will try to continue to add documentation about how to > develop with Studs. It is definitely all up in my head, but so far > there isn't a tremendous amount written down. This wiki will change > that. This documentation will help any studs newcomer. Thanks you again. regars, Juanjo --=20 Desarrollo y sistemas: http://www.usebox.net/ P=E1gina Personal: http://www.usebox.net/jjm/ |
|
From: Dan A. <dan...@gm...> - 2005-07-01 07:02:59
|
Juanjo, Is perhaps this what you are looking for? http://studs.sourceforge.net/wiki/doku.php I have put together a wiki for the site and kicked it off by documenting the Phase Servlet Pages a bit, though still more needs to be done. I will try to continue to add documentation about how to develop with Studs. It is definitely all up in my head, but so far there isn't a tremendous amount written down. This wiki will change that. /dan On 6/28/05, Juan J. Mart=EDnez <re...@us...> wrote: > Hello list, >=20 > Finally I'm trying studs. >=20 > I have some experience with PHP programming and OOP and I'm trying to > get the MVC approach using this language. Studs is by now my choice. >=20 > I've been kinda disappointed by the fact that there's no documentation > about studs (almost nothing). The quick start document is a good point > but.. I want (need) more. The API documentation is not useful for me > right know (at least all the times I've browsed it I've found > nothing :D). >=20 > I'm reading code (mainly golflog) and, even I have no idea about struts > and I've reading about the topic only two days, I think I'm getting > (half) of the whole picture. >=20 > Right know I miss a tag reference. I've checked the tld files, but is > not enough information. I've tried to read the source classes, but I > don't feel that is not the way. The code shows me how to call some of > them, but I need to know the environment in order to code. >=20 > There's out there studs docs I'm missing? Any pointer will be nice. >=20 > Thanks you. >=20 > regards, >=20 > Juanjo >=20 > -- > Desarrollo y sistemas: http://www.usebox.net/ > P=E1gina Personal: http://www.usebox.net/jjm/ >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-06-29 04:07:01
|
Juanjo, You make some good points about the documentation...a lot of it is still in my head. I will try to throw together some starting points tomorrow, and I am also thinking of getting a wiki together for studs so that various people can add their thoughts. I will let you know when I have something to contribute. /dan On 6/28/05, Juan J. Mart=EDnez <re...@us...> wrote: > Hello list, >=20 > Finally I'm trying studs. >=20 > I have some experience with PHP programming and OOP and I'm trying to > get the MVC approach using this language. Studs is by now my choice. >=20 > I've been kinda disappointed by the fact that there's no documentation > about studs (almost nothing). The quick start document is a good point > but.. I want (need) more. The API documentation is not useful for me > right know (at least all the times I've browsed it I've found > nothing :D). >=20 > I'm reading code (mainly golflog) and, even I have no idea about struts > and I've reading about the topic only two days, I think I'm getting > (half) of the whole picture. >=20 > Right know I miss a tag reference. I've checked the tld files, but is > not enough information. I've tried to read the source classes, but I > don't feel that is not the way. The code shows me how to call some of > them, but I need to know the environment in order to code. >=20 > There's out there studs docs I'm missing? Any pointer will be nice. >=20 > Thanks you. >=20 > regards, >=20 > Juanjo >=20 > -- > Desarrollo y sistemas: http://www.usebox.net/ > P=E1gina Personal: http://www.usebox.net/jjm/ >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&opclick > _______________________________________________ > studs-user mailing list > stu...@li... > https://lists.sourceforge.net/lists/listinfo/studs-user >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Juan J. <re...@us...> - 2005-06-28 22:35:03
|
Hello list, Finally I'm trying studs. I have some experience with PHP programming and OOP and I'm trying to get the MVC approach using this language. Studs is by now my choice. I've been kinda disappointed by the fact that there's no documentation about studs (almost nothing). The quick start document is a good point but.. I want (need) more. The API documentation is not useful for me right know (at least all the times I've browsed it I've found nothing :D). I'm reading code (mainly golflog) and, even I have no idea about struts and I've reading about the topic only two days, I think I'm getting (half) of the whole picture. Right know I miss a tag reference. I've checked the tld files, but is not enough information. I've tried to read the source classes, but I don't feel that is not the way. The code shows me how to call some of them, but I need to know the environment in order to code. There's out there studs docs I'm missing? Any pointer will be nice. Thanks you. regards, Juanjo --=20 Desarrollo y sistemas: http://www.usebox.net/ P=E1gina Personal: http://www.usebox.net/jjm/ |
|
From: Dan A. <dan...@mo...> - 2005-06-27 15:03:24
|
Juanjo, I am excited that you are considering Studs in your evaluation for a PHP MVC framework. I trust that you will find that the design is one that has been proven in the Java community (as Struts) and will be closly aligned with the many resources on the web discussing the use of its Java-sibling. While developing Studs, I was very sensitive about performance. My belief is that the performance of Studs will prove to be better than most other frameworks based on the fact that it caches the configuration as a serialized object, rather than reinitializing on each page request, and therefore reducing a lot of the overhead common to PHP applications. PHP serialization is very efficient and offers a nice way to preserve context from one page request to the next. In designing PHP, I kept to the object-oriented principal of implementation hiding. What I mean is that inside each method I get right to the low level PHP function call, rather than relying on a bunch of nested abstractions. From the outside, this preserves a clean API while optimizing performance by taking advantage of PHP's built-in functions. (Example: I sort using PHP's sort functions rather than implementing my own). I have not kept a good record of projects using Studs, but I can tell you that there are a handful of people that have contacted me boasting success on their Studs-driven project. The one public example, of course, is the Golflog demo http://studs.sf.net/golflog/ Anyone on this list who has other testimonials, perhaps you will be willing to share them? /dan ju...@re... wrote: > Submitted by: Juanjo <ju...@bl...> on Monday, June 27th, 2005 @ 10:09:54 am (-0400) > > Online Form Fields > ------------------ > > Url: > http://blackshell.usebox.net/ > > Message: > Hello Dan, > > I'm evaluating several approaches to the MVC patterns with PHP and I'm > thinking about trying studs. > > Right know I have two doubts about your framework. > > First one is about performance, what's the overhead of your framework on > script execution? > > Second one is I haven't seen projects using your framework, so it's hard > to evaluate results prior to trying it. > > I think the fact is a 'port' of struct is interesting for me (I have > zero experience with JSP and structs), and the apparent KISS aspect of > studs make it attractive for me. > > I'd like to hear from you some points about why I (someone) should put > studs on production for a project. > > I know may be this mail is a bit vage (and my english really sucks, > excuse me!), but I hope you can help me. > > Regards, > > Juanjo > > Client Variables > ---------------- > > HTTP_USER_AGENT: > Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.6) Gecko/20050524 Firefox/1.0 (Ubuntu package 1.0.2 MFSA2005-44) > > |
|
From: Dan A. <dan...@gm...> - 2005-06-27 14:43:30
|
Greg, A lot of the points you are making about error handling in PHP are well founded. I actually went the opposite way from you, moving from PHP to Java. In doing so, found that error handling was much more explicit and well defined in Java. The error catching scenario I implemented in Studs acts somewhat like Runtime exceptions in Java.=20 However, because PHP has a very sloppy way of dealing with errors, it doesn't always work the way you would expect. What happens is that certain errors in PHP actually halt the program, rendering the handling of exceptions hopeless. Much of this is fixed in PHP5, thankfully, and as time goes on, Studs will start to take advantage of what PHP5 has to offer in this realm. I would very much like to get your feedback about Studs as you work on your project. What causes you trouble (you mentioned the error handling, so I am looking into making that easier)? What feels too laborous? What ideas do you have that could make it better? Any feedback you provide will be most helpful. You can take a look at the TODO file in the root of the source tree to get an idea of what I have planned for the future. One big advantage of PHP is the instant feedback...no build required.=20 Even when you do run into an error in a PSP page or an action class, you can jump to the line, fix it and hit the page again (or run the unit test). No need to kick off ant to rebuild the whole thing. I miss that every day that I develop java apps. Be sure to check out the unit testing framework that ships with Studs. It isn't the fanciest thing around, but it definitely works and will give you the comfort of TDD within PHP. Looking forward to hearing from you! /dan On 6/27/05, Greg Heartsfield <sc...@im...> wrote: > Excellent... I've just started a project with Studs, my first PHP > project of any kind. I have many years of java/struts experience, so > Studs seemed like a logical choice. I must say, after a week of much > frustration (mostly with PHP I think), I'm getting the hang of it and > making solid progress. I'm looking forward to trying out the new > release, and if I have any ideas for improvements, I'll send them > your way. My initial impressions lead me to think the area that > needs most improvement is error handling and reporting... I've spent > quite a bit of time hunting down bugs in my code that Tomcat/Struts > would have been more explicit about. Again, much of that may be > because I'm new to PHP. >=20 > I wouldn't have attempted to do what I'm doing now with any of the > other MVC PHP frameworks, so I certainly thank you for making finding > web hosting much easier (not to mention cheaper). >=20 > Thanks! > Greg Heartsfield >=20 >=20 > On Jun 27, 2005, at 1:08 AM, Dan Allen wrote: >=20 > > Alright folks, you asked for it. Studs MVC Framework+ is now PHP 5 > > compliant! It took a bit of hacking to work around all the new > > reserved keywords and requirements, but we got it done! > > Go grab it today, bend it, twist it and see if it works for you. > > > > Short list of new features: > > > > - php5 support > > - template tag library for Studs > > - bug fixes > > > > Enjoy! > > > > /dan > > > > -- > > Open Source Advocacy > > http://www.mojavelinux.com > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > > from IBM. Find simple to follow Roadmaps, straightforward articles, > > informative Webcasts and more! Get everything you need to get up to > > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > > _______________________________________________ > > studs-user mailing list > > stu...@li... > > https://lists.sourceforge.net/lists/listinfo/studs-user > > >=20 >=20 --=20 Open Source Advocacy http://www.mojavelinux.com |
|
From: Dan A. <dan...@gm...> - 2005-06-27 05:08:48
|
Alright folks, you asked for it. Studs MVC Framework+ is now PHP 5 compliant! It took a bit of hacking to work around all the new reserved keywords and requirements, but we got it done! Go grab it today, bend it, twist it and see if it works for you. Short list of new features: - php5 support - template tag library for Studs - bug fixes Enjoy! /dan --=20 Open Source Advocacy http://www.mojavelinux.com |