SV: [ANNOUNCE] New Shale PMC Chair

2008-03-20 Thread Hermod Opstvedt
Congratulations, Gary - Keep up the good work for the community.

Hermod

-Opprinnelig melding-
Fra: Greg Reddin [mailto:[EMAIL PROTECTED] 
Sendt: 20. mars 2008 15:41
Til: user@shale.apache.org; [EMAIL PROTECTED]
Emne: [ANNOUNCE] New Shale PMC Chair

In its meeting yesterday the Apache Board of Directors unanimously approved
a resolution naming Gary VanMatre the new chair of the Apache Shale Project
Management Committee.  Please join us in congratulating Gary for this new
role.

In addition we would like to publicly thank Craig McClanahan for his service
to this project and his invaluable contribution to the Java web application
development community. We are endlessly grateful to him for his role in
defining the JavaServer Faces framework and, more specifically, in birthing
the Shale project. It is no small loss to this community that his work has
made it difficult for him to be as involved as he once was. At his own
request, Craig is now an emeritus member of the Shale PMC.

Thank you,
Greg Reddin
Apache Shale PMC Member




SV: initializing commons validator for rule type mask

2007-10-15 Thread Hermod Opstvedt
Hi

Please always respond to the list, så that others may benefit. 

Hermod

-Opprinnelig melding-
Fra: Hariharan Manoharan01 [mailto:[EMAIL PROTECTED] 
Sendt: 15. oktober 2007 12:19
Til: [EMAIL PROTECTED]
Emne: RE: initializing commons validator for rule type mask

Hi,

Thanks for helping me out. The problem got solved.

Thanks  Regards,



Hariharan Manoharan


-Original Message-
From: Hermod Opstvedt [mailto:[EMAIL PROTECTED]
Sent: Saturday, October 13, 2007 5:25 PM
To: user@shale.apache.org
Subject: SV: initializing commons validator for rule type mask

Hi

The answer is in your stacktrace :

Caused by: java.lang.NoClassDefFoundError:
org.apache.oro.text.perl.Perl5UtilHi

You need oro in your classpath.

Hermod

-Opprinnelig melding-
Fra: Hariharan Manoharan01 [mailto:[EMAIL PROTECTED]
Sendt: 13. oktober 2007 11:47
Til: user@shale.apache.org
Emne: initializing commons validator for rule type mask


  Hi,

This is the code used

  h:inputText value= id=connectionName
  f:validateLength minimum=1
maximum=50/f:validateLength
  val:commonsValidator type=mask
message=errorMessages.no_data_found
server=true
val:validatorVar name=mask
value=^[a-zA-Z0-9]+$/
/val:commonsValidator
  /h:inputText

Value attribute left blank intentionally.

I've both shale-validator and common-validator jars in my lib folder. I get
the following exception trace. Kindly help me.


com.sun.faces.lifecycle.ProcessValidationsPhase execute Error initializing
commons validator for rule type mask on component id connectionName.
java.lang.RuntimeException: Error initializing commons validator for rule
type mask on component id connectionName.
  at
org.apache.shale.validator.CommonsValidator.validate(CommonsValidator.java:8
21)
  at javax.faces.component.UIInput.validateValue(UIInput.java:781)
  at javax.faces.component.UIInput.validate(UIInput.java:645)
  at javax.faces.component.UIInput.executeValidate(UIInput.java:849)
  at javax.faces.component.UIInput.processValidators(UIInput.java:412)
  at javax.faces.component.UIForm.processValidators(UIForm.java:170)
  at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java
:946)
  at
javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:373)
  at
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPh
ase.java:80)
  at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:220)
  at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
  at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:9
66)
  at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.
java:478)
  at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrappe
r.java:463)
  at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServl
etWrapper.java:92)
  at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744)
  at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
  at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:93)
  at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht
tpInboundLink.java:465)
  at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht
tpInboundLink.java:394)
  at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLRea
dCallback.java:102)
  at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioRea
dCompletionListener.java:152)
  at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java
:213)
  at
com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFutu
re.java:195)
  at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
  at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:194)
  at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:741
)
  at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:863)
  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
Caused by: java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64
)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)
  at java.lang.reflect.Method.invoke(Method.java:615)
  at
org.apache.shale.validator.CommonsValidator.validate(CommonsValidator.java:7
99)
  ... 29 more
Caused by: java.lang.NoClassDefFoundError

SV: java.lang.NullPointerException when using html view with JSP.

2007-08-30 Thread Hermod Opstvedt
Hi

I'll look into this. 

Hermod

-Opprinnelig melding-
Fra: mohammad_gh [mailto:[EMAIL PROTECTED] 
Sendt: 28. august 2007 17:46
Til: user@shale.apache.org
Emne: java.lang.NullPointerException when using html view with JSP.


hi 

i am using clay and want to create an html view with JSP.
i downloaded ShaleClay.zip and deployed it.
everything is ok.
 
but i can not use a html view with JSP.

i added only the following file and i get the error below when calling the
full.jsp .


i did not change anything else in the configurations.
what i have to do more?
--full.jsp-
%@ taglib prefix=clay uri=http://shale.apache.org/clay; %

 clay:clay id=full jsfid=/full.html /

---full.html
html
head

/head
body

h3test the full html view/h3


form 
input type=text value=#{2+2}/
input type=submit/
/form
/html



 org.apache.jasper.JasperException

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
58)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleAppl
icationFilter.java:267)

root cause 
java.lang.NullPointerException

javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:92
9)

javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
org.apache.jsp.full_jsp._jspx_meth_clay_clay_0(full_jsp.java:78)
org.apache.jsp.full_jsp._jspService(full_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
11)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleAppl
icationFilter.java:267)



help me please !!!
Mohammad GHASEMI HAMED

clay-config.xml---

?xml version=1.0 encoding=UTF-8?
!DOCTYPE view PUBLIC
  -//Apache Software Foundation//DTD Shale Clay View Configuration
1.0//EN
  http://struts.apache.org/dtds/shale-clay-config_1_0.dtd;

view

component jsfid=baseLayout extends=clay id=base
attributes
set name=clayJsfid
value=/templates/standard.html /
/attributes
symbols
set name=title value=Hello World /
set name=leftContent
value=/pages/defaultLeftNav.html /
set name=headerContent
value=/pages/defaultHeader.html /
set name=bodyContent
value=/pages/defaultBody.html /
set name=footerContent
value=/pages/defaultFooter.html /
/symbols
/component

/view
--clay-views-config.xml---
?xml version=1.0 encoding=UTF-8?
!DOCTYPE view PUBLIC
  -//Apache Software Foundation//DTD Shale Clay View Configuration
1.0//EN
  http://struts.apache.org/dtds/shale-clay-config_1_0.dtd;

view
component jsfid=/page1.jsf extends=baseLayout
symbols
set name=title value=Page 1 /
set name=bodyContent
value=/pages/page1Body.html /
/symbols
/component
component jsfid=/page2.jsf extends=baseLayout
symbols
set name=title value=Page 2 /
set name=bodyContent
value=/pages/page2Body.html /
/symbols
/component
component jsfid=/page3.jsf extends=baseLayout
symbols
set name=title value=Page 3 /
set name=bodyContent
value=/pages/page3Body.html /
/symbols
/component
/view

-- 
View this message in context:
http://www.nabble.com/java.lang.NullPointerException-when-using-html-view-wi
th-JSP.-tf4342539.html#a12370548
Sent from the Shale - User mailing list archive at Nabble.com.




SV: master-detail redirection with annoteded request bean and tomahawk updateActionListener

2007-07-31 Thread Hermod Opstvedt
Hi

Please redirect questions regarding Tomahawk to the MyFaces list. 

Hermod

-Opprinnelig melding-
Fra: Érico Teixeira [mailto:[EMAIL PROTECTED] 
Sendt: 30. juli 2007 20:26
Til: user@shale.apache.org
Emne: master-detail redirection with annoteded request bean and tomahawk
updateActionListener

I have an use case where I need to load a dataTable with all monthly fees
from a student and put a link in id column to redirect to an annotaded Fee
Request Bean  where I can visualize all details ...

I've tried to use :

t:dataTable id=cob var=fee
value=#{studentBean.fees} preserveDataModel=true
rows=8

...

t:commandLink id=command_link action=#{sutendBean.choose}
immediate=true
h:outputText value=#{fee.fee} /
t:updateActionListener property=#{feeBean.fee} value=#{fee} /
/t:commandLink



In my faces_config.xml I have :

navigation-rule
from-view-id*/from-view-id
navigation-case
from-action#{studentBean.choose}/from-action
from-outcomesuccess/from-outcome
to-view-id/view/fee.xhtml/to-view-id
redirect /
/navigation-case
/navigation-rule


Using Eclipse / Tomcat Debug when I enter in feeBean I can see that my
property #{feeBean.fee} is set to null

Are those steps correct ? Is that the way to have a master-detail
redirection using these frameworks ?
   
-
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 



SV: SV: SHALE-444

2007-05-27 Thread Hermod Opstvedt
Hi

Well, then I am at a loss. I have it running on 3 different machines doing
exactly what you did. Maybe Ryan can shed some light on this. 

Hermod

-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 26. mai 2007 21:53
Til: user@shale.apache.org
Emne: Re: SV: SHALE-444

Thx Hermod for your help.
But i've still got a problem - there is no new editor entry or a new wizard
dialog for clay.
plugin is copied to the plugin folder. eclipse started with -clean.

Error Log stays empty. Any help how to find out if plugin is correctly
there:

It shows up in window-preferences-plugin-in development-target platform.

But under Info-Plugin Details theres nothing about Shale/Clay.

Any additional help someone can provide - i am using eclipse 3.2.1.

Torsten

Am Samstag, den 26.05.2007, 18:59 +0200 schrieb Hermod Opstvedt:
 Hi
 
 You can get it from here:
 http://www.opstvedt.com/div/shale_clay_plugin_1.0.0.jar
 
 Hermod
 
 -Opprinnelig melding-
 Fra: Torsten Krah [mailto:[EMAIL PROTECTED]
 Sendt: 26. mai 2007 17:14
 Til: user@shale.apache.org
 Emne: SHALE-444
 
 Hi, did found - wowww - this nice work.
 Although i am too dumb to get it working with eclipse.
 
 What have i have to do to get it working (got eclipse3.2).
 
 Compile something, put something at some place, some help would be 
 nice :-)
 - i cant wait to see this plugin in action ;)
 
 Torsten
 



SV: SV: SV: SHALE-444

2007-05-27 Thread Hermod Opstvedt
Hi

I am running it as a jar file just fine. I exported it as plugin, so it
should be a able to run as is (and it is). 

Hermod

