voyent
Messages posted by: magruene  XML
Profile for magruene -> Messages posted by magruene [18] Go to Page: 1, 2 Next 
Author Message
Hello, I have a simple question regarding the <ace:list> component. Is it possible to use a paginator with this component? I have a list which is rather long (50-100 entries) and when all entries are displayed at the same time it looks really bad because users would have to scroll down for some time to reach the end of the list. What I want to do is to have a list of "available" users and a list of "selected" users. My first approach was to add two <ace:dataTable> components and implement a drag&drop behaviour between those two. This works but on several occasions (e.g. when filtering is enabled) it totally bugs out. So the next equivalent I found was the <ace:list> but without paging or maybe even filtering, it's not really usable for bigger lists.

Regards

Marc
Indeed. Updating to 3.2 helped. Thank you both very much.

Cheers Marc

artzambrano wrote:
The menu component is designed to work in a more asynchronous way, making dynamic updates on the same page as you activate menu items (unless the menu item has a 'url' attribute). If you want to move to a different page, perhaps you could try adding an actionListener method to the menu item, and from there redirect the user manually to a different page/url.

 


Thanks for the reply but I do want to stay on the same page. The problem is, that the menu is rendered/displayed wrong, after I clicked on a menuItem. (See screenshot a few posts above)

Cheers

Marc
Hello again, I updated Mojarra and I can remove the PartialStateSaving context-param. Thanks. However the display issue remains. I'm not exactly sure what you mean with markup code as it seems my english skills only go that far, but I'll try and provide a little more details.

I have a xhtml-page which displays details from a JIRA Issue fetched via REST. On the page I'm able to edit the fields and update the issue, again via REST. Also I added the possibility to change the current stauts of the Issue via the Transitions. The possible Transitions are displayed in the ace:menu tag dynamically:

Code:
<ace:menu model="#{transitionBean.menuModel}" type="tiered" id="transition_menu_model">
 				<!-- <c:forEach items="${transitionBean.possibleTransitions}" var="transition">
 					<ace:menuItem value="#{transition.key}"
 						actionListener="#{transitionBean.updateIssueWithTransition}">
 						<f:param name="selectedTransition"
 							value="#{transition.value}" />
 					</ace:menuItem>
 				</c:forEach> -->
 			</ace:menu>


Notice that I commented the c:forEach part for now, as I'm currently using the "model"-attribute to build the menu dynamically:

Code:
public DefaultMenuModel getMenuModel() {
 		menuModel = new DefaultMenuModel();
 		Submenu subMenu = new Submenu();
 		subMenu.setId("transition_subMenu");
 		subMenu.setLabel(ResourceBundle.getProperty("transitions"));
 		menuModel.addSubmenu(subMenu);
 		for (Entry<String, Integer> entry : getPossibleTransitions().entrySet()) {
 			MenuItem menuItem = new MenuItem();
 			UIParameter uiParam = new UIParameter();
 			uiParam.setName("selectedTransition");
 			uiParam.setValue(entry.getValue());
 			menuItem.setId(entry.getKey().replaceAll(" ", "_").toLowerCase() + "_" + entry.getValue().toString());
 			menuItem.getChildren().add(uiParam);
 			menuItem.setValue(entry.getKey());
 			menuItem.setAction(LiferayFacesContext
 					.getCurrentInstance()
 					.getApplication()
 					.createMethodBinding("#{transitionBean.updateIssueWithTransition}",
 							new Class[] {}));
 			subMenu.getChildren().add(menuItem);
 		}


I'm aware that "setAction" is deprecated, I may change that later. Everything displays correctly and works fine until I press one of the menuItems and submit a transition. After the update is finished, I reload the current Issue to display the new values on the page. The users stays on the same page after the update process is finished. It works if I leave the current page after the update and manually go back to the detail page after that, however that is bothersome and not what I intended.

Cheers

Marc

dsinotte wrote:
What scope is the bean?

Does the same issue occur in a non-portlet environment (that is, if you take the same markup and bean code and just run it in Tomcat, does it behave differently)? Just trying to see if it's portlet specific.

Is it possible to replace c:forEach with ui:repeat? 



Hey, sorry for the late reply, for some reason I haven't received a notification mail. I just checked back, to post, that I got it resolved.

It was a completely diffrerent issue though. Because I'm using <ui:include> to build up my UI, the ViewScope for some reason fails to build up correctly and will get reinstanciated on every request, much like a RequestScoped Bean. For reference: http://balusc.blogspot.de/2011/09/communication-in-jsf-20.html#ViewScopedFailsInTagHandlers

Adding the following to the web.xml resolved this:

Code:
     <context-param>
         <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
         <param-value>false</param-value>
     </context-param>


Also, to answer your other question. <ui:repeat> didn't work, because I got a ClassCastException when combining <ace:menuItem> and <ui:repeat>.

However, now that it works, I seem to have a diffrerent problem. After the submit is successfull, the <ace:menu> (I changed it to that from <ace:menuButton> for design reasons) renders somewhat broken. (Image attached). Is there anything I can do? (I checked with menuButton too, the same thing happens)

Cheers

Marc
Hello everybody,

it's been some time since I last posted something on here, so please don't blame me, if I violate any forum regulations =).

