Re: [shale] clay generic templates and symbol replacement

2006-03-02 Thread Ryan Wynn
On 3/1/06, Ryan Wynn [EMAIL PROTECTED] wrote:
 I am getting the following exception and though I have looked at bug
 37796 I still can't decide if what I am trying to do cannot be done
 with symbol replacement or if I have made a mistake.

 The Component jsfid attribute is null.  The cause is most likely a
 missing clayJsfid attribute when using HTML templates and nesting
 a clay component.  It is also likely that the problem was caused by using
 generic templates with symbol replacement of the
 [EMAIL PROTECTED]:
 java.lang.NullPointerException

 In my component that extends clay, clayJsfid is tied to a value
 binding expression [EMAIL PROTECTED] and in my .html file I
 specify the symbol managed-bean-name to be myBean.

 What exactly constitutes a generic template?

 Thanks,
 Ryan



Here is some more information about my problem.

I have the following files

add.html

span jsfid=clay clayJsfid=templates/template.html
content=views/add.html/


templates/template.html

TABLE width=100% border=1
TBODY
TR
TD colspan=2 height=20 valign=top 
bgcolor=lightblueScheduler
Application/TD
/TR
TR
TD width=20% height=600 valign=top
A href=# jsfid=addContactLinkAdd New 
Contact/ABR
BR
A href=# jsfid=viewContactsLinkView 
Contacts/ABR
BR
A href=# jsfid=newTaskLinkAdd New Task/ABR
BR
A href=# jsfid=viewTasksLinkView Tasks/ABR
BR
/TD
TD width=80% height=600 valign=topSPAN 
jsfid=clay
clayJsfid=@content allowBody=falsebHello 
World!/b/SPAN/TD
/TR
/TBODY
/TABLE


views/add.html

span jsfid=collage:wizard wizardBean=addPersonWizard /


Now, views/add.html is where the problem is.  collage:wizard is
specified as follows


component jsfid=collage:wizard extends=panelGrid
allowBody=false

attributes
set name=columns value=1 /
set name=cellspacing value=0 /
set name=cellpadding value=0 /
set name=border value=0 /
/attributes

element renderId=1 jsfid=clay
attributes
set name=clayJsfid value=[EMAIL PROTECTED] /
/attributes
/element

element renderId=2 jsfid=panelGrid
attributes
set name=columns value=4 /
set name=cellspacing value=0 /
set name=cellpadding value=10 /
set name=border value=0 /
/attributes

element renderId=1 jsfid=collage:commandButton
attributes
set name=value value=Back /
set name=action value=[EMAIL PROTECTED] /
set name=rendered
value=[EMAIL PROTECTED] /
/attributes
/element

element renderId=2 jsfid=collage:commandButton
attributes
set name=value value=Next /
set name=action value=[EMAIL PROTECTED] /
set name=rendered
value=[EMAIL PROTECTED] /
/attributes
/element

element renderId=3 jsfid=collage:commandButton
attributes
set name=value value=Back /
set name=action value=[EMAIL PROTECTED] /
set name=rendered
value=[EMAIL PROTECTED] /
/attributes
/element

element renderId=4 jsfid=collage:commandButton
attributes
set name=value value=Back /
set name=action value=[EMAIL PROTECTED] /
set name=rendered
value=[EMAIL PROTECTED] /
/attributes
/element

/element

/component


wizardBean has an attribute called viewId which corresponds to the
current view of the wizard (e.g. /views/page1.html).  This viewId will
change with calls to wizardBean.next, wizardBean.back, etc.

It seems like Clay is not able to resolve the symbol wizardBean in
collage:wizard in order to dynamically display the nested clay
component.  Again this is the message that I get:

The Component jsfid attribute is null.  The cause is most likely a
missing clayJsfid attribute when using 

Re: [shale] clay generic templates and symbol replacement

2006-03-02 Thread Gary VanMatre
From: Ryan Wynn [EMAIL PROTECTED] 

 I am getting the following exception and though I have looked at bug 
 37796 I still can't decide if what I am trying to do cannot be done 
 with symbol replacement or if I have made a mistake. 
 
 The Component jsfid attribute is null. The cause is most likely a 
 missing clayJsfid attribute when using HTML templates and nesting 
 a clay component. It is also likely that the problem was caused by using 
 generic templates with symbol replacement of the 
 [EMAIL PROTECTED]: 
 java.lang.NullPointerException 
 

What's the rest of the NullPointerException?  Is there a custom message?  What 
does the stack trace look like?

 In my component that extends clay, clayJsfid is tied to a value 
 binding expression [EMAIL PROTECTED] and in my .html file I 
 specify the symbol managed-bean-name to be myBean. 
 


I don't think that I've ever tried that.  I think the error has to do with the 
suffix of the jsfid or clayJsfid in this case.  The suffix is used to determine 
what handler should be used.  You might try  [EMAIL PROTECTED].

