Re: [Wicket-user] selecting MarkupStream

2006-05-16 Thread Aaron Hiniker




Update: 

I fixed the problem by returning the super implementation rather than 'null' at the end of the method.. I still am not sure why it isn't finding the .html file though, if anyone sees my mistake I'd appreciate the heads up.

Aaron


On Fri, 2006-05-12 at 09:02 -0700, Aaron Hiniker wrote:

Hi, I'm overriding newMarkupResourceStream(Class aClass) but I am still getting a markup not found error in my logs and even with DEBUG on there are no list of files that it is trying (probably because I am overriding the default functionality). This method below worked fine in beta3, but does not work fine in rc1, rc3-- did anything change in regards to markup streams since then? here is the relevant code:


 @Override
 public IResourceStream newMarkupResourceStream(Class aClass)
 {
 return getMailMarkupStream( mailType );
 } 

 
 public IResourceStream getMailMarkupStream( MailType type )
 {

 if ( type == MailType.Html )
 {
 return PackageResource.get( getClass(), getClass().getSimpleName() + .html ).getResourceStream();
 }
 if ( type == MailType.Text )
 {
 return PackageResource.get( getClass(), getClass().getSimpleName() + .txt ).getResourceStream();
 }

 return null;
 }

I would like to select a different stream based on the 'type' variable.. is this valid? or do I have to use variations?

Aaron












[Wicket-user] selecting MarkupStream

2006-05-12 Thread Aaron Hiniker




Hi, I'm overriding newMarkupResourceStream(Class aClass) but I am still getting a markup not found error in my logs and even with DEBUG on there are no list of files that it is trying (probably because I am overriding the default functionality). This method below worked fine in beta3, but does not work fine in rc1, rc3-- did anything change in regards to markup streams since then? here is the relevant code:


 @Override
 public IResourceStream newMarkupResourceStream(Class aClass)
 {
 return getMailMarkupStream( mailType );
 } 

 
 public IResourceStream getMailMarkupStream( MailType type )
 {

 if ( type == MailType.Html )
 {
 return PackageResource.get( getClass(), getClass().getSimpleName() + .html ).getResourceStream();
 }
 if ( type == MailType.Text )
 {
 return PackageResource.get( getClass(), getClass().getSimpleName() + .txt ).getResourceStream();
 }

 return null;
 }

I would like to select a different stream based on the 'type' variable.. is this valid? or do I have to use variations?

Aaron











Re: [Wicket-user] selecting MarkupStream

2006-05-12 Thread Johan Compagner
one is txt?is that file still valid markup? That we can parse?Or doesn't it contain anything? does the page not have wicket components what so ever.I guess that method should still work fine. Is the getMailMarkup really returning something?
johan]On 5/12/06, Aaron Hiniker [EMAIL PROTECTED] wrote:



  
  


Hi, I'm overriding newMarkupResourceStream(Class aClass) but I am still getting a markup not found error in my logs and even with DEBUG on there are no list of files that it is trying (probably because I am overriding the default functionality). This method below worked fine in beta3, but does not work fine in rc1, rc3-- did anything change in regards to markup streams since then? here is the relevant code:


 @Override public IResourceStream newMarkupResourceStream(Class aClass) { return getMailMarkupStream( mailType ); }   public IResourceStream getMailMarkupStream( MailType type )
 { if ( type == MailType.Html ) { return PackageResource.get( getClass(), getClass().getSimpleName() + .html ).getResourceStream(); } if ( type == 
MailType.Text ) { return PackageResource.get( getClass(), getClass().getSimpleName() + .txt ).getResourceStream(); } return null; }I would like to select a different stream based on the 'type' variable.. is this valid? or do I have to use variations?
Aaron










Re: [Wicket-user] selecting MarkupStream

2006-05-12 Thread Johan Compagner
and yes variation could be used for this.On 5/12/06, Johan Compagner [EMAIL PROTECTED] wrote:
one is txt?is that file still valid markup? That we can parse?Or doesn't it contain anything? does the page not have wicket components what so ever.
I guess that method should still work fine. Is the getMailMarkup really returning something?
johan]On 5/12/06, Aaron Hiniker 
[EMAIL PROTECTED] wrote:



  
  


Hi, I'm overriding newMarkupResourceStream(Class aClass) but I am still getting a markup not found error in my logs and even with DEBUG on there are no list of files that it is trying (probably because I am overriding the default functionality). This method below worked fine in beta3, but does not work fine in rc1, rc3-- did anything change in regards to markup streams since then? here is the relevant code:


 @Override public IResourceStream newMarkupResourceStream(Class aClass) { return getMailMarkupStream( mailType ); }   public IResourceStream getMailMarkupStream( MailType type )
 { if ( type == MailType.Html ) { return PackageResource.get( getClass(), getClass().getSimpleName() + .html ).getResourceStream(); } if ( type == 
MailType.Text ) { return PackageResource.get( getClass(), getClass().getSimpleName() + .txt ).getResourceStream(); } return null; }I would like to select a different stream based on the 'type' variable.. is this valid? or do I have to use variations?
Aaron