Re: [Components] New Component Proposal

2008-12-15 Thread Alexandru Stanoi
Kevin Waterson wrote:
 My proposal is for an ezcForm component.
 The ezcForm component would provide an interface to the creation
 of HTML form objects which may be rendered for use with templates.

Does it need to depend on the Template component?

 Each form element would be an object which whose properties would
 define how the form would be rendered.
 eg:
 
 ?php
   $form = new ezcForm;
 
   $form-setMethod('post');
 
   $form-setId('my_form_id');
 
   $form-setAction($url);
 
   $select = new ezcFormSelect;
   $select-options($array)
  -setLabel('My Select')
  -setId('my_select_id');
 
   $submit = new ezcFormSubmit;
   $submit-setValue('Click Me')
  -setScript('onclick=do_some_js');
 
   $form-render(array($select, $submit));
 ?

How about CSS for the form? Also it should support different renderers 
(HTML, templates, maybe smartphone forms?).

 Also proposed, is the ability to attach validators directly to
 to each object.
 
 ?php
   $txt = new ezcFormText;
   $text-setName=email)
-setId(email)
-setLabel('Enter Email')
-setRequired(true)
-setValidator(ezcFormValidateEmail);
 ?

How is state being kept? If the user enters a wrong email address it 
needs to appear in the textbox as it was when displaying the page again.

Also how would multi-page forms (wizards) be implemented?

 In this instance, ezcFormValidateEmail could be a call back to
 new ezcInputFormDefinitionElement(
   ezcInputFormDefinitionElement::REQUIRED, 'validate_email'
   )

Is it a good idea to depend on another component? (UserInput in this case).

 An ezcForm component will provide a comprehensive suite of
 easy to use form objects with an easy to use API. Forms will
 initially be defined insite a definition list, but other
 markup should not be hard to build in.
 
 Larson was working on something similar at some time in 
 experimental, but after a quick chat on IRC he described his
 as overly complex.
 
 Any thoughts, ideas, objections, abuse is welcome.
 
 Kind regards
 Kevin
 
 
 
   


-- 
Alexandru Stanoi
System Developer
eZ Systems | http://ez.no
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components


[Components] eZ Components 2008.2 Release Candidate released

2008-12-15 Thread Derick Rethans
Hello,

The eZ Components team just released a release candidate of the new 
2008.2 release. This release candidate resolves a couple of issues that 
where found during the testing and review process. The release candidate 
can be installed by running the following command:

pear upgrade ezc/ezcomponents

A full download of the release can be found on the download page.[1]

This Release Candidate be followed by the final release on January 5th, 
if no major issues are uncovered during our test cycle.

The full release announcement can be found online.[2]

[1] http://ezcomponents.org/download
[2] http://ezcomponents.org/resources/news/news-2008-12-15

with kind regards,
-- 
Derick Rethans
eZ components Product Manager
eZ systems | http://ez.no
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components


Re: [Components] New Component Proposal

2008-12-15 Thread Kevin Waterson
This one time, at band camp, Alexandru Stanoi a...@ez.no wrote:

 How about CSS for the form? Also it should support different renderers 
 (HTML, templates, maybe smartphone forms?).

These are all up for grabs, I expect there will be several possiblities
in choice of renderers.

 
 How is state being kept? If the user enters a wrong email address it 
 needs to appear in the textbox as it was when displaying the page again.
Traditionally state is maintained by sessions or cookies. I am open to
any further suggestions here.


Also how would multi-page forms (wizards) be implemented?
Once again, this would be a matter of maintaining state across 
several pages.


 Is it a good idea to depend on another component? (UserInput in this case).
I was thinking on this, and the options seem to be to 'repurpose' UserInput
or to re-invent it again in ezcForm


Tnanks for the quick feedback, I know I have a long road ahead and 
much to learn.

Kind regards
Kevin
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components


[Components] [MvcTools] Sending HTTP status codes

2008-12-15 Thread Hans Melis
Hello list,

I'm rewriting my application to use the new MvcTools component (ezc
2008.2rc1) and the conversion went pretty flawless. I also discovered
the createFatalRedirectRequest() method in the documentation and decided
to give it a go.

The redirecting (well, actually forwarding) works fine, but I can't
figure out how I can send HTTP status codes as part of the response.

Example: Someone types an URL for which no route exists. The request is
passed on to the fatal handler and I would like to add a 404 to the
response instead of the 200 (because 200 says everything's OK).

Is there some way to accomplish this?


Regards,
Hans
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components