Messages posted by osian
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: osian  XML
Profile for osian -> Messages posted by osian [17] Go to Page: 1, 2 Next 
Author Message
Hi Judy,

Thanks again for getting back to me so quickly.

I don't have any security in use in my application at the moment, so I don't believe that this should be causing any issues.

Wrt the example, my class is performing exactly the same actions, the only difference is that I attempt to do something with the hibernate objects, and this is where the problem arises. Strangely enough, it doesn't happen all of the time, but obviously I don't want it to happen at all :-)

Do the examples in icepack do something similar to what I am trying to acheive? (I don't have a support contract currently, so I don't have access to it).

I have a feeling that it is to do with the rendering phase, Seam probably requires more phases to take place for what I want to acheive, but I don't know how to initiate those from the code.
Hi Judy,

Thanks for your reply.

It would be easier for me to post some code to show you what I am attempting to do, but there is a lot of it, so let me try and explain:

1. A user clicks on a button, which causes a thread to be fired off and the progress bar to start.
2. The progress bar is updated through the thread while the thread is performing its processing
3. When the thread is complete, a call is made back to the calling component, which in this case is a seam component in conversation scope.
4. During this call to say that the thread is complete, I attempt to either refresh a hibernate object, or perform a search through hibernate to be able to update the screen with new information

Below are some snippets of code of the thread and the seam component:

Seam Component:
Code:
@Name("errorFileSearch")
 @Scope(ScopeType.CONVERSATION)
 public class FileSearch extends NexusEntityQuery<ErrorFile> implements ListDataValueChanged<String>, ExecuteServerCommandListener {
 
 	...
 	@Override
 	@Conversational
 	@Begin(join = true, flushMode=FlushModeType.MANUAL)
 	public void executeServerCommandComplete() {
 		getActionButtonManager().setAllButtonsTo(false);
 		ensureButtonStatuses();
 		getProgramManager().unlockAllOtherTabs();
 		if (isReprocessMode()) {
 			performSearch(0, false);
 		}
 		else if (isCorrectionWizardMultiMode() || isCorrectionWizardSingleMode()) {
 			for (ErrorFile file : getSelectedRecords()) {
 				//This is where the error is thrown
 				getSession().refresh(file);
 			}
 		}
 		//sets the progress bar to 100%
 		getActionButtonManager().getProgressBar().stopProgressBar();
 	}
 	... 
 }


Thread:
Code:
public class ExecuteCommandOnServerThread extends Thread implements Serializable {
 
 	private static final long serialVersionUID = 1L;
 
 	private ExecuteServerCommandListener executeServerCommandListener;
 	private Vector<ServerCommand> serverCommands = new Vector<ServerCommand>();
 	
 	/**
 	 * @param executeServerCommandListener
 	 * @param serverCommands
 	 */
 	public ExecuteCommandOnServerThread(ExecuteServerCommandListener executeServerCommandListener, Vector<? extends ServerCommand> serverCommands) {
 		this.executeServerCommandListener = executeServerCommandListener;
 		this.serverCommands.addAll(serverCommands);
 	}
 	
 	/**
 	 * @param serverCommand
 	 */
 	/**
 	 * @param executeServerCommandListener
 	 * @param serverCommand
 	 */
 	public ExecuteCommandOnServerThread(ExecuteServerCommandListener executeServerCommandListener, ServerCommand serverCommand) {
 		this.executeServerCommandListener = executeServerCommandListener;
 		serverCommands.add(serverCommand);
 	}
 
 	/* (non-Javadoc)
 	 * @see java.lang.Thread#run()
 	 */
 	@Override
 	public void run() {
 		long start = System.currentTimeMillis();
 		for (ServerCommand command : serverCommands) {
         	try {
 	            executeServerCommandListener.handleResponse(command, command.execute());
             } catch (IOException e) {
 	            e.printStackTrace();
             }
         }
 		long end = System.currentTimeMillis();
 		if ((end - start) < 1500) {
 	        try {
 		        Thread.sleep(2000);
 	        } catch (InterruptedException e) {}
 		}
 		//call the seam component to notify that all processing is complete
 		executeServerCommandListener.executeServerCommandComplete();
 	}
 }


Any ideas?
Hi,

I have, on screen, a simple progress bar being updated while some stuff happens in a thread in the background.
Once this thread is completed, I want to refresh the hibernate object that I have, but I keep on getting the exception:

