Peter Hopfgartner | 1 May 2009 16:00
Favicon

Re: ezcTree visualization

Derick Rethans wrote:
> Hello Peter,
>
> On Fri, 17 Apr 2009, Peter Hopfgartner wrote:
>
>   
>> I'm using the ezcTree component for storing information about plant 
>> taxonomy in a database. Now, I would like to print out the tree. 
>> Unfortunatly, looking through the tutorial it seems to me that for 
>> text and GraphViz only IDs are shown, contrary to what happens with 
>> XHTML. Is this only a matter of setting the right option? Or, given 
>> that the visitors are quite small, should I adapt them to my needs?
>>     
>
> At the moment the visitors are quite small and simple. The idea is to 
> inherit from the visitors to provide your own data elements if needed. 
> I'd love however to add this data by default easily... so a patch/new 
> class would be quite useful here.
>
> regards,
>   
The changes would basically be that in accept() more data is collected, 
as is in the XHTML version, so that at least the ID and the data is 
accessible.
 Then the label could be composed of the id and/or the data. The format 
could eventually be specifyed by an option object passed to the 
constructor (as in the XHTML case).

Peter

(Continue reading)

Alan Catterson | 3 May 2009 16:31

ezcWorkflowNodeVariableSet vs. $execution->setVariable()?

Good Morning. ezcWorkflowNodeVariableSet vs. $execution->setVariable()? I'm trying to get my arms around when I'd use each. At first I thought that the ezcWorkflowNodeVariableSet is part of workflow definition whereas the $execution->setVariable() is available when workflow is executing ... but I can do either while a workflow is executing?
<div>
<div><span>Good Morning. ezcWorkflowNodeVariableSet vs. 
$execution-&gt;setVariable()? I'm trying to get my arms 
around when I'd use each. At first I thought that the 
ezcWorkflowNodeVariableSet is part of workflow definition 
whereas the $execution-&gt;setVariable() is available when 
workflow is executing ... but I can do either while a workflow 
is executing?</span></div>
</div>
Kore Nordmann | 4 May 2009 09:04
Picon
Favicon

Re: GRAPH - Use carriage returns in graph titles

Hello Raul,

On Thu, 2009-04-30 at 14:43 +0200, Raul Mateos wrote:
> Hi!
> 
> Does any one know how to include a carriage return in graph titles?

Explicit line breaks are not possible (yet) in graph. The text fitting
algorithm in the driver base class does not allow this.

Kind regards,
Kore

-- 
Mit freundlichen Grüßen / Med vennlig hilsen

Kore Nordmann (GPG: 0xDDC70BBB)
eZ Components Developer
eZ systems Headquarters

tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751
kn@... | eZ systems | ez.no
Hello Raul,

On Thu, 2009-04-30 at 14:43 +0200, Raul Mateos wrote:
> Hi!
> 
> Does any one know how to include a carriage return in graph titles?

Explicit line breaks are not possible (yet) in graph. The text fitting
algorithm in the driver base class does not allow this.

Kind regards,
Kore

--

-- 
Mit freundlichen Grüßen / Med vennlig hilsen

Kore Nordmann (GPG: 0xDDC70BBB)
eZ Components Developer
eZ systems Headquarters

tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751
kn@... | eZ systems | ez.no
Hilary Boyce | 4 May 2009 10:06
Picon

UserInput Component - how to define a checkbox

I'm using eZ components for the first time and am trying to get to
grips with the UserInput component.  I have read the tutorials and the
api fairly thoroughly.

I have a checkbox on my form which returns a short string if checked.
I have defined in in the $definitions as

'administrator' => new ezcInputFormDefinitionElement(
			         ezcInputFormDefinitionElement::OPTIONAL,'string')

When I then check if the form is valid, when the checkbox is not
checked, even if all the other fields validate OK, then it returns
false.  With the checkbox fieldname (administrator) in the
invalidProperties array.

According to the api, the OPTIONAL parameter should mean that the
field does not have to be in the form (which it isn't as unchecked
checkboxes do not get passed to the program in the globals).  It looks
to me as if this is documented incorrectly, that the field does in
fact have to be present in $_POST/$_GET. Which means that the
component cannot be used with checkboxes.

