PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > xajax
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
xajax

Réponse
 
LinkBack Outils de la discussion
Vieux 12/11/2005, 10h46   #1 (permalink)
Matias Surdi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut xajax

¿Alguien ha utilizado xajax con Smarty? ¿Conocen alguna mejor opción que
xajax para trabajar con Smarty?


Gracias!
  Réponse avec citation
Vieux 12/11/2005, 17h37   #2 (permalink)
v3rb0
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] xajax

neesmu viss xajaks prieks Gudreli utilizejis.
please use english, this is _general_ mailing list.


On 11/12/05, Matias Surdi <matiassurdi@gmail.com> wrote:
> ¿Alguien ha utilizado xajax con Smarty? ¿Conocen alguna mejor opción que
> xajax para trabajar con Smarty?
>
>
> Gracias!
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
n
  Réponse avec citation
Vieux 17/11/2005, 20h47   #3 (permalink)
A.J. Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut [SMARTY] looping through array of objects not working

Hello,

I know this was discussed earlier in the mailing list, but it is NOT working
for me. I have verified that the method calls work through my
business-logic, but I cannot us the objects in the template. I can,
however, use the objects when they are NOT within an array.


For example, I have the following template code:


----BEGIN------------------

{foreach from="items" item="itemobj"}
<tr class="{cycle values="row1,row2"}">
<td><input type="checkbox" name="item[{$itemobj->getId()}]"/></td>
<td>{$itemobj->getSku()}</td>
<td>{$itemobj->getName()|escape:"htmlall"}</td>
<td>{$itemobj->getRevised()|date_format:"%D"}</td>
<td>{$itemobj->getCreated()|date_format:"%D"}</td>
</tr>
{foreachelse}
<tr>
<td colspan="8">No Records Found</td>
</tr>
{/foreach}


----END--------------------

$items contains an array of InventoryItem objects. I've verified this using
print_r() in the logic just before the assign() statement is done.

The first occurrence of any method call to $itemobj (in this case,
$itemobj->getId()) results in a "Call to a member function on a non-object"
fatal error. However, if I call the method from the logic side, it works
fine.

Also, I've verified that objects which are assigned directly (i.e. not
within an array) are working fine.

I found a work-around to this in PHP5 using the ArrayAccess interface, but
our server is running PHP4.4 and I do not want to have to upgrade.


I have the latest release of Smarty installed. This particular problem is
occurring on a windows machine (Development environment), and I have not
tested it on the production Linux machine.

Why isn't this working?


A.J. Brown
BitNotion Technology
  Réponse avec citation
Vieux 17/11/2005, 20h58   #4 (permalink)
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] looping through array of objects not working

On Thu, Nov 17, 2005 at 03:47:00PM -0500, A.J. Brown wrote:
> Hello,
>
> I know this was discussed earlier in the mailing list, but it is NOT working
> for me. I have verified that the method calls work through my
> business-logic, but I cannot us the objects in the template. I can,
> however, use the objects when they are NOT within an array.
>
>
> For example, I have the following template code:
>
>
> ----BEGIN------------------
>
> {foreach from="items" item="itemobj"}


{foreach from=$items item="itemobj"}

that is.

[...]
> ----END--------------------
>
> $items contains an array of InventoryItem objects. I've verified this using
> print_r() in the logic just before the assign() statement is done.
>
> The first occurrence of any method call to $itemobj (in this case,
> $itemobj->getId()) results in a "Call to a member function on a non-object"
> fatal error. However, if I call the method from the logic side, it works
> fine.
>
> Also, I've verified that objects which are assigned directly (i.e. not
> within an array) are working fine.
>
> I found a work-around to this in PHP5 using the ArrayAccess interface, but
> our server is running PHP4.4 and I do not want to have to upgrade.
>
>
> I have the latest release of Smarty installed. This particular problem is
> occurring on a windows machine (Development environment), and I have not
> tested it on the production Linux machine.
>
> Why isn't this working?
>
>
> A.J. Brown
> BitNotion Technology

  Réponse avec citation
Vieux 18/11/2005, 01h38   #5 (permalink)
A.J. Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: [SMARTY] looping through array of objects not working

That did the trick! I don't know how I missed that, Some times you just
have to have an outside eye I guess

Thanks,

A.J. Brown


-----Original Message-----
From: messju mohr [mailto:messju@lammfellpuschen.de]
Sent: Thursday, November 17, 2005 3:59 PM
To: A.J. Brown
Cc: smarty-general@lists.php.net
Subject: Re: [SMARTY] looping through array of objects not working

On Thu, Nov 17, 2005 at 03:47:00PM -0500, A.J. Brown wrote:
> Hello,
>
> I know this was discussed earlier in the mailing list, but it is NOT

working
> for me. I have verified that the method calls work through my
> business-logic, but I cannot us the objects in the template. I can,
> however, use the objects when they are NOT within an array.
>
>
> For example, I have the following template code:
>
>
> ----BEGIN------------------
>
> {foreach from="items" item="itemobj"}


{foreach from=$items item="itemobj"}

that is.

[...]
> ----END--------------------
>
> $items contains an array of InventoryItem objects. I've verified this

using
> print_r() in the logic just before the assign() statement is done.
>
> The first occurrence of any method call to $itemobj (in this case,
> $itemobj->getId()) results in a "Call to a member function on a

non-object"
> fatal error. However, if I call the method from the logic side, it works
> fine.
>
> Also, I've verified that objects which are assigned directly (i.e. not
> within an array) are working fine.
>
> I found a work-around to this in PHP5 using the ArrayAccess interface, but
> our server is running PHP4.4 and I do not want to have to upgrade.
>
>
> I have the latest release of Smarty installed. This particular problem is
> occurring on a windows machine (Development environment), and I have not
> tested it on the production Linux machine.
>
> Why isn't this working?
>
>
> A.J. Brown
> BitNotion Technology


--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h20.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11589 seconds with 13 queries