Exception in thread "Thread-12" java.lang.IllegalStateException: No active application context
at org.jboss.seam.security.EntityPermissionChecker.instance(EntityPermissionChecker.java:55)
at org.jboss.seam.security.HibernateSecurityInterceptor.onLoad(HibernateSecurityInterceptor.java:36)
at org.hibernate.event.def.DefaultPreLoadEventListener.onPreLoad(DefaultPreLoadEventListener.java:41)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:148)
at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)
at org.hibernate.loader.Loader.doQuery(Loader.java:752)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at com.nexustelecom.mediation.errorcorrection.wizard.FileSearch.areRecordsLoadedFor(FileSearch.java:635)
at com.nexustelecom.mediation.errorcorrection.wizard.FileSearch.ensureButtonStatuses(FileSearch.java:295)
at com.nexustelecom.mediation.errorcorrection.wizard.FileSearch.executeServerCommandComplete(FileSearch.java:407)
at com.nexustelecom.mediation.admind.shared.ExecuteCommandOnServerThread.run(ExecuteCommandOnServerThread.java:61)
at java.lang.Thread.run(Thread.java:619) 


Does anyone have any thoughts around this? Do I need to try and get the action that is being executed into conversation scope or something??

Thanks in advance,
Osian
Hi,

I have a simple page where the user is able to click on a button to edit some values. Initially the page has outputTexts on it, then when the edit button is pressed, these are then input fields. I also have a cancel button on the page which resets the page back to the output text style.

On this cancel button (ice:commandLink) I have set immediate to true because there are integers, etc. captured on the page, therefore when cancelling, it should ignore validation and simply set the value back to the original value.

The problem is, that when the user presses cancel, all seems well, until he/she clicks edit again, and the old values are still in the input fields. I have even gone to the length of re-creating the backing beans for the input fields completely, but this still has no effect.

Any ideas on how to reset these fields back to their original values?

Osian

Icefaces 1.8.0
Hi,

I have a problem with the panelTabSet, it is adding unwanted white space at the top and the bottom of the tab (please see attached image).

When using firebug, and I remove the spacer images that is embedded in the top and the bottom of the tab, it looks like it should do. I do have the spacer.gif, so it can't be that. Has anyone experienced this before?

Also, if I want to get rid of the round edges can this done easily?

Thanks,
Osh
Hi All,

Thanks for reading this post.

Versions Used:
Icefaces 1.7.2.SP1
Java 1.6_03
Tomcat 6.0.18

I am attempting to deploy my first icefaces based portlet. I started off with a normal jsp portlet, and this deployed fine, I then included the icefaces jars, and cretaed a jspx file and deployed this as a portlet, and it was available in liferay for me to add, but once it is added, it constantly displays the 'User Session Expired' error message. I have searched the forums high and low, and have done things like add emptySessionPath="true" to the Connector sections in my server.xml file. But everything I have tried, shows me this error. I have attached my war file that I deploy, and if someone would be kind enough to either try the deployment or recommend me a fix, I would be very grateful,


Thanks in advance,
Osian

Please note that the fact that things like the actionURLSuffix is set to .seam , there is currently no seam in this portlet or anywhere near it, that will be introduced once this fix has been resolved.
Hi,

Icefaces 1.7.2SP1

I have created a generic data capture component for my application with appropriate backing beans, etc. but now I want to add the ice:message component to this custom facelet component.

The problem that I have is that the id field needs to be dynamic for the appropriate input fields, for example ice:inputText or ice:selectOneMenu, but it will remain the same for the lifetime of the component on the appropriate page. The reason that I need the id is so that the ice:message requires this id.

Below is a snippet from my jspx file:

Code:
 	<ui:fragment rendered="#{captureFor.string}">
 		<ice:inputText id="#{captureFor.identifier}" value="#{captureFor.dataCaptureValue}" rendered="#{not disabled}" maxlength="#{captureFor.length}" size="#{captureFor.size}"/>
 		<ice:outputText value="#{captureFor.dataCaptureValue}" rendered="#{disabled}"/>
 		<ice:message rendered="#{not disabled}" id="#{captureFor.javascriptIdentifier}_msg" for="#{captureFor.identifier}"/>
 	</ui:fragment>
 


Is there possibly any way to capture the generated id by icefaces to pass to the ice:message component?

Thanks for any help/advice,

Osian
Hi,

I have an issue when I am displaying a modal window, or a draggable panel. They seem to offset themselves from the top of the window by the height of 93px.

The reason I know the position so well is because that is where the position of where the my content styled div starts:

Code:
 .content {
 	border-left:1px solid #AFAFAF;
 	border-right:1px solid #AFAFAF;
 	
 	position: absolute;
 	top: 93px;
 	bottom: 29px;
 	left: 3px;
 	right: 9px;
 }
 


I believe it is something to do with the "position: absolute" but I need to use this as I have things like a header and footer which must remain at 'absolute' positions on screen. Is there another way to resolve this problem except re-designing my css for placing components on screen?

If its a no, does anyone have any example css where they have a header and footer displayed at exacly the top and the bottom of the screen with scrollable content in the main section?

Thanks in advance,