Am I correct in thinking that this component is not behaving as
documented?  Have I defined the ezcInputFormDefinititionElement
incorrectly or is there somewhere else where I'm going wrong?

Any help would be much appreciated, this problem is a show-stopper for
me with this component.

regards
Hilary

Sebastian Bergmann | 4 May 2009 11:20
Picon
Favicon

Re: ezcWorkflowNodeVariableSet vs. $execution->setVariable()?

Alan Catterson schrieb:
> ezcWorkflowNodeVariableSet vs. $execution->setVariable()

 - ezcWorkflowNodeVariableSet is part of workflow definition

 - $execution->setVariable() can be used by a Service Object that is
   attached to an Action node

-- 
Sebastian Bergmann
System Developer
sb@... | eZ Systems | http://ez.no

Alan Catterson schrieb:
> ezcWorkflowNodeVariableSet vs. $execution->setVariable()

 - ezcWorkflowNodeVariableSet is part of workflow definition

 - $execution->setVariable() can be used by a Service Object that is
   attached to an Action node

--

-- 
Sebastian Bergmann
System Developer
sb@... | eZ Systems | http://ez.no

Sebastian Bergmann | 4 May 2009 11:48
Picon
Favicon

Re: Struggling a bit w/ ezcWorkflow

Alan Catterson schrieb:
> Do I create them manually?

 Have a look at

   http://ezcomponents.org/docs/tutorials/WorkflowDatabaseTiein

-- 
Sebastian Bergmann
System Developer
sb@... | eZ Systems | http://ez.no

Alan Catterson schrieb:
> Do I create them manually?

 Have a look at

   http://ezcomponents.org/docs/tutorials/WorkflowDatabaseTiein

--

-- 
Sebastian Bergmann
System Developer
sb@... | eZ Systems | http://ez.no

Alexandru Stanoi | 4 May 2009 12:00
Picon
Favicon

Re: Webdav possible features: use webdav share as drive

Stefan Kilp [sk-software] wrote:
> Hi List,
> 
> while testing the webdav component i didnt get one (for me importent) problem solved:
> 
> the webdav share must allow me to operate like a normal drive. coping from and to the share 
> is no problem und work fine, but using it as a normal drive means the i can take a common 
> application like word, picasa, ... and load and save files directly from that share.
> 
> so the question now is: has some one managed to configure this properly? Open a Word 
> document directy from the share, modify it and save it again with out destroying the 
> document. Same for editing a picture with picasa.
> 
> if yes (and i hope so) what are the steps to get there. maybe it is only a problem of mounting 
> the share, or a windows patch, ...
> perhaps it would help to connect a drive letter (A: ...Z:) to the share, but i dont know how.
> i tried net use * <share> but i got "system error 67"

I tried to use different applications with WebDAV shares and for me it 
behaves like a normal drive (I can open files from it, edit and then 
save). I tried with Paint, IrfanView, Photoshop (but did not try yet 
with Word).

One thing which I noticed is that working with WebDAV shares in this way 
is very slow (5 times slower even). I think it is better to work on a 
local copy of the file, then upload it to WebDAV.

--

-- 
Alexandru Stanoi
System Developer
eZ Systems | http://ez.no
Alexandre, Lydia | 4 May 2009 20:01
Picon

Re: I can't see why this throws exception?

Hi,
 
1) put try catch to have the error
2) try this :
 

//$branch->addConditionalOutNode(new ezcWorkflowConditionIsTrue('choice'),$true);

$branch

->addConditionalOutNode ( new ezcWorkflowConditionVariable ( 'choice', new ezcWorkflowConditionIsTrue ( ) ), $true );

//$branch->addConditionalOutNode(new ezcWorkflowConditionIsFalse('choice'),$false);

$branch

->addConditionalOutNode ( new ezcWorkflowConditionVariable ( 'choice', new ezcWorkflowConditionIsFalse ( ) ), $false );
 
Lydia

Another newbie situation :-) I get an exception on resume(). It is noted in following code as a comment. The classes PrintTrue and PrintFalse exist, code also below. As expected, the workflow suspends ... waiting for input. But when provided the input via resume(), it throws exception ...