-Opprinnelig melding-
Fra: Ryan Wynn [mailto:[EMAIL PROTECTED] 
Sendt: 27. mai 2007 19:48
Til: user@shale.apache.org; [EMAIL PROTECTED]
Emne: Re: SV: SV: SHALE-444

Yes, you must unzip in plugin directory.  When I downloaded from Hermod's
site the url said .jar but the actual file was .zip.  Either one will work,
though it should be zip.

However, I just checked and the way the jar is built you will need to
actually create a directory inside plugins first.

cd plugins
mkdir shale_clay_plugin_1.0.0
cd shale_clay_plugin_1.0.0
mv shale_clay_plugin_1.0.0.zip .
unzip shale_clay_plugin_1.0.0.zip

then restart eclipse



On 5/27/07, Torsten Krah [EMAIL PROTECTED] wrote:
 Its a jar file.

 I copied the jar in the plugin directory - must i unzip the jar there?

 Yes, Graphical Editing Framework GEF and Xerxes are there, installed 
 through the eclipse manager and up to date.

 Torsten

 Am Sonntag, den 27.05.2007, 13:31 -0400 schrieb Ryan Wynn:
  ns directory, not simply
  copying the zip file there.





SV: SV: SV: Shale and Sandbox inputSuggestAjax

2007-05-20 Thread Hermod Opstvedt
Hi

How is your progress on this. Seems like there are some issues[1] with the 
inputSuggestAjax.

[1] https://issues.apache.org/jira/browse/TOMAHAWK-999 

I have been very busy the last week and a ahalf, so I have not been able to 
complete the fix to the ShaleValidator (It's about halfway done)

Hermod

-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 11. mai 2007 15:18
Til: user@shale.apache.org
Emne: RE: SV: SV: Shale and Sandbox inputSuggestAjax

Yeah, 

declared it.

component jsfid=suggestAjax extends=s:inputSuggestAjax
attributes
set name=suggestedItemsMethod

value=#{inputSuggestAjax.getAddresses} /
set name=itemLabelMethod

value=#{inputSuggestAjax.getAddressLabel} /
set name=value

value=#{inputSuggestAjax.choosenAddress} /
set name=charset value=utf-8 /
set name=maxSuggestedItems value=10 /
/attributes
converter jsfid=f:converter
attributes
set name=converterId

value=inputSuggestAjaxConverter /
/attributes
/converter
/component


converter
converter-idinputSuggestAjaxConverter/converter-id

converter-classde.sf.faces.ajax.InputSuggestAjaxConverter/converter-c
lass
/converter

converter gets called - so this should work.

Torsten

PS: Hm i test the simple sample again, but this didn't work either for me - 
lets give it a try again.


Am Freitag, den 11.05.2007, 11:38 +0200 schrieb
[EMAIL PROTECTED]:
 Hi
 
 The regular inputSuggestAjax works, and I am just about to test the 
 label/value sample now. However, there is one thing that comes to 
 mind. Have you done anything to the converter (i.e have you declared 
 it?)
 
 Hemrod
 
 -Original Message-
 From: Torsten Krah [mailto:[EMAIL PROTECTED]
 Sent: Friday, May 11, 2007 11:08 AM
 To: user@shale.apache.org
 Subject: Re: SV: SV: Shale and Sandbox inputSuggestAjax
 
 
 Debugged dojo a little bit:
 
 onLoad calls this function on
 
 
 var js=ifd.getElementsByTagName(textarea)[0].value;
 
 
 However, textarea is not known and got no properies, excaption is 
 thrown and gets catched.
 Thats all - maybe the problem, but that might be a dojo issue - i am 
 wonder if this is shale related, as the irian example with jsp does 
 work.
 
 Hermod, does it work for you? 
 
 Torsten
 
 Am Freitag, den 11.05.2007, 10:21 +0200 schrieb Torsten Krah:
  Hm i got a serious problem:
  
  Using firebug to analyse the response for the 3rd example (using 
  converter + label) under:
  
  http://www.irian.at/myfaces-sandbox/inputSuggestAjax.jsf
  
  On load the address is show in the field, and the answer on clocking 
  the arrow is:
  
  [[detroit,nonamestreet,KL,11],[san
  diego,maxstreet,SJ,12],[philadelphia,philstreet,NW,13],[new
  york,newstreet,IL,14],[san francisco,sanstreet,NY,15],]
  
  Used it with clay, and now i get:
  
  Instead of the detroit ... , the 11 number is shown in the input 
  field.
  
  The answer of the ajax request is:
  
  
  [[detroit,nonamestreet,KL,11],[san 
  diego,maxstreet,SJ,12],[philadelphia,philstreet,NW,13
  ],[new york,newstreet,IL,14],[san 
  francisco,sanstreet,NY,15],]
  
  
  The same.
  
  But no popup for the suggests. No ajax or js error on the debug 
  console - whats wrong here?
  
  Torsten
  
  Am Freitag, den 11.05.2007, 09:45 +0200 schrieb Torsten Krah:
   Thx - nice work.
   
   Tried it, works so far - method gets called and i get an ajax response.
   But i see no popup in the browser, must have done something wrong ;).
   
   Torsten
   
   
   Am Dienstag, den 08.05.2007, 19:57 +0200 schrieb Hermod Opstvedt:
Hi

Wiki entry in place.

Hermod


-Opprinnelig melding-
Fra: Erik Govaers [mailto:[EMAIL PROTECTED]
Sendt: 8. mai 2007 17:33
Til: user@shale.apache.org
Emne: Re: SV: Shale and Sandbox inputSuggestAjax

Hi,

It would be brilliant if you could get us a fix in a couple of days. 
I'm in an advanced phase of a project and I'm reluctant to let go of 
either Shale or Tomahawk-Sandbox. And yes, I would welcome a Wiki too.

Thank you,

Erik


- Oorspronkelijk bericht -
Van: Hermod Opstvedt [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag, mei 8, 2007 05:14 PM
Aan: user@shale.apache.org
Onderwerp: SV: Shale and Sandbox inputSuggestAjax

Hi

I have a working setup for Clay on this and if there is an interest I 
can write a small tutorial on the Wiki.

I am going to start a fix for the Shale-validator which is the cause 
of this later to day and hopefully it will be done in a day or two.

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED]
Sendt: 8. mai 2007 16:47
Til: user

SV: Clay @ symbol not setting taglib mutator to null

2007-05-18 Thread Hermod Opstvedt
Hi

First of all why do you not use the Acegi integration library that Cagatay
Civici? It works like a charm.

I have not checked if what happens when you use symbols in connection with
declared components like you do, but I suspect it might be a bug. Please
file a Jira issue for it.

Hermod

-Opprinnelig melding-
Fra: Darran White [mailto:[EMAIL PROTECTED] 
Sendt: 18. mai 2007 18:00
Til: user@shale.apache.org
Emne: Clay @ symbol not setting taglib mutator to null

Hi,

Not sure if this is a bug in clay but the clay documentation states

If the result of the substitution is a zero length string, a null value is
returned and the value is not apply to a property

 

I have a clay config file using acegijsf it is configured as follows

 

  component jsfid=acegijsf:authorize
componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true

attributes

  set name=ifAllGranted value=@ifAllGranted/

  set name=ifAnyGranted value=@ifAnyGranted/

  set name=ifNotGranted value=@ifNotGranted/

/attributes

  /component

 

If in my html I use

span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN 

ADMIN ONLY STUFF

/span

 

When the page is rendered the Authorize class is having its methd

 

public void setIfAllGranted(String ifAllGranted)

 

set to @ifAllGranted

 

and 

 

public void setIfNotGranted(String ifNotGranted)

 

set to @ifNotGranted

 

Now I believe these should be set to null and its causing the acegijsf to
work incorrectly as it expects null values for these attributes if they`re
not set.

 

If I replace the symbols with el the same problem occurs.

 

I have a temporary work around which is to create separate widgets for each
of the attribute options but wondered if any body else had experienced this?

 

So work around is 

  component jsfid=acegijsf:ifAnyAuthorize
componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true

attributes

  set name=ifAnyGranted value=@ifAnyGranted/

/attributes

  /component

 

Regards

 

Darran White
Senior Developer

Mobile:  +44 (0) 7795577076 
Skype:   darran.whiteEmail:  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
www.opsera.com http://www.opsera.com 

Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ
| UK

This e-mail is confidential, intended only for the named recipient(s) above
and may contain information that is privileged and confidential.
If you receive this message in error, or are not the named recipient(s),
please notify the sender at the phone number above, do not copy this
message, do not disclose its contents to anyone, and delete this e-mail
message from your computer. Although Opsera routinely screens for viruses,
addressees should scan this e-mail and any attachments for viruses. Opsera
makes no representation or warranty as to the absence of viruses in this
e-mail or any attachments.

 




SV: Clay @ symbol not setting taglib mutator to null

2007-05-18 Thread Hermod Opstvedt
 Business Park Reading | Berkshire | RG6 1AZ
| UK

This e-mail is confidential, intended only for the named recipient(s) above
and may contain information that is privileged and confidential. If you
receive this message in error, or are not the named recipient(s), please
notify the sender at the phone number above, do not copy this message, do
not disclose its contents to anyone, and delete this e-mail message from
your computer. Although Opsera routinely screens for viruses, addressees
should scan this e-mail and any attachments for viruses. Opsera makes no
representation or warranty as to the absence of viruses in this e-mail or
any attachments.


-Original Message-
From: Hermod Opstvedt [mailto:[EMAIL PROTECTED]
Sent: 18 May 2007 17:40
To: user@shale.apache.org
Subject: SV: Clay @ symbol not setting taglib mutator to null

Hi

First of all why do you not use the Acegi integration library that Cagatay
Civici? It works like a charm.

I have not checked if what happens when you use symbols in connection with
declared components like you do, but I suspect it might be a bug. Please
file a Jira issue for it.

Hermod

-Opprinnelig melding-
Fra: Darran White [mailto:[EMAIL PROTECTED]
Sendt: 18. mai 2007 18:00
Til: user@shale.apache.org
Emne: Clay @ symbol not setting taglib mutator to null

Hi,

Not sure if this is a bug in clay but the clay documentation states

If the result of the substitution is a zero length string, a null value is
returned and the value is not apply to a property

 

I have a clay config file using acegijsf it is configured as follows

 

  component jsfid=acegijsf:authorize
componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true

attributes

  set name=ifAllGranted value=@ifAllGranted/

  set name=ifAnyGranted value=@ifAnyGranted/

  set name=ifNotGranted value=@ifNotGranted/

/attributes

  /component

 

If in my html I use

span jsfid=acegijsf:authorize ifAnyGranted=ROLE_ADMIN 

ADMIN ONLY STUFF

/span

 

When the page is rendered the Authorize class is having its methd

 

public void setIfAllGranted(String ifAllGranted)

 

set to @ifAllGranted

 

and 

 

public void setIfNotGranted(String ifNotGranted)

 

set to @ifNotGranted

 

Now I believe these should be set to null and its causing the acegijsf to
work incorrectly as it expects null values for these attributes if they`re
not set.

 

If I replace the symbols with el the same problem occurs.

 

I have a temporary work around which is to create separate widgets for each
of the attribute options but wondered if any body else had experienced this?

 

So work around is 

  component jsfid=acegijsf:ifAnyAuthorize
componentType=net.sf.jsfcomp.acegijsf.Authorize allowBody=true

attributes

  set name=ifAnyGranted value=@ifAnyGranted/

/attributes

  /component

 

Regards

 

Darran White
Senior Developer

Mobile:  +44 (0) 7795577076 
Skype:   darran.whiteEmail:  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
www.opsera.com http://www.opsera.com 

Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ
| UK

This e-mail is confidential, intended only for the named recipient(s) above
and may contain information that is privileged and confidential.
If you receive this message in error, or are not the named recipient(s),
please notify the sender at the phone number above, do not copy this
message, do not disclose its contents to anyone, and delete this e-mail
message from your computer. Although Opsera routinely screens for viruses,
addressees should scan this e-mail and any attachments for viruses. Opsera
makes no representation or warranty as to the absence of viruses in this
e-mail or any attachments.

 







SV: is there any way I can tell clay parser to print a block of html code as it is without any changes?

2007-05-14 Thread Hermod Opstvedt
Hi

Try using the outputText with the escape=false attribute.

Hermod

-Opprinnelig melding-
Fra: AM101 [mailto:[EMAIL PROTECTED] 
Sendt: 14. mai 2007 22:35
Til: user@shale.apache.org
Emne: is there any way I can tell clay parser to print a block of html code
as it is without any changes?


I am using a flash slide show in my html page. This slide show uses a xml
file (images.xml) to configure images that needs to be displayed in the
slide show.

It works fine as a static html page (without clay) but when i use it with
clay, clay throws NullPointerException during parsing. is there any way I
can tell clay parser to print a block of html code as it is without any
changes?

Thanks,
AM
--
View this message in context:
http://www.nabble.com/is-there-any-way-I-can-tell-clay-parser-to-print-a-blo
ck-of-html-code-as-it-is-without-any-changes--tf3754736.html#a10611556
Sent from the Shale - User mailing list archive at Nabble.com.




SV: SV: Shale and Sandbox inputSuggestAjax

2007-05-08 Thread Hermod Opstvedt
Hi

Wiki entry in place.

Hermod


-Opprinnelig melding-
Fra: Erik Govaers [mailto:[EMAIL PROTECTED] 
Sendt: 8. mai 2007 17:33
Til: user@shale.apache.org
Emne: Re: SV: Shale and Sandbox inputSuggestAjax

Hi,

It would be brilliant if you could get us a fix in a couple of days. I'm in an 
advanced phase of a project and I'm reluctant to let go of either Shale or 
Tomahawk-Sandbox. And yes, I would welcome a Wiki too.

Thank you,

Erik


- Oorspronkelijk bericht -
Van: Hermod Opstvedt [mailto:[EMAIL PROTECTED]
Verzonden: dinsdag, mei 8, 2007 05:14 PM
Aan: user@shale.apache.org
Onderwerp: SV: Shale and Sandbox inputSuggestAjax

Hi

I have a working setup for Clay on this and if there is an interest I can 
write a small tutorial on the Wiki.

I am going to start a fix for the Shale-validator which is the cause of this 
later to day and hopefully it will be done in a day or two.

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 8. mai 2007 16:47
Til: user@shale.apache.org
Emne: Re: Shale and Sandbox inputSuggestAjax

From: Erik Govaers [EMAIL PROTECTED] 

 Hello, 
 
 I’m trying my hand at a very simple example based on the 
 example at http://www.irian.at/myfaces-sandbox/inputSuggestAjax.jsf. I get 
 an 
 input field, but when I start typing I get no suggestions since my backing 
 bean 
 ‘suggestedItems’ method is never called. I’m using server-side saving, 
 but 
 switching to client-side makes no difference. I’ve looked at a lot of the 
 inputSuggestAjax related issues in the mailing lists, but found no solution 
 yet. 
 My guess is that is has either something to do with the fact that I'm using 
 MyFaces 1.1.3 or with the fact that the Shale/Clay ValidatorInputRenderer is 
 overwriting the InputSuggestAjax Renderer (something I noticed just now). If 
 the 
 latter is true, what can I do to prevent this? 


This is an open JIRA ticket [1].  We need to find a configurable option for 
specifying components in the javax.faces.Input family that should be 
excluded from the commons validator renderer decorator.

This looks like a cool component. You might try a workaround.  This is a 
*complete hack* but I think it should solve this problem.  The trick would be 
to change the component family and rendererType.
 
 
[1] https://issues.apache.org/struts/browse/SHALE-442
 
Consider:


// subclass the component overriding the family and renderer type.
package com.acme.InputSuggestAjax
public class InputSuggestAjax extends 
org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax {
   public InputSuggestAjax() {
  setRendererType(com.acme.InputSuggestAjax)
   }   
   public String getFamily() {
   return com.acme.Input;
   }


}

// register the subclassed component in the /WEB-INF/faces-config.xml

  component
component-typecom.acme.InputSuggestAjax/component-type
component-classcom.acme.InputSuggestAjax/component-class
  /component
 render-kit
renderer
  component-familycom.acme.Input/component-family
  renderer-typecom.acme.InputSuggestAjax/renderer-type
  
 renderer-classorg.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjaxRenderer/renderer-class
/renderer
  /render-kit


Depending on if you are using JSP, Clay or Facelets you will need some 
additional setup. 


Gary








Recommendation for Ajax enabled inputText

2007-05-07 Thread Hermod Opstvedt
Hi

I have been searching the net for an Ajax enabled inputText component, but
have naot found anything that I like. I want to try it out to see what
performance it will give using shale-remoting as opposed to the JSF submit
that happens with inputSuggestAjax component from tomahawk.

If anybody has a working sample using dojo or similar I appreciate it.

Hermod



SV: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type problem, the defaultRenderer wrapped is of the needed type - how to expose?

2007-05-04 Thread Hermod Opstvedt
Hi

I have tried to follow you example, but there must be something more to it.

I have set the suggestedItemsMethod and itemLabelMethod to MB

I have in the chain-config:

catalog name=clayCustomization
chain name=suggestedItemsMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
chain name=itemLabelMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
/catalog

But when I run it i get:

javax.faces.FacesException: Could not set property suggestedItemsMethod of
component personregpanel:_id72 to value : #{post.getCities} with type :
java.lang.String
at
javax.faces.component._ComponentAttributesMap.setComponentProperty(_Componen
tAttributesMap.java:419)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.ja
va:312)
at
org.apache.shale.clay.component.chain.PropertyValueCommand.execute(PropertyV
alueCommand.java:193)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 3. mai 2007 23:20
Til: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 

 
The binding type should be MB but there is more to it.  The method binding
requires defining the formal parameter list.  The custom bindings are
configured by attribute name.
 
You will need to register your own command to create the custom binding.
This requires adding a chain to the clayCustomization catalog.  The name
of the chain should correspond to the attribute name.
 

WEB-INF/chain-config.xml
catalog name=clayCustomization
   chain name=suggestedItemsMethod
 command className=acme.PropertyListenerCommand /
   /chain
/catalog

The shale-clay-trinidad project in the sandbox has an example[1][2].
 
[1]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/weba
pp/WEB-INF/chain-config.xml?view=markup
[2]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java
/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
?view=markup
 

Torsten

 
Gary

Am Donnerstag, den 03.05.2007, 19:01 +0200 schrieb Torsten Krah:
 Did some code do get this wrapped functionality in.
 
 Ajay encode call is made now - however, on the InputAjax class - the
 method binding was not set.
 
 What else have i have to do, to get a method binding expression on a
 attribute working?
 
 My clay sandbox xml got:
 
 set name=suggestedItemsMethod bindingType=VB
 
 Should be enough, shouldn't it?
 
 Torsten
 




SV: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type problem, the defaultRenderer wrapped is of the needed type - how to expose?

2007-05-04 Thread Hermod Opstvedt
Hi

Disregard this. I had forgotten to configure Chain in my web.xml file.
However the situation remains unchanged. The configured method is not beeing
called and the Ajax post is hanging (loading according to firebug). The
PropertyListenerCommand is now beeing called and does what it is supposed to
(I think).

When I debug it, the following line:

propertyHelper.setValue(child, attributeBean.getName(), mb);

has:
child:
org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax
attributeBean.getName():suggestedItemsMethod
mb: #{post.getCities}


Hermod


-Opprinnelig melding-
Fra: Hermod Opstvedt [mailto:[EMAIL PROTECTED] 
Sendt: 4. mai 2007 18:59
Til: user@shale.apache.org
Emne: SV: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hi

I have tried to follow you example, but there must be something more to it.

I have set the suggestedItemsMethod and itemLabelMethod to MB

I have in the chain-config:

catalog name=clayCustomization
chain name=suggestedItemsMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
chain name=itemLabelMethod
command

className=com.opstvedt.osseil.component.chain.myfaces.PropertyListenerComma
nd /
/chain
/catalog

But when I run it i get:

javax.faces.FacesException: Could not set property suggestedItemsMethod of
component personregpanel:_id72 to value : #{post.getCities} with type :
java.lang.String
at
javax.faces.component._ComponentAttributesMap.setComponentProperty(_Componen
tAttributesMap.java:419)
at
javax.faces.component._ComponentAttributesMap.put(_ComponentAttributesMap.ja
va:312)
at
org.apache.shale.clay.component.chain.PropertyValueCommand.execute(PropertyV
alueCommand.java:193)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 3. mai 2007 23:20
Til: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay - ValidatorInputRenderer Type
problem, the defaultRenderer wrapped is of the needed type - how to expose?

Hm - its a method binding expression - not a value binding one, so it
should be MB, shouldn't it? 

 
The binding type should be MB but there is more to it.  The method binding
requires defining the formal parameter list.  The custom bindings are
configured by attribute name.
 
You will need to register your own command to create the custom binding.
This requires adding a chain to the clayCustomization catalog.  The name
of the chain should correspond to the attribute name.
 

WEB-INF/chain-config.xml
catalog name=clayCustomization
   chain name=suggestedItemsMethod
 command className=acme.PropertyListenerCommand /
   /chain
/catalog

The shale-clay-trinidad project in the sandbox has an example[1][2].
 
[1]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/weba
pp/WEB-INF/chain-config.xml?view=markup
[2]
http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java
/org/apache/shale/clay/component/chain/trinidad/PropertyListenerCommand.java
?view=markup
 

Torsten

 
Gary

Am Donnerstag, den 03.05.2007, 19:01 +0200 schrieb Torsten Krah:
 Did some code do get this wrapped functionality in.
 
 Ajay encode call is made now - however, on the InputAjax class - the
 method binding was not set.
 
 What else have i have to do, to get a method binding expression on a
 attribute working?
 
 My clay sandbox xml got:
 
 set name=suggestedItemsMethod bindingType=VB
 
 Should be enough, shouldn't it?
 
 Torsten
 





SV: s:inputSuggestAjax an Shale/Clay

2007-05-03 Thread Hermod Opstvedt
Hi

I am investigating this, and so far I have been able to rule out Shale as
the culprit. I took the tomahawk sandbox sample application and wired in
Shale and it still worked. I am taking this one step at a time in hope of
pinpointing where things og wrong.

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 3. mai 2007 17:51
Til: [EMAIL PROTECTED]
Kopi: user@shale.apache.org
Emne: Re: s:inputSuggestAjax an Shale/Clay

Get it now rendered, although a form in a form it does not really like.

But i am facing the same problem you've got, nothing happens - my bean
methods are not called.

Am Dienstag, den 01.05.2007, 22:59 +0200 schrieb Hermod Opstvedt:
 Hi
 
 Has anybody made the inputSuggestAjax component work in a Shale/Clay
 environment. It's posting to the server, but it's not calling my method on
 the configured bean. It just disapears
 
 Hermod
 



s:inputSuggestAjax an Shale/Clay

2007-05-01 Thread Hermod Opstvedt
Hi

Has anybody made the inputSuggestAjax component work in a Shale/Clay
environment. It's posting to the server, but it's not calling my method on
the configured bean. It just disapears

Hermod



SV: Dialog SCXML Data class - Setter injection, ViewController etc. pp.

2007-04-29 Thread Hermod Opstvedt
Hi

Are you using the Shale-spring integration?

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 29. april 2007 12:08
Til: user@shale.apache.org
Emne: Dialog SCXML Data class - Setter injection, ViewController etc. pp.

The configured data class is not managed trough the bean facility - am i
right?

However, it would be nice to have things like setter injection  view
controller for this data class too.
Is there already a good way there yet to do this?

Torsten



SV: SV: SV: How to initialize a bean before initial display

2007-04-27 Thread Hermod Opstvedt
Hi

If its not called, you must have placed it in session-scope (it must be
request-scoped), or it is not mapped against the view in faces-config.xml

Hermod


-Opprinnelig melding-
Fra: AM101 [mailto:[EMAIL PROTECTED] 
Sendt: 26. april 2007 23:54
Til: user@shale.apache.org
Emne: Re: SV: SV: How to initialize a bean before initial display


Thanks for your reply. I am now extending AbstractViewController and
implemented the init() method but this method is never called. do I need to
configure anything? I am new to Shale, I appreciate your help.



Hermod Opstvedt wrote:
 
 Hi
 
 In that case you can initialize it in the init method or prerender method
 of
 the viewcontroller.
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 21:22
 Til: user@shale.apache.org
 Emne: Re: SV: How to initialize a bean before initial display
 
 
 It is a view backing bean.
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 What type of bean? Is it ViewController or what?
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 17:30
 Til: user@shale.apache.org
 Emne: How to initialize a bean before initial display
 
 
 How do I initialize a bean before initial display? I want to populate
 bean
 values from database table. 
 
 I can do it in the constructor, phase listener or by adding additional
 getter method to initialize the bean. But is there any better way?
 
 -- 
 View this message in context:


http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10202810
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:

http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10206968
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
365.html#a10209745
Sent from the Shale - User mailing list archive at Nabble.com.




SV: SV: SV: SV: How to initialize a bean before initial display

2007-04-27 Thread Hermod Opstvedt
Hi

What is the name of the view and bean?

Example:

If yor view is /lists.jsf the the bean must be defined as lists

If your view is /member/info.jsf, then the bean must be defined as
member$info

And so on.

Hermod


-Opprinnelig melding-
Fra: AM101 [mailto:[EMAIL PROTECTED] 
Sendt: 27. april 2007 16:50
Til: user@shale.apache.org
Emne: Re: SV: SV: SV: How to initialize a bean before initial display


My backing bean is request-scoped and it is mapped in faces-config.xml. 

But I am using ADF and now I want to use shale going forward. I added
shale-application.jar, shale-core.jar and shale-view.jar to my existing
library. I also modified web.xml and added following entries:

!-- Shale Application Controller Filter --
filter
filter-nameshale/filter-name
filter-class

org.apache.shale.application.faces.ShaleApplicationFilter
/filter-class
/filter

!-- Shale Application Controller Filter Mapping --
filter-mapping
filter-nameshale/filter-name
url-pattern/*/url-pattern
/filter-mapping

I don't get any exception at startup and My backing bean is extending
AbstractViewController but init() method is never called by the controller.




Hermod Opstvedt wrote:
 
 Hi
 
 If its not called, you must have placed it in session-scope (it must be
 request-scoped), or it is not mapped against the view in faces-config.xml
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 23:54
 Til: user@shale.apache.org
 Emne: Re: SV: SV: How to initialize a bean before initial display
 
 
 Thanks for your reply. I am now extending AbstractViewController and
 implemented the init() method but this method is never called. do I need
 to
 configure anything? I am new to Shale, I appreciate your help.
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 In that case you can initialize it in the init method or prerender method
 of
 the viewcontroller.
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 21:22
 Til: user@shale.apache.org
 Emne: Re: SV: How to initialize a bean before initial display
 
 
 It is a view backing bean.
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 What type of bean? Is it ViewController or what?
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 17:30
 Til: user@shale.apache.org
 Emne: How to initialize a bean before initial display
 
 
 How do I initialize a bean before initial display? I want to populate
 bean
 values from database table. 
 
 I can do it in the constructor, phase listener or by adding additional
 getter method to initialize the bean. But is there any better way?
 
 -- 
 View this message in context:



http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10202810
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:


http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10206968
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:

http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10209745
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
365.html#a10220616
Sent from the Shale - User mailing list archive at Nabble.com.




SV: SV: SV: SV: SV: How to initialize a bean before initial display

2007-04-27 Thread Hermod Opstvedt
etExternalContextImpl.java:416)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
lerImpl.java:234)
at
oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHan
dlerImpl.java:157)
at
org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:
450)
at
org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:
147)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

###


Hermod Opstvedt wrote:
 
 Hi
 
 What is the name of the view and bean?
 
 Example:
 
 If yor view is /lists.jsf the the bean must be defined as lists
 
 If your view is /member/info.jsf, then the bean must be defined as
 member$info
 
 And so on.
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 27. april 2007 16:50
 Til: user@shale.apache.org
 Emne: Re: SV: SV: SV: How to initialize a bean before initial display
 
 
 My backing bean is request-scoped and it is mapped in faces-config.xml. 
 
 But I am using ADF and now I want to use shale going forward. I added
 shale-application.jar, shale-core.jar and shale-view.jar to my existing
 library. I also modified web.xml and added following entries:
 
 !-- Shale Application Controller Filter --
   filter
   filter-nameshale/filter-name
   filter-class
   
 org.apache.shale.application.faces.ShaleApplicationFilter
   /filter-class
   /filter
 
   !-- Shale Application Controller Filter Mapping --
   filter-mapping
   filter-nameshale/filter-name
   url-pattern/*/url-pattern
   /filter-mapping
 
 I don't get any exception at startup and My backing bean is extending
 AbstractViewController but init() method is never called by the
 controller.
 
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 If its not called, you must have placed it in session-scope (it must be
 request-scoped), or it is not mapped against the view in faces-config.xml
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 23:54
 Til: user@shale.apache.org
 Emne: Re: SV: SV: How to initialize a bean before initial display
 
 
 Thanks for your reply. I am now extending AbstractViewController and
 implemented the init() method but this method is never called. do I need
 to
 configure anything? I am new to Shale, I appreciate your help.
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 In that case you can initialize it in the init method or prerender
 method
 of
 the viewcontroller.
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 21:22
 Til: user@shale.apache.org
 Emne: Re: SV: How to initialize a bean before initial display
 
 
 It is a view backing bean.
 
 
 
 Hermod Opstvedt wrote:
 
 Hi
 
 What type of bean? Is it ViewController or what?
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: AM101 [mailto:[EMAIL PROTECTED] 
 Sendt: 26. april 2007 17:30
 Til: user@shale.apache.org
 Emne: How to initialize a bean before initial display
 
 
 How do I initialize a bean before initial display? I want to populate
 bean
 values from database table. 
 
 I can do it in the constructor, phase listener or by adding additional
 getter method to initialize the bean. But is there any better way?
 
 -- 
 View this message in context:




http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10202810
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:



http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10206968
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:


http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10209745
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 
 
 -- 
 View this message in context:

http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
 365.html#a10220616
 Sent from the Shale - User mailing list archive at Nabble.com.
 
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-initialize-a-bean-before-initial-display-tf3652
365.html#a10223552
Sent from the Shale - User mailing list archive at Nabble.com.




SV: Submitted values lost - view is refilled everytime with model values

2007-04-26 Thread Hermod Opstvedt
Hi

I think this is related to [1], since you are missing stuff from scope

[1] https://issues.apache.org/struts/browse/SHALE-410

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 26. april 2007 17:51
Til: user@shale.apache.org
Emne: Re: Submitted values lost - view is refilled everytime with model
values

Got a problem with clay and flowScoped Spring beans.

My view is everytime filled with the model values. The submitted values
are lost.

I can enter some data in my input fields and submit the form - if i left
some required input fields empty, a message appears that something is
missing, so far so good.
However, the same field which i left empty - and all others i may have
changed - are now populated again with values from my bean.

What might cause this? I thought the component should remember this
value and display this instead of the beans model value. Lifecycle
stopped processing at Validation phase, so the components should not be
cleared, any idea or tipps to debug this?

I took a look at the webflow javadoc [1].  It looks like they are using a
couple tricks for saving the FlowExecution.  The FlowPhase listener [2] adds
a non-visual component to the view root to keep state.  It also adds the
flow execution key to the view root.It looks like the flow key is used to
restore the FlowExecution.  I suspect the problem you are seeing has to do
with the state not being resorted for the current flow on the postback.  I
would try setting some break points in the FlowPhaseListener. 
[1]
http://static.springframework.org/spring-webflow/docs/current/api/overview-s
ummary.html
[2]
http://opensource.atlassian.com/projects/spring/secure/attachment/12520/Flow
ExecutionKeyStateHolder.patch

Torsten


Gary



SV: SV: using tld2claycfg

2007-04-17 Thread Hermod Opstvedt
Hi

Where did you run this (folder?)

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 17. april 2007 15:23
Til: [EMAIL PROTECTED]
Kopi: user@shale.apache.org
Emne: Re: SV: using tld2claycfg

It seems that building anything with maven is a real pain to me.

Java 1.5, Maven 2.0.5.

mvn clean install

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.shale:Tld2ClayCfg:jar:1.0-SNAPSHOT

  Try downloading the file manually from the project website.

  Then, install it using the command: 
  mvn install:install-file -DgroupId=org.apache.shale
-DartifactId=Tld2ClayCfg \
  -Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency: 
1) org.apache.shale:Tld2ClayCfgMojo:maven-plugin:1.0-SNAPSHOT
2) org.apache.shale:Tld2ClayCfg:jar:1.0-SNAPSHOT

--
1 required artifact is missing.

for artifact: 
  org.apache.shale:Tld2ClayCfgMojo:maven-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)


[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 7 seconds
[INFO] Finished at: Tue Apr 17 15:21:30 CEST 2007
[INFO] Final Memory: 6M/11M
[INFO]



Hints?

Torsten

Am Dienstag, den 17.04.2007, 15:09 +0200 schrieb Hermod Opstvedt:
 Hi
 
 I answered this yesterday, but it seems that mail sent from work uses 4-5
 days to reach the list.
 
 
 Download the source from[1]
 
 Build the Maven plugin in the folder mojo by using mvn clean install
 In the test folder open the Mavne POM and tweak it according to what you
 want (the tld section and the dependency section).
 Run mvn clean install in the test folder. The generated jar in the target
 folder contains the Clay config files you want.
 
 [1] https://svn.apache.org/repos/asf/shale/maven/trunk/tld2claycfg
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
 Sendt: 17. april 2007 13:43
 Til: user@shale.apache.org
 Emne: Re: using tld2claycfg
 
 I guess Hermod does, because he made it.
 
 My problem is, i cant build the tool with maven, maybe i am doing
 something wrong - so Hermod, can you give us a short intro what to do to
 build it after svn checkout and how to create the clay config files?
 
 Torsten
 
 Am Sonntag, den 15.04.2007, 12:40 +1200 schrieb JS Portal Support:
  Hi,
  
  I've been trying to find some documentation on how to use the
tld2claycfg.
 I
  want to use some myfaces sandbox components but can't find the clay
config
  file for it and understand you can create it with tld2claycfg. Does
anyone
  know how and where?
  
  Thanks,
  Joost Schouten
  
  
 



SV: SAXParseException in clay-config.xml

2007-04-13 Thread Hermod Opstvedt
Hi

Could you post the clay-config.xml content around lines 25-35, that is in
the shale-clay-1.0.3.jar file

Hermod


-Opprinnelig melding-
Fra: jelmstrom [mailto:[EMAIL PROTECTED] 
Sendt: 13. april 2007 14:41
Til: [EMAIL PROTECTED]
Emne: SAXParseException in clay-config.xml


Hi,

I'm building a webapp that uses maven to include several other different
resources, one of these resources has a reference to shale-clay 1.0.3, until
recently this has not been a problem.

Today i upgraded to springframework 1.2.8 (previously used 1.2.6.), and now
when I start the appserver (Weblogic 8.1.4) i am getting a SAXParseException
in shale-clay.

The problem i have is that i am not actively using clay in my application,
so i hve not defined any clay configuration of my own, and its the default
implementation in  shale-clay-1.0.3.jar.. 

Has anyone got any idea how to fis this??

Regards

/Johan 

[Stacktrace]


..WEB-INF/lib/shale-clay-1.0.3.jar!/META-INF/clay-config.xml.
2007-apr-13 14:25:00 org.apache.commons.digester.Digester error
ALLVARLIG: Parse Error at line 28 column 19: Element type description must
be declared.
org.xml.sax.SAXParseException: Element type description must be declared.
at
weblogic.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Erro
rHandlerWrapper.java:232)
at
weblogic.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.ja
va:173)
at
weblogic.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja
va:371)
at
weblogic.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.ja
va:305)
at
weblogic.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDVal
idator.java:1833)
at
weblogic.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator
.java:724)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(
XMLDocumentFragmentScannerImpl.ja
va:759)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDi
spatcher.dispatch(XMLDocumentFrag
mentScannerImpl.java:1477)
at
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLD
ocumentFragmentScannerImpl.java:3
29)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
525)
at
weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:
581)
at
weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at
weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.jav
a:1175)
at
weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
at
weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at
org.apache.shale.clay.config.ClayXmlParser.loadConfigFile(ClayXmlParser.java
:164)
at
org.apache.shale.clay.config.beans.ComponentConfigBean$WatchDog.refresh(Comp
onentConfigBean.java:1122)
at
org.apache.shale.clay.config.beans.ComponentConfigBean.loadConfigFiles(Compo
nentConfigBean.java:182)
at
org.apache.shale.clay.config.beans.ComponentConfigBean.init(ComponentConfigB
ean.java:142)
at
org.apache.shale.clay.config.ClayConfigureListener.contextInitialized(ClayCo
nfigureListener.java:82)
at
weblogic.servlet.internal.WebAppServletContext$FireContextListenerAction.run
(WebAppServletContext.java:6781)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.notifyCreated(WebAppServletCo
ntext.java:1681)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServle
tContext.java:3255)
at
weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletConte
xt.java:5949)
at
weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:862)
at
weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2
127)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.jav
a:2168)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.jav
a:2115)
at
weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(Sla
veDeployer.java:3082)
at
weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllAppli
cations(SlaveDeployer.java:1751)
at
weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:359
)
at
weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(Deplo
ymentManagerServerLifeCycleImpl.j
ava:229)
at
weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
at 