Ok, so I'm developing a Portlet using Icefaces (3.0.1) and I'm facing a wierd problem with the forEach X menuItem combination.

The code-snipped in question:

Code:
<ace:menuButton value="#{i18n['transitions']}">
 				<c:forEach items="${transitionBean.possibleTransitions}" var="transition">
 					<ace:menuItem value="#{transition}"
 						action="#{transitionBean.updateIssueWithTransition}">
 						<f:param name="selectedTransition"
 							value="#{transition}" />
 					</ace:menuItem>
 				</c:forEach>
 			</ace:menuButton>


What I'm trying to do is to fill a List (possibleTransitions) with String values and then create an MenuItem for each String value for it to be displayed and clickable. When clicked, the Page should put the "selectedTransition" param in the request for me to read back in the bean. However, although the values are correctly displayed and the menuItems are added, nothing happens when I click one of the menuItems. My method is never fired. Fun thing is, if I add a ArrayList manually and assign it to c:forEach everything works like expected. Hoewever if I try to add the initial possibleTransitions list to the test List, the manually added String work but the "possibleTransitions"-Part still won't work.

Code in the backing Bean:Code:
 
 	public List<String> getPossibleTransitions() {
 		if (possibleTransitions.size() == 0 && incidentBean != null
 				&& incidentBean.getCurrentIssue() != null) {
 			possibleTransitions = incidentBean.getJiraServiceRest()
 					.getPossibleTransitionsWithJson(
 							incidentBean.getCurrentIssue().getIssueKey());
 			for (String string : possibleTransitions) {
 				System.out.println(string + " from getMethod");
 			}
 		}


Also the one with "test list":
Code:
 public List<String> getTestList() {
 		testList.clear();
 		testList.add("test 1");
 		testList.add("test 2");
 		if (incidentBean != null && incidentBean.getCurrentIssue() != null) {
 			testList.addAll(incidentBean.getJiraServiceRest()
 					.getPossibleTransitionsWithJson(
 							incidentBean.getCurrentIssue().getIssueKey()));
 		}
 
 		return testList;
 	}


As said before, the manual part of the testList works, the part with the addAll-Method doesn't or at least the MenuItems are created with the correct String values but the action is not fired for those.

I checked with firebug, whether I can figure out a difference between the two elements but there doesn't seem to be one. Now I tried pretty much everything and I can't figure out what's the problem.

I really hope you can help.

Thanks in advance!

Cheers

Marc


P.S. I added a screenshot showing the firebug output, maybe it helps..


Hello everybody. I've been googling for quite some time but couldn't find anything of use(or I was to stupid to see the solution when I had it). However we have the following scenario:

We will set Liferays User Session to 4 hours. Currently we're testing with the default 30min.

- User is idle until Liferay displays the session extension warning message
- User extends
- User still is idle
- Perform an action in an Icefaces Portlet whithout refreshing the page after more time idle

I get the Session error in IceFaces.
Everything back to normal once I refresh the page.

So what I want to do is when I press the "Extend" button, I want to also extend the Icefaces session. So I will set the Liferay and Icefaces Session to 4 hours and they get ~simultaniously extended.

Is this possible?

Regards

Marc
Hello everybody,

I have a rather annoying blocking Issue for my Project right now. Because of a proxy that will be used later in the Project, I have to deploy Liferay on a specific Context, let's say /portal. Liferay works fine on that new Context, however my Custom Icefaces Portles don't. Every dynamic Resource(like ice:graphicImage or ice:outputResource) can't be found when the context isn't ROOT. I always get 404 Dynamic Resource not found Error from the Browser, while trying to download a File or the Picture won't be displayed on ice:graphicImages. That makes my Portles pretty much useless. I'd like to stick with Icefaces, as I have absolutely no time, to switch to something else now. I already tried changing the Url-Mapping in the web.xml without any success. Does anyone have any Idea?

Best Regards

Marc
I found out what the Problem is, but not how to resolve it. In Liferay on Linux I changed the portal context to something like virtualhost:port/portal, while on my local Machine it remains as localhost:8080/. So Icefaces deosn't seem to take that into account return the 404 Error.

Do I have to change the

Code:
    <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>/icefaces/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>ICEfaces Compatibility Resource Servlet</servlet-name>
         <url-pattern>/xmlhttp/*</url-pattern>
     </servlet-mapping>


values?

Best Regards

Marc
I wrote an Email to the Address you've posted. Hopefully I'll get an answer :). Thanks anyways!

Regards

Marc
Does no one know an Answer for that? My Portlets somehow render useless if this isn't working =/

Regards

Marc
Hello once again everyone,

let me try to explain my Problem.

General Info:
-Liferay 6.1
-Icefaces 3.0
-Issue: outputResource/graphicImage throws either 404 or 500 Error.

Little more Details ;):
Our Integration Server crashed last week and has finally be restored. I immediately tested my Custom Portlets and for whatever reasons some thiings don't work like they did before. I think some files got corrupted or something, I managed to restore most of the old functionality however. I can't figure out one thing though. I'm using the outputResource Component to provide a Downloadable File to the Users, which worked more or less perfectly on both my local server(Windows 7) and the Integration Server(Linux Red Hat). There was a Issue that I had to remove the Portlet from the Page and readd it after I deployed a newer Version of the Portlet, or else I would get an 500 Internal Server Error with the following Stacktrace:

Code:
java.lang.NullPointerException
 	org.portletfaces.bridge.container.PortletContainerFactoryImpl.getPortletContainer(PortletContainerFactoryImpl.java:58)
 	org.portletfaces.bridge.application.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:149)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	org.icefaces.impl.push.servlet.ICEpushResourceHandler.createResource(ICEpushResourceHandler.java:113)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:182)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
 	com.icesoft.faces.component.gmap.GMapResourceHandler.createResource(GMapResourceHandler.java:39)
 	com.icesoft.faces.component.gmap.GMapResourceHandler.createResource(GMapResourceHandler.java:26)
 	javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:84)
 	org.icefaces.impl.application.AuxUploadResourceHandler.getTokenResource(AuxUploadResourceHandler.java:59)
 	org.icefaces.impl.application.AuxUploadResourceHandler.handleResourceRequest(AuxUploadResourceHandler.java:67)
 	javax.faces.webapp.FacesServlet.service(FacesServlet.java:407)
 	com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 	com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)


However that wasn't really a Problem, as in Production we hopefully won't need to redeploy the Portlets much, and removing/adding the Portlet to the Page isn't really much work..

However since the Server crashed, I can't download the File at all(from the Linux Server that is). Now I get a 404 Error, which obviously means the File cannot be found. Also the Error Message says so:

Code:
 type Status report
 
 message Could not find requested dynamic resource.
 
 description The requested resource (Could not find requested dynamic resource.) is not available.
 


It generates the Link like before to something like "localhost:8080/CustomPortlet/icefaces/resource/SomeHashValue/filename.filetype". The file also is generated and can be viewed when trying to acces it via WinSCP or something like that. As the path above doesn't exist I guess that is just some reference to the real File-Location?

I checked whether it could be because of missing Permissions on the Folder where the File is generated but user and group have read/write Permissions, no execute though, but I think to download the File, that's not needed?

The same Portlet works fine on my Win7 Machine, so it's no direct Portlet Problem, I guess.

The Filename contains no Special Characters except an underscore(_), but I've read outputResource used to have Problems with Special Characters.

The problem with the ice:graphicImage is basically the same. Same Portlet on both Machines, it works on Win7 but not on Linux. Using Firebug I get an 404 Error :
Code:
"NetworkError: 404 Not Found - ...../PortletName-portlet/icefaces/resource/LTQyMTM1Njc5Ng==/"


The Image exists, the ByteArray is not null and not empty. I think something is wrong with the Reference, if there is one?

Is there a way to disable the /iceface/resource "thing" and 1. get the outputResource to point to the actual File Location and 2. let the graphicImage get the ByteArray directly and not via the Reference?

Thanks in advance and

Best Regards

Marc

Thank you very much. Your code snippet and suggestion to clear the components worked like a charm. I'm back to using the Icefaces-Components now instead of the <h:> - jsf-Components. Thanks again, you guys are awesome ;)

Cheers Marc
I just found out, that if I use the h:inputText Component it works. Now I don't know whether my IceFaces Setup is messed up, which leads to that strange behaviour or thats an actual bug.

Additional info:

icefaces-ace-3.0.0
icefaces-3.0.0
icefaces-compat-3.0.0

Those are the Icefaces jars I'm using. All the other jars come with Liferay I think. I got nothing special configured, so I really have no idea why this isn't working with the Icefaces-Component. I'm fine with the h:inputText because theres no visible difference, so this problem is solved for me, but maybe it's interesting for you guys?

EDIT:

Ok, damn. I'm also using the ice:selectInputText-Component, where I can type some text an the component returns a list of possible matches. Jsf doesn't provide this Component in such an easy manner.
That said, I think I still need some help :l
Hello everybody,

I'm trying to develop a portlet to add, view, update and delete customers. The functionality is implemented, but I'm facing a bit of a problem.
As I said, I can view created customers in detail(eg. name, phone, fax, etc.).
I have a table which shows me every customer with a few details like the name or the creation date. I also added an edit button to every column which leads me to the detailed page, where I can edit the customer.
On initial startup of the Portlet everythings fine. I get the table with all my customers and if I want to view the detailed page of a customer, everything gets displayed correctly. The problem occurs from now onwards.
If I change to another customer(the second one since startup), the values of all textfields remain on the first viewed customer.(Like if I choose customer A with name Value ="Customer A" and other Value ="otherValueA" and switch to Customer B the values are still "Customer A" and "otherValueA").
The wierd thing is, that everything except or the inputText and inputTextField Components is updated correctly. So an custom Image or several outputLabels are updated to the new values.

Code:
<ice:outputLabel value="#{i18n['customer-website']}" />
 <ice:inputText required="true" partialSubmit="true"
 		      value="#{customersModelBean.selectedCustomer.website}" id="website" />
 <ice:outputLabel value="#{customersModelBean.selectedCustomer.website}"/>


This is just a small snippet.
The first outputLabel ist a constant, so no problem here.
The inputText gets it's value from a backing bean. On initial startup - no problem. When another customer is selected - well as I stated above - no update of the values.
The second outputLabel which gets its value from the exact same attribute of the backing bean gets updated..

Hope you guys can help.

Thanks in advance

Cheers
Marc
 
Profile for magruene -> Messages posted by magruene [18] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team