Understanding this will probably get me on the path to hvaing a clue :-) Any help greatly appreciated.

<?php

require_once

'lib/ezComponents/Base/src/base.php ';

require_once

'lib/ezComponents/Database/src/factory.php ';

require_once

'PrintTrue.php';

require_once

'PrintFalse.php';

function __autoload ( $className )

{

ezcBase :: autoload (

$className );

}

$dbparams = array(

'type' => 'mysql',

'dbname' => 'wflow',

'user' => 'root',

'pass' => 'password' );

$workflow

= new ezcWorkflow('Test');

$input

= new ezcWorkflowNodeInput(array ('choice' => new ezcWorkflowConditionIsBool));

$workflow

->startNode->addOutNode($input);

$true

= new ezcWorkflowNodeAction('PrintTrue');

$false

= new ezcWorkflowNodeAction('PrintFalse');

$branch

= new ezcWorkflowNodeExclusiveChoice();

$branch

->addConditionalOutNode(new ezcWorkflowConditionIsTrue('choice'),$true);

$branch

->addConditionalOutNode(new ezcWorkflowConditionIsFalse('choice'),$false);

$input

->addOutNode($branch);

$merge

= new ezcWorkflowNodeSimpleMerge();

$merge

->addInNode($true)->addInNode($false)->addOutNode($workflow->endNode);

$db

= ezcDbFactory::create($dbparams);

$definition

= new ezcWorkflowDatabaseDefinitionStorage($db);

$definition

->save($workflow);

$execute

= new ezcWorkflowDatabaseExecution($db);

$execute

->workflow = $workflow;

$executionId

= $execute->start();

$execute

= new ezcWorkflowDatabaseExecution($db, $executionId);

// Throws following exception at the resume() ...

ezcWorkflowExecutionException: Node activates less conditional outgoing nodes than required.

$execute

->resume(array('choice' =>true));

______________________________________

*** PrintTrue class

?>

class PrintTrue implements ezcWorkflowServiceObject

{

private $whatToSay;

public function __construct(){

$this->whatToSay = 'true';

}

public function execute(ezcWorkflowExecution $execute) {

echo $this->whatToSay;

return true;

}

public function __toString(){

return 'action description';

}

}

?>

**** PrintFalse class

<?php

class

PrintFalse implements ezcWorkflowServiceObject

{

private $whatToSay;

public function __construct(){

$this->whatToSay = 'false';

}

public function execute(ezcWorkflowExecution $execute) {

echo $this->whatToSay;

return true;

}

public function __toString(){

return 'action description';

}

}

?>