SV: Shale Build Error - Lifecycle class not found

2007-04-13 Thread Hermod Opstvedt
Hi

Have you tried the mvn -U clean install? -U forces update.

Also: Are you using a maven-proxy by chance?

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 13. april 2007 10:12
Til: [EMAIL PROTECTED]
Emne: Re: Shale Build Error - Lifecycle class not found

I got no directory ~/.m2/repository/org/apache/myfaces

Output of mvn -X install:

http://fachschaft.imn.htwk-leipzig.de/~tkrah/mvn.out.gz

Maven does not want to download anything extra, although myfaces is
missing.
Deleted .m2 already but myfaces does not get fetched.

Torsten

Am Donnerstag, den 12.04.2007, 20:28 -0700 schrieb Craig McClanahan:
 On 4/12/07, Torsten Krah [EMAIL PROTECTED] wrote:
  cd ~/Development/src/shale-parent - top lvl directory of svn checkout
 
  mvn clean install
 
  Whats interesting is - it seams the complete jsf spec api is not
  found.
  Searching ~/.m2 for a myfaces api i got:
 
  Nothing ...
 
 
 Hmm ... for me, it's in:
 
 ~/.m2/repository/org/apache/myfaces/core/myfaces-api
 
 The build defaults to version 1.1.4 of this artifact.  This was
 downloaded initially from the standard Maven public repository.
 
 One thing you might try is using the -X option on your mvn command.
 It will create a very copious amount of debugging output, including
 which dependencies it thinks you need, and which repositories it is
 searching for them.
 
 (I also presume that you're connected to the Internet when running
 your build, so that new dependencies can be downloaded automatically.)
 
 Craig
 
 
  Have i have to provide it myself anywhere - thought maven would fetch it
  if needed.
 
  Torsten
 
  Am Mittwoch, den 11.04.2007, 13:34 -0700 schrieb Craig McClanahan:
   Hmm ... building the current trunk code (with Maven 2.0.4) works for
   me when I do the following:
  
   cd /framework -- top level directory of my SVN checkout
   mvn clean install
  
   Could you describe a little more about what commands you used to
   initiate the build that is breaking like this?
  
   Craig
  
   On 4/10/07, Torsten Krah [EMAIL PROTECTED] wrote:
Trying to build latest SVN Snapshot, i get:
   
[INFO] Surefire report directory:
   
