Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Christopher Whu

Ranch Hand
+ Follow
since Sep 03, 2008
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 Christopher Whu

just wondering why this is acceptable



but this is not (an arraylist instead of a array)



thanks in advance!>
7 years ago
i was wondering if there is an easy to use technology that can look a directory and update the jars to the most current versions. please advise me on this..

basically i want to know when my glassfish java server needs to have some of its jars updated... i lost about 2 days this week do to my mojarra related jars being old even though my glass fish install was up to date.
8 years ago
i am hoping this saves some people some headaches but i updated jsf-api.jar and jsf-impl.jar w/in my modules directory in glass fish and now my code is working as you think it should... Its beautiful... I hope this saves someone some time. I was using an up to date version of glassfish and i guess my mojarra related jars where old?



8 years ago
JSF
i have seen quite a few questions about why ajax is not firing in jsf drop downs... i am stuck on this right now so i created a simple example and i look forward to the discussion that it creates.

Backing Bean



and here is the xhtml





8 years ago
JSF
Ok i changed the code some. How do you guys like this... How would you improve upon this.
Generic DAO


Implementing Super Class





extends GenericDAOImp implements GenericDAO


MapResultSetToObject




Generic View


extends GenericView implements Serializable

8 years ago
i will hopefully be able to put up more code tonight...

I think i have a halfway solution... I basically created a superclass for my DTO's that i want to be off the generic DAO.

i have to set the class at the top of the DAO, which is a bit lame but i was quite happy with it (late last night)

I am curious to see the improvements you would recommend...
8 years ago
thanks for the quick turnaround, i will see if i can implement some of this when i get home...
8 years ago
I am trying to learn more about generic so i am trying to create a generic DAO for an older project. My problem is that i am still copying alot of code. I am hoping you guys can help me figure out a simple solution (and increase my understanding of generics). Once again i apologize in advance for my english (its not my native language)

i have my interfaces


public interface GenericDAO<T> {
public T saveOrUpdate(T entity);
public void delete(T entity);
public T findById(int id);
public ArrayList<T> findAll();
}



i have my abstract class that implements the above interface


and then i have my class that extends my abstract.


Ultimately i would like to reuse that findAll() code by just changing the query string and the RecordSet map. Please help me solve this or at least point me down the right street.
8 years ago
It works!!! What a time saver... I probably have that panelgroup arrangement in like 4 or 5 files, now i can just reuse it...

ty ty ty...
8 years ago
JSF
i am going to give this a whirl today! Ty so much.
8 years ago
JSF
i have created a nice looking client detail display page, its basically just a bunch of panelgroups. i would like to be able to reuse this display to show customer details no matter what the backing bean for the page (just keep using a ui:include).

ideally i would like something like h:datatable where i can just set the value and the var...


basically something like this: (pseudo coded)




and then my include would look like



Is there a tool like this currently out there. I am just trying to prevent code re-use in my xhtml.

8 years ago
JSF
Thank you for all the incite... My code usually works but i always want to see what everyone else does...

I am terrible at asking questions... Is it ok/correct to use Bean injection to instead or should i just use the context

ex"
8 years ago
I have a spring authentication bean, i also have a bean that lets a system user edit his account info. In order for the user to edit his info i have to know his email address. in the old days i would have just set a session variable


I have been trying to use more J2ee technologies, i have loved everyone i have tried (this forum got me using JSF and i love it).

In order to solve the above issue i am injecting SessionMinder bean (which will allow me to store the email address i need) into my auth bean. Both beans are below. My question is, is this the correct way to use injections... if my way stinks, how would you do this. Thank your in advance...



my security bean

8 years ago
in the end i just ended up creating a separate DAO & DTO for both the role(authority) and user table. I was really asking a coding style question. I am always curious to see if i am doing my programming the HIP and current way... I want to be like one of the cool kids...