<div>
<div dir="ltr" align="left"><span class="250335817-04052009">Hi,</span></div>
<div dir="ltr" align="left">
<span class="250335817-04052009"></span>&nbsp;</div>
<div dir="ltr" align="left"><span class="250335817-04052009">1) put try catch to have the error</span></div>
<div dir="ltr" align="left"><span class="250335817-04052009">2) try this :</span></div>
<div dir="ltr" align="left">
<span class="250335817-04052009"></span>&nbsp;</div>
<div dir="ltr" align="left"><span class="250335817-04052009">
<p align="left">//$branch-&gt;addConditionalOutNode(new 
ezcWorkflowConditionIsTrue('choice'),$true);</p>
<p align="left">$branch</p>-&gt;addConditionalOutNode ( 
new 
ezcWorkflowConditionVariable ( 'choice', new 
ezcWorkflowConditionIsTrue ( ) ), $true );
<p align="left">//$branch-&gt;addConditionalOutNode(new 
ezcWorkflowConditionIsFalse('choice'),$false);</p>
<p align="left">$branch</p>-&gt;addConditionalOutNode ( 
new 
ezcWorkflowConditionVariable ( 'choice', new 
ezcWorkflowConditionIsFalse ( ) ), $false );</span></div>
<div>&nbsp;</div>
<div>
<span class="250335817-04052009"></span>L<span class="250335817-04052009">ydia</span><br>
</div>
<div dir="ltr" lang="fr" class="OutlookMessageHeader" align="left">
</div>
<div></div>
<div>
<p align="left">Another newbie situation :-) I get an 
exception on resume(). It is noted in following code as a&nbsp;comment. The 
classes PrintTrue and PrintFalse exist, code also below. As expected, the 
workflow suspends ... waiting for input. But when provided the input via 
resume(), it throws exception ... </p>
<p align="left">Understanding this will probably get me on the 
path to hvaing a clue :-) Any help greatly appreciated.</p>
<p align="left">&lt;?php</p>
<p align="left">require_once </p>'lib/ezComponents/Base/src/base.php ';
<p align="left">require_once </p>'lib/ezComponents/Database/src/factory.php 
';
<p align="left">require_once </p>'PrintTrue.php';
<p align="left">require_once </p>'PrintFalse.php';
<p align="left"></p>
<p align="left"></p>function __autoload ( $className )
<p align="left">{</p>
<p align="left">ezcBase :: autoload ( </p>$className );
<p align="left">}</p>
<p align="left"></p>
<p align="left"></p>$dbparams = array(
<p align="left"></p>'type' =&gt; 'mysql',
<p align="left"></p>'dbname' =&gt; 'wflow',
<p align="left"></p>'user' =&gt; 'root',
<p align="left"></p>'pass' =&gt; 'password' );
<p align="left"></p>
<p align="left">$workflow </p>= new ezcWorkflow('Test');
<p align="left">$input </p>= new ezcWorkflowNodeInput(array ('choice' =&gt; new 
ezcWorkflowConditionIsBool));
<p align="left">$workflow</p>-&gt;startNode-&gt;addOutNode($input);
<p align="left"></p>
<p align="left">$true </p>= new ezcWorkflowNodeAction('PrintTrue');
<p align="left">$false </p>= new ezcWorkflowNodeAction('PrintFalse');
<p align="left">$branch </p>= new ezcWorkflowNodeExclusiveChoice();
<p align="left">$branch</p>-&gt;addConditionalOutNode(new ezcWorkflowConditionIsTrue('choice'),$true);
<p align="left">$branch</p>-&gt;addConditionalOutNode(new ezcWorkflowConditionIsFalse('choice'),$false);
<p align="left">$input</p>-&gt;addOutNode($branch);
<p align="left"></p>
<p align="left">$merge </p>= new ezcWorkflowNodeSimpleMerge();
<p align="left">$merge</p>-&gt;addInNode($true)-&gt;addInNode($false)-&gt;addOutNode($workflow-&gt;endNode);
<p align="left"></p>
<p align="left">$db </p>= ezcDbFactory::create($dbparams);
<p align="left">$definition </p>= new ezcWorkflowDatabaseDefinitionStorage($db); 

<p align="left">$definition</p>-&gt;save($workflow); 
<p align="left"></p>
<p align="left">$execute </p>= new ezcWorkflowDatabaseExecution($db);
<p align="left">$execute</p>-&gt;workflow = $workflow;
<p align="left">$executionId </p>= $execute-&gt;start();
<p align="left"></p>
<p align="left">$execute </p>= new ezcWorkflowDatabaseExecution($db, $executionId);
<p align="left">// Throws following exception at the resume() ... 
</p>
<p>ezcWorkflowExecutionException: Node activates less conditional outgoing nodes 
than required.</p>
<p align="left">$execute</p>-&gt;resume(array('choice' 
=&gt;true));
<p align="left">______________________________________</p>
<p>*** PrintTrue class</p>
<p>?&gt;</p>
<p>class 
PrintTrue implements ezcWorkflowServiceObject</p>
<p align="left">{</p>
<p align="left"></p>private $whatToSay;
<p align="left"></p>
<p align="left"></p>public function __construct(){
<p align="left"></p>$this-&gt;whatToSay = 'true';
<p align="left">}</p>
<p align="left"></p>
<p align="left"></p>public function execute(ezcWorkflowExecution 
$execute) {
<p align="left"></p>echo 
$this-&gt;whatToSay;
<p align="left"></p>return true;
<p align="left">}</p>
<p align="left"></p>
<p align="left"></p>public function __toString(){
<p align="left"></p>return 'action description';
<p align="left">}</p>
<p align="left">}</p>
<p>?&gt;</p>
<p>**** PrintFalse class</p>
<p align="left">&lt;?php</p>
<p align="left">class </p>PrintFalse implements ezcWorkflowServiceObject
<p align="left">{</p>
<p align="left"></p>private $whatToSay;
<p align="left"></p>
<p align="left"></p>public function __construct(){
<p align="left"></p>$this-&gt;whatToSay = 'false';
<p align="left">}</p>
<p align="left"></p>
<p align="left"></p>public function execute(ezcWorkflowExecution 
$execute) {
<p align="left"></p>echo 
$this-&gt;whatToSay;
<p align="left"></p>return true;
<p align="left">}</p>
<p align="left"></p>
<p align="left"></p>public function __toString(){
<p align="left"></p>return 'action description';
<p align="left">}</p>
<p align="left">}</p>
<p>?&gt;</p>
</div>
</div>
Thomas, Maxime | 5 May 2009 11:11
Picon
Favicon