/home/tkrah/Development/src/shale-parent/shale-test/target/surefire-reports
org.apache.maven.surefire.booter.SurefireExecutionException:
javax/faces/lifecycle/Lifecycle; nested exception is
java.lang.NoClassDefFoundError: javax/faces/lifecycle/Lifecycle
java.lang.NoClassDefFoundError: javax/faces/lifecycle/Lifecycle
at java.lang.Class.getDeclaredMethods0(Native Method)
at
java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getMethod0(Class.java:2670)
at java.lang.Class.getMethod(Class.java:1603)
at
   
org.apache.maven.surefire.junit.JUnitTestSet.createInstanceFromSuiteMethod(J
UnitTestSet.java:176)
at
   
org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSe
t.java:140)
at
   
org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:
247)
at
   
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(Ab
stractDirectoryTestSuite.java:104)
at
   
org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:1
50)
at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
   
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
   
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
   
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB
ooter.java:290)
at
   
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818
)
[INFO]

[ERROR] BUILD FAILURE
[INFO]

   
   
Can anyone confirm this or is my maven broken again?
   
Torsten
   
   
 
 



SV: componentType=override

2007-04-13 Thread Hermod Opstvedt
Hi

I don't think that you can redefine the t:updateActionListener in this way

You are naming the component: t:updateActionListener, but also extending it.
Try and give it a unique name

Hermod

-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 13. april 2007 18:40
Til: [EMAIL PROTECTED]
Emne: componentType=override

I am trying to use the updateActionListener from Tomahawk, using Hermods
tomahawk 1.1.5 Snapshot xml for clay.

But i get this exception:

[181892007-04-13
18:33:17,488](org.apache.myfaces.application.ApplicationImpl)**ERROR**{org.a
pache.myfaces.application.ApplicationImpl.createComponent:391} User:
-Undefined component type override
[181982007-04-13
18:33:17,497](org.apache.shale.clay.component.chain.CreateComponentCommand)*
*ERROR**{org.apache.shale.clay.component.chain.CreateComponentCommand.execut
e:166} User: -Cannot create Component renderId=464
jsfid=t:updateActionListener componentType=override
extends=t:updateActionListener allowBody=null facetName=null
javax.faces.FacesException: Undefined component type override


Hm according to the shale clay page, this componentType should be
possible.

Whats missing here?

Torsten



SV: Shale Build Error - Lifecycle class not found

2007-04-10 Thread Hermod Opstvedt
Hi

Which Maven version are you running? Latest is 2.0.6

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 10. april 2007 14:30
Til: [EMAIL PROTECTED]
Kopi: user@shale.apache.org
Emne: RE: Shale Build Error - Lifecycle class not found

Deleted the repository before i wrote the mail, did not help.
Cleaned out the project completly and trying to build, with or without
skip flag, now i get:

[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 57 source files
to /home/tkrah/Development/src/shale-parent/shale-test/target/classes
[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] Compilation failure

/home/tkrah/Development/src/shale-parent/shale-test/src/main/java/org/apache
/shale/test/base/AbstractJsfTestCase.java:[23,18] package javax.faces does
not exist

/home/tkrah/Development/src/shale-parent/shale-test/src/main/java/org/apache
/shale/test/base/AbstractJsfTestCase.java:[24,30] package
javax.faces.application does not exist

My fault i guess, but i dont know what i did wrong :(

Torsten


Am Dienstag, den 10.04.2007, 14:11 +0200 schrieb
[EMAIL PROTECTED]:
 Hi
 
 Trying now - Have you tried to clean out your m2 repo (rename it to .old)?

 
 You can also specify -Dmaven.test.skip=true to circumvent testing.
 
 
 Hermod
 
 
 
 -Original Message-
 From: Torsten Krah [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 10, 2007 12:42 PM
 To: user@shale.apache.org
 Subject: Shale Build Error - Lifecycle class not found
 
 
 Trying to build latest SVN Snapshot, i get:
 
 [INFO] Surefire report directory:

/home/tkrah/Development/src/shale-parent/shale-test/target/surefire-reports
 org.apache.maven.surefire.booter.SurefireExecutionException:
 javax/faces/lifecycle/Lifecycle; nested exception is
 java.lang.NoClassDefFoundError: javax/faces/lifecycle/Lifecycle
 java.lang.NoClassDefFoundError: javax/faces/lifecycle/Lifecycle
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
 at java.lang.Class.getMethod0(Class.java:2670)
 at java.lang.Class.getMethod(Class.java:1603)
 at

org.apache.maven.surefire.junit.JUnitTestSet.createInstanceFromSuiteMethod(J
UnitTestSet.java:176)
 at

org.apache.maven.surefire.junit.JUnitTestSet.constructTestObject(JUnitTestSe
t.java:140)
 at

org.apache.maven.surefire.junit.JUnitTestSet.getTestCount(JUnitTestSet.java:
247)
 at

org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(Ab
stractDirectoryTestSuite.java:104)
 at

org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:1
50)
 at org.apache.maven.surefire.Surefire.run(Surefire.java:111)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireB
ooter.java:290)
 at

org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818
)
 [INFO]

 [ERROR] BUILD FAILURE
 [INFO]

 
 
 Can anyone confirm this or is my maven broken again?
 
 Torsten
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
 
 This email with attachments is solely for the use of the individual or
 entity to whom it is addressed. Please also be aware that the DnB NOR
Group
 cannot accept any payment orders or other legally binding correspondence
with
 customers as a part of an email. 
 
 This email message has been virus checked by the anti virus programs used
 in the DnB NOR Group.
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*



SV: Clay nested templates

2007-04-10 Thread Hermod Opstvedt
Hi

In order for this to work, you need the following:

component jsfid=baseHomeLayout extends=clay id=baseHomeLayout
attributes 
set name=clayJsfid value=/templates/main_template.html
/ 
/attributes 
symbols 
set name=title
value=#{webLabels['msg.public.headTitle']} / 
/symbols 
/component

component jsfid=/user_calendar.jsf extends=baseHomeLayout 
symbols
set name=content value=/templates/column_template.html
set name=left_column value=/components/empty.html / 
set name=right_column value=/components/empty.html / 
/symbols
/component

Then in /templates/column_template.html you must have the symbols
@left_column and @right_column defined and in /templates/main_template.html
you must have @content defined

Take a look at the tutorials here:

[1] http://wiki.apache.org/shale/ShaleAndClayTutorial
[2] http://wiki.apache.org/shale/CreatingClayComponents

Hermod


