rwfphp-developers Mailing List for PHP Reusable Web Framework (rwfPHP)
Status: Beta
Brought to you by:
kaibab
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(9) |
Oct
(1) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Alexander <ale...@ar...> - 2005-04-14 16:48:22
|
confirm 769705 |
|
From: Renaun E. <re...@mu...> - 2004-11-05 22:06:31
|
Check out the website for the download of rmfphp. Renaun |
|
From: Renaun E. <re...@mu...> - 2004-10-15 06:22:33
|
The CVS is updated with some FrameworkController changes that implement the Post-Redirect-Get module (PRG). In doing this you can also call the FrameworkController class with a Get URL. It only requires 3 parameters, with one being optional for sessions. http://localhost/index.rwf.php?rwfEventObject=index_r_wcTest&rwfEventType=Click&rwfSesMan=rwfPage87b2b328685c123464feb74a357991c9&rwfTime=e924f281550307b20d8a78fc9203de63 rwfEventObject and rwfEventType are the main parameters that send all the events. rwfSesMan is set by FrameworkController and all you have to do is add RWF_GET_REPLACE_KEY into your custom URL and it will replace rwfSesMan, rwfTime and rwfCurrentModule with FrameworkController values. NOTE: rwfTime is there to get the URL salt so that the browser things its a different call and makes the back button in teh browser work better Ok its late so I probably wont explain this well. But if you use the new Get URL it will not save the state of input fields, but this is the normal web experience so most ppl dont care. I defaulted the Label with Click event to use the new Get URL method and not do the normal rwfphp rwfEventSubmission js call to send a Post. But in the future I'll make it so you can set the Controls if you want to use the Get URL method (stateless) or use the rwfEventSubmission js method. Of course the Button control will not have this option and will always send the Post method. This gets us closer to making rwfphp less dependent on JS for the plumbing, there are still a few html controls that need JS to get them to mimic Application like functionality. Of course if you didn't want to use that functionality rwfphp's JS dependency becomes much less. We have also created some Code Helper classes that hopefully we can make available some time soon. Renaun |
|
From: Renaun E. <re...@mu...> - 2004-09-21 16:03:28
|
I dont have Zend but i know it would speed up things. My goal with this project again was not to be the faster as hardware is cheaper then developer man-hour costs. So there is overhead with all these controls but with hardware being cheap you could compensate for pretty easily. And when you are outputing 12 columns with 1000 rows per page there are other issues, like bandwidth and html that might be a bigger concern. I have run TurkMMCache and Zend's accelator which make a big difference but I would like to get my hands on the whole Zend package some time. Ok, I'll make the changes to the FrameworkController today or tomorrow and get it to you. I am not sure what you are talking about with the Image control. When you mention "regions" are you talking about image map cordinates? Well give me more details on your thinking of that. Renaun Berend Dekens wrote: > Ok that would be awesome :) Plus its possible to extend like the Image > control and use the regions in a same way - without using normal links > but with the new feedback mechanism :) > And indeed, normal grids will give a lot over overhead. Take for > example this system I'm testing. It has 12 columns and up to 1000 rows > per page. If each cell had to be clickable and thus needed another > control you would create 12.000 dynamic controls for this which > offcourse is a huge slowdown. > > Btw, have you tried compiling the code to Zend to test if it speeds up > the big, heavy applications? > > Berend Dekens > > Renaun Erickson wrote: > >> I know about your concerns of the lots of controls and overhead. You >> have to remember the goal of rwfphp wasn't to make the fastest >> framework (not saying its slow). I do want to do some more >> benchmarking, there is a quick hack include in the rwfphp tools >> folder but you still have insert lots of benchmark code into your >> existing code to use it. >> >> The overhead of lots of controls is mainly memory, and data grids are >> prime suspects to create specific control that uses less general >> purpose controls. But in terms of the DataList I wanted something >> easy to use and be able to reuse existing controls. So saying that, >> I would also like a lightweight control like the approach you are >> taking. It can't be done with the FrameworkController as is. But >> with a general modification to the FrameworkController to handle >> cases of dynamic content in controls we can get it to work. >> >> With that said, lets talk about your specific approach. >> >> "is there a way to tell the control *WHAT* has been clicked?" this is >> normally passed as the $sender object. I am assuming that its the >> your modified DataList control that comes back as the clicked >> control, but you want to know what row/cell was clicked. >> >> But a general purpose way to do this is brewing in my mind. My >> thinking is this. As you dynamically create the rwfName (ie: >> index_r_wcFirstControl_r_wcNewDataList), you add references to the >> name with another sperator. So the outputted rwfName (what ends up >> in html id and/or name), would look like >> index_r_wcFirstControl_r_wcNewDataList_args_param1_args_param2 >> >> This new separator would be called defined as FrameworkController >> attribute and could be changed to your liking just like how you can >> change "_r_". >> >> Making it with general parameters you could code your dynamic >> linkable parts with numbers or names or however you want. Also you >> could pass simple ID's through this method, I would not pass a whole >> string of values though. But with knowing what was clicked you could >> create an array in the modified DataList that held all kinds of >> information that would be needed once the item was clicked. Which >> becomes close to just having the items be dynamically created >> controls. But there are still many cases a lightweight listing >> control would be nice. >> >> Then the FrameworkController would read up to the first _args_ >> normally which would keep the events working. Then it would read in >> the _args_ parameters and put them in an array and pass them as the >> args to the Event. Where the $sender would equal the reference to >> the wcNewDataList and the 2nd argument of the Event method would be >> an array of the arguments. I am thinking making the array indexed by >> numbers no associated array stuff. >> >> Thats a quick idea, and would work. It would save some overhead on >> big lists which is always good to pursue. >> Let me know if you what you think. I could code up the >> FrameworkController changes pretty easy. >> >> Renaun > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > rwfphp-developers mailing list > rwf...@li... > https://lists.sourceforge.net/lists/listinfo/rwfphp-developers |
|
From: Berend D. <cyb...@sp...> - 2004-09-21 13:04:28
|
Ok that would be awesome :) Plus its possible to extend like the Image control and use the regions in a same way - without using normal links but with the new feedback mechanism :) And indeed, normal grids will give a lot over overhead. Take for example this system I'm testing. It has 12 columns and up to 1000 rows per page. If each cell had to be clickable and thus needed another control you would create 12.000 dynamic controls for this which offcourse is a huge slowdown. Btw, have you tried compiling the code to Zend to test if it speeds up the big, heavy applications? Berend Dekens Renaun Erickson wrote: > I know about your concerns of the lots of controls and overhead. You > have to remember the goal of rwfphp wasn't to make the fastest > framework (not saying its slow). I do want to do some more > benchmarking, there is a quick hack include in the rwfphp tools folder > but you still have insert lots of benchmark code into your existing > code to use it. > > The overhead of lots of controls is mainly memory, and data grids are > prime suspects to create specific control that uses less general > purpose controls. But in terms of the DataList I wanted something > easy to use and be able to reuse existing controls. So saying that, I > would also like a lightweight control like the approach you are > taking. It can't be done with the FrameworkController as is. But > with a general modification to the FrameworkController to handle cases > of dynamic content in controls we can get it to work. > > With that said, lets talk about your specific approach. > > "is there a way to tell the control *WHAT* has been clicked?" this is > normally passed as the $sender object. I am assuming that its the > your modified DataList control that comes back as the clicked control, > but you want to know what row/cell was clicked. > > But a general purpose way to do this is brewing in my mind. My > thinking is this. As you dynamically create the rwfName (ie: > index_r_wcFirstControl_r_wcNewDataList), you add references to the > name with another sperator. So the outputted rwfName (what ends up in > html id and/or name), would look like > index_r_wcFirstControl_r_wcNewDataList_args_param1_args_param2 > > This new separator would be called defined as FrameworkController > attribute and could be changed to your liking just like how you can > change "_r_". > > Making it with general parameters you could code your dynamic linkable > parts with numbers or names or however you want. Also you could pass > simple ID's through this method, I would not pass a whole string of > values though. But with knowing what was clicked you could create an > array in the modified DataList that held all kinds of information that > would be needed once the item was clicked. Which becomes close to > just having the items be dynamically created controls. But there are > still many cases a lightweight listing control would be nice. > > Then the FrameworkController would read up to the first _args_ > normally which would keep the events working. Then it would read in > the _args_ parameters and put them in an array and pass them as the > args to the Event. Where the $sender would equal the reference to the > wcNewDataList and the 2nd argument of the Event method would be an > array of the arguments. I am thinking making the array indexed by > numbers no associated array stuff. > > Thats a quick idea, and would work. It would save some overhead on > big lists which is always good to pursue. > Let me know if you what you think. I could code up the > FrameworkController changes pretty easy. > > Renaun |
|
From: Renaun E. <re...@rw...> - 2004-09-21 04:47:17
|
I know about your concerns of the lots of controls and overhead. You
have to remember the goal of rwfphp wasn't to make the fastest framework
(not saying its slow). I do want to do some more benchmarking, there is
a quick hack include in the rwfphp tools folder but you still have
insert lots of benchmark code into your existing code to use it.
The overhead of lots of controls is mainly memory, and data grids are
prime suspects to create specific control that uses less general purpose
controls. But in terms of the DataList I wanted something easy to use
and be able to reuse existing controls. So saying that, I would also
like a lightweight control like the approach you are taking. It can't
be done with the FrameworkController as is. But with a general
modification to the FrameworkController to handle cases of dynamic
content in controls we can get it to work.
With that said, lets talk about your specific approach.
"is there a way to tell the control *WHAT* has been clicked?" this is
normally passed as the $sender object. I am assuming that its the your
modified DataList control that comes back as the clicked control, but
you want to know what row/cell was clicked.
But a general purpose way to do this is brewing in my mind. My thinking
is this. As you dynamically create the rwfName (ie:
index_r_wcFirstControl_r_wcNewDataList), you add references to the name
with another sperator. So the outputted rwfName (what ends up in html
id and/or name), would look like
index_r_wcFirstControl_r_wcNewDataList_args_param1_args_param2
This new separator would be called defined as FrameworkController
attribute and could be changed to your liking just like how you can
change "_r_".
Making it with general parameters you could code your dynamic linkable
parts with numbers or names or however you want. Also you could pass
simple ID's through this method, I would not pass a whole string of
values though. But with knowing what was clicked you could create an
array in the modified DataList that held all kinds of information that
would be needed once the item was clicked. Which becomes close to just
having the items be dynamically created controls. But there are still
many cases a lightweight listing control would be nice.
Then the FrameworkController would read up to the first _args_ normally
which would keep the events working. Then it would read in the _args_
parameters and put them in an array and pass them as the args to the
Event. Where the $sender would equal the reference to the wcNewDataList
and the 2nd argument of the Event method would be an array of the
arguments. I am thinking making the array indexed by numbers no
associated array stuff.
Thats a quick idea, and would work. It would save some overhead on big
lists which is always good to pursue.
Let me know if you what you think. I could code up the
FrameworkController changes pretty easy.
Renaun
Berend Dekens wrote:
> K, after looking at the datagrid i decided its not what I wanted and
> to get it to do that would require loads of code, loads of controls
> and thus loads of overhead... So I've started writing my own list
> control that displays about the same stuff as the datagrid but this
> one is a lot simpler (and thus faster, i hope). Now every cell is made
> clickable and I can get it to fire the event. Question: is there a way
> to tell the control *WHAT* has been clicked? Its all the same code
> over and over so it all originates from the control itself. Now I need
> a way to determine what row has been clicked.
> The whole point was to make one control that can do stuff like that
> without embedding more controls (yes i might regret that approach but
> right now I have no intentions for it to contain other controls).
>
> One solution might be to use some sort of javascript function to
> change a variable ( setVar('row_id','12') or summit like that) and
> control it that way... However I don't know if something like that
> exists and if not how to reach back to the framework from the html to
> tell it stuff like that.
>
> Berend Dekens
>
> "Who is finally getting the hang of this :)"
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> rwfphp-developers mailing list
> rwf...@li...
> https://lists.sourceforge.net/lists/listinfo/rwfphp-developers
|
|
From: Berend D. <cyb...@sp...> - 2004-09-21 00:30:12
|
K, after looking at the datagrid i decided its not what I wanted and to
get it to do that would require loads of code, loads of controls and
thus loads of overhead... So I've started writing my own list control
that displays about the same stuff as the datagrid but this one is a lot
simpler (and thus faster, i hope). Now every cell is made clickable and
I can get it to fire the event. Question: is there a way to tell the
control *WHAT* has been clicked? Its all the same code over and over so
it all originates from the control itself. Now I need a way to determine
what row has been clicked.
The whole point was to make one control that can do stuff like that
without embedding more controls (yes i might regret that approach but
right now I have no intentions for it to contain other controls).
One solution might be to use some sort of javascript function to change
a variable ( setVar('row_id','12') or summit like that) and control it
that way... However I don't know if something like that exists and if
not how to reach back to the framework from the html to tell it stuff
like that.
Berend Dekens
"Who is finally getting the hang of this :)"
|
|
From: Renaun E. <re...@mu...> - 2004-09-15 21:47:29
|
Your MultiContainer is a very valid way of doing things. There is nothing wrong with it. For the DataGrid, yes to you question about using it. If you look at the CRM example (on the rwfphp website) the DataGrid lists dynamically created linkable items. This is one of the controls I wanted to write an article on but there are some ways to use it I haven't gotten around to it. But I'll give some sample code to show how to start using it. Take a look of the code snippets below, if they get you confused I'll have to write something more formal up: url to code snippet - http://www.rwfphp.org/phpBB2/viewtopic.php?p=34#34 Renaun Berend Dekens wrote: > Ok, the MultiContainer works fine now. I don't see any problem with > the way its done now - it seems its a legitimate way of overloading > objects. > > Anyway, I've build a listing control that shows a selection from the > database. Now I wanted to make the list clickable. I mean you can > select one of the entries which then shows it details and the option > to edit and remove stuff. > > The problem is that I generate this list dynamically so I can't just > add buttons as the list size may change, plus I generate the code for > the table myself. Now I found that DataGrid control you were working > on. Is that one capable of generating clickable content or do i need > to design my own control for summit like that? I looked at the code > but I couldn't find any evidence to see if it supports events. > > Berend Dekens > > P.S. Once I got this stuff completely working I'll help out with some > articles and examples for using code. Should help other users getting > started as well :-) > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > rwfphp-developers mailing list > rwf...@li... > https://lists.sourceforge.net/lists/listinfo/rwfphp-developers |
|
From: Berend D. <cyb...@sp...> - 2004-09-15 21:21:41
|
Ok, the MultiContainer works fine now. I don't see any problem with the way its done now - it seems its a legitimate way of overloading objects. Anyway, I've build a listing control that shows a selection from the database. Now I wanted to make the list clickable. I mean you can select one of the entries which then shows it details and the option to edit and remove stuff. The problem is that I generate this list dynamically so I can't just add buttons as the list size may change, plus I generate the code for the table myself. Now I found that DataGrid control you were working on. Is that one capable of generating clickable content or do i need to design my own control for summit like that? I looked at the code but I couldn't find any evidence to see if it supports events. Berend Dekens P.S. Once I got this stuff completely working I'll help out with some articles and examples for using code. Should help other users getting started as well :-) |
|
From: Renaun E. <re...@rw...> - 2004-09-13 21:52:22
|
I am glad this code worked somewhat, the overloading of $controls must
have been the source of some of the problems.
For the button name problem with the Listing control. Add this line
"$this->{$control->Name} = &$control;" in the MultiContainer class file.
[code] in the MultiContainer.rwf.php class file
function addControl($control) {
$this->{$control->Name} = &$control;
$this->AddControls( array($control->Name => &$control));
// Sanity check: when we add the 1st control its automagically
activated...
if ($this->select == '') $this->setVisible($control->Name);
}
[/code]
That seems to make it work. I have some code that i used to test it if
you want to see it, let me know. I think i understand what you are
trying to do now. Its a nice approach, although I am not sure what
$this->{$control->Name} = &$control; will do in terms of references and
it pointing to another object's attribute. PHP is funny and you can do
crazy things like this just not sure what it will cause later, but worth
trying. This idea leads to some interesting ideas for some controls.
The issue is that the $control is created as an attribute to some other
control then MultiContainer. When the MultiContainer class goes through
its Controls attribute it finds that the added $control's are not an
attribute of MultiContainer. Thus I added the line to force an
attribute in the scope of MultiContainer. Rwfphp is very touchy on the
relationships between Controls and their parent controls. All the links
have to be correct so one control can find its parent control. Well I
am probably not making sense of this but I tried to explain it. I'll
have to write more up on it another day.
Other approaches to this problem are using the "SetTemplateMapping"
function in the TemplateControl class.
In you class that would create your "welkom" and "klantlisting"
controls, create the two controls like normal. Then set the mapping
like this:
$this->SetTemplateMapping( array('currentControl','klantlisting') );
or
$this->SetTemplateMapping( array('currentControl','welkom') );
Then in the the Smarty template just use "currentControl" instead of
"welkom" or "klantlisting".
Your approache lends it self to more specific abstraction and reuse for
future implementations. The approach above is a quick and dirty
approach i guess. But its good to bring this up as it points out
another function in the rwfphp classes. Need ppl to write some articles
that point out functionality that rwfphp has. The articles I have
written just don't do it justice.
Renaun
Berend Dekens wrote:
> Hi Renaun,
>
> I understand what you mean with the directory variable but thats not
> what I'm trying to do. I got a page with 2 menu controls and one main
> control that shows a listing or an entry detail (its a kind of
> database frontend). So I want one control variable to display one
> control but which control is not fixed. (I could add the desired
> control by using one name for every type but that can be confusing
> while programming).
>
> I'm now using this version which i modified to use the Controls array
> from the Control class. Allthough it seems to work (I can select a
> control to view) it still messes up the button name...
>
> class MultiContainer extends WebControl {
> /*
> Radical change: lets store the controls by name instead by
> index. Nobody cares as you'll allways use the name anyway :)
> */
> var $select; // This is the name of the selected control
> function MultiContainer() {
> WebControl::WebControl();
> $this->select = '';
> }
>
> function addControl($control) {
> $this->AddControls( array($control->Name => &$control));
>
> // Sanity check: when we add the 1st control its automagically
> activated...
> if ($this->select == '') $this->setVisible($control->Name);
> }
>
> /*
> Make a control active
> Note: when we get an invalid name we simply ignore it
> */
> function setVisible(/* Control name */ $name) {
> // $this->Controls is from the Control class
> if(isset($this->Controls[$name])) {
> // We know the selection is valid, now select it
> $this->select = $name;
> } else {
> $this->rwfERROR("MultiContainer error: could not select
> '{$name}' as active control as it does not exists",__FILE__,__LINE__);
> }
> }
>
> function GetTemplate($smarty) {
> if($this->select == '') {
> $this->rwfERROR("MultiContainer error: empty
> container",__FILE__,__LINE__);
> return "[Empty container]";
> }
> if (!isset($this->Controls[$this->select])) {
> $this->rwfERROR("MultiContainer error: could not find
> '{$this->name}'",__FILE__,__LINE__);
> return "[MultiContainer error: Object not found!]";
> }
> return $this->Controls[$this->select]->GetTemplate($smarty);
> }
> }
>
> When I run it i get a few errors that disappear when I use the menu to
> switch controls...
>
> [rwfphp error: Control does not exist. [Control: welkom] (File:
> Control.class.php Line: 164)]
> [rwfphp error: Control does not exist. [Control: klantlisting] (File:
> Control.class.php Line: 164)]
>
> Berend
|
|
From: Renaun E. <re...@rw...> - 2004-09-13 17:14:58
|
Nice to hear from you, Berend Dekens wrote: > Hi, > > I finally got back to my projects and I think I know what is going > wrong... I tried to build a control that contains multiple other > controls but only displays one at a time. This way I can design a skin > with only one variable in the Smarty template that switches controls > depending on what the user is doing. (Perhaps this can be done in > another way but I thought the easiest way was to simply switch between > controls). > I usually create a variable that is a folder value. Then if i want different skin i just change the varible the different folder would have the different skins. Something like: ($folderName = 'skin1';) templates/skin1 templates/skin2 templates/skin3 etc... $this->TemplateFile = 'templates/'.$folderName.'/templateFile.rwf.tpl'; Each skin folder has the same templates with the same names that map into the Controls, but the html/Smarty code is different. Now for your code: For starters I would take a look at http://www.rwfphp.org/rwfdoc/rwfPHP/Control.html#var$Controls This inherited object contains some properties and methods we can use. I couldn't find the source of the problem right off the back, so I think if we make some changes we might see something different happen. My changes are below: > <?php > require_once(RWF_DIR.'rwf/Web/UI/WebControls/WebControl.class.php'); > class MultiContainer extends WebControl { > var $controls; var $controlsByNumber > var $select; > function MultiContainer() { > WebControl::WebControl(); > $this->controls = array(); > $this->select = 0; $this->controlsByNumber = array(); > } > function addControl(/* Control */ $control) { > $this->controls[count($this->controls)] = &$control; > } function addControl($control) { $this->AddControls($control->Name,&$control); $this->controlsByNumber[count($this->controlsByNumber)] = &$control; } > function setVisible(/* number */ $n) { > if (!is_numeric($n)) return $this->setVisibleByName($n); > if ($n >= 0 && $n <= count($this->controls) - 1) { > $this->select = $n; } > } function setVisible($n) { if(!is_numeric($n)) return $this->setVisibleByName($n); if($n >= 0 && $n <= count($this->controlsByNumber) - 1) { $this->select = $n; } } > function setVisibleByName($name) { > for ($i = 0; $i < count($this->controls); $i++) { > if ($this->controls[$i]->Name == $name) return > $this->setVisible($i); } > } function setVisibleByName($name) { // $this->Controls is from the Control class if(isset($this->Controls[$name])) return $this->Controls[$name]; else // Handle error here } > function GetTemplate($smarty) { > if (count($this->controls) == 0) return "[Empty container]"; > return > $this->controls[$this->select]->getTemplate($smarty); } > /*function ConstructName() { > if (count($this->controls) != 0) return > $this->controls[$this->select]->ConstructName(); }*/ > } > function GetTemplate($smarty) { if(count($this->controlsByNumber) == 0) return "[Empty container]"; return $this->controlsByNumber[$this->select]->GetTemplate($smarty); } > ?> > > Hope we can sort this out. > > Berend Dekens > aka Cyberwizzard > The problem might be with the use of $controls in the MultiContainer, its not good (an easy to do with php) to override the Properties of the rwfphp classes. Overriding methods is less problematic and some methods like GetTemplate are made to be overridden, but always be careful about doing it. Here is the code in one piece: <?php require_once(RWF_DIR.'rwf/Web/UI/WebControls/WebControl.class.php'); class MultiContainer extends WebControl { var $controlsByNumber; var $select; function MultiContainer() { WebControl::WebControl(); $this->controlsByNumber = array(); $this->select = 0; } function addControl($control) { $this->AddControls($control->Name,&$control); $this->controlsByNumber[count($this->controlsByNumber)] = &$control; } function setVisible($n) { if(!is_numeric($n)) return $this->setVisibleByName($n); if($n >= 0 && $n <= count($this->controlsByNumber) - 1) { $this->select = $n; } } function setVisibleByName($name) { // $this->Controls is from the Control class if(isset($this->Controls[$name])) return $this->Controls[$name]; else // Handle error here } function GetTemplate($smarty) { if(count($this->controlsByNumber) == 0) return "[Empty container]"; return $this->controlsByNumber[$this->select]->GetTemplate($smarty); } ?> ps - I would prefer that you would not swear while posting to the list. |
|
From: Berend D. <cyb...@sp...> - 2004-09-13 16:37:26
|
Hi,
I finally got back to my projects and I think I know what is going
wrong... I tried to build a control that contains multiple other
controls but only displays one at a time. This way I can design a skin
with only one variable in the Smarty template that switches controls
depending on what the user is doing. (Perhaps this can be done in
another way but I thought the easiest way was to simply switch between
controls).
Anyhow, this is the code which fucks it up (the controls inside this
container don't get their proper name - like we allready found out).
<?php
require_once(RWF_DIR.'rwf/Web/UI/WebControls/WebControl.class.php');
class MultiContainer extends WebControl {
var $controls;
var $select;
function MultiContainer() {
WebControl::WebControl();
$this->controls = array();
$this->select = 0;
}
function addControl(/* Control */ $control) {
$this->controls[count($this->controls)] = &$control;
}
function setVisible(/* number */ $n) {
if (!is_numeric($n)) return $this->setVisibleByName($n);
if ($n >= 0 && $n <= count($this->controls) - 1) {
$this->select = $n;
}
}
function setVisibleByName($name) {
for ($i = 0; $i < count($this->controls); $i++) {
if ($this->controls[$i]->Name == $name) return
$this->setVisible($i);
}
}
function GetTemplate($smarty) {
if (count($this->controls) == 0) return "[Empty container]";
return $this->controls[$this->select]->getTemplate($smarty);
}
/*function ConstructName() {
if (count($this->controls) != 0) return
$this->controls[$this->select]->ConstructName();
}*/
}
?>
Hope we can sort this out.
Berend Dekens
aka Cyberwizzard
|
|
From: Renaun E. <re...@rw...> - 2004-08-18 04:16:51
|
I have rwfphp up on the sourceforge cvs. Here is a link explaining how to use it. http://sourceforge.net/cvs/?group_id=102302 Renaun |
|
From: Renaun E. <re...@rw...> - 2004-08-11 05:21:10
|
Here is the Changelog:
Changes/Fixes/Enhancements:
1. rwfUtil.js - cleaned up some code, fixed keyDown function
2. DataList.class.php - fixed some code
3. Fixes to validation javascript and ValidateController
4. Fixes to work in PHP5
5. Added rwfAlertMessage
6. Fixes in ComboBox, Checkbox
7. Changes to Control->AddControls, fixed Parent reference problem,
allowed for automactic assigning of Name value
8. FrameworkController error output array.
9. Object.class.php has to new functions, to access the
FrameworkControllers rwfDEBUG and rwfERROR methods
Renaun
|
|
From: <ben...@id...> - 2004-05-25 08:08:31
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
|
From: Renaun E. <re...@rw...> - 2004-04-29 14:00:11
|
I have changed around the web page to hopefully help with navigation. And help with adding more stuff as the site gets bigger. http://www.rwfphp.org/ Anybody have any code examples that they would like to share? Renaun |
|
From: Renaun E. <re...@rw...> - 2004-04-23 19:48:31
|
rwfPHP 0.0.7 has been released:
Changes/Fixes/Enhancements:
1. FrameworkController - enhancements minor fixes, in regards to
popups.
2. rwfDate.js - cleaned up javascript code to make it smaller
3. XHTML changes throughout web controls
The rwfphp project is looking for examples or articles that might help
build the awareness of how to use or what rwfphp is. Thank you for all
your support.
Renaun
|
|
From: Renaun E. <re...@rw...> - 2004-03-10 06:39:56
|
This list is brand new and finally we have a few subscribers. I would love to hear what you think of rwfPHP or take questions about using rwfPHP. Have a nice day, Renaun |
|
From: Renaun E. <re...@ho...> - 2004-02-22 04:37:01
|
test 5 |
|
From: Renaun E. <re...@mu...> - 2004-02-22 04:29:32
|
test |
|
From: Renaun E. <re...@mu...> - 2004-02-22 04:26:29
|
testing the list |
|
From: Renaun E. <re...@ho...> - 2004-02-22 04:24:37
|
test the list |
|
From: Renaun E. <re...@mu...> - 2004-02-22 04:20:02
|
testing the list |
|
From: Renaun E. <re...@ho...> - 2004-02-22 04:17:49
|
Testing mailing list |