[TYPO3-project-formidable] How to use rowInput:: with AJAX?

Gary Wong gary.wong at spingroup.com
Wed Nov 26 20:54:17 CET 2008


Ahh - I figured it out finally.  I find that my troubleshooting skills 
are very poor at 1AM.

I needed to put in the lister ID as well...

For reference:

-----------
<renderlet:BOX name="list-box">
 <childs>
  <renderlet:LISTER  name="thelist">       
   <column name="uid" type="renderlet:TEXT" listHeader="ID"/>
   <column name="specialty" type="renderlet:TEXT" listHeader="Specialty 
Name" activelistable="true" />
   <column type="renderlet:BUTTON" name="btn-edit" listHeader="" 
label="Save"> 
    <onclick runat="ajax" params="rowData::uid,rowInput::list-box.thelist.specialty" 
cache="false"> 
      <userobj> 
      <php><![CDATA[/*<?*/
        $data = $this->oMajixEvent->getParams();
         return $this->majixDebug($data);

-----------

This returns:

rowData:uid => uid of row
rowData::specialty => the default value of the "specialty" renderlet
rowInput::list-box.thelist.specialty => whatever was typed in to the 
input box for renderlet "specialty"

Notice that my lister is in a renderlet:BOX and so that's why I needed 
that in the dot notation as well.

-----------

Cheer,
Gary


Gary Wong wrote:
> Hi Michael,
>
> Thank you for your response, but the problem I have is not about 
> "rowData::", but with "rowInput::"
>
> "rowData::uid" returns the stored (default) value of the uid field of 
> the current row.
> But what I need is to access the field's current INPUT field data (an 
> activelistable field). 
>
> So, if I have a column with a text renderlet "specialty" that is 
> "activelistable", let's say the default value is "Doctor".
> And, now let's say the user changed that field of that row's input field 
> data to "Physician"
>
> "rowData::specialty" will and should return "Doctor"
> "rowInput::specialty" as I understand it should return "Physician", but 
> it doesn't.
>
> Any other ideas?
>
> Thank you
> Gary
>
>
> Michael Hilgers wrote:
>   
>> Hi Gary,
>>
>> You can access the value of the params attribute via $aParams
>> Here is an example that I use:
>>
>> <column name="select"
>> label="LLL:EXT:mh_ttpstockmanager/mod1/locallang.xml:select_header"
>> type="renderlet:BUTTON">  
>>   <onclick runat="ajax" params="rowData::uid">  
>>     <userobj>  
>>       <php><![CDATA[ /*<?*/
>>           $aTasks[] = array();
>>           $this->oSandBox->articleuid = $aParams['uid']; 
>>           $aTasks[] = $this->aORenderlets["list-container"]->majixRepaint();
>>
>>           return $aTasks ;
>>        /*?>*/]]></php>   
>>     </userobj>  
>>   </onclick>  
>> </column>
>>
>> Here I take the uid from the row an update another lister.
>> Hope that works for U.
>>
>> Michael Hilgers
>> it-consulting
>> Rimplergasse 20/10
>> A-1180 Wien
>>  
>> mobile +43 (0)664 20 60 814
>> mail mhil at mhil.at 
>> www www.mhil.at
>>
>> -----Original Message-----
>> From: typo3-project-formidable-bounces at lists.netfielders.de
>> [mailto:typo3-project-formidable-bounces at lists.netfielders.de] On Behalf Of
>> Gary Wong
>> Sent: Mittwoch, 26. November 2008 08:28
>> To: TYPO3 project list for the FORMidable extension
>> Subject: [TYPO3-project-formidable] How to use rowInput:: with AJAX?
>>
>> I have a lister with activelistable columns, and buttons on each row 
>> which I want to trigger AJAX events.  I need to pass the current row's 
>> INPUT field data to the AJAX event. I found limited info on using 
>> rowInput::value but couldn't get it to work.
>>
>> Here's the snippet of what I'm trying to do:
>>
>> <renderlet:BOX name="list-box">
>>  <childs>
>>   <renderlet:LISTER  name="thelist">       
>>    <column name="uid" type="renderlet:TEXT" listHeader="ID"/>
>>    <column name="specialty" type="renderlet:TEXT" listHeader="Specialty 
>> Name" activelistable="true" />
>>    <column type="renderlet:BUTTON" name="btn-edit" listHeader="" 
>> label="Save"> 
>>     <onclick runat="ajax" params="rowData::uid,rowInput::specialty" 
>> cache="false"> 
>>       <userobj> 
>>       <php><![CDATA[/*<?*/
>>         $data = $this->oMajixEvent->getParams();
>>          return $this->majixDebug($data);
>> .....
>>
>> The rowData info passes in fine, but I cannot get the rowInput values.  
>> I also tried "rowInput::list-box.specialty" with no success.
>>
>> Any hints?
>>
>> Thank you very much!
>> Gary
>>
>>
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidabl
>> e
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com 
>> Version: 8.0.175 / Virus Database: 270.9.10/1812 - Release Date: 25.11.2008
>> 19:53
>>
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>>   
>>     
>
>
> _______________________________________________
> TYPO3-project-formidable mailing list
> TYPO3-project-formidable at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable
>   

-- 
Gary Wong
Spin Group, Inc.
Web, eCommerce, Online Marketing - Over 10 years strong!
http://www.SpinGroup.com




More information about the TYPO3-project-formidable mailing list