• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOConditionnal strange behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOConditionnal strange behavior


  • Subject: Re: WOConditionnal strange behavior
  • From: Ken Anderson <email@hidden>
  • Date: Fri, 15 Sep 2006 09:38:01 -0400

In my experience, weird behavior like this usually stems from the object graph of the page changing from when the page was rendered to when a form post comes back. Is this inside a form? Are you modifying any state that would affect the structure of the page?

On Sep 15, 2006, at 8:34 AM, Gilles MATHURIN wrote:

Hello List,

i have a strange behavior with my WOConditionnal, it seems to do not work as it should.
Explanation:
I have a WOCond within another WOCond. Each is bind to a different boolean.


WOCond n°1 : works great, it appears when his boolean resolves to true.
But WOCond n°2 doesn't. It is set like that :


======= Code =====

public WOComponent editPhotos()
{
// afficher le formulaire d'édition des photos et masque les formulaires au dessus
boolPhoto = true;
boolBiog = false;
boolActu = false;
// recupérer le contexte d'édition de l'artiste
EOEditingContext ec = artiste.editingContext();

// récupère l'Array (tableau) de photos de l'artiste.
NSMutableArray photosArtist = artiste.artistephotos().mutableClone ();


// Display the option to Add a new photo, if there are already ones (boolAjouterUnePhoto)
if (photosArtist.count() > 0) {
boolAjouterUnePhoto = true;
}
else { // If there aren't any existing photos, just create a new one withour displaying the Add action possibility.
boolAjouterUnePhoto = false;
ArtistePhoto newPhoto = (ArtistePhoto) EOUtilities.createAndInsertInstance(ec,"ArtistePhoto");
// Passe newPhoto à photoForm
setPhotoForm(newPhoto);

}
// afficher le formulaire d'édition des photos et masque les formulaires au dessus

return null;
}


==== End of Code ====

Any idea of why it doesn't work ?

Thanks for your support.

GM _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: WOConditionnal strange behavior
      • From: Gilles MATHURIN <email@hidden>
    • Re: WOConditionnal strange behavior
      • From: Gilles MATHURIN <email@hidden>
References: 
 >WOConditionnal strange behavior (From: Gilles MATHURIN <email@hidden>)

  • Prev by Date: WOConditionnal strange behavior
  • Next by Date: Re: WOConditionnal strange behavior
  • Previous by thread: WOConditionnal strange behavior
  • Next by thread: Re: WOConditionnal strange behavior
  • Index(es):
    • Date
    • Thread