Thanx Gary for your help. Yah "bypass" or "clayignore" block will be useful feature. Thanx for taking the initiative.
About your other solution, I will try it tonite and let you know how it goes. On 9/23/05, Gary VanMatre <[EMAIL PROTECTED]> wrote: > > >Gary thanks for ur reply. > > > >The problem is I want LoginForm action to be "j_acegi_security_check" > ><form action="j_acegi_security_check" method="POST"> > ></form> > > > >The only I could make it render this way is my bypassing clay. But for my > >logout button, > ><input type="submit" value=logout jsfid=mybutton /> I need to go thru > Clay > >:( > > I like your idea about creating a "bypass" or "clayIgnore" block. It would > be a new feature. I'll see if I can get that done. > > I can think of a way to handle today as a compromise. You could load a > document into a jsf outputText component using the shape validator. Maybe > something like this: > > -- html > <!-- inserting a vanilla form here --> > <span jsfid="clayInclude" url="/login.htm" managedBeanName="mybean" > shapeValidator="#{managed-bean-name.includeLoginForm}" /> > > > -- xml def (metadata attributes that are not component properties end up > in the attributes map) > <component jsfid="clayInclude" extends="clay"> > <attributes> > <set name="url" /> > </attributes> > </component> > > > -- managed bean > mybean: > > public void includeLoginForm(FacesContext context, UIComponent clay, > Object displayElement) { > > ComponentBea root = (ComponentBean) displayElement; > > //make the root a verbatim component > root.setComponentType("javax.faces.HtmlOutputText"); > > String url = (String) clay.getAttributes().get("url"); > > > //use the external context to load a file into a buffer > StringBuffer buff = new StringBuffer(); > InputStream in = context.getExternalContext().getResourceAsStream(url); > .... read file into buffer ... > > //include the payload as a value attribute > AttributeBean attr = new AttributeBean(); > attr.setName("value"); > attr.setValue(buff.toString()); > root.addAttribute(attr); > > //leave the html special chars > attr = new AttributeBean(); > attr.setName("escape"); > attr.setValue(Boolean.FALSE.toString()); > root.addAttribute(attr); > > //don't cache server side state for the monster > attr = new AttributeBean(); > attr.setName("isTransient"); > attr.setValue(Boolean.TRUE.toString()); > root.addAttribute(attr); > } > > > I think that something simple like this might be good in the Clay > baseline. > > Gary > > > > > > >