-Opprinnelig melding-
Fra: JS Portal Support [mailto:[EMAIL PROTECTED] 
Sendt: 10. april 2007 13:23
Til: user@shale.apache.org
Emne: Clay nested templates

Hi,

I'm experimenting with Clay and I like it. A few things are not quite clear
to me though. I can make my page /user_calendar.jsf work with the following
clay config:

component jsfid=baseHomeLayout extends=clay id=baseHomeLayout
attributes
set name=clayJsfid value=/templates/main_template.html /
/attributes
symbols
set name=title value=#{webLabels['msg.public.headTitle']} /
set name=content value=/components/empty.html /
/symbols
/component

component jsfid=/user_calendar.jsf extends= baseHomeLayout 
symbols
set name=content value=/components/empty.html /
/symbols
/component

But I wish to insert another template inside a template, and thought the
following might work:

component jsfid=/user_calendar.jsf extends=baseHomeLayout
set name=content value=/templates/column_template.html
symbols
set name=left_column value=/components/empty.html /
set name=right_column value=/components/empty.html /
/symbols
/set
/symbols
/component

but it doesn't. I get the parse error:
java.lang.NoSuchMethodException: No such accessible method: addSymbol() on
object: org.apache.shale.clay.config.beans.SymbolBean.

I guess I will need to create an Element for the inserted template, but
tried different approaches but can't seem to get it to work. I could
obviously create a second complete template hardcoding
/templates/column_template.html in /templates/main_template.html, but that
defeats the Clay purpose.

Thank you,
joost





SV: Shale, Clay, Facelets and JSF Templating

2007-03-28 Thread Hermod Opstvedt
Hi

This seems like a total mess. Keep with one of them (If
siplicity/functionality counts - choose Clay)

Hermod

-Opprinnelig melding-
Fra: Kito D. Mann [mailto:[EMAIL PROTECTED] 
Sendt: 28. mars 2007 22:47
Til: user@shale.apache.org
Emne: RE: Shale, Clay, Facelets and JSF Templating

Ransford,

Just out of curiosity, why are you interested in using Clay, Facelets, and
JSF Templatin in the same application, since they all solve the same
problem?

~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: +1 203-653-2989
fax: +1 203-653-2988
* Sign up for the JSF Central newsletter!
http://oi.vresp.com/?fid=ac048d0e17 *



 

 -Original Message-
 From: paksegu [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, March 28, 2007 2:47 PM
 To: user@shale.apache.org
 Subject: Shale, Clay, Facelets and JSF Templating
 
  nameHi,
nameIs is possible to use Shale, Clay,  Facelets and 
 JSF Templating in the same application and if so will the 
 shale dialog and the standard navigation feature behave 
 differently? Also can anyone give me tips on where it will 
 best use jsf templating over clay or facelets?
 
 
 Ransford Segu-Baffoe
 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 http://www.noqturnalmediasystems.com/
 http://www.noqturnalmediasystems.com/Serenade/
 https://serenade.dev.java.net/
  
 -
 Now that's room service! Choose from over 150,000 hotels in 
 45,000 destinations on Yahoo! Travel to find your fit.
 



SV: Tomahawk's enabledOnUserRole attribute and Clay

2007-03-27 Thread Hermod Opstvedt
Hi

But this is handled in the new version of TlD2ClayCfg tool, so it if you use
it against the tomahawk 1.3 jar you will get a correct config file.

Hermod

-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 27. mars 2007 17:06
Til: user@shale.apache.org
Emne: Re: Tomahawk's enabledOnUserRole attribute and Clay

Perhaps I'm overlooking something here, but from the testing I did this 
afternoon, it appears that the enabledOnUserRole attribute provided with
most 
of Tomahawk's components doesn't work at all in Clay HTML templates.
However, 
it does work properly when I use straight JSP/JSF without Clay (at least
most of 
the time, anyway; t:commandButton seems to have issues with it).

I have an HTML template that contains an element that looks something like
the 
following:

input 
   type=checkbox 
   jsfid=t:selectBooleanCheckbox 
   value=#{mybean.myflag} 
   enabledOnUserRole=myrole 
/

When I view the page while logged in as a user that does not have the
myrole 
role, the checkbox is still enabled, and I can use it to toggle the 
corresponding flag in the underlying bean.  Thinking that it might be a
problem 
with the implicit mapping of the input element, I tried changing the HTML

element to just a span tag (with attributes set as above, minus the 
type=checkbox part), to no avail.

I also tried setting enabledOnUserRole for a textarea, and it didn't work 
correctly there, either.

visibleOnUserRole seems to work just fine, though.

Any ideas on this, or should I post it to JIRA?


This looks like another case where we need to explicitly override the
rendererType.
The shared renderer [1] is the default for the runtime but in tomahawk,
there is a renderer
override [2].


[1]
http://svn.apache.org/viewvc/myfaces/shared/branches/2_0_0/core/src/main/jav
a/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java?vie
w=markup
[2]
http://svn.apache.org/viewvc/myfaces/tomahawk/branches/1_1_3/core/src/main/j
ava/org/apache/myfaces/renderkit/html/ext/HtmlCheckboxRenderer.java?view=mar
kup


Could you try the following test to help troubleshoot the problem?

Extend the base check box component definition:

component jsfid=mySelectBooleanCheckbox
extends=t:selectBooleanCheckbox
 attributes
   set name=rendererType value=org.apache.myfaces.Checkbox
bindingType=VB /
/attributes
/component

In the html template, point to the override:

input 
   type=checkbox 
   jsfid=mySelectBooleanCheckbox 
   value=#{mybean.myflag} 
   enabledOnUserRole=myrole 
/


I think this should solve the problem but regardless, please create a JIRA
ticket.



For reference, I'm using MyFaces 1.1.4, Tomahawk 1.1.3, and Shale 1.0.4.



Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com


Gary



SV: URLs and backing beans

2007-03-24 Thread Hermod Opstvedt
Hi

I'm not shure what you are looking for her but his is my understanding of
it.

Why would you want a backing bean for this? This is more the responsibility
of an ApplicationController. What I would do is to subclass the Shale
Aplication controller and add the logic you want there. You can use the
filter mappings to control what gets routed to you

Backing beans (I take it you mean ViewControllers) are mapped against views
i.e page2.jsf, page2.jsf and so on.

Hermod

-Opprinnelig melding-
Fra: Brad Smith [mailto:[EMAIL PROTECTED] 
Sendt: 24. mars 2007 15:36
Til: user@shale.apache.org
Emne: URLs and backing beans

I have an application which needs to handle urls that have the following
patterns:

http://localhost:8080/myapp/projects/office1

http://localhost:8080/myapp/projects/office2

http://localhost:8080/myapp/projects/office2/subofficeA

Conceptually I would like the request to be routed to a single backing
bean called Projects that would use the URL content after ../projects/..
to determine what the response should be.

Are there features in Shale which would make this possible? Is this
where the Application Manager would come into play?



Thank you,

Brad




SV: SV: URLs and backing beans

2007-03-24 Thread Hermod Opstvedt
Hi

In which case I guess Rahul's answer was more useful.

Hermod


-Opprinnelig melding-
Fra: Brad Smith [mailto:[EMAIL PROTECTED] 
Sendt: 24. mars 2007 17:22
Til: user@shale.apache.org
Emne: Re: SV: URLs and backing beans

Thank you for the reply Hermod.

I should have added that in response to a url such as those in the
original post, the application would return a web page with a list of
projects that are active at each office.  The goal is to have a
bookmarkable URL without creating separate view controllers for each
office (on the order of 1000).

Brad


On Sat, 2007-03-24 at 16:43 +0100, Hermod Opstvedt wrote:
 Hi
 
 I'm not shure what you are looking for her but his is my understanding of
 it.
 
 Why would you want a backing bean for this? This is more the
responsibility
 of an ApplicationController. What I would do is to subclass the Shale
 Aplication controller and add the logic you want there. You can use the
 filter mappings to control what gets routed to you
 
 Backing beans (I take it you mean ViewControllers) are mapped against
views
 i.e page2.jsf, page2.jsf and so on.
 
 Hermod
 
 -Opprinnelig melding-
 Fra: Brad Smith [mailto:[EMAIL PROTECTED] 
 Sendt: 24. mars 2007 15:36
 Til: user@shale.apache.org
 Emne: URLs and backing beans
 
 I have an application which needs to handle urls that have the following
 patterns:
 
 http://localhost:8080/myapp/projects/office1
 
 http://localhost:8080/myapp/projects/office2
 
 http://localhost:8080/myapp/projects/office2/subofficeA
 
 Conceptually I would like the request to be routed to a single backing
 bean called Projects that would use the URL content after ../projects/..
 to determine what the response should be.
 
 Are there features in Shale which would make this possible? Is this
 where the Application Manager would come into play?
 
 
 
 Thank you,
 
 Brad
 
 



SV: prerender() not called on my tiles

2007-03-21 Thread Hermod Opstvedt
Hi

Why? Seems like there are a lot of issues with Tiles, I'm sticking with Clay
:)

Hermod


-Opprinnelig melding-
Fra: Greg Reddin [mailto:[EMAIL PROTECTED] 
Sendt: 21. mars 2007 16:38
Til: user@shale.apache.org
Emne: Re: prerender() not called on my tiles

On 3/20/07, Gary VanMatre [EMAIL PROTECTED] wrote:

 We sure need a tiles example app for Shale.


Yeah, one of these days I really need to start using Tiles 2 with a JSF
app.  I'm really behind the curve on that one :-)

Greg



SV: validation required

2007-03-19 Thread Hermod Opstvedt
Hi

Could you post more of the jsp. I would like to see the label etc.

Hermod

-Opprinnelig melding-
Fra: Sanjay Choudhary [mailto:[EMAIL PROTECTED] 
Sendt: 19. mars 2007 19:27
Til: user@shale.apache.org
Emne: validation required

I am not sure what I am missing here... snippet from my JSP is

h:inputText styleClass=inputText
value=#{bp.firstName} id=firstName
required=true size=30
val:commonsValidator type=required arg=First
name
server=true client=true message=
errors.required/
/val:commonsValidator
/h:inputText



in my message bundle file I have overridden
javax.faces.component.UIInput.REQUIRED={0} is required.  (I read on wiki
that message = errors.required will be ignored). Funny thing is that JSF is
not passing argument for {0}. On my client , I am seeing message {0} is
required instead of First name is required.   What am I missing here?

thanks,
Sanjay



SV: validation required

2007-03-19 Thread Hermod Opstvedt
Hei

Take a look at [1]. Notice the usage of the arg parameter.


[1] http://shale.apache.org/shale-validator/index.html

Hermod

-Opprinnelig melding-
Fra: Sanjay Choudhary [mailto:[EMAIL PROTECTED] 
Sendt: 19. mars 2007 21:14
Til: user@shale.apache.org
Emne: Re: validation required

Hermod and Gary,

 h:panelGrid columns=3 cellpadding=0 cellspacing=0
h:outputLabel for=firstName
h:outputText value=*
styleClass=required/h:outputText
h:outputText value=First name /
/h:outputLabel
h:inputText styleClass=inputText
value=#{bp.firstName} id=firstName size=30
maxlength=30 required=true
val:commonsValidator type=required arg=First
name
server=true client=true
message=#{bu['myerror']}/  tried as per Gary's
suggestion, nothing appeared
/h:inputText
h:message for=firstName
styleClass=message/h:message
/h:panelGrid


I read Gary's email and tried his thoughts. When I tried this without
required=true no message appeared and with required=true it showed the
default message {0} is required.

Sanjay.

On 3/19/07, Gary VanMatre [EMAIL PROTECTED] wrote:

 From: Sanjay Choudhary [EMAIL PROTECTED]
 
  I am not sure what I am missing here... snippet from my JSP is
 
 h:inputText styleClass=inputText
 value=#{bp.firstName} id=firstName
 required=true size=30
 val:commonsValidator type=required arg=First
 name
 server=true client=true message=
 errors.required/
 /val:commonsValidator
 /h:inputText
 
 
 
 
 
 
  in my message bundle file I have overridden
  javax.faces.component.UIInput.REQUIRED={0} is required. (I read on wiki
  that message = errors.required will be ignored). Funny thing is that JSF
 is
  not passing argument for {0}. On my client , I am seeing message {0} is
  required instead of First name is required. What am I missing here?
 


 When you use the message attribute to override the validation message, it
 must be
 the expanded message.  It can not be the message key.  This means that you
 will
 need to load the resource bundle within the JSP to override the validator
 message,
 #{messages['somekey']}.


 The shale validator will look in three locations for the error message.

 1) Default messages are defined with the validaion rule [1].  The message
 keys point
 to a packaged resource bundles in 4 locales [2].

 2) You can override the message by using the same message key and a
 different
 resource bundle.  This resource bundle needs to be registered in the
 faces-conif.xml using the message-bundle [3].  This is a global override
 for all
 uses of the commonsValidator within your application.

 3) You can override the message for each situation using the message
 attribute.
 This expects the message as it might appear in the resource bundle.


 The getErrorMessages method in the commonsValidator resolves these rules
 [4].


 [1]

http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/
resources/org/apache/shale/validator/validator-rules.xml?view=markup
 [2]

http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/
resources/org/apache/shale/validator/messages.properties?view=markup
 [3]

http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-usecases
/src/main/webapp/WEB-INF/faces-config.xml?view=markup
 [4]

http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/
java/org/apache/shale/validator/CommonsValidator.java?view=markup


  thanks,
  Sanjay


 Gary



SV: Defining mask globally

2007-03-15 Thread Hermod Opstvedt
Hi

Since I use Clay, I solve this with symbols. Clay really makes life simple
in these cases. Try using the validators message attribute along with the
resourcebundle lookup.

Hermod


-Opprinnelig melding-
Fra: Sanjay Choudhary [mailto:[EMAIL PROTECTED] 
Sendt: 15. mars 2007 16:45
Til: user@shale.apache.org
Emne: Re: Defining mask globally

Hi Hermod,

I will try this. I have another question regards to the mask - Is it
possible to display different message for each mask validation?  Is there a
way I can pass the message to each of the mask validation?


For example - For this validation I may like to display Only Alpha chars
are allowed
   val:commonsValidator type=mask arg=Company Name
server=true
client=false
val:validatorVar name=mask
value=#'{bu.ALPHAONLY}'
/
/val:commonsValidator

and for this validation I may want to display - Only numbers are allowed
   val:commonsValidator type=mask arg=Salary
server=true
client=false
val:validatorVar name=mask
value=#'{bu.INTONLY}'
/
/val:commonsValidator

Thanks,
Sanjay

On 3/15/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi

 Haven't had a look at the code yet, but could you try:  val:validatorVar
 name=mask value=#{globalmask['name']} /

 Hermod

 -Original Message-
 From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 14, 2007 11:03 PM
 To: user@shale.apache.org; [EMAIL PROTECTED]
 Subject: Re: Defining mask globally


 Hi Hermod,

 I am using version 1.0.4 of shale-validator.

 Is this the right approach to manage the regex for the mask?

 I also double checked about typo error, that error was in email message
 but
 not in the code.

 Thanks




 On 3/14/07, Hermod Opstvedt [EMAIL PROTECTED] wrote:
 
  Hi
 
  Another question: Which version is this of shale-validator? The
  linenumbers
  don't match up with the current.
 
  Hermod
 
 
  -Opprinnelig melding-
  Fra: Sanjay Choudhary [mailto:[EMAIL PROTECTED]
  Sendt: 14. mars 2007 21:33
  Til: user@shale.apache.org
  Emne: Defining mask globally
 
  hi
 
  I wish to define the global regex for masks in a common file. For
 example
  ,
  name field mask will be like ^[a-zA-Z]+$.
 
  h:inputText id=nameame styleClass=inputText
  value=#{BrokerRepresentative.name} size=20
  val:commonsValidator type=mask arg=Company Name
  server=true
  client=false
  val:validatorVar name=mask
 value=^[a-zA-Z]+$
  /
  /val:commonsValidator
  /h:inputText
 
  I wish to replace this with something like
 
  f:loadBundle basename=globalmasks val=globalmask/
 
  h:inputText id=nameame styleClass=inputText
  value=#{BrokerRepresentative.name} size=20
  val:commonsValidator type=mask arg=Company Name
  server=true
  client=false
  val:validatorVar name=mask value=#{
  globalmask.name} /
  /val:commonsValidator
  /h:inputText
 
  This will enable me to validate the name field in a uniform way through
  out
  my application. Also if any change is need in regex then it needs to
  applied
  in one place.  When I tried this solution  I got
 
 
  java.lang.NullPointerException
 
  org.apache.shale.validator.CommonsValidator.convert(
 CommonsValidator.java
  :95
  4)
 
  org.apache.shale.validator.CommonsValidator.loadMethodParamValues
  (CommonsVal
  idator.java:715)
 
  org.apache.shale.validator.CommonsValidator.validate(
 CommonsValidator.java
  :7
  93)
  javax.faces.component.UIInput.validateValue(UIInput.java:781)
  javax.faces.component.UIInput.validate(UIInput.java:645)
  javax.faces.component.UIInput.executeValidate(UIInput.java:849)
  javax.faces.component.UIInput.processValidators(UIInput.java
 :412)
 
  javax.faces.component.UIComponentBase.processValidators(
  UIComponentBase.java
  :912)
  javax.faces.component.UIForm.processValidators(UIForm.java:170)
 
  javax.faces.component.UIComponentBase.processValidators(
  UIComponentBase.java
  :912)
 
  javax.faces.component.UIComponentBase.processValidators(
  UIComponentBase.java
  :912)
 
  javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:342)
 
  com.sun.faces.lifecycle.ProcessValidationsPhase.execute
  (ProcessValidationsPh
  ase.java:78)
  com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java
  :200)
  com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
  :90)
  javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
 
 
 
  Any help /commens/ pointers appreciated to resolve this problem.  I open
  to
  different solution too.
 
 
  Thanks,
  sanjay

SV: SV: Re: basic dialog nullpointerexception

2007-03-14 Thread Hermod Opstvedt
Hi

Try it with jdk 1.4 on 5.5.23 and see what happens then.

Hermod


-Opprinnelig melding-
Fra: Veit Guna [mailto:[EMAIL PROTECTED] 
Sendt: 14. mars 2007 23:06
Til: user@shale.apache.org
Emne: Re: SV: Re: basic dialog nullpointerexception

Hi.

After I switched my local project to another version (different
workspace), it indeeded stopped working with 5.5.23. But it worked
before with 5.5.23. I don't know what it blew up.

So that means, listeners in tlds only work up to tomcat 5.5.17? But it
didn't work out with my 5.5.17 version. Strange thing. Meanwhile I think
perhaps it's a problem with eclipse wtp and tomcat. Never tried it with
tomcat standalone. Did you?

BTW: I'm using Java5.

regards,
Veit


Hermod Opstvedt schrieb:
 Hi
 
 The last working version of Tomcat is actually 5.5.17 with Java5. If you
 switch to Java 1.4 things are different.
 
 There is a post by me on this, where I went through and tested on all
5.5.x
 versions, and things stopped working after 5.5.17
 
 Hermod
 
 
 -Opprinnelig melding-
 Fra: Veit Guna [mailto:[EMAIL PROTECTED] 
 Sendt: 12. mars 2007 20:34
 Til: user@shale.apache.org
 Emne: SV: Re: basic dialog nullpointerexception
 
 Hi again.
 
 I upgraded my Tomcat 5.5.17 installation (it wasn't 5.5.16) to tomcat
5.5.23
 and now the BasicLifecycleListener gets invoked.
 
 Seemed to be a problem with tomcat?!
 
 Regards,
 Veit
 
 
  Original-Nachricht 
 Datum: Mon, 12 Mar 2007 13:41:26 +0100
 Von: Veit Guna [EMAIL PROTECTED]
 An: user@shale.apache.org
 CC: 
 Betreff: Re: basic dialog nullpointerexception
 
 I'm using tomcat 5.5.16.


  Original-Nachricht 
 Datum: Mon, 12 Mar 2007 05:31:50 -0700
 Von: Craig McClanahan [EMAIL PROTECTED]
 An: user@shale.apache.org
 CC: 
 Betreff: Re: basic dialog nullpointerexception

 On 3/12/07, Veit Guna [EMAIL PROTECTED] wrote:
 Hi.

 I'm trying to get the basic dialog feature of shale 1.0.4 working.
 I've
 added the jars view, dialog, basic-dialog, core to my classpath and
 created
 a dialog xml file in WEB-INF. Now when I try in a h:commandLink an
 action
 like dialog:myDialog a NullPointerException occurs:
 java.lang.NullPointerException
at


org.apache.shale.dialog.basic.BasicDialogManager.create(BasicDialogManager.j
 ava:97)
at


org.apache.shale.dialog.basic.BasicDialogManager.create(BasicDialogManager.j
 ava:87)
at


org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(Dialo
 gNavigationHandler.java:121)
at


org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
 erImpl.java:84)
at


org.apache.shale.view.faces.ViewActionListener.processAction(ViewActionListe
 ner.java:74)
at
 ...

 I've taken a look at the BasicDialogManager. It tries to use an
 uninitialized Map. I guess it should be initialized by the
 BasicLifecycleListener
 but it isn't. Any hints, what I've forgotten?
 Do I have to put the BasicLifecycleListener somewhere manually?
 In general, you should *not* have to configure this listener manually.
  It is registered in a listener defined in the
 shale-dialog-basic-xxx.jar file that you're including.  However, not
 all containers properly implement registering listeners in a TLD
 inside a JAR file.  What container and version are you running on?

 Craig

 Regards,
 Veit

 --
 Feel free - 5 GB Mailbox, 50 FreeSMS/Monat ...
 Jetzt GMX ProMail testen: www.gmx.net/de/go/mailfooter/promail-out

 -- 
 Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
 Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
 



SV: JSF 1.2 and Shale Tiles problem

2007-03-10 Thread Hermod Opstvedt
Hi

Which version of Tiles are you using? I know that there are issues with a
lot the Tiles releases.

Hermod

-Opprinnelig melding-
Fra: Mads Henderson [mailto:[EMAIL PROTECTED] 
Sendt: 10. mars 2007 15:52
Til: user@shale.apache.org
Emne: JSF 1.2 and Shale Tiles problem

Hi!

I am trying to get Shale Tiles to work with JSF 1.2_04 (RI), and I have some
problems concerning injecting a tile into my template.

I have tried to make a small example application using the JBoss hellojsf
example, in order to have a working demo before upgrading my production
site.

I have the following:
template.jsp:
%@ page contentType=text/html;charset=UTF-8 language=java %
%@ taglib prefix=f uri=http://java.sun.com/jsf/core; %
%@ taglib prefix=tiles uri=http://struts.apache.org/tags-tiles; %
html
  headtitleSimple jsp page/title/head
  body
f:view
  This is a simple test
  f:subview id=content
tiles:attribute name=body flush=false/
  /f:subview
/f:view
  /body
/html

What I want to do is to inject the content of my index.jsp page in the place
of the body attribute.
I have defined the following in the tiles-definitions.ml:
?xml version=1.0?

!DOCTYPE tiles-definitions PUBLIC
  -//Apache Software Foundation//DTD Tiles Configuration 2.0//EN
  http://struts.apache.org/dtds/tiles-config_2_0.dtd;

tiles-definitions
  definition name=/layout template=/template.jsp
put name=bodyvalue= /
  /definition

  definition name=/index extends=/layout 
put name=body value=/index.jsp /
  /definition

/tiles-definitions

in my web.xml I have added the tiles listener:
  listener
listener-classorg.apache.tiles.listener.TilesListener/listener-class
  /listener

and also mapped the jsf extension to the faces servlet:
   servlet-mapping
  servlet-nameFaces Servlet/servlet-name
  url-pattern*.jsf/url-pattern
   /servlet-mapping


When I hit the index.jsf URL of the deployed application all I get is the
content of the template.jsp except for the parts inside the f:view tag.

So it seems that tiles is correctly loading the template, but I some how
failed to make the correct configuration of how to insert the parts coming
from index.jsp. Can any one see what I am doing wrong?

I'm using the files from Shale Framework 1.0.4 (shale-tiles.jar and
tiles-core.jar).

Best regards,
 Mads



SV: Client-id : _id0 is duplicated in the faces tree.

2007-03-01 Thread Hermod Opstvedt
Hi

Getting Tomahawk is easy - Either use Maven2 or download it from
www.ibiblio.org

Hermod


-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 1. mars 2007 17:20
Til: user@shale.apache.org
Emne: RE: Client-id : _id0 is duplicated in the faces tree.

Unfortunately, it would take me just as long to acquire Shale 1.0.3 as it
would for me to acquire MyFaces 1.1.4 (actually, I can get MyFaces 1.1.4
immediately; it's Tomahawk that poses the problem, since it is no longer
packaged with MyFaces, and upgrading MyFaces means I'd lose Tomahawk).

I guess I'll just have to suffer through not being able to reload pages
until I can upgrade. :(

Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com



-Original Message-
From: Gary VanMatre [mailto:[EMAIL PROTECTED]
Sent: Thu 3/1/2007 10:32 AM
To: user@shale.apache.org
Subject: RE: Client-id : _id0 is duplicated in the faces tree.
 
From: Richard Eggert [EMAIL PROTECTED] 

 Thanks for the explanation! I've reported it as SHALE-418. 
 
 Is there a workaround, or do I just have to wait until I'm able to upgrade
to 
 MyFaces 1.1.4 (which won't be until late next week at the earliest)? 
 

Unfortunately, I can't think of a workaround other than using clay 1.0.3.


http://shale.apache.org/docs/release-notes-1.0.3.html


http://shale.apache.org/docs/release-notes-1.0.4.html


I'll try to get to this one this weekend... 


 
 Rich Eggert 
 Member of Technical Staff 
 Proteus Technologies, LLC 
 http://www.proteus-technologies.com 
 
 

Gary


 
 -Original Message- 
 From: Gary VanMatre [mailto:[EMAIL PROTECTED] 
 Sent: Wed 2/28/2007 9:45 PM 
 To: user@shale.apache.org 
 Subject: Re: Client-id : _id0 is duplicated in the faces tree. 
 
 From: Richard Eggert 
  
  I'm running into a problem using Xml views using HTML templates.
Loading a 
  page initially works fine, but if I reload the page either by clicking
on a 
 link 
  or hitting Refresh, I get the following error. 
  
  
  java.lang.IllegalStateException: Client-id : _id0 is duplicated in the
faces 
  tree. 
  at 
  

org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(
JspS 
  tateManagerImpl.java:241) 
  at 
  

org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(
JspS 
  tateManagerImpl.java:255) 
  (the above line is repeated several times) 
  at 
  

org.apache.myfaces.application.jsp.JspStateManagerImpl.savedSerializedView(J
spSt 
  ateManagerImpl.java:204) 
  at 
  

org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:
418) 
  ... 
  
  The error goes away if I load the page again, and then comes back if I
load 
 the 
  page again after that. 
  
  I created a very simple test page to reproduce the problem: 
  
  bugTest.html 
  --- 
  
  
  
  
  
  
  
  
  
  
  foo 
  
  
  
  
  
  
  clay-views.xml (excerpt) 
   
  
  
  
  
  
  
  
  (web.xml maps *.clay to the Faces servlet and the Shale application
filter) 
  
  I don't know if this is a bug in MyFaces (I'm using version 1.1.1), a
bug in 
  Clay, or if I'm doing something wrong, but I've never seen this problem
before 
  with my other (non-Clay-based) pages. Any ideas? 
  
 
 
 Darn, I thought we had this one covered for all the releases but I must
not have 
 tested again with myfaces 1.1. There is some history with this issue. 
 
 
 This has to do with how the view root generates component ids. For
components 
 that you don't explicitly assign a component id, there is a utility
function on 
 the view root to generate a unique Id. In the first versions of Myfaces
and the 
 RI, the internal sequence that generates the ids was always reset even
after the 
 view was restored. 
 
 
 This is a significant because of components marked transient. Transient 
 components do not save state in the view. The verbatim component is
actual an 
 outputText with the transient property tunned on. When the view is
restored, we 
 have to recreate transient components and these components will need
generated 
 component id's since this is just text. In the early version of clay,
after the 
 view was restored, we would generate, in sequence, component ids for all 
 components including components that were restored because this counter
was 
 always reset. A clay html template contains allot of transient components 
 because the entire template is defined using components (Thanks again to
Manfred 
 Klug who helped figure this all out). Interesting enough, making all the
view 
 represented by components is the same approach they took in JSF 1.2. 
 
 
 The EG team determined that reseting the counter was a bug. The view
root 
 should restore the internal counter. Starting with version 1.1.2, myfaces 
 changed the view roots to restore the counter. 
 
 
 Clay Release 1.0.3 
 http://issues.apache.org/struts/browse/SHALE-195 
 
 
 The counter being reset made PPR or any changes 

SV: Trouble with simple dialog

2007-02-28 Thread Hermod Opstvedt
Hi

Just quickly looking at your dialog file, I notice that you have a target
Register that is not defined.

Looking at the code, the problem is that the web.xml context-param
Constants.DIALOG_PREFIX_PARAM is missing or ill defined. Have you defined
it?

Hermod


-Opprinnelig melding-
Fra: Colin Chalmers [mailto:[EMAIL PROTECTED] 
Sendt: 28. februar 2007 19:22
Til: user@shale.apache.org
Emne: Trouble with simple dialog

Hi,

I'm experimenting with the dialog manager and seem to have ommitted a 
setting somewhere which is throwing an exception.

Basically I'm just hitting one page and after clicking a button I should 
be brought to the next page, however this is not happening.
In the logs I see the following exception:

exception
2007-02-28 15:53:54 StandardContext[/shale]null
java.lang.NullPointerException
at 
org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(Dialo
gNavigationHandler.java:121)
at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListen
erImpl.java:84)
at 
org.apache.shale.view.faces.ViewActionListener.processAction(ViewActionListe
ner.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
at 
org.apache.shale.view.faces.ShaleViewRoot.processApplication(ShaleViewRoot.j
ava:40)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.j
ava:316)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at 
org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleAppl
icationFilter.java:267)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:102)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
at java.lang.Thread.run(Thread.java:534)
/exception

My dialog-config files looks like the following

dialogs
  dialog name=Create New Dialog start=Input
transition outcome=start target=Input/
 transition outcome=exit target=Exit/

view name=Input viewId=/input.jsf
  transition outcome=next target=Register/
   /view
   
end name=Exit viewId=/goodBye.jsf/
  
 /dialog
/dialogs

 th epage itself contains

h:form id=start
h:commandButton id=startDialog action=dialog:Create New 
Dialog value=Create New Dialog  /
/h:form

Currently I've no idea why it's not working :-((

Any help or links to examples would be much appreciated!!

Thx

/Colin




SV: Client-id : _id0 is duplicated in the faces tree.

2007-02-28 Thread Hermod Opstvedt
Hi

Could you also post bugtest.html. That is likely to be the origin of the
Exception.

Also I would move to at least MyFaces 1.3 to see if the problem persists.

Hermod

-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 28. februar 2007 20:01
Til: user@shale.apache.org
Emne: Client-id : _id0 is duplicated in the faces tree.

I'm running into a problem using Xml views using HTML templates.  Loading
a page initially works fine, but if I reload the page either by clicking on
a link or hitting Refresh, I get the following error.


java.lang.IllegalStateException: Client-id : _id0 is duplicated in the faces
tree.
   at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(
JspStateManagerImpl.java:241)
   at
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(
JspStateManagerImpl.java:255)
(the above line is repeated several times)
   at
org.apache.myfaces.application.jsp.JspStateManagerImpl.savedSerializedView(J
spStateManagerImpl.java:204)
   at
org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:
418)
...

The error goes away if I load the page again, and then comes back if I load
the page again after that.

I created a very simple test page to reproduce the problem:

bugTest.html
---
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Strict//EN
html
   head
  titleTesting/title
  meta http-equiv=Content-Type content=text/html;charset=UTF-8 /
  meta http-equiv=pragma content=no-cache
  meta http-equiv=cache-control content=no-cache
  meta http-equiv=expires content=0
   /head
   body
  foo
   /body
/html


clay-views.xml  (excerpt)

component jsfid=/bugTest.clay extends=clay
   attributes
  set name=clayJsfid value=/path/to/bugTest.html /
   /attributes
/component


(web.xml maps *.clay to the Faces servlet and the Shale application filter)

I don't know if this is a bug in MyFaces (I'm using version 1.1.1), a bug in
Clay, or if I'm doing something wrong, but I've never seen this problem
before with my other (non-Clay-based) pages.  Any ideas?


Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com







SV: SV: Trouble with simple dialog

2007-02-28 Thread Hermod Opstvedt
Hi

It's not required - The I asked was that it is null, meaning that if had
declared it empty that would explain the NullPointerException.

What version of Shale and Shale-dialog are you using?

Hermod

-Opprinnelig melding-
Fra: Colin Chalmers [mailto:[EMAIL PROTECTED] 
Sendt: 28. februar 2007 21:53
Til: user@shale.apache.org
Emne: Re: SV: Trouble with simple dialog

Hi Hermod,

Thx for the reply.

The Register target is a copyPaste error, but even ommitting that 
transition doesn't affect the stack-trace.

I haven't defined the context-param you mention and was unaware that it 
was required, I thought the default setting was dialog?
Can you point me to info concerning this?

/Colin

Hermod Opstvedt wrote:

Hi

Just quickly looking at your dialog file, I notice that you have a target
Register that is not defined.

Looking at the code, the problem is that the web.xml context-param
Constants.DIALOG_PREFIX_PARAM is missing or ill defined. Have you defined
it?

Hermod


-Opprinnelig melding-
Fra: Colin Chalmers [mailto:[EMAIL PROTECTED] 
Sendt: 28. februar 2007 19:22
Til: user@shale.apache.org
Emne: Trouble with simple dialog

Hi,

I'm experimenting with the dialog manager and seem to have ommitted a 
setting somewhere which is throwing an exception.

Basically I'm just hitting one page and after clicking a button I should 
be brought to the next page, however this is not happening.
In the logs I see the following exception:

exception
2007-02-28 15:53:54 StandardContext[/shale]null
java.lang.NullPointerException
at 
org.apache.shale.dialog.faces.DialogNavigationHandler.handleNavigation(Dial
o
gNavigationHandler.java:121)
at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListe
n
erImpl.java:84)
at 
org.apache.shale.view.faces.ViewActionListener.processAction(ViewActionList
e
ner.java:74)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
at 
org.apache.shale.view.faces.ShaleViewRoot.processApplication(ShaleViewRoot.
j
ava:40)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.
j
ava:316)
at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
n
FilterChain.java:237)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
h
ain.java:157)
at 
org.apache.shale.application.faces.ShaleApplicationFilter.doFilter(ShaleApp
l
icationFilter.java:267)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
n
FilterChain.java:186)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
h
ain.java:157)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
a
va:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex
t
Valve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
a
va:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:13
7
)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
t.java:104)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11
8
)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
t.java:102)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a
:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte
x
t.java:104)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
e
ction(Http11Protocol.java:705)
at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
v
a:683)
at java.lang.Thread.run(Thread.java:534)
/exception

