[JBoss Seam] - Re: keeping context using external webapp
by ollix
just in case someone needs to do the same, I wrap up my last post.
I created that ugly helper, to enable to use the web container's jsessionid. I use it to create a simple link, that contains both the jsessionid and the conversation id. The remote server uses this information to setup a callback URL :
.../callback.seam;#{jsessionId}?cid=#(cid)...
The cid component is a second ugly helper, that returns the current conversationId:
| @Name("cid")
| public class ConversationIdHelper {
|
| @Override
| public String toString() {
| return Conversation.instance().getId();
| }
|
| }
|
The remote server calls this URL, retrieves the resulting HTML and injects some payment information using predefined provider specific tags. The resulting HTML is than represented to the user. The URL seen by the user will be a payment provider one, but the content looks just like the stuff from our website. The only "problem" left is the need to use absolute URLs for all Images, stylesheets etc. I used a second template for this.
If somebody knows a more elegant way to do the same, I would be happy to get some feedback.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032940#4032940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032940
17Â years, 9Â months
[JBossCache] - Re: PojoCache, Serializable object and cluster
by jacek187
I do some investigation and I think, that this is a bug in PojoCache (blocker in my opinion)
Look into TreeCacheAopDelegate._putObject method
| if(!cache_.isMarshallNonSerializable())
| AopUtil.checkObjectType(obj);
|
| if (obj == null) {
| return cache_._removeObject(fqn, true);
| }
| // Skip some un-necessary update if obj is the same class as the old one
| Object oldValue = internal_.getPojo(fqn);
| if(oldValue == obj) return obj; // value already in cache. return right away.
|
|
if new object == oldObject mothod is leaved and nothing is in cache changed!
I think that this should be true only for Advised objects and for Serializable absolutly not!
I've checked, that if comment out this condition my test pass!!
But I still didn't decide to use modified code in production use, because I don't know that this change causes other unexpected effects.
Because this bug is stopper for my (My application is using only PojoCache, and there are many Serializable objects stored in cache. Now I can't create cluster without huge code modification) I decide to report new bug: JBCACHE-1016. I hope, that this issue will be soon resolved.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032933#4032933
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032933
17Â years, 9Â months
[JBoss Seam] - Re: Seam and Richfaces : Drag and Drop Problem
by stu2
I'm also using DnD from Richfaces, and just like you started with a simple example to explore it. It's working fine for me (also latest Seam from CVS) so I'll post what I have in case it helps you out.
Here's the xhtml:
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:a="https://ajax4jsf.dev.java.net/ajax"
| xmlns:rich="http://richfaces.ajax4jsf.org/rich"
| template="/themes/#{globalPrefs.themeName}/template.xhtml">
|
| <ui:define name="content">
| <h1>Drag and Drop exploration</h1>
|
| <a:outputPanel id="messages">
| <h:messages styleClass="message" />
| </a:outputPanel>
| <rich:dragIndicator id="indicator" />
| <h:form id="dand">
|
| <h:panelGrid columnClasses="panelc" columns="4" width="100%">
|
| <rich:panel>
| <f:facet name="header">
| <h:outputText value="Source List!" />
| </f:facet>
| <h:dataTable id="src" columns="1" value="#{dand.genders}" var="fm">
| <h:column>
| <a:outputPanel style="border:1px solid gray;padding:2px;"
| layout="block">
| <rich:dragSupport dragIndicator=":indicator"
| dragType="gender" dragValue="#{fm}">
| <rich:dndParam name="label" value="#{fm}" />
| </rich:dragSupport>
| #{fm}
| </a:outputPanel>
| </h:column>
| </h:dataTable>
| </rich:panel>
|
| <rich:panel>
| <f:facet name="header">
| <h:outputText value="CDM Fields" />
| </f:facet>
|
| <h:dataTable id="cdmtable" columns="1"
| value="#{dand.fields}" var="fm">
| <h:column>
| <a:outputPanel style="border:1px solid gray;padding:2px;"
| layout="block">
| <rich:dropSupport acceptedTypes="gender" dropValue="#{fm}"
| dropListener="#{dand.dragged}" reRender="messages">
| </rich:dropSupport>
| #{fm}
| </a:outputPanel>
| </h:column>
| </h:dataTable>
| </rich:panel>
|
| </h:panelGrid>
| </h:form>
|
| </ui:define>
| </ui:composition>
|
Here's the SLSB:
| package com.fb.core.action;
|
| import java.util.ArrayList;
| import java.util.EnumSet;
| import java.util.List;
|
| import javax.ejb.Stateless;
|
| import org.ajax4jsf.dnd.Dropzone;
| import org.ajax4jsf.dnd.event.DropEvent;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.datamodel.DataModel;
| import org.jboss.seam.framework.EntityController;
|
| import com.fb.core.model.cdm.CdmField;
| import com.fb.core.model.cdm.Gender;
|
| @Stateless
| @Name("dand")
| public class DandDAction extends EntityController implements DanD {
|
| private static final long serialVersionUID = -5492165330283497323L;
|
| @DataModel
| private final List<CdmField> fields;
| @DataModel
| private final List<Gender> genders;
|
| public DandDAction() {
| fields = new ArrayList<CdmField>();
| fields.addAll(EnumSet.allOf(CdmField.class));
| genders = new ArrayList<Gender>();
| genders.addAll(EnumSet.allOf(Gender.class));
| }
|
| public void dragged(DropEvent dropEvent) {
| Dropzone dropzone = (Dropzone) dropEvent.getComponent();
| addFacesMessage("Dragged #0 with dragType #1 onto dropValue #2",
| dropEvent.getDragValue(), dropEvent.getDragType(), dropzone.getDropValue());
| }
|
| public List<CdmField> getFields() {
| return fields;
| }
|
| public List<Gender> getGenders() {
| return genders;
| }
|
| }
|
There wasn't really much else to it. The two lists in the SLSB just contain enums.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032931#4032931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032931
17Â years, 9Â months