[JBoss Seam] - Re: s:link problem
by stu2
"Stateless Bean" wrote : hi,
| i got problem with s:link i need to create in <h:dataTable elements with s:link and need to incject him param like:
|
| | <s:link action='#{stsb.method("12")}'>
| | <img src="#{defence.imageSrc}" style="border: none;" />
| | </s:link>
| |
| | public String method(String elem) {}
| |
|
| but i must to set my "12" numer from bean with EL, is this well formed? does this work?
|
| | <s:link action='#{stsb.method("#{sfsb.myparam}")}'>
| | <img src="#{defence.imageSrc}" style="border: none;" />
| | </s:link>
| |
|
| or maybe is better way to inject=rendered elem?
|
One very straightforward way that works reliably is to use f:param and @RequestParameter.
I've found it to be simpler than trying to get the el parameter stuff to work (or the DataModelSelection for that matter) plus you can unit test it (El parameters don't work from SeamTest currently)
Anyway, here's how it looks in the xhtml:
<s:link value="del" action="#{catalogMapping.removeMapping}">
| <f:param name="columnNumberToUnmap" value="#{column.rawColumn.columnNumber}" />
| </s:link>
|
Your image tag would be a peer of the f:param. And in your bean, just mark a variable with @RequestParameter with a name that matches your parameter name. Done.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046580#4046580
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046580
18 years, 11 months
[JBoss Portal] - Re: Please explain the Portal URL - /portal/portal
by nollie
Hello all
I am picking up where hamptont has left off. We are just finishing our upgrade to portal 2.4.1 and I'm addressing our issues with the context-root and URL prefixing/mapping. When I began the upgrade our context-root was '/' and our URLs were being prefixed with 'portal'. My goal is to make the context-root 'portal' and remove the prefixes all together. (Our motivation is still the same and explained above by hamptont.)
The below suggestion
anonymous wrote : If you look at jboss-service.xml you can even change how the URL decoding is performed :
|
| 1/ remove the PrefixDelegatingCommandMapper
| 2/ set the PortalObjectCommandMapper as the next of the DefaultPortalCommandMapper service
|
| this way you should have /a/b/c act the same as /portal/a/b/c
Deals with classes found in 2.2. The seemingly relevant mbeans in 2.4 are listed here. You can see that I've tried setting the prefix to '/' but that hasn't lead to the desired result.
<mbean
| code="org.jboss.portal.core.command.mapper.CommandFactoryDelegate"
| name="portal:commandFactory=Delegate,prefix=portal"
| xmbean-dd=""
| xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
| <xmbean/>
| <attribute name="Prefix">/</attribute>
| <depends
| optional-attribute-name="DelegatingFactory"
| proxy-type="attribute">portal:commandFactory=Delegating</depends>
| <depends
| optional-attribute-name="DelegateFactory"
| proxy-type="attribute">portal:commandFactory=PortalObject</depends>
| </mbean>
| <mbean
| code="org.jboss.portal.core.model.portal.PortalObjectURLFactory"
| name="portal:urlFactory=PortalObject"
| xmbean-dd=""
| xmbean-code="org.jboss.portal.common.system.JBossServiceModelMBean">
| <xmbean/>
| <attribute name="Prefix">/</attribute>
| <depends
| optional-attribute-name="Factory"
| proxy-type="attribute">portal:urlFactory=Delegating</depends>
| </mbean>
Have I made a wrong assumption about the prefix attribute? (it would seem so) Is there an analogous edit to the XML as explained above for 2.2?
Any help appreciated, thanks.
Nollie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046578#4046578
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046578
18 years, 11 months
[Installation, Configuration & Deployment] - Problems deploying to JBoss 4.2.0 - pesky JSF?
by nalbion
I've just upgraded from JBoss 4.0.5 to 4.2.0 and am having all sorts of trouble deploying my web app.
I was using Selenium to test the web pages, but have removed that because I suspected that there was a compatibility problem, but the problem still exists (actually it was complaing about org.apache.commons.digester)
This doesn't make any sense to me because I can't even see any trace of where I'm calling JSF methods...
02:58:02,703 INFO [TomcatDeployer] deploy, ctxPath=/mojoWeb, warUrl=.../deploy/mojoWeb.war/
| 02:58:07,640 INFO [STDOUT] 02:58:07,640 ERROR [[/mojoWeb]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
| java.lang.IncompatibleClassChangeError: Class org.jnp.server.NamingServer does not implement the requested interface org.jnp.interfaces.Naming
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at com.sun.faces.config.WebConfiguration.processJndiEntries(WebConfiguration.java:441)
| at com.sun.faces.config.WebConfiguration.<init>(WebConfiguration.java:86)
| at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:139)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:249)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| 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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046577#4046577
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046577
18 years, 11 months