Or, You might try to early binding option on the clayJsfid attribute.

 component jsfid=clay componentType=org.apache.shale.clay.component.Clay 
allowBody=false
attributes
  set name=rendered bindingType=VB /
  set name=clayJsfid bindingType=Early value=RUNTIME/
  set name=managedBeanName bindingType=Early/
  set name=shapeValidator bindingType=None/ 
/attributes
  /component 

 What exactly constitutes a generic template? 
 

You should be able to answer that better than I can :-) .  All templates are 
generic.  You have 4 options 
(http://struts.apache.org/struts-shale/features-reusable-views.html).  What are 
you specifically looking for?


 Thanks, 
 Ryan 

Gary

Re: [shale] clay generic templates and symbol replacement

2006-03-02 Thread Ryan Wynn
On 3/2/06, Ryan Wynn [EMAIL PROTECTED] wrote:
 On 3/2/06, Gary VanMatre [EMAIL PROTECTED] wrote:
  From: Ryan Wynn [EMAIL PROTECTED]
  
   I am getting the following exception and though I have looked at bug
   37796 I still can't decide if what I am trying to do cannot be done
   with symbol replacement or if I have made a mistake.
  
   The Component jsfid attribute is null. The cause is most likely a
   missing clayJsfid attribute when using HTML templates and nesting
   a clay component. It is also likely that the problem was caused by using
   generic templates with symbol replacement of the
   [EMAIL PROTECTED]:
   java.lang.NullPointerException
  
 
  What's the rest of the NullPointerException?  Is there a custom message?  
  What does the stack trace look like?
 
   In my component that extends clay, clayJsfid is tied to a value
   binding expression [EMAIL PROTECTED] and in my .html file I
   specify the symbol managed-bean-name to be myBean.
  
 
 
  I don't think that I've ever tried that.  I think the error has to do with 
  the suffix of the jsfid or clayJsfid in this case.  The suffix is used to 
  determine what handler should be used.  You might try  [EMAIL PROTECTED].
 
  Or, You might try to early binding option on the clayJsfid attribute.
 
   component jsfid=clay 
  componentType=org.apache.shale.clay.component.Clay
 allowBody=false
 attributes
   set name=rendered bindingType=VB /
   set name=clayJsfid bindingType=Early value=RUNTIME/
   set name=managedBeanName bindingType=Early/
   set name=shapeValidator bindingType=None/
 /attributes
   /component
 
   What exactly constitutes a generic template?
  
 
  You should be able to answer that better than I can :-) .  All templates 
  are generic.  You have 4 options 
  (http://struts.apache.org/struts-shale/features-reusable-views.html).  What 
  are you specifically looking for?
 
 
   Thanks,
   Ryan
 
  Gary
 

 Thanks, Gary.  The bindingType=Early fixed it.  I guess Clay was
 looking for an extension and it was being done too late.

 My whole generic templates question came from the error msg that was
 reported from the clay message bundle.  I thought it was telling me
 that particular the way I had configured my templates was too much for
 it to handle with symbols.  But I guess I was wrong, so far Clay can
 handle all I can throw at it :-)


One thing I did notice though was that Clay was interpreting some
components nested within !-- -- in a html template.  I removed the
whole comment block and the error went away.


Re: [shale] clay generic templates and symbol replacement

2006-03-02 Thread Gary VanMatre
From: Ryan Wynn [EMAIL PROTECTED] 

 
 Thanks, Gary. The bindingType=Early fixed it. I guess Clay was 
 looking for an extension and it was being done too late. 


I'll make that the default.  I don't think that a VB bindingType even works.  
I'll do a little refactoring here.  

 
 My whole generic templates question came from the error msg that was 
 reported from the clay message bundle. I thought it was telling me 
 that particular the way I had configured my templates was too much for 
 it to handle with symbols. But I guess I was wrong, so far Clay can 
 handle all I can throw at it :-) 

You are the one pushing the envelope. Your feedback makes the difference. 
Thanks for the help. 

Gary

[shale] clay generic templates and symbol replacement

2006-03-01 Thread Ryan Wynn
I am getting the following exception and though I have looked at bug
37796 I still can't decide if what I am trying to do cannot be done
with symbol replacement or if I have made a mistake.

The Component jsfid attribute is null.  The cause is most likely a
missing clayJsfid attribute when using HTML templates and nesting
a clay component.  It is also likely that the problem was caused by using
generic templates with symbol replacement of the
[EMAIL PROTECTED]:
java.lang.NullPointerException

In my component that extends clay, clayJsfid is tied to a value
binding expression [EMAIL PROTECTED] and in my .html file I
specify the symbol managed-bean-name to be myBean.

What exactly constitutes a generic template?

Thanks,
Ryan