Osian
I have gone with the simple clickable label approach for now as I need to get the prototype out quickly, but I will investigate the rowselector problem further.

FYI, my seam component doesn't have any scope defined, and it extends the HibernateEntityQuery object, so nothing to complicated. Could it be something to do with a missing jar? I have fixed a number of issues that I was having because of the location of the jar files in my ear (not literallly in my ear lol).
Thanks for the reply Mark, it is now finally attempting to call my class, but now it is complaining that it can't find the method which has the 'RowSelectorEvent' as its parameter.

I have done a copy and paste to ensure that it is nothing silly like a spelling mistake. I have even made the table a component so that the seam class can be of scope page, etc., i.e. the same as the example, but it still complains that there is no method:

Code:
 javax.faces.el.MethodNotFoundException: /file:/D:/Projects/Testing_Prototype/jboss-4.2.3.GA/server/seam/tmp/deploy/tmp8468testing.ear-contents/lib/components.jar!/components/search-results.jspx @14,53 selectionListener="#{searchResults.selectRow}": Method not found: test.components.search.SearchResultsHandler@f20761.selectRow(com.icesoft.faces.component.ext.RowSelectorEvent)
 	com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:71)
 	com.icesoft.faces.component.ext.RowSelector.broadcast(RowSelector.java:360)
 	com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:559)
 	com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:238)
 	javax.faces.component.UIData.broadcast(UIData.java:938)
 	com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:233)
 	javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
 	javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:541)
 	com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
 	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
 	com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
 	com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:94)
 	com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:54)
 	com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:26)
 	com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
 	com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
 	com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
 	com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
 	com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
 	com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:19)
 	com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
 	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 	com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56)
 	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 
 



Any thoughts? Anyone??

Thanks again,
Osian
Icefaces 1.7.2.SP1
SEAM 2.1.0.SP1

Hi,

I'm loving working with IceFaces & Seam, new to me, but very nice. but I have been struggling all afternoon (and am almost pulling my hair out) with trying to get a row selection to actually call a method in a backing seam component (whose scope I have changed to all possible scopes as well).

I have tried both the selectionListener & the selectionAction, but nothing is called on my seam component.

Does anyone else use rowSelector and SEAM? I have searched high and low for a solution, but have found no answers.

Is there an alternative in IceFaces to make a whole row clickable? (I don't mind a page refresh)

Thanks in advance,

Osian
Not sure what effect it has, but the example that I posted returns a void, whereas you return a String. Are you sure that the method is being executed?

What is the code in your JSF page?

Osian
Take a look at http://balusc.blogspot.com/2006/05/pdf-handling.html

This is doing something similar, but to simply open a standard pdf file, just replace the file (byte[] buffer stuff) with the jasper stuff, and that should do the trick for you,

Osian
Hi again,

I have now discovered the "binding" tag (I am completely new to jsf & icefaces) this hugely simplifies the problem at hand, and this is working well for the initial display of the component tree that I want to display. Here is the jsf code for this:

Code:
 	<div class="flow">
 		<c:if test="${configPage.selectedController != null}">
 			<ice:form>	
 				<ice:panelGroup binding="#{configPage.selectedController.flowManager.compImpl}" id="flowComp"/>
 			</ice:form>
 		</c:if>
 	</div>
 


(note that the scope of the configPage bean is request)

Unfortunately, when a user selects a different flowController from a list, the 'binding' is supposed to be given a brand new implementation of PanelGroup, but this method is never called. Is there anyway to ensure that this method is called?

I have seen that richfaces does this by specifying which areas need re-rendering, but icefaces is very clever with the dom approach.

Any help would be greatfuly appreciated, as I really want to stick with icefaces and don't want to move over to richfaces this late in the day,

Thanks again,
Osh
Hi All Again,

I have now re-written this component as a pure facelet, but it is still experiencing strange behaviour where it needs to clean up its children.

Below is the facelet in question:

Code:
 <span 
 	xmlns="http://www.w3.org/1999/xhtml"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:c="http://java.sun.com/jstl/core"
 	xmlns:ice="http://www.icesoft.com/icefaces/component"
 	xmlns:oshComp="http://osian.me.uk/components">
 
 	<f:param name="controller" value="#{controller}"/>
 	
 	<ice:panelGroup style="#{controller.cssStyle}">		
 		<ice:panelGroup style="#{controller.cssContentStyle}">
 			<ice:outputLabel value="#{controller.displayName}"/>
 		</ice:panelGroup>
 	</ice:panelGroup>
 	 
 	<c:forEach items="#{controller.children}" var="child">
 		<oshComp:customComponent controller="#{child}"/>
 	</c:forEach>
 
 </span>
 


Any advice/help would be greatfully appreciated,

Many thanks,
Osian
 
Profile for osian -> Messages posted by osian [17] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team