My dialog-config files looks like the following

dialogs

SV: Relative paths Clay

2007-02-23 Thread Hermod Opstvedt
Hi

By the way, there is a Tomahawk sandbox component for the link (tx:link?).

Hermod


-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 23. februar 2007 16:19
Til: user@shale.apache.org
Emne: RE: Relative paths  Clay

Thanks.  Those ideas worked great.  Here's what I ended up doing to make
them reusable:


component jsfid=sym:graphicImage extends=h:graphicImage
   attributes
  set name=url value=@imageUrl /
   /attributes
   symbols
  set name=imageUrl value=@src /
  set name=src /
   /symbols
/component

component jsfid=sym:headerLink extends=clayOut
   attributes
  set name=escapeXml value=false /
  set 
 name=value 
 value=lt;link type=quot;@typequot; rel=quot;@relquot;
href=quot;@linkUrlquot; /gt;
  /
   /attributes
   symbols
  set name=type /
  set name=rel /
  set name=linkUrl value=@href /
  set name=href /
   /symbols
/component


link jsfid=sym:headerLink rel=stylesheet type=text/css
linkUrl=./path/to/style.css href=style.css /


img jsfid=sym:graphicImage src=../../images/bar.jpg
imageUrl=images/bar.jpg /




Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com



-Original Message-
From: Gary VanMatre [mailto:[EMAIL PROTECTED]
Sent: Thu 2/22/2007 5:48 PM
To: user@shale.apache.org
Subject: Re: Relative paths  Clay
 
From: Richard Eggert [EMAIL PROTECTED] 

 I've run into a very basic problem using Clay that I'm not sure how to
solve. 
 
 Here's the setup: 
 
 I have a JSP file (we'll call it page.jsp) that contains a single tag 
 that points to an HTML template in a subdirectory (we'll call it 
 /templates/blah/foo.html). The HTML template references an image file in a

 completely different directory (/images/bar.jpg). 
 
 How do I get the image to display properly both when rendered by Clay and
when 
 just loaded as a mockup? 
 
 When loaded through the JSP using Clay, the image file's relative path is 
 images/bar.jpg. However, when the HTML is loaded directly with a browser
either 
 online or offline, the image file's relative path is instead 
 ../../images/bar.jpg. 
 
 Using the absolute path (/appName/images/bar.jpg) works for both forms of
online 
 viewing (via JSP and as mockup), but it doesn't work for offline viewing
(since 
 the absolute path then becomes
/full/filesystem/path/to/appName/images/bar.jpg), 
 and I'd also rather not hard-code my application's context root into my
HTML. 
 
 I thought of using a tag with jsfid=void, but that doesn't work, since 
 only accepts full URL's and not relative paths. 
 
 Does anyone know of a way around this? 


You might try something like this:

component jsfid=imageBar extends=h:graphicImage
   attributes
set name=url value=/images/bar.jpg/
   /attributes
/component

img jsfid=imageBar src=/appName/images/bar.jpg/ 

 
 Incidentally, the same issue arises with links to stylesheets. 



You would be better off looking for a component, but something like this
might work too:

component jsfid=mycssLink extends=clay:clayOut
   attributes
set name=excapeXml value=false/
set name=value value=lt;link jsfid=quot;mycssLinkquot;
type=quot;text/cssquot; rel=quot;stylesheetquot; id=quot;csslinkquot;
href=quot;/mycss.cssquot;  /gt;/
   /attributes
/component


link jsfid=mycssLink type=text/css rel=stylesheet id=csslink
href=/appName/images/mycss.css  /


Another option would be to use the comment blocks to remove the CSS used for
developement.

!-- ### clay:remove ### --
link type=text/css rel=stylesheet id=csslink
href=/appName/images/mycss.css  /
!-- ### /clay:remove ### --
link type=text/css rel=stylesheet id=csslink href=/mycss.css  /
 
 
 Rich Eggert 
 Member of Technical Staff 
 Proteus Technologies, LLC 
 http://www.proteus-technologies.com 
 
 

Gary




SV: Relative paths Clay

2007-02-22 Thread Hermod Opstvedt
Hi

Short answer: You don't. What I do is add a duplicate entry around such
stuff using the Clay html remove stuff

!-- ### clay:remove ### --

What comes here will be removed by clay, but displayed by a browser

!-- ### /clay:remove ### --

Hermod


-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 22. februar 2007 22:30
Til: user@shale.apache.org
Emne: Relative paths  Clay

I've run into a very basic problem using Clay that I'm not sure how to
solve.

Here's the setup:

I have a JSP file (we'll call it page.jsp) that contains a single clay tag
that points to an HTML template in a subdirectory (we'll call it
/templates/blah/foo.html).  The HTML template references an image file in a
completely different directory (/images/bar.jpg).

How do I get the image to display properly both when rendered by Clay and
when just loaded as a mockup?

When loaded through the JSP using Clay, the image file's relative path is
images/bar.jpg.  However, when the HTML is loaded directly with a browser
either online or offline, the image file's relative path is instead
../../images/bar.jpg.

Using the absolute path (/appName/images/bar.jpg) works for both forms of
online viewing (via JSP and as mockup), but it doesn't work for offline
viewing (since the absolute path then becomes
/full/filesystem/path/to/appName/images/bar.jpg), and I'd also rather not
hard-code my application's context root into my HTML.

I thought of using a base tag with jsfid=void, but that doesn't work,
since base only accepts full URL's and not relative paths.

Does anyone know of a way around this?  

Incidentally, the same issue arises with links to stylesheets.
 

Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com




SV: Clay challange

2007-02-21 Thread Hermod Opstvedt
Hi

I am so excited I can hardly wait.

Hermod


-Opprinnelig melding-
Fra: Ryan Wynn [mailto:[EMAIL PROTECTED] 
Sendt: 21. februar 2007 23:31
Til: user@shale.apache.org
Emne: Re: Clay challange

On 2/14/07, Gary VanMatre [EMAIL PROTECTED] wrote:
 From: [EMAIL PROTECTED]
 
  Hi
 
  Thanks, Ryan. This is what you get when you copy/paste and then go blind
:) (I
  need to sit down and repeat to my self: DO NOT DO THIS! a thousand
times)
 

 You are not alone there.  Hey Ryan, what's the status of that Eclipse 3.2
plug in that you are trying to get IBM to donate?


The donation is coming along.  I need to submit a couple of documents
to ibm and then a review will be held on it.  Sorry for the wait, it
has been mostly due to my busyness and somewhat the tedious process
ibm has in place.

For those of you that don't know I was planning to donate an eclipse
plugin with a gui and drag n drop for building clay config files.  It
dynamically finds all the clay config defs in your project and builds
a component palette.  When you create new component defs they get
added to the palette.  So it's all about reusablilty.



  Hermod
 

 Gary

  -Original Message-
  From: Ryan Wynn [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, February 13, 2007 11:23 PM
  To: user@shale.apache.org; [EMAIL PROTECTED]
  Subject: Re: Clay challange
 
 
  On 2/13/07, Hermod Opstvedt wrote:
   Hi
  
   I'm struggling with a component that I have defined:
  
  
  
  
  
  
  
  
  
  
  
  

   value=#{messages['navnpanel.text']}
  
  
  
  
  
  
 value=#{messages['navnpanel.text']}
  
  
  
  
  
   It is supposed to render a fieldset with a legend, and a label inside
it.
   However the label never appears and there are no errors what so ever.
 
  I think you might need to look at your renderIds. The renderId
  attribute is a way of ordering component children. RenderIds are only
  relevant for sibling elements. If you have 2 sibling elements with
  the same renderId value then one of the elements will be
  lost/replaced.
 
  In your case the t:htmlTag and outputLabel both have the same parent
  (t:htmlTag) but they also use the same renderId (2). They should
  instead be 1 and 2.
 
  My renderIds usually start at 1 for each element set and increment
  from there. I think only the relative values matter, so you could
  have renderIds 6 and 3 and you would still get 2 children with the 3
  renderId as the first child.
 
  With inheritance you are able to override a component's children
  selectively by specifying another component with the same renderId.
 
 
  ...
  ...
 
 
 
  ..
 
 
  both c1 and c2 produce a clay component with 2 children. c2 uses
  inheritance and the renderId attribute to override the second
  outputText in c1 with an inputText. But, c2 still inherits the first
  outputText child from c1.
 
  Hope this helps.
 
  
   Hermod
  
  
  
 
 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
 
  This email with attachments is solely for the use of the individual or
  entity to whom it is addressed. Please also be aware that DnB NOR cannot
  accept any payment orders or other legally binding correspondence with
  customers as a part of an email.
 
  This email message has been virus checked by the anti virus programs
used
  in the DnB NOR Group.
 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
 



SV: Dynamically-selectable HTML templates

2007-02-17 Thread Hermod Opstvedt
Hi

The jsfid must map to a Clay pre-defined component. I am not sure that what
you are trying to do is feasible in Clay and actually if it is the correct
way to solve your problem. I would more tend to using CSS (Cascading Style
Sheets) for this scenario.

Hermod


-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 17. februar 2007 21:54
Til: user@shale.apache.org
Emne: Dynamically-selectable HTML templates

In an application I'm working on, I'm trying to implement a mechanism by
which the exact HTML template file that is used for a given page is
dependent upon a configurable (at a minimum, by the person deploying the
application, but ideally, in the profile of each user) parameter such that
although the actual information displayed by a given page remains the same,
the layout and formatting of the page may vary according to the site theme
selected by the site owner and/or user preferences.  After doing some
experimenting, I discovered that expressions are not allowed in the jsfid
attribute of the clay JSP tag.  Is there some other way of implementing
this?  Is what I'm trying to do even feasible with Clay?


Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com




SV: Dynamically-selectable HTML templates

2007-02-17 Thread Hermod Opstvedt
Hi

This is a smart way to do this. I did not quite understand your scenario in
your previous mail. I thought you where talking about formatting/layout.

Hermod


-Opprinnelig melding-
Fra: Richard Eggert [mailto:[EMAIL PROTECTED] 
Sendt: 17. februar 2007 22:35
Til: user@shale.apache.org
Emne: RE: Dynamically-selectable HTML templates

After playing with it some more, I figured out the answer to my question.
:-)

The trick was to use the clay component (or a component derived from
clay) and pass the configurable parts to the clayJsfid attribute
(instead of trying to pass them as part of the jsfid attribute directly),
like so:


In my JSP:

f:loadBundle basename=runtime var=runtime /
c:clay 
id=testPage 
jsfid=templateTestPage 

c:symbol name=pageTitle value=Test of template /
c:symbol name=templatesPrefix value=#{runtime.templatesPrefix}
/
c:symbol name=themeName value=#{runtime.themeName} /
/c:clay


In my clay-config.xml:

component jsfid=basePage extends=clay
attributes
set name=clayJsfid
value=@templatesPrefix/@themeName/html.html /
/attributes
/component

component jsfid=templateTestPage extends=basePage
symbols
set name=bodyTemplate
value=@templatesPrefix/@themeName/bodyTemplate.html /
/symbols
/component


In this case, I'm using a message bundle named runtime.properties to pass in
the theme name, but presumably, one could use a managed bean in the same way
to obtain the theme name from user preferences.





Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com



-Original Message-
From: Richard Eggert [mailto:[EMAIL PROTECTED]
Sent: Sat 2/17/2007 3:53 PM
To: user@shale.apache.org
Subject: Dynamically-selectable HTML templates
 
In an application I'm working on, I'm trying to implement a mechanism by
which the exact HTML template file that is used for a given page is
dependent upon a configurable (at a minimum, by the person deploying the
application, but ideally, in the profile of each user) parameter such that
although the actual information displayed by a given page remains the same,
the layout and formatting of the page may vary according to the site theme
selected by the site owner and/or user preferences.  After doing some
experimenting, I discovered that expressions are not allowed in the jsfid
attribute of the clay JSP tag.  Is there some other way of implementing
this?  Is what I'm trying to do even feasible with Clay?


Rich Eggert
Member of Technical Staff
Proteus Technologies, LLC
http://www.proteus-technologies.com





SV: maven build problem of latest svn trunk

2007-02-15 Thread Hermod Opstvedt
Hi

The M2 2.05 was released today. Download it and retry to see if that not
fixes your problem (I'm in progress of downloading it now)

Hermod


-Opprinnelig melding-
Fra: Rahul Akolkar [mailto:[EMAIL PROTECTED] 
Sendt: 15. februar 2007 17:24
Til: user@shale.apache.org
Emne: Re: maven build problem of latest svn trunk

On 2/15/07, Torsten Krah [EMAIL PROTECTED] wrote:
 I have still no success - i got the plugin version 2.0 and 2.1, if i
 delete the 2.0 ones, they get downloaded again.
 The error stays the same.

 Any other hints?

snip/

Not from me, like many things m2, it is just supposed to work.

If its mission critical to build today, try removing
Implementation-Title from the jar/war plugin configurations of
your working copy of the parent pom [1], but thats no fix. *shrug*

-Rahul

[1] http://svn.apache.org/repos/asf/shale/framework/trunk/pom.xml




 Torsten

 Am Freitag, den 02.02.2007, 20:21 +0100 schrieb Torsten Krah:
  Got:
 
  [DEBUG]
  org.apache.maven.plugins:maven-jar-plugin:maven-plugin:2.0:runtime
  (selected for runtime)
 
  mvn -up install does not help, same error like before, any other hints?
 
  A bigger trace output:
 
  [INFO] Using default encoding to copy filtered resources.
  [WARNING]
  Artifact javax.servlet:servlet-api:jar:2.5:provided retains
  local scope 'provided' overriding broader scope 'compile'
  given by a dependency. If this is not intended, modify or remove
  the local scope.
 
  [INFO] [compiler:compile]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [resources:testResources]
  [INFO] Using default encoding to copy filtered resources.
  [INFO] [compiler:testCompile]
  [INFO] Nothing to compile - all classes are up to date
  [INFO] [surefire:test]
  [INFO] Surefire report
  directory:
/home/tkrah/Development/src/shale-parent/shale-test/target/surefire-reports
 
  ---
   T E S T S
  ---
  Running org.apache.shale.test.mock.MockObjectsTestCase
  Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.264
  sec
  Running org.apache.shale.test.config.ConfigParserTestCase
  log4j:WARN No appenders could be found for logger
  (org.apache.commons.digester.Digester.sax).
  log4j:WARN Please initialize the log4j system properly.
  Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.507
  sec
  Running org.apache.shale.test.mock.ValueBindingTest
  descriptor(class=org.apache.shale.test.mock.data.Bean, name=name
Found BeanInfo [EMAIL PROTECTED]
  Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015
  sec
  Running org.apache.shale.test.el.MockExpressionFactoryTestCase
  Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.217
  sec
  Running org.apache.shale.test.mock.TestMockBean
  Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005
  sec
 
  Results :
  Tests run: 18, Failures: 0, Errors: 0, Skipped: 0
 
Found PropertyDescriptor [EMAIL PROTECTED]
  [INFO] [jar:jar]
  [INFO]
  
  [ERROR] BUILD ERROR
  [INFO]
  
  [INFO] Error assembling JAR
 
  Embedded error: The attribute Implementation-Title may not occur more
  than once in the same section
  [INFO]
  
  [INFO] For more information, run Maven with the -e switch
  [INFO]
  
  [INFO] Total time: 6 seconds
  [INFO] Finished at: Fri Feb 02 20:19:54 CET 2007
  [INFO] Final Memory: 8M/14M
  [INFO]
  
 
snap/



Clay challange

2007-02-13 Thread Hermod Opstvedt
Hi

I'm struggling with a component that I have defined:

component jsfid=navnpanel extends=clay id=navnpanel
element jsfid=t:htmlTag renderId=1
attributes
set name=value value=fieldset /
/attributes
element jsfid=t:htmlTag renderId=2
attributes
set name=value value=legend /
/attributes
element jsfid=outputText renderId=2
attributes
set name=value

value=#{messages['navnpanel.text']}
/set
/attributes
/element
/element
element jsfid=outputLabel renderId=2
attributes
set name=value
value=#{messages['navnpanel.text']}/set
/attributes
/element
/element
/component

It is supposed to render a fieldset with a legend, and a label inside it.
However the label never appears and there are no errors what so ever.

Hermod




SV: Getting started...again.

2007-01-16 Thread Hermod Opstvedt
Hi

How are you creating it? As a complete Maven2 project, or as Maven2
archetype?

Reason for asking, is that I recently submitted Shale/Clay kickstart project
(The first of more to come with other faces libs included). Take a look in
the shale sandbox under maven

Hermod


-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av
Matthias Wessendorf
Sendt: 16. januar 2007 17:23
Til: user@shale.apache.org
Emne: Re: Getting started...again.

James-

I am creating a sorta kickstart project, using technologies like

Apache MyFaces
Facelets
Apache Trinidad (formal Oracle ADF Faces)
Shale (View and application.manager (test will follow soon))
JPA
Toplink Essentials

as the container I am using jetty.

check here:
http://code.google.com/p/facesgoodies/

-M

On 1/15/07, Craig McClanahan [EMAIL PROTECTED] wrote:
 On 1/15/07, Reynolds, James [EMAIL PROTECTED] wrote:
 
  Steps 0  1 are complete :)
 
  I'm much closer as I can see Tomcat behaving as I'd expect, though I did
  end up with a couple errors in the log:
 
  1. java.lang.NoClassDefFoundError: javax/el/ExpressionFactory


 This is supposed to be pulled in by the dependencies for MyFaces
 (commons-el?)  if you're using JSF 1.1.  It'll be part of the server if
 you're using JSF 1.2 (the RI, since MyFaces doesn't support this yet).

 2. org.apache.commons.chain.web.ChainListener


 Make sure commons chain is not *also* in your Tomcat shared or common
dirs.

 Commons-chain is definitely in my project, but I can't locate
  javax/el/ExpressionFactory in my jsf libs.  Should this be in my server
  or J2EE libs?  I'm attempting to use Tomcat 5.5.20


 Does the prebuilt war in the 1.0.4 test builds work out of the box?  If
so,
 it'd be interesting to do a detailed comparison of JARs in yours versus
that
 one.  If not, we've got something else weird, because the out-of-the-box
one
 runs for me.

 Craig

 On 1/15/07, Reynolds, James [EMAIL PROTECTED] wrote:
  
   I've been on a hiatus from Shale since changing jobs last year;
  however,
   my new company is considering it based on my gushing recommendation.
  
   Embarrassingly enough, I can't fire up the shale-blank application.
   When I run the app, I see the output below in the console then -
   nothing.  No errors in tomcat or anything (that I can see).  This
  output
   has changed since I last ran Shale.  Do you see anything that might
   explain the silent failure?
 
 
  I've never tried it with the Shale libraries or facelets installed in
  Tomcat's common/lib directory ... FIrst thing I would try is a
  completely
  vanilla Tomcat install, with the Shale jars deployed inside the webapp
  (as
  they should default when shale-blank builds).
 
  Actually, the zeroth thing I would try is the 1.0.4 release instead of
  1.0.3:-).  Rahul is in the process of getting it out there; his test
  build is
  available at http://people.apache.org/~rahul/shale/v104/.
 
  Craig
 
  Thanks!
  
  
   cmd /c C:\apache-tomcat-5.5.20\bin\catalina.bat run
   Using CATALINA_BASE:   C:\Documents and
   Settings\jReynolds\.IntelliJIdea60\system\tomcat_Unnamed_5094815
   Using CATALINA_HOME:   C:\apache-tomcat-5.5.20
   Using CATALINA_TMPDIR: C:\apache-tomcat-5.5.20\temp
   Using JRE_HOME:C:\Java\jdk1.5.0_09
   log4j:WARN No appenders could be found for logger
   (org.apache.catalina.startup.Embedded).
   log4j:WARN Please initialize the log4j system properly.
   ContextListener:
  attributeAdded('org$apache$shale$view$VIEW_CALLBACKS',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.shale.tiger.FACES_CONFIG_CONFIG',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.myfaces.config.RuntimeConfig',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.myfaces.webapp.webxml.WebXml',
   '[EMAIL PROTECTED]')
   ContextListener:
  
  attributeAdded('org.apache.myfaces.webapp.StartupServletContextListener.
   FACES_INIT_DONE', 'true')
   ContextListener:
  attributeAdded('org$apache$shale$view$VIEW_CALLBACKS',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.shale.tiger.FACES_CONFIG_CONFIG',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.myfaces.config.RuntimeConfig',
   '[EMAIL PROTECTED]')
   ContextListener:
   attributeAdded('org.apache.myfaces.webapp.webxml.WebXml',
   '[EMAIL PROTECTED]')
   ContextListener:
  
  attributeAdded('org.apache.myfaces.webapp.StartupServletContextListener.
   FACES_INIT_DONE', 'true')
   ContextListener:
   attributeRemoved('org.apache.shale.tiger.FACES_CONFIG_CONFIG',
   '[EMAIL PROTECTED]')
   ContextListener: attributeRemoved('org.apache.catalina.jsp_classpath',
  
  '/C:/apache-tomcat-5.5.20/webapps/servlets-examples/WEB-INF/classes/;/C:
  
  /apache-tomcat-5.5.20/common/classes/;/C:/apache-tomcat-5.5.20/common/i1
  
  8n/tomcat-i18n-en.jar;/C:/apache-tomcat-5.5.20/common/i18n/tomcat-i18n-e
  
  

SV: Clay, Tomahawk and jscookmenu

2006-12-18 Thread Hermod Opstvedt
Hi

I'll take a look at it.

Hermod


-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 18. desember 2006 17:03
Til: user@shale.apache.org
Emne: RE: Clay, Tomahawk and jscookmenu

From: [EMAIL PROTECTED] 

 Hi 
 
 Gary, is this something that we need to adress in the Tld2Clayconfig tool 
 (rendertype) ? 


That's not a bad idea.  If we pulled the rendererType from the Tag, it
should
fix these components that are loose (with the rendererType).


 
 Hermod 


Gary
 
 -Original Message- 
 From: Gary VanMatre [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, December 17, 2006 11:59 PM 
 To: user@shale.apache.org 
 Subject: Re: Clay, Tomahawk and jscookmenu 
 
 
 From: Steve Olson 
  
  Thanks for the info. I looked at both the code below and your site, and
 have 
 a couple questions. It looks like you had to essentially render your 
  own menu, as if the jscookmenu renderer wasn't used. Also the call to 
  cmDrawFromText - the jscookmenu.js that comes with the tomahawk 1.1.3
jar  
 doesn't seem to define cmDrawFromText. I can see on the jscook site that 
this 
 is a valid function so are you using a newer jscook version than the 
  tomhawk jar does, or am I just missing something? 
  
  Also, it looked like you had to extract the resources (.js, .gif, etc)
for 
  jscookmenu from the tomahawk jar into your own directories and
explicitly  
 include them, as if org.apache.myfaces.webapp.filter.ExtensionsFilter also

  wasn't working. Is that what you had to do? Am I understanding things 
  correctly here? 
  
  I was hoping to get html something like this working, but this just
renders 
  a default submit Query button as an input control (!?): 
  
   theme=ThemeOffice 
  
   itemValue=#{messages['menu1']} action=#{homePage.menu1}/ 
  
   itemValue=#{messages['menu2']} action=#{homePage.menu2}/ 
  
  
  
  It'd be nice if this would rely on the tomahawk infastructure to provide
the 
  same rendering it does without using Clay. Is there a conflict/bug here
 
 between Clay and tomahawk with how it renders jscookmenu controls? 
  
  If this is a bug or an RFE, I don't see anything listed in the Shale
Jira. 
  I'm also assuming this is a Clay issue, since it works in JSP, but maybe
 
 that's a bad assumption :-). Anyway, I have some time available and would 
  be interested in contributing a patch (assuming I can figure one out :-)
if 
  that would be useful. 
  
  Do you agree that this is a Clay bug? Do you know of anyone else already
 
 looking into this? Should this be a new clay Jira issue? 
  
 
 It looks like there are a couple issue here. The first is that the
renderType 
 of the jscookMenu is lost. Some of the myfaces tomahawk components 
 don't return / override the renderType. In this case it's picking up a
default 
 button renderType. 
 
 This can be easily fixed by overriding it in the Clay conifg. We will need
to 
 change this in the base tomahawk 1.3 config but consider the following
example: 
 
 
 
 
 
 
 
 The next problem is that the javascript is not being added. I tracked this
down 
 to the myfaces ExtensionsFilter. The filter injects javascript into the 
 response but it's insistent that the response's contentType is set so it
can 
 determine if it should process the resource for insertion. The 
 ClayViewHander is not explicitly setting the response's content type. 
 
 You have uncovered a couple bugs here. Please create a JIRA ticket 
 on this one (http://shale.apache.org/issue-tracking.html). I'd like to get
a 
 fix in before the next shale release. 
 
 
 Gary 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 
 
 This email with attachments is solely for the use of the individual or 
 entity to whom it is addressed. Please also be aware that DnB NOR cannot 
 accept any payment orders or other legally binding correspondence with 
 customers as a part of an email. 
 
 This email message has been virus checked by the anti virus programs used 
 in the DnB NOR Group. 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 
 



SV: s:commonsValidator question

2006-12-12 Thread Hermod Opstvedt
Hi

I'll have a Norwegian translation ready later today :)

Hermod

-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Craig
McClanahan
Sendt: 12. desember 2006 06:56
Til: user@shale.apache.org
Emne: Re: s:commonsValidator question

On 12/11/06, JS Portal support team [EMAIL PROTECTED] wrote:

 If you do not specify messages for these keys in your own application
 resource bundle, validator will fall back to its own default message
 strings  ... so you don't have to override these unless the defaults do
 not
 help you.

 Does shale also internationalize these messages then? Also in Hebrew and
 Korean or any other script for that matter?


At the moment, Shale only includes the English and German translation of the
messages.  But I would love to check in translated versions if I could find
some volunteers to do the translations!  It's a matter of providing an
appropriate messages_XXX.properties file containing translations of the
English version, which can be found at [1].  The same applies to any other
message resource bundles found in the source base as well.

The best way to provide the translations would be to create an RFE issue in
our tracking system[1], and add the appropriate properties files as an
enhancement.  Like all resource bundles, don't forget to run native2ascii if
the translations include on-USASCII7 characters.

That is what would happen if the form is actually submitted, but the client
 side checks are designed to prevent the form submit from happening if
 there
 are any errors detected there -- so things never get far enough along for
 the server side checks to kick in (unless you've disabled client side
 Javascript).

 Why I asked is because I want to use the client check to prevent
 unneeded return trips to the server. I just don't like the looks of the
 alert. I was hoping shale also made a little client script available
 which populates the h:message with the appropriate error message.


That would be a great enhancement to the current functionality, but it's not
there at present.  It's also going to take a bit of refactoring in the
client side JavaScript code of Commons Validator, which currently mixes the
logic (is the field valid) and presentation (do the popup) a little too
closely to be able to pull this off.  But the developers there have been
receptive to such changes.

Thank you for your help,=


Craig

[1]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-validator/src/main/
resources/org/apache/shale/validator/messages.properties?revision=467172vie
w=markup

]2] https://issues.apache.org/struts/browse/SHALE


JS Portal - Support
 Dasstraat 21
 2623CB Delft
 the Netherlands
 E: [EMAIL PROTECTED]
 W: www.jsportal.com
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
 McClanahan
 Sent: Tuesday, December 12, 2006 12:36 PM
 To: user@shale.apache.org
 Subject: Re: s:commonsValidator question

 On 12/11/06, JS Portal support team [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I have two questions concerning s:commonsValidator tag
 
  1. Is there a way to set the message attribute of the s:commonsValidator
  with the value resulting from?:
 
  h:outputFormat escape=false value=#{labels['err.requiredField']}
  f:param value=#{labels['labels.user.email']} /
  /h:outputFormat
 
  This way I don't have to add a long list of err.required.email,
  err.required.name etc. to my i18n properties files. Just a compilation
  of my err.requiredField ({0} required) combined with the field name will
  be enough.


 If you do not specify messages for these keys in your own application
 resource bundle, validator will fall back to its own default message
 strings  ... so you don't have to override these unless the defaults do
 not
 help you.

 2. Is there a way to have the client check also print the error message
  to the h:message for=myField/ in stead of having the JavaScript
  alert pop up?


 That is what would happen if the form is actually submitted, but the
 client
 side checks are designed to prevent the form submit from happening if
 there
 are any errors detected there -- so things never get far enough along for
 the server side checks to kick in (unless you've disabled client side
 Javascript).

 Thank you and have a great day,
  Joost Schouten
  Director


 Craig


 JS Portal
  Dasstraat 21
  2623CB Delft
  the Netherlands
  P: +31 6 160 160 14
  E: [EMAIL PROTECTED]
  W: www.jsportal.com
 
 





allowOverride on Clay components

2006-12-07 Thread Hermod Opstvedt
Hi

Today I held a presentation at work about JSF, Shale and Clay. The scenario
is that we are going to move away from what we are currently using as
viewlayer and move into a more J2EE compliant setting.

One of the guys responsible for the company framework standard regarding the
viewlayers really liked the idea of being able to create company wide
standard components that are packaged as .jar files and simply included by
the projects teams. However, wise from experience I guess, he would really
like to be able to lock certain attribute of the components.

Thinking about this, I must agree that this would be a nice feature and
likely not to complicated to implement into Clay. So I propose that we add a
new attribute to the Clay component definition attributes: allowOveride.

I'll create a JIRA ticket for it to.

Hermod



SV: usecase example logon dialog

2006-11-14 Thread Hermod Opstvedt
Hi

If ypu look in faces-config.xml you will find tke declaration of
logon$dialog. Then you can look for the enter method in that bean.

Hermod

-Opprinnelig melding-
Fra: Jonathan Smith [mailto:[EMAIL PROTECTED] 
Sendt: 14. november 2006 18:00
Til: user@shale.apache.org
Emne: usecase example logon dialog

in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a 
managed bean method or is that something that lets you enter the dialog 
automatically. If if is declared in a managed bean please let me know which 
one and where in the faces-config that bean is declared.

thank you
Jon Smith

_
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://www
.windowsonecare.com/?sc_cid=msn_hotmail



SV: SV: usecase example logon dialog

2006-11-14 Thread Hermod Opstvedt
Hi

You must have - I can not find it in any of the current sources. Unless you
are running the Tiger stuff, where this is registered using annotations

Hermod


-Opprinnelig melding-
Fra: Jonathan Smith [mailto:[EMAIL PROTECTED] 
Sendt: 14. november 2006 18:28
Til: [EMAIL PROTECTED]
Emne: RE: SV: usecase example logon dialog

do i have a old copy of the usecase example becaus i have spent the last day

and a half looking for that declaration in faces-config and i have not found

it yet.



From: Hermod Opstvedt [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: user@shale.apache.org
Subject: SV: usecase example logon dialog
Date: Tue, 14 Nov 2006 18:11:19 +0100

Hi

If ypu look in faces-config.xml you will find tke declaration of
logon$dialog. Then you can look for the enter method in that bean.

Hermod

-Opprinnelig melding-
Fra: Jonathan Smith [mailto:[EMAIL PROTECTED]
Sendt: 14. november 2006 18:00
Til: user@shale.apache.org
Emne: usecase example logon dialog

in usecases.jsp where does the #{logon$dialog.enter} come from. Is that a
managed bean method or is that something that lets you enter the dialog
automatically. If if is declared in a managed bean please let me know which
one and where in the faces-config that bean is declared.

thank you
Jon Smith

_
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://clk.atdmt.com/MSN/go/msnnkwlo005002msn/direct/01/?href=http://ww
w
.windowsonecare.com/?sc_cid=msn_hotmail


_
Try Search Survival Kits: Fix up your home and better handle your cash with 
Live Search! 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improvelocale=e
n-USsource=hmtagline



SV: [scxml] dialog not found problem

2006-11-07 Thread Hermod Opstvedt
Hi

Should it not be: WEB-INF/dialog-config.xml? (Note the missing leading
slash)

Hermod


-Opprinnelig melding-
Fra: Torsten Krah [mailto:[EMAIL PROTECTED] 
Sendt: 7. november 2006 17:09
Til: user@shale.apache.org
Emne: [scxml] dialog not found problem

Got it working once, but now i don't find out whats going wrong since
i've changed some dialog configs, the log says:

 WARN http-8080-Processor25
org.apache.shale.dialog.scxml.SCXMLDialogManager - No dialog
configuration information present.  No default configuration found
at: /WEB-INF/dialog-config.xml.  No embedded configuration found at:
META-INF/dialog-config.xml
 ERROR http-8080-Processor25
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/app] -
No definition for dialog name 'newadmin' can be found


web.xml:

context-param

param-nameorg.apache.shale.dialog.scxml.CONFIGURATION/param-name
param-value/WEB-INF/dialog-config.xml/param-value
/context-param

dialog-config.xml:

scxmldialogs
dialog scxmlconfig=new-admin-user.xml name=newadmin
dataclassname=my.app.jsf.beans.UserBeanWrapper /
/scxmldialogs

What did i miss?

A dialog-config.xml is there, a dialog named newadmin too - why does the
manager does not find it? Any ideas?

Torsten



Shale and Spring

2006-11-04 Thread Hermod Opstvedt
Hi

Is there any special issues relating to the Spring integration
(shale-spring) and Spring 1.2.8? It's currently at 1.2.6

Hermod



SV: Clay and Tobago

2006-10-17 Thread Hermod Opstvedt
Hi

-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På vegne av Craig
McClanahan
Sendt: 17. oktober 2006 19:32
Til: user@shale.apache.org; [EMAIL PROTECTED]
Emne: Re: Clay and Tobago

On 10/17/06, Hermod Opstvedt [EMAIL PROTECTED] wrote:

 Hi

 That would be a great idea. This is something that I have also have
 thought
 about previously.

 Just to get this started, I took a look at the first component in the
 tomahawk.tld (1.1.3) commandbutton.

 Now the componentType we can derive from the tag-class, removing the last
 part: Tag


That seems pretty fragile to me, because it depends on a naming pattern.
Wouldn't it be better to actually instantiate an instance of the tag class,
and call getComponentType() on it?  Likewise for getRendererType().

Craig

Seems like a good approach, but that will then require the tool to have the
necessary .jars with dependencies in the classpath.

Hermod

The next to follow is extends, which I gather will always(?) be baseAction.

 Now if we start looking at the attributes, then looking at the attributes
 in
 the tomahawk-1_1_3.xml file and compare them with the attributelist in the
 tld then the first thing to note is that some of the attributes are
 defined
 in baseAction and others are defined in baseHtml and baseComponent.

 And will the attributes from libraries like tomahawk etc, always have
 valuebinding (VB) as bindingType?

 Now from this I do not think that a straight forward xslt translation will
 do the trick, so I guess that we need to create some sort of utility to do
 this translation. Being a commonly used handcrafter of such items, I would
 like to take a shot at it.

 Hermod


 -Opprinnelig melding-
 Fra: Gary VanMatre [mailto:[EMAIL PROTECTED]
 Sendt: 17. oktober 2006 17:28
 Til: user@shale.apache.org
 Emne: Re: Clay and Tobago

 From: [EMAIL PROTECTED]
 
   Hi
  
   Has anybody made any attempt at creating a Clay definition file for
 the
 Tobago
  components?
  

 I have not yet.  I'd also like to include Trinidad support.  We need to
 figure out a way to generate the Clay config from the TLD or something.


   Hermod
 

 Gary

 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 *
 
  This email with attachments is solely for the use of the individual or
  entity to whom it is addressed. Please also be aware that DnB NOR cannot
  accept any payment orders or other legally binding correspondence with
  customers as a part of an email.
 
  This email message has been virus checked by the anti virus programs
 used
  in the DnB NOR Group.
 
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *
 *
 





SV: Clay and Tobago

2006-10-17 Thread Hermod Opstvedt
Hi

That is what I am planning on doing. Since I am committer at codehaus, I
probably will submit it as Mojo there.

Hermod


-Opprinnelig melding-
Fra: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sendt: 17. oktober 2006 21:24
Til: user@shale.apache.org
Emne: Re: Clay and Tobago

On 10/17/06, Hermod Opstvedt [EMAIL PROTECTED] wrote:

 Seems like a good approach, but that will then require the tool to have
the
 necessary .jars with dependencies in the classpath.

A Maven plugin to generate Clay config files?

-- 
Wendy



Tomahawk t:stylesheet component in Clay

2006-10-16 Thread Hermod Opstvedt
Hi

Since my link
href=#{facesContext.externalContext.requestContextPath}/theme/styles.css/
does not work anymore, I thought I would give the Tomahawk t:stylesheet
component a try. However it does not seem to work properly:

In my Clay template .html file I have:

span jsfid=clay clayjsfid=t:stylesheet path=/theme/styles.css
allowbody=false/span

But instead of rendering:
link rel=stylesheet type=text/css href=/ClayMal/theme/styles.css /
It renders:
link rel=stylesheet type=text/css href=/ClayMalnull /

Am I barking up the wrong tree here or is this maybe a bug in Clay or the
tomahawk-1.1.3.xml definition?

Hermod



Link tag and requestContextPath

2006-10-15 Thread Hermod Opstvedt
Hi

I have had the following on my Clay .html templates for some time, and it
has been working just fine. I have now upgraded one of my shale and clay
sample, and it has stopped working. The Link now gets renedered as written
instead of getting resolved to the contextpath. I have probably missed
something, but I just can't figure what.

link
href=#{facesContext.externalContext.requestContextPath}/theme/styles.css/

Hermod




SV: Error in sandbox shale-clay-mailreader pom

2006-10-04 Thread Hermod Opstvedt
Hi

Did I hear refactoring? 

Hermod

-Opprinnelig melding-
Fra: Gary VanMatre [mailto:[EMAIL PROTECTED] 
Sendt: 4. oktober 2006 17:13
Til: user@shale.apache.org
Emne: RE: Error in sandbox shale-clay-mailreader pom

From: [EMAIL PROTECTED] 

 Hi 
 
 Likewise with the struts-mailreader-dao.jar. Update it to 1.3.5, and it
can be 
 downloaded from ibiblio. 
 
 Hemrod 
 
 -Original Message- 
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 04, 2006 11:03 AM 
 To: user@shale.apache.org 
 Subject: Error in sandbox shale-clay-mailreader pom 
 
 
 Hi 
 
 I tried to build the Shale-Clay mailreader app with Maven, but the pom
refers to 
 non-existant dependencies. 
 
 I searched around and came upon the following Wiki entry on MyFaces: 
 
 http://wiki.apache.org/myfaces/More_tips_on_Upgrading_to_Tomahawk_1.1.3 
 
 So the myfaces (1.1.3) stuff has a different groupid and can be downloaded
from 
 the above described repository. 
 
 Gary: Feel like updating this one? 

Yeap, I will and thanks for the tip.  I registered this this one in my own
maven reopos but we might want to use myfaces 1.1.4 instead.  This example
has not been refactored based on shales recent re-organization.  

I was thinking of moving this out of the sandbox and into the examples.  I
pause here because it's a copy of the shale-mailreader but using Clay
instead of JSP.  There would be duplicated source to maintain.

Any thoughts? 

 
 Hermod 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 
 
 This email with attachments is solely for the use of the individual or 
 entity to whom it is addressed. Please also be aware that the DnB NOR
Group 
 cannot accept any payment orders or other legally binding correspondence
with 
 customers as a part of an email. 
 
 This email message has been virus checked by the anti virus programs used 
 in the DnB NOR Group. 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* 
 



SV: Defining Clay views in clay-config.xml

2006-08-20 Thread Hermod Opstvedt
Hi

Figured it out. I had forgot to declare the
org.apache.shale.clay.FULLXML_CONFIG_FILES context param in web.xml.

Hermod

-Opprinnelig melding-
Fra: Hermod Opstvedt [mailto:[EMAIL PROTECTED] 
Sendt: 19. august 2006 20:14
Til: user@shale.apache.org
Emne: Defining Clay views in clay-config.xml

Hi

So far I've been using named xml files to define the various pages, but I've
decided to define them in clay-config instead. I know this is doable, but
I'm missing something, either a setting in web.xml or elsewhere

My simple clay-config.xml looks like this:

component jsfid=baseLayout extends=clay id=base
attributes
set name=clayJsfid
value=/templates/standard.html /
/attributes
symbols
set name=title value=Hello World /
set name=leftContent
value=/pages/defaultLeftNav.html /
set name=headerContent
value=/pages/defaultHeader.html /
set name=bodyContent
value=/pages/defaultBody.html /
set name=footerContent
value=/pages/defaultFooter.html /
/symbols
/component

component jsfid=/page1.xml extends=baseLayout
symbols
  set name=title value=Page 1/
  set name=bodyContent value=/pages/page1Body.html/
/symbols
/component

Earlier I had a page called page1.xml which contained the definition for
this and all was well, however if I now try to access the same page I get:

javax.servlet.ServletException: Unable to find file /page1.xml.  If this is
a full HTML or XML view, check your navigation rules.

What am I missing here?


Hermod



Defining Clay views in clay-config.xml

2006-08-19 Thread Hermod Opstvedt
Hi

So far I've been using named xml files to define the various pages, but I've
decided to define them in clay-config instead. I know this is doable, but
I'm missing something, either a setting in web.xml or elsewhere

My simple clay-config.xml looks like this:

component jsfid=baseLayout extends=clay id=base
attributes
set name=clayJsfid
value=/templates/standard.html /
/attributes
symbols
set name=title value=Hello World /
set name=leftContent
value=/pages/defaultLeftNav.html /
set name=headerContent
value=/pages/defaultHeader.html /
set name=bodyContent
value=/pages/defaultBody.html /
set name=footerContent
value=/pages/defaultFooter.html /
/symbols
/component

component jsfid=/page1.xml extends=baseLayout
symbols
  set name=title value=Page 1/
  set name=bodyContent value=/pages/page1Body.html/
/symbols
/component

Earlier I had a page called page1.xml which contained the definition for
this and all was well, however if I now try to access the same page I get:

javax.servlet.ServletException: Unable to find file /page1.xml.  If this is
a full HTML or XML view, check your navigation rules.

What am I missing here?


Hermod