Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Ron De Leon

Greenhorn
+ Follow
since Feb 14, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ron De Leon

Hi Guys,

Does anyone having problem using JSF and IE. I know that JSF doesn't work in IE7, even a simple JSF page.

Thanks,
Ron
13 years ago
JSF
You can try panelGrid, panelGroup and dataTable.

<h:panelGrid>
<h:panelGroup >
<h:dataTable/>
</h:panelGroup>
</h:panelGrid>
13 years ago
JSF
A quick solution, you can make the manage bean scope to request. This will automatically reset your form.

If you are using manage bean scope that is set to session, you can just re-initilize the object like Cars ford = new Ford().
13 years ago
JSF
Hi Sushma,

I am getting the same problem as you have been experincing that navigation keeps returning to the same page.

Below are some code samples for reference. Also, I put some logs to capture the behavior.

The navigation works and sometimes doesn't work depending on the certain situation as you have describe above.

This is my observation of navigation not working from looking in the logs. Everytime I hit the link and it returns to the same page. I don't see the method "viewEditAction" being called by JSF. Instead it reconstruct the same page again, so I will see the constructor of "SearchRequestFaces" being called again.

I assume one thing that there could be exception or error in JSF that it keeps the previous request in the Faces Context for that particular session. It might not work on my session but it might work on other session.

FOR QUICK FIX, I usually close all my IE to force to get a new session and to restart the app server.

I hope this help. I am still looking for the answer for this navigation not working. I need look in the FacesContext to see what is happening there. I will let you know if I find something informative.

Thanks,
Ron


<!-- jsp page -->
<h:column>
<h:commandLink id="editSearchs" action="#{clientSearch.viewEditAction}" >
<h:outputText value="View/Edit" />
<f:param name="idAcct" value="#{data.idAcct}"/>
</h:commandLink>
</h:column>


<!-- SearchRequestFaces.java -->

public SearchRequestFaces() {
log.debug("SearchRequestFaces => initiliazed for request");
}

public String viewEditAction() {
log.debug("********************************");
String idAccount = DataTypeConverter.getFacesParamValue(this.fc, "idAcct");
log.debug("VIEW EDIT ACTION => setting the current account with " + idAccount + " or " + client.getAccountFaces().getIdAcct());
client.setCurrentAccount(Integer.parseInt(idAccount));
return "ViewEdit";
}


<!-- managed bean -->
<managed-bean>
<managed-bean-name>clientSearch</managed-bean-name>
<managed-bean-class> com.espeed.compliance.faces.client.SearchRequestFaces
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>


<!-- navigation -->
<navigation-case>
<from-outcome>Search</from-outcome>
<to-view-id>/jsf/client/SearchAccount.jsp</to-view-id>
<redirect/>
</navigation-case>

<navigation-case>
<from-outcome>ViewEdit</from-outcome>
<to-view-id>/jsf/client/EditViewAccount.jsp
</to-view-id>
<redirect/>
</navigation-case>
13 years ago
JSF
sorry
couple of typo error:

1. For example, HERE is the full constructor of concrete class for hibernate:

2. My problem is that when I want to getAccounts().
13 years ago
JSF
Hi Guys,

Thanks for the replys. I am using MyEclipse to create hibernate beans base on the database. It creates me a set of abstract, concrete and DAO classes.


For example, were is the full constructor of concrete class for hibernate:

public CompUser(Integer idUser, BusinessGroup businessGroup, UserRole userRole, String ntUsername, String nmFirst, String nmLast, String phone, String email, Integer indActive, Date dtCreated, Date dtModified, String idUserLastModified, String nmMiddlee, String nmSuffix, Date dtLastLogin, Integer indAdminReview, Set idUserReferences, Set accounts, Set userFeedbacks) {

My problem is that when I what to getAccounts(). It returns me a Hibernate Set object, not a list.

So how can I iterate a Hibernate Set in a List in Datatable.

Thanks,
Ron
13 years ago
JSF
Hi,

I am using Hibernate to retrieve data, and it giving me a Hibernate Set. I tried to used this Set in JSF datatable but I am keep getting error.

Does anyone know how to make JSF datatable to accept any type of Collection?

Or any other solutions?

Thanks,
Ron
13 years ago
JSF
"I've never tried to use 1.5 in WL 8.1 but I think it should support."

I have tried use 1.5 in WL 8.1, and it doesn't work. You will get a lot of funky errors.
I have the same issue how to authenticate the users. I am thinking to put the authenticated object in the session, and let the jsp and servlets check if the authenticated object is null or not null. I am pretty much sure there are many alternative and better ways to do it.
14 years ago
JSF
I will be interested also to know this switch action. does it exists in struts in jsp level?
14 years ago
Hi,

It has been a long time since I took this test. Getting to the point, but why do you want to have multiple inheritence. The concept of OO will be destroyed if you have multiple inheritance. It is like 2 objects like a dog and an orange. You can't inherit 2 objects into one object. It is either a dog or an orange. So multiple inheritence won't work.

Thanks,
Ron