Guy deLyonesse

Ranch Hand
+ Follow
since Apr 12, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Guy deLyonesse

Hello,

I have a media component used for showing flash videos, which the user can select from a selectOneMenu component. The issue I'm seeing is that when the user selects a new video, the media player does not update to display the selection...



I added the outputText component (id="madman") to test to verify that the value of videoDisplay.selectedVideoURL is being updated, and it is working fine.

Thanks in advance for any ideas...

Here's the code for the Ajax event handler, just in case... although it is working, successfully updating madman.

10 years ago
JSF
Problem resolved. It's unclear to me why the backing bean was being initialized, but as it happens, that bean is also the backing bean for the initial view. The reason the navigation wasn't working: no form tag.

This is why maintaining others' code is not fun.
11 years ago
JSF
This is a navigation question.

I have a page that contains a PrimeFaces button to navigate to a separate view:



The problem is that when this button is clicked, the navigation works in that it initializes the target view's backing bean. (I have some debug statements in there that prove this.) The view itself does not change, however. The user is left thinking nothing has happened. The only "weirdness" on the page is a series of Dygraphs with heavy JavaScript interaction. Could that be interfering with the browser's ability to change views?

Edit: Both of these backing beans are View Scoped.
11 years ago
JSF

Tim Holloway wrote:Unfortunately, the local bookstore has almost completely eliminated inventory of books on JEE and JSF, so I have no idea what's good these days.



They're a bit on the lower level techincally, but the HeadFirst series by O'Reilly are great fun to read and provide a perspective that helps me "get it" more quickly than the more dry style. I recommend them highly to anyone who's newly learning, or who just wants to review old material from a fresh perspective.
11 years ago
JSF
Well, I discovered the problem.

It seems a progressBar that had been added to the page was interfering with the way things were working. I learned this by converting a similar view into a portlet and testing it, and it worked perfectly. The only significant difference between the two page views was that progressBar, which was installed as a facet of the DataTable.

So, I'll be looking to determine why the progressBar was breaking things, but for now, the mystery is solved.
11 years ago
JSF
Is it? (Learning experience for me) the commandButton is inside the analyzeTreeHolder panelGroup, which makes it under a separate parent from the DataTable, or am I misunderstanding? (I had originally tried the update pointing directly at availableStudy.)

I'm thinking it must have something to do with being moved into a portlet environment, but it's not clear to me how.
11 years ago
JSF
Hey Tim, Thanks for the reply.

Isn't that covered in the update="formAnalyze:availableStudy" attribute in the commandButton?
11 years ago
JSF
Hey all,

This is actually a feature that had been working at one time and has now ceased. The change? It's now a portlet in Liferay.

What is supposed to happen is a DataTable, which starts out empty, gets values added to it when the user makes some selections and clicks a commandButton.



edit: Code from the backing bean...



Using debug statements I've verified that the ArrayList that feeds the DataTable is being updated, but the control on the page isn't. I gather the update isn't able to find the component anymore now that it's in a Liferay context... but looking at the component path in the page source gives me the naming containers I'm already defining in the update.
11 years ago
JSF
Heh glad it's not just me...

I did find that using the c:if tag helped, but I want to avoid that if it's not best practice. My understanding is that it is a shaky solution at best.
11 years ago
JSF
Hey Tim,

Thanks for the reply. I think the part that's got me confused is related to the rendered attribute. From what I've read, even if rendered="false" the component tree is still being built server side, just not displayed on the client browser. I thought that by not rendering the included page, the associated backing bean wouldn't be instantiated. It seems I was mistaken there, or is there something else I'm missing? Is the component tree for non-rendered included pages also being built on the server?
11 years ago
JSF
Hey all,

So I'm trying to use panel switching to allow a user to "navigate" through a site. I have code like this:



The problem is that some of the controls on the panelVisualize.xhtml are based on data that is queried from a DB. The managed bean is attempting to populate that data because the component tree is being built even though that page isn't yet visible to the user. Wouldn't be a problem... except that this is even before the user logs in and since the query depends on the username...

So in short, I want to keep that bean from being instantiated until the panel actually becomes visible. I thought of using <c:if test=""> but I understand using JSTL mixed with JSF is bad mojo. I'm sure I'm missing something fundamental here, so any help is appreciated.
11 years ago
JSF
Thank you, Tim. I will take those insights to heart as I dig through this mess.
11 years ago
JSF
So this is a headache because I'm working with other people's code and so I'm not as familiar with their work as I would like... In any case, we have component values not being updated in one of the view pages, and I'm trying to determine why. I've added a phase listener to dump the component tree to standard output after each phase, and I noticed something odd...

beforePhase() pe.getPhaseId() = RESTORE_VIEW 1
After Phase RESTORE_VIEW 1

(Rendering Component Tree)
|
j_id1 (javax.faces.component.UIViewRoot)
|
j_idt1 (javax.faces.component.UIOutput)
|
j_idt2 (com.sun.faces.facelets.compiler.UIInstructions)

This is the entirety of the output when clicking a button on a page with a number of components, including an inputTextarea (which is supposed to receive the updated value). This tree prints out in the afterPhase() method.

EDIT: Using Mojarra 2.0 with PrimeFaces 3.5

So this tells me that not only is the component tree not being fully built, the lifecycle halts after the afterPhase() method runs for the Restore View phase. Mind you, this is not from the initial page render, where I'd only expect to see Restore View and Render Response. This is from clicking a commandButton. The actionListener works, and runs the associated code in the backing bean, so it must be going at least through the Invoke Application phase, and yet this is all the output I see.

Now, what I'm dreading is going through this app, page by page, not sure what I'm looking for so I'm hoping that this will spark some insight among the more experienced folks here.
11 years ago
JSF
Hello,

Getting this error when running ant deploy

[javac] C:\Servers\liferay-plugins-sdk-6.0.6-20110225\ext\cvrg-portal-ext\docroot\WEB-INF\ext-impl\src\com\liferay\portlet\login\util\LoginUtil.java:17: package com.jhu.cvrg.utilities.authentication does not exist

The .classpath file contains the following entry:



And the file is indeed in the following location:

C:\Users\myuserid\cvrg_jars\cvrg_authenticator.jar

This is a custom .jar I created.

The command produces the same result in Eclipse or at the command line.

Am I missing something?


12 years ago