[JBoss Portal] - Re: Clear/reset render parameters or re-initialise all portl
by Antoine_h
Yeah !
that's great.
using the interceptor is nice.
just clearing the other portlets navigationnal state is not clean job (JSR is shouting : "don't do that !"... but...).
nice example of how to use the interceptors to plug a behavior around the portlets engine and commands...
thanks for reporting this solution.
about IPC, the global way of doing this is to have a communication mean between the several parts of the application.
so they can communicate with each other : the portal pieces (portlets, portal main engine),
as well as backoffice application that are behind the portlets.
you can use the HttpSession for that, but this is not really meant for this.
or you can use some messaging. This is a quite heavy solution, but the most reliable and clean architecture.
your solution is enough for this need... so the best...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125134#4125134
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125134
17 years, 1 month
[JBoss Seam] - Re: FlushModeType.MANUAL in conversation
by Lundegaard
See the posted code below to see how to validate the input.
| /**
| * @author Thomas Maerz (thomas.maerz(a)primedo.com)
| */
| @Name("userHome")
| public class UserHome extends EntityHome<User> {
|
| private static final long serialVersionUID = 1L;
|
| @In
| UserDao userDao;
|
| public void validateUsername(FacesContext context, UIComponent component, Object value) throws ValidatorException {
| User user = userDao.getByUsername((String) value);
| if (user == null || user.getId().equals(getInstance().getId())) {
| return;
| }
| throw new ValidatorException(new FacesMessage(""));
| }
| }
|
edit.html
| <s:decorate template="/templates/edit.html">
| <ui:define name="label">Username</ui:define>
| <h:inputText value="#{userHome.instance.username}" validator="#{userHome.validateUsername}" required="true"/>
| </s:decorate>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125131#4125131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125131
17 years, 1 month
[Installation, Configuration & DEPLOYMENT] - Errors when the Jboss server starts
by rodosa
Hello!!
I have some problems when the Jboss server starts. Could someone what's wrong? Because I've looking for the solution but I don't get nothing that helps me.
This is one of the errors reported. I only put the first lines because It's too long
|
| 2008-01-31 12:51:41,399 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:
|
| --- Packages waiting for a deployer ---
| org.jboss.deployment.DeploymentInfo@477faab3 { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/META-INF/MANIFEST.MF }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/META-INF/MANIFEST.MF
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
| org.jboss.deployment.DeploymentInfo@cbb725fb { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/access.properties }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/access.properties
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
| org.jboss.deployment.DeploymentInfo@7134709e { url=file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/classes/com/miApp/UserBean.class }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/C:/jbpm/jbpm-jpdl-3.2.2/server/server/jbpm/deploy/jbpm-console/WEB-INF/classes/com/miApp/UserBean.class
| altDD: null
| lastDeployed: 1201780300337
| lastModified: 1201780300337
| mbeans:
|
|
These are the rest of errors!!! I supposed that I've a bad configuration of web.xml & faces-config.xml files
| 2008-01-31 13:42:45,671 ERROR [STDERR] 31-ene-2008 13:42:45 com.sun.faces.config.ConfigureListener contextInitialized
| INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for context 'null'
| 2008-01-31 13:42:46,203 ERROR [STDERR] 31-ene-2008 13:42:46 com.sun.faces.spi.InjectionProviderFactory createInstance
| ADVERTENCIA: JSF1033: Resource injection is DISABLED.
| 2008-01-31 13:42:46,453 ERROR [STDERR] 31-ene-2008 13:42:46 com.sun.faces.config.ConfigureListener registerELResolverAndListenerWithJsp
| GRAVE: Error Instantiating ExpressionFactory
| java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:169)
| at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1606)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:455)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
|
Thanks for your help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125128#4125128
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125128
17 years, 1 month
[JBoss Seam] - Re: Facelet Templates from a Database
by Lundegaard
I am using a similar code to access templates from another webapp, but the sample DatabaseResourceResolver shows you the basis:
| import java.io.ByteArrayInputStream;
| import java.io.IOException;
| import java.io.InputStream;
| import java.net.MalformedURLException;
| import java.net.URL;
| import java.net.URLConnection;
| import java.net.URLStreamHandler;
|
| import com.sun.facelets.impl.DefaultResourceResolver;
|
| /**
| * @author Thomas Maerz (thomas.maerz(a)primedo.com)
| */
| public class DatabaseResourceResolver extends DefaultResourceResolver {
|
| @Override
| public URL resolveUrl(String path) {
| URL url = super.resolveUrl(path);
| if (url != null) {
| return url;
| }
|
| try {
| return new URL("internal", null, 0, path, getHandler(path));
| } catch (MalformedURLException e) {
| }
| return null;
| }
|
| private static URLStreamHandler getHandler(final String path) {
|
| return new URLStreamHandler() {
|
| @Override
| protected URLConnection openConnection(URL url) throws IOException {
| return new URLConnection(url) {
|
| @Override
| public void connect() throws IOException {
| }
|
| @Override
| public InputStream getInputStream() throws IOException {
| // Connect to Database and return your content
| return new ByteArrayInputStream(new byte[] {});
| }
|
| };
| }
|
| };
|
| }
|
| }
|
web.xml
| <context-param>
| <param-name>facelets.RESOURCE_RESOLVER</param-name>
| <param-value>DatabaseResourceResolver</param-value>
| </context-param>
|
Facelets file
| <ui:composition
| xmlns:ui="http://java.sun.com/jsf/facelets"
| template="/cms/some/path/index.html">
|
But there are some pitfalls:
- Facelets will cache the the returned URL with the path as key
- You have to handle reloading yourself (Override getLastModified() in URLConnection)
- return valid XML
Hope that helps,
Tom
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125126#4125126
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125126
17 years, 1 month