• 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: Disable displaying contents of WOComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disable displaying contents of WOComponent


  • Subject: Re: Disable displaying contents of WOComponent
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 27 Jun 2008 07:40:46 +1000

On 27/06/2008, at 12:38 AM, Freddie Tilley wrote:

((WOComponentReference)el)._contentElement = null;

You're toying with private data. So you should expect strange behaviour unless you reinstate the component behaviour via similar custom code.


You've got a couple of options:

1)
public class AccessibleComponent extends ...
{
public void appendToResponse( WOResponse response, WOContext context )
{
if ( canViewComponent() )
super.appendToResponse( response, context );
else
pageWithName ( ERXEmptyComponent.class.getName() ).appendToResponse( response, context );
}
}


2) as Thomas suggested
YourComponent.html
<wo:WOConditional condition = "$canViewComponent">
	...
</wo:WOConditional>


with regards, --

Lachlan Deck
_______________________________________________
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: Disable displaying contents of WOComponent
      • From: Don Lindsay <email@hidden>
References: 
 >Disable displaying contents of WOComponent (From: Freddie Tilley <email@hidden>)
 >Re: Disable displaying contents of WOComponent (From: Thomas <email@hidden>)
 >Re: Disable displaying contents of WOComponent (From: Freddie Tilley <email@hidden>)
 >Re: Disable displaying contents of WOComponent (From: Freddie Tilley <email@hidden>)

  • Prev by Date: Re: Problems deploying app on Leopard server
  • Next by Date: Re: [OT] Objective-c library that would resemble EO talking to SQLite
  • Previous by thread: Re: Disable displaying contents of WOComponent
  • Next by thread: Re: Disable displaying contents of WOComponent
  • Index(es):
    • Date
    • Thread