<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
         xmlns:err="http://jelix.org/ns/xmlerror/1.0">
 <channel>

    <title><![CDATA[Jelix : Forums]]></title>
    <link>https://jelix.org</link>
    <description>Framework PHP</description>

    
    <language>en</language>
    

    
    <pubDate>Thu, 06 Mar 2014 14:46:09 +0000</pubDate>    <lastBuildDate>Thu, 06 Mar 2014 14:46:09 +0000</lastBuildDate>    <generator>Jelix php framework http://jelix.org</generator>    <copyright>Jelix : Forums</copyright>                        <ttl>60</ttl>                
      <item>
        <title><![CDATA[Adding multiple fields dinamically to a jForm ]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10736-9299-adding-multiple-fields-dinamically-to-a-jform</link>
        <description><![CDATA[<p>Hi, I'm a bit new with the framework and I have a following problem:</p>

<p>I'm making an interface with jForms with various input fields...
and for one of the fields I would like to add a possibility for the user to add or remove a field
example.</p>

<pre>
Input fields Group------------------------------|

Input field ID: &lt;---INPUT FIELD---&gt; 
                   &quot;Add another&quot;     

------------------------------------------------|
</pre>

<p>and after you click add another you would have</p>

<pre>

Input fields Group------------------------------|

Input field ID  : &lt;---INPUT FIELD---&gt;  

Input field ID+1: &lt;---INPUT FIELD---&gt; 
                    &quot;Add another&quot; 

------------------------------------------------|
</pre>

<p>rest of the form</p>

<p>etc. </p>

<p>What do you think is the best strategy to make this, I already tried with jquery ajax putting
the htmlfragment into a form but didn't work because form is initialized before and it can't see the added field.</p>

<p>thank you for your answer.</p>
]]></description>
        <pubDate>Thu, 06 Mar 2014 14:46:09 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10736-9299-adding-multiple-fields-dinamically-to-a-jform</guid>
        <author>fluid </author>                                    </item>
      <item>
        <title><![CDATA[Error handling]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5876-5876-error-handling</link>
        <description><![CDATA[<p>newbie question:</p>

<p>I am developing an application with jelix but I would like mode information about some errors in my code. I set (in defaultconfig.ini.php):</p>

<pre>
 use_error_handler = on
 ...
 [error_handling]
 messageLogFormat = &quot;%date%\t[%code%]\t%msg%\t%file%\t%line%\n&quot;
 logFile = error.log
 email = root@localhost
 ...
 default      = TRACE EXIT
 error        = TRACE EXIT
 ...
</pre>

<p>But nothing special happens; only the usual &quot;Fatal error: Call to a member ...&quot;
appears.</p>]]></description>
        <pubDate>Thu, 12 Nov 2009 18:12:00 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5876-5876-error-handling</guid>
        <author>aeiaco </author>                                    </item>
      <item>
        <title><![CDATA[<eq property="" value="" /> doesn't seem to work?]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7286-7286-eq-property-value-doesn-t-seem-to-work</link>
        <description><![CDATA[<p>Hello, here I am with yet another message <img src="/hfnu/images/smileys/famfamfam/emoticon_grin.png" alt="grin" /></p>

<p>This:</p>
<pre>
&lt;method name=&quot;findAllStartedStates&quot; type=&quot;select&quot;&gt;
&lt;code&gt;
	&lt;condition&gt;
		&lt;eq property=&quot;state&quot; value=&quot;started&quot; /&gt;
	&lt;/condition&gt;
	&lt;order&gt;
		&lt;orderitem property=&quot;name&quot; way=&quot;asc&quot; /&gt;
	&lt;/order&gt;
</pre>
&lt;/method&gt;
&lt;/code&gt;

<p>returns:</p>

<pre>
array (
&lt;code&gt;
  0 =&gt; 
  cDaoRecord_module_Jx_game_Jx_mysql::__set_state(array(
     'id' =&gt; '2',
     'name' =&gt; 'Game 2',
     'state' =&gt; 'created',
  )),
  1 =&gt; 
  cDaoRecord_module_Jx_game_Jx_mysql::__set_state(array(
     'id' =&gt; '1',
     'name' =&gt; 'Game 1',
     'state' =&gt; 'started',
  )),
</pre>
<p>)</p>
&lt;/code&gt;

<p>in Jelix 1.1.7.</p>

<p>The database field is a:</p>
<pre>set('created','started','stopped')</pre>

<p>The game with id 2 should not be returned, I think. Is this a bug?</p>

<p>Note: The order appears off because I took out some sensitive info.</p>]]></description>
        <pubDate>Thu, 04 Nov 2010 16:47:01 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7286-7286-eq-property-value-doesn-t-seem-to-work</guid>
        <author>Kirk </author>                                    </item>
      <item>
        <title><![CDATA[How to release a module]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7258-7258-how-to-release-a-module</link>
        <description><![CDATA[<p>I was wondering, what should I think about (coding wise) if I were to release a custom module to the public? I'm guessing events, an installer...?</p>]]></description>
        <pubDate>Mon, 01 Nov 2010 15:28:08 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7258-7258-how-to-release-a-module</guid>
        <author>Kirk </author>                                    </item>
      <item>
        <title><![CDATA[How to pass javascript variables to a zone ?]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11048-9391-how-to-pass-javascript-variables-to-a-zone</link>
        <description><![CDATA[<p>When the page loads :</p>
<pre>
class defaultCtrl extends jController {
    /**
    *
    */
    function index()
    {
    	jClasses::inc(&quot;commun~toolsSrv&quot;) ;
    	
        $oResp = $this-&gt;getResponse('html');
        
        $oResp-&gt;bodyTpl = &quot;utilisateurs~FoHome&quot; ;
        
        $zUrlGetZone	= jUrl::get(&quot;commun~default:getZone&quot;) ;
        
        // list of profiles
        $toProfils	= toolsSrv::getAllProfils() ;
        
        $oResp-&gt;body-&gt;assignZone('oZoneListe', 'utilisateurs~FoListeUtilisateurs', array()) ; // this will be for a dataTable-like zone
        
        $oResp-&gt;body-&gt;assign(&quot;zUrlGetZone&quot;, $zUrlGetZone) ;
        $oResp-&gt;body-&gt;assign(&quot;toProfils&quot;, $toProfils) ; // this will feed a listbox #selectProfil

        return $oResp;
    }
</pre>

<p>The template :</p>

<pre>
&lt;select name=&quot;selectProfil&quot; id=&quot;selectProfil&quot;&gt;
                  &lt;option value=&quot;0&quot;&gt;--- Tous ---&lt;/option&gt;
                  {foreach $toProfils as $oProfil}
                  &lt;option value=&quot;{$oProfil-&gt;id_profil}&quot;&gt;{$oProfil-&gt;lib_profil}&lt;/option&gt;
                  {/foreach}
                &lt;/select&gt;
&lt;br /&gt;
        &lt;div class=&quot;ajaxZone&quot;&gt;
        	{$oZoneListe}
        &lt;/div&gt;
</pre>

<p>Code of commun~default:getZone :</p>

<pre>
function getZone() {
        
		$oResp = $this-&gt;getResponse('text');

		$zZone = $this-&gt;param('zone');
		
		if (is_null($zZone)) {
			throw new Exception('Paramêtre zone requis');
		}
		$tParams = $GLOBALS['gJCoord']-&gt;request-&gt;params;
        
		$oResp-&gt;content = jZone::get($zZone, $tParams);

        return $oResp;
	}
</pre>

<p>When the #selectProfil listbox changes then I want to filter the results displayed on the zone oZoneListe :</p>

<pre>
{literal}
&lt;script type=&quot;text/javascript&quot;&gt;
	$(function()
	{
           $(&quot;#selectProfil&quot;).change(
			function()
			{
				var iProfilId	= $(this).val() ;
                
				var zSrc			= '{/literal}{$zUrlGetZone}{literal}' ;
				var zone			= 'utilisateurs~FoListeUtilisateurs' ;
				$(&quot;.ajaxZone&quot;).load(zSrc, {zone:zone, iProfilId:iProfilId}) ;
			}
		) ;
        }) ;
&lt;/script&gt;
</pre>

<p>So I want to filter the zone when the listbox changes. The problem is that I cannot get the parameter iProfilId inside the zone ! So how to pass this javascript variable to the zone ?</p>]]></description>
        <pubDate>Fri, 01 Apr 2016 10:48:44 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11048-9391-how-to-pass-javascript-variables-to-a-zone</guid>
        <author>pheromix </author>                                    </item>
      <item>
        <title><![CDATA[problem to create application by script]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5243-5243-problem-to-create-application-by-script</link>
        <description><![CDATA[<p>Hello Guys</p>

<p>I just begun to work with jelix, because i'd like to use it for a project. i installed it on my server, running with Ubuntu 8.x, Intel(R) Xeon(R) CPU etc. also on this server, i have running Plesk management tool for this server. now when i install existing applications, it is all right, the works as the have to <img src="/hfnu/images/smileys/famfamfam/emoticon_smile.png" alt="smile" />. but if i want to create a new application (with php jelix.php --appname createapp), i have lots of errors, always begun by mkdir(); error in the script &quot;command.class.php on line 117&quot;. its strange that there are some files and folders created in the destination folder, but most of them can't be created and gives an error. </p>

<p>example for one applitacion</p>

<blockquote><p>php jelix.php --omne5 createapp</p></blockquote>

<p>created files:</p>

<p>http://www.easywink.ch/jelix/createdfiles.txt</p>

<p>and the errors:</p>

<p>http://easywink.ch/jelix/errorlog.txt
i simplified the file a little bit, so it is easier to read it.</p>

<p>hopefully that someone knows an answer to my problem</p>

<p>Greez ben</p>]]></description>
        <pubDate>Tue, 26 May 2009 15:24:37 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5243-5243-problem-to-create-application-by-script</guid>
        <author>bene </author>                                    </item>
      <item>
        <title><![CDATA[Removing module name in the URL]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10924-9351-removing-module-name-in-the-url</link>
        <description><![CDATA[<p>Hi, there,
I am working on cleaning the URLs. I have removed &quot;index.php&quot; in the URL, now the URLs look like</p>

<p>http://www.example.com/aaa/bbb/ccc</p>

<p>aaa is a module. Since aaa is the only module in my jelix app, is it possible to make the URLs look like</p>

<p>http://www.example.com/bbb/ccc</p>


<p>Thanks,
Richard</p>]]></description>
        <pubDate>Thu, 12 Feb 2015 23:45:21 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10924-9351-removing-module-name-in-the-url</guid>
        <author>richard_sma </author>                                    </item>
      <item>
        <title><![CDATA[How to pass data to an included template ?]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11088-9419-how-to-pass-data-to-an-included-template</link>
        <description><![CDATA[<p>I created a template inside a module. Now I included this template inside many other templates :</p>

<pre>
...
{ include 'my_module~my_template' }
...
</pre>

<p>The problem is that the included template needs data from database because there are listboxs in it. So how can I populate the listbox of the included template ?</p>

<p>thank you</p>]]></description>
        <pubDate>Sat, 28 May 2016 09:51:50 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11088-9419-how-to-pass-data-to-an-included-template</guid>
        <author>pheromix </author>                                    </item>
      <item>
        <title><![CDATA[action selector - simple_urlengine_entrypoints]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/4592-4592-action-selector-simple_urlengine_entrypoints</link>
        <description><![CDATA[<p>Hi,</p>

<p>First of all, congratulation for Jelix. Great work.</p>

<p>I'm a little confused about defining an action for entrypoint at simple_urlengine_entrypoints. </p>

<p>How can I define an entry point only for one controller? I've listed all the methods of the controller explicitly. Like: news~admin:index@classic, news~admin:view@classic...</p>

<p>Shouldn't will be good a new wildcard in simple.urls.php::getScript ?</p>

<p>Thanks</p>]]></description>
        <pubDate>Fri, 27 Feb 2009 17:39:00 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/4592-4592-action-selector-simple_urlengine_entrypoints</guid>
        <author>dsdenes </author>                                    </item>
      <item>
        <title><![CDATA[CRUD controller: how to redirect and how to use multiple columns PK]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5938-5938-crud-controller-how-to-redirect-and-how-to-use-multiple-columns-pk</link>
        <description><![CDATA[<p>I am dealing with the powerful CRUD controller. 
Now I faced two problems:</p>

<p>1) I was not capable of using the CRUD with a simple table build on a two columns primary key. I looked the sources, and it seems to me that the CRUD engine only use the first key. Is it intentional ? I solved introducing a single column PK, even if it is a DB redundant information.</p>

<p>2) I would like to redirect to other page from inside CRUD controller. For example: I want to check something in the create (precreate) action. If the conditions are not satisfied, I would redirect to and error page. Now, I tried in the _precreate method and in the _create one, without success.
Should I overload the CRUD methods instead ?</p>

<p>THX for the help.</p>]]></description>
        <pubDate>Fri, 27 Nov 2009 18:05:02 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5938-5938-crud-controller-how-to-redirect-and-how-to-use-multiple-columns-pk</guid>
        <author>aeiaco </author>                                    </item>
      <item>
        <title><![CDATA[An initial question]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/2423-2423-an-initial-question</link>
        <description><![CDATA[<p>Hello!</p>

<p>I'm looking for the framework to build my project on and as such have found Jelix to be interesting. But before I invest my time and resources I would like to have some questions answered to what is reasonably possible and able to use Jelix for in the aspect of what I'm aiming at.</p>

<p>What I'm aiming at is an <strong>web site and application for comic creators</strong> to have <strong>tools for creating digital multimedia comics</strong>, <strong>collaborate</strong> and <strong>present the outcome</strong> to visitors <strong>in various formats</strong> (ie more than just web pages). By preference I'd like to <strong>not be dependant on any external relational database manager application</strong>, but on <em>PHP5 native XML and file handling</em>. I also prefer it have an one backend application with <strong>file storage formats</strong> (mainly <strong>XML</strong>) and <strong>_multiple output formats</strong> via <em>RESTful web services</em>. Multiple clients including static and AJAX enabled ones will then be able to communicate with it.</p>

<p>From what I understand so far most of this should be possible without too much additional code. The one area I'm a not sure about and which have made me step away from most other framework candidates is the XML file storage part and no database dependency at all. </p>

<p>So the most important question for me at this point is <strong>how well or closely supported XML file storage might be with Jelix?</strong> Or else if you are able to estimate <strong>if and how advanced a task it would be to implement?</strong>_</p>]]></description>
        <pubDate>Sun, 09 Mar 2008 14:54:37 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/2423-2423-an-initial-question</guid>
        <author>killerrabbit </author>                                    </item>
      <item>
        <title><![CDATA[Config of the urls.xml file]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11049-9392-config-of-the-urls-xml-file</link>
        <description><![CDATA[<p>There are 6 modules in my project. So I want to know if this config is correct for the urls.xml file :</p>
<pre>
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;urls xmlns=&quot;http://jelix.org/ns/urls/1.0&quot;&gt;
    &lt;entrypoint type=&quot;classic&quot; name=&quot;index&quot; default=&quot;true&quot;&gt;
        &lt;url pathinfo=&quot;/&quot; module=&quot;srcs&quot; action=&quot;default:index&quot;&gt;
        &lt;/url&gt;
    &lt;/entrypoint&gt;
&lt;/urls&gt;
</pre>]]></description>
        <pubDate>Wed, 06 Apr 2016 10:37:32 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/11049-9392-config-of-the-urls-xml-file</guid>
        <author>pheromix </author>                                    </item>
      <item>
        <title><![CDATA[Cmdline]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10658-9279-cmdline</link>
        <description><![CDATA[<p>Bonjour,</p>

<p>J'utilise cmdline pour la première fois. 
Sur Apache, il n'y a pas d'erreur mais quand je migre mon application sur le serveur web IIS, j'ai l'erreur ci-dessous :</p>

<pre>
D:\Apps\myProjet\www\cron&gt;php D:\Apps\myProjet\scripts\cron.php cron~cron:index
2013-11-08 15:02:12     127.0.0.1       [18]    Module inconnu dans le s├®lecteur &quot;cron~cron:index@cmdline&quot;     D:\GnApps\jelix\lib\jelix\core\selector\jSelectorActFast.class.php      50
        D:\GnApps\scanner\scripts\cron.php
array (   'module' =&gt; 'cron',   'action' =&gt; 'cron:index', )

        0       jSelectorActFast-&gt;_createPath() D:\GnApps\jelix\lib\jelix\core\selector\jSelectorActFast.class.php : 44
        1       jSelectorActFast-&gt;__construct() D:\GnApps\jelix\lib\jelix\core\jCoordinator.class.php : 163
        2       jCoordinator-&gt;process() D:\GnApps\jelix\lib\jelix\core\jCmdlineCoordinator.class.php : 55
        3       jCmdlineCoordinator-&gt;process()  D:\GnApps\scanner\scripts\cron.php : 22@@

</pre>

<p>Quelqu'un pourrait m'aider. Je devrai mettre en prod l'application mardi matin.</p>

<p>Merci beaucoup</p>

]]></description>
        <pubDate>Fri, 08 Nov 2013 15:10:40 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/10658-9279-cmdline</guid>
        <author>billben </author>                                    </item>
      <item>
        <title><![CDATA[Foreign tables]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7314-7314-foreign-tables</link>
        <description><![CDATA[<p>Is it possible to declare foreign tables that are joined on foreign keys in other foreign tables? So that one can move up two or more levels in one's hierarchy?</p>]]></description>
        <pubDate>Tue, 16 Nov 2010 10:18:38 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7314-7314-foreign-tables</guid>
        <author>Kirk </author>                                    </item>
      <item>
        <title><![CDATA[htmleditor tag unknown?]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7281-7281-htmleditor-tag-unknown</link>
        <description><![CDATA[<p>I'm getting an error message when I try to use &lt;htmleditor&gt; in jForms. It is error 801, it says the tag is not known. Do I need to do anything special to get it to work?</p>]]></description>
        <pubDate>Wed, 03 Nov 2010 13:41:17 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7281-7281-htmleditor-tag-unknown</guid>
        <author>Kirk </author>                                    </item>
      <item>
        <title><![CDATA[Jelix can't find jAuth module]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7253-7253-jelix-can-t-find-jauth-module</link>
        <description><![CDATA[<p>I enabled jAuth for my application and I'm getting:</p>

<pre>
[[exception 18]] Unknown module in the selector &quot;jauth~login:out@classic&quot; /&lt;snip&gt;/jelix/lib/jelix/core/selector/jSelectorAct.class.php 76
</pre>

<p>My module settings looks like:</p>

<pre>
modulesPath = &quot;app:modules/,lib:jelix-modules/&quot;

[[modules]]
jelix.access = 2
jauth.access = 2
jauthdb.access = 2
</pre>

<p>And my installer settings look like:</p>

<pre>
[[index]]
jelix.installed = 1
jelix.version = 1.2RC1
jelix.sessionid = 0
jauth.installed = 1
jauth.version = 1.2RC1
jauth.sessionid = 0
jauthdb.installed = 1
jauthdb.version = 1.2RC1
jauthdb.sessionid = 0
</pre>

<p>I started with 1.2b1 and upgraded to 1.2RC1 when it came out.</p>

<p>I can't seem to figure it out... anybody any ideas?</p>]]></description>
        <pubDate>Sun, 31 Oct 2010 15:22:53 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/7253-7253-jelix-can-t-find-jauth-module</guid>
        <author>Kirk </author>                                    </item>
      <item>
        <title><![CDATA[JForms and dynamic data through a class]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5877-5877-jforms-and-dynamic-data-through-a-class</link>
        <description><![CDATA[<p>Another newbie question: I tried to follow the documentation in implementing JForm and a custom class for dynamic filling a control.</p>

<p>test.form.xml contains:</p>
<pre>
 &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
 &lt;form xmlns=&quot;http://jelix.org/ns/forms/1.1&quot;&gt;
   &lt;listbox ref=&quot;icona&quot;&gt;
    &lt;label&gt;Prova&lt;/label&gt;
    &lt;datasource class=&quot;admin~jfd_test&quot; /&gt;
   &lt;/listbox&gt;
 &lt;/form&gt;
</pre>

<p>And jfd_test.class.php contains:</p>
<pre>
 class jfd_test implements jIFormsDatasource
 {
  protected $formId = 0;
  protected $datas = array();
  
  function __construct($id)
  {
    $this-&gt;formId = $id;
    
    $this-&gt;datas = array (
      0 =&gt; 'test',
      1 =&gt; 'test 2',
      2 =&gt; 'Id = '. $id);
  }
  
  public function getData($form)
  {
    return ($this-&gt;datas);
  }
  
  public function getLabel($key)
  {
    if(isset($this-&gt;datas[$key]))
      return $this-&gt;datas[$key];
    else
      return null;
  }
 }
</pre>

<p>I use a main template:</p>
<pre>
 &lt;h2&gt;Test JForm&lt;/h2&gt;
 {form $form, 'admin~acl:save'}
    &lt;h3&gt;{ctrl_label 'icona'}::&lt;/h3&gt;
    &lt;h4&gt;{ctrl_control 'icona'}&lt;/h4&gt;  
  &lt;div&gt; {formsubmit} &lt;/div&gt;
 {/form}
</pre>

<p>Finally, the controller:</p>
<pre>
 class aclCtrl extends jController 
 {
  function index() 
  {
      $rep = $this-&gt;getResponse('html');
  
      $form = jForms::create(&quot;admin~test&quot;, $this-&gt;param('id')); 
      $rep-&gt;body-&gt;assign( &quot;form&quot;, $form );
      
      return $rep;
  }
 }
</pre>

<p>Result: it shows the form, correctly filled but stops with the following error:</p>
<blockquote><p><strong>Fatal error:</strong> Call to a member function isReadOnly() on a non-object in /var/www/jelix-1.1.2-dev/lib/jelix/plugins/jforms/html/html.jformsbuilder.php on line 204</p></blockquote>

<p>Suggestions ?</p>]]></description>
        <pubDate>Thu, 12 Nov 2009 19:11:53 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5877-5877-jforms-and-dynamic-data-through-a-class</guid>
        <author>aeiaco </author>                                    </item>
      <item>
        <title><![CDATA[How to redirect from a zone file?]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5861-5861-how-to-redirect-from-a-zone-file</link>
        <description><![CDATA[<p>Hi,
I now, redirects should be handled in the controller.
But what I'm trying to do is move almost all the sql inside the zone files in order to take advantage of zone caching and speed up the site.
When performing the sql, it may turn out that an invalid http request parameter was passed, but I'm inside the zone, and need to throw a http 404 or 500 error
Here's my hacky solution, can you advise a better one?</p>
<pre>
 
 $rep = $GLOBALS['gJCoord']-&gt;response;
 if ($invalid_params) {
 @ob_end_clean();
 $rep-&gt;setHttpStatus('404','not found');
 $rep-&gt;bodyTpl='404';
 $this-&gt;_cancelCache=true;
 return; 
 }
</pre>]]></description>
        <pubDate>Wed, 11 Nov 2009 09:36:13 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5861-5861-how-to-redirect-from-a-zone-file</guid>
        <author>tudorilisoi </author>                                    </item>
      <item>
        <title><![CDATA[A basic gzip response]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5863-5863-a-basic-gzip-response</link>
        <description><![CDATA[<p>Hi, here's a basic gzip response
Here's an example usage:</p>
<pre>
 $rep = $this-&gt;getResponse('gzip');
 $path=JELIX_APP_WWW_PATH.'some_file';
 $rep-&gt;mimeType=files::getMimeType($path);
 $rep-&gt;content=file_get_contents($path);
 return $rep;
</pre>
<p>, and here's the gzipResponse.class.php code:</p>

<pre>
 &lt;?php
 class gzipResponse extends jResponse {
     /**
     * @var string
     */
     protected $_type = 'gzip';
 
     /**
      * text content
      * @var string
      */
     public $content = '';
     public $mimeType = '';
 
     /**
      * output the content with the text/plain mime type
      * @return boolean    true si it's ok
      */
     public function output(){
         global $gJConfig;
         if($this-&gt;hasErrors()) return false;
         if ((substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))) {
         	$this-&gt;addHttpHeader('Content-Encoding','gzip');
         	$this-&gt;content=ob_gzhandler($this-&gt;content,5);
         } else {
         	# code...
         }
         
         $this-&gt;addHttpHeader('Content-Type',$this-&gt;mimeType.';charset='.$gJConfig-&gt;charset,false);
         $this-&gt;_httpHeaders['Content-length']=strlen($this-&gt;content);
         $this-&gt;sendHttpHeaders();
         echo $this-&gt;content;
         return true;
     }
 
     /**
      * output errors
      */
     public function outputErrors(){
         global $gJConfig;
         header(&quot;HTTP/1.0 500 Internal Server Error&quot;);
         header('Content-Type: text/plain;charset='.$gJConfig-&gt;charset);
         if($this-&gt;hasErrors()){
             foreach( $GLOBALS['gJCoord']-&gt;errorMessages  as $e){
                echo '['.$e[0].' '.$e[1].'] '.$e[2].&quot; \t&quot;.$e[3].&quot; \t&quot;.$e[4].&quot;\n&quot;;
             }
         }else{
             echo &quot;[unknow error]\n&quot;;
         }
     }
 }
</pre>

<p>Of course, as I've also seen in ticket requests, the best way to gzip would be having an 'isGzip' flag in all the http response types</p>]]></description>
        <pubDate>Wed, 11 Nov 2009 09:49:28 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/5863-5863-a-basic-gzip-response</guid>
        <author>tudorilisoi </author>                                    </item>
      <item>
        <title><![CDATA[jLocale and config]]></title>
        <link>https://jelix.org/forums/forum/16-jelix-use-and-development/posts/2474-2474-jlocale-and-config</link>
        <description><![CDATA[<p>Hello! I'm working on an <em>translation tool for Jelix .properties files</em> and I'm wondering if and how I would apply these new translations, preferably on-the-fly, adding it to the configuration. From what I can understand there's no configuration variable for setting an additional locales path (to a script-writable folder) or is there?</p>

<p><strong>BTW</strong> I'm planning this as part of what I call <em>admintools</em> (working name) for CMS Admin feature tools (possibly a new Jelix Forge project in the future (if I ever get there). And I will most probably implement it with Xforms rather than jforms with server side scripts serving an xhtml client side with an unobtrusive AJAX scripts overlay based on jQuery and jQuery plugins (including client-side XSLT).</p>

<p><strong>BTW2</strong> This is far fetched as of now, but if any of the Jelix developer team reads this, maybe I could get to know how you feel about me adding a feature to easily mail new translations directly to a Jelix developer teams email address and if so which one?</p>

<p>regards
Henrik</p>]]></description>
        <pubDate>Sat, 15 Mar 2008 12:52:40 +0000</pubDate>
        <guid isPermaLink="true">https://jelix.org/forums/forum/16-jelix-use-and-development/posts/2474-2474-jlocale-and-config</guid>
        <author>killerrabbit </author>                                    </item>
  
 </channel>
</rss>