ezcPersistentObject

Hi everybody,

We have a little problem with the ezcPeristentObject on our project and we don't know where is the mistake. With an outside look, someone could help us.

We have made a script to look up in the database and generate a schema XML file. Then we use the persistent object database tie in to generate the classes and definitions. One of our table in the database contains a field of type datetime, and when we try to save an object with the persistent session, the datetime field is never saved : we have the following value in the database : "0000-00-00 00:00:00.0". So we have looked in the definition and in the class, and the datetime field is considered as an integer (it must be a string).

There's nothing on the documentation about this and I was wondering if we have made a mistake.

The database is MySQL 5.x and eZComponents 2008.2.2.


Regards,
Maxime THOMAS
IT Consultant - CMS OpenSource
Logica


Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen / Por favor ajude a Logica a respeitar o ambiente não imprimindo este correio electrónico. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
<div>

<p>Hi everybody,<br><br>
We have a little problem with the ezcPeristentObject on our project and we don't know where is the mistake. With an outside look, someone could help us.<br><br>
We have made a script to look up in the database and generate a schema XML file. Then we use the persistent object database tie in to generate the classes and definitions. One of our table in the database contains a field of type datetime, and when we try to save an object with the persistent session, the datetime field is never saved : we have the following value in the database : "0000-00-00 00:00:00.0". So we have looked in the definition and in the class, and the datetime field is considered as an integer (it must be a string).<br><br>
There's nothing on the documentation about this and I was wondering if we have made a mistake.<br><br>
The database is MySQL 5.x and eZComponents 2008.2.2.<br><br><br>
Regards,<br>
Maxime THOMAS<br>
IT Consultant - CMS OpenSource<br>
Logica<br>
</p>

<br clear="all"> Please help Logica to respect the environment by not printing this email  / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail /  Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei die Umwelt zu schuetzen  /  Por favor ajude a Logica a respeitar o ambiente n&atilde;o imprimindo este correio electr&oacute;nico.



This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

</div>
Tobias Schlitt | 5 May 2009 11:23
Picon
Favicon

Re: ezcPersistentObject

Hi Thomas,

On 05/05/2009 11:11 AM Thomas, Maxime wrote:

> We have made a script to look up in the database and generate a
> schema XML file. Then we use the persistent object database tie in to
> generate the classes and definitions. One of our table in the
> database contains a field of type datetime, and when we try to save
> an object with the persistent session, the datetime field is never
> saved : we have the following value in the database : "0000-00-00
> 00:00:00.0". So we have looked in the definition and in the class,
> and the datetime field is considered as an integer (it must be a
> string).

database specific time formats are not supported by the database
abstraction components in eZ Components, since they are not portable.
Some databases use different formats and some even do not support
special time fields at all.#

Therefore you should use integer fields to store date/time information.

Regards,
Toby
-- 
Mit freundlichen Grüßen / Med vennlig hilsen / With kind regards

Tobias Schlitt (GPG: 0xC462BC14) eZ Components Developer

ts <at> ez.no | eZ Systems AS | ez.no
--

-- 
Components mailing list
Components <at> lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Gmane