0

Posted by Jagadeesh VP | Posted in





Dependecy Injection

0

Posted by Jagadeesh VP | Posted in














Refer Bean ScopeReference Bean Scope
ApplicationApplication
SessionApplication, Session
RequestApplication, Session, Request




Examlple :

We have two classes Managed_Bean_Class1 & Managed_Bean_Class2 ,
public Class Managed_Bean_Class1 {
private String userName;
public void setUserName( String userName){
this.userName = userName;
}
public String getUserName(){
return userName;
}
}
if we need the instance of Managed_Bean_Class1 in Managed_Bean_Class2
public Class Managed_Bean_Class2 {
private String dbURL;
public void setUserName(String dbURL){
this.dbURL = dbURL;
}
public String getUserName(){
return dbURL;
}
public boolean checkUser() {
/* Normal way */
Managed_Bean_Class1 ref = (Managed_Bean_Class1)FacesContext.getCurrentInstance()
.getApplication().createValueBinding("#{managed_Bean_Class1}")
.getValue(FacesContext.getCurrentInstance());
String userName = ref.getUserName();
............
// business logic
}
public boolean connect() {
........
........
}
}





faces-config.xml entries for Managed_Bean_Class1 & Managed_Bean_Class2

<managed-bean>
<managed-bean-name>managed_Bean_Class1</managed-bean-name>
<managed-bean-class>myproject.UserData</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>managed_Bean_Class2</managed-bean-name>
<managed-bean-class>myproject.Control</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>





In case of dependency injection:
We have the Managed_Bean_Class1 as a property with getter & setter.



public Class Managed_Bean_Class2 {
private String dbURL;
public void setUserName(String dbURL){
this.dbURL = dbURL;
}
public String getUserName(){
return dbURL;
}
private Managed_Bean_Class1 class1_in_class2 = null;
public setClass1_in_class2(Managed_Bean_Class1 class1_in_class2){
this.class1_in_class2 = Class1_in_class2;
}
public Managed_Bean_Class1 getClass1_in_class2(){
return class1_in_class2;
}
public boolean checkUser() {
/* Normal way */
String userName = getClass1_in_class2().getUserName();
/* This will get the value in userName property
in Managed_Bean_Class1 */
............
// business logic
}
public boolean connect() {
........
........
}
}


faces-config.xml entries for Managed_Bean_Class1 & Managed_Bean_Class2:
<managed-bean>
<managed-bean-name>managed_Bean_Class1</managed-bean-name>
<managed-bean-class>myproject.UserData</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>managed_Bean_Class2</managed-bean-name>
<managed-bean-class>myproject.Control</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<property-name>class1_in_class2</property-name>
<value>#{managed_Bean_Class1}</value>
</managed-property>
</managed-bean>


Aayirathil Oruvan

1

Posted by Jagadeesh VP | Posted in


A fantastic movie in Tamil cinema. Many commenting that he shouldn't have pulled the names of two dynasties for the sake of attracting audiences.

But i really proud about Mr Selva coz, with / without his knowledge he just narrated the real story of our peoples in SriLanka who are referred as LTTE.

The dialogs @ second half of the flim really superb. Mr Selva took a great decision, though he knows the Yalpanam Tamil is tough to understand by many.

He choose a right shield to protect him from the unwanted questions about the TIGER symbol. A flim which slapped all ours.

Some came out from theater without feeling the slap, some did not informed about this slap to others due security issue.


Time Warp

0

Posted by Jagadeesh VP | Posted in

One of the most viewed video in 2009.










Navigation in JSF

0

Posted by Jagadeesh VP | Posted in

Navigation from faces-config.xml

<navigation-rule>
<from-view-id>/blah.jsp</from-view-id>
<navigation-case>
<from-outcome>some string</from-outcome>
<to-view-id>/something.jsp</to-view-id>
</navigation-case>
</navigation-rule>

Navigation from Bean:
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getApplication().getNavigationHandler().handleNavigation(...);
ctx.responseComplete();

Hint: handleNavigation(fc, actionMethodCurrent, actionNameCurrent);
Eg :
context.getApplication().getNavigationHandler().handleNavigation(context, null, managed-bean-name);

Whats happening in TN?

0

Posted by Jagadeesh VP | Posted in

The two Tamil Nadu ministers who took no action as an injured policeman begged for help stayed away from his last rites, which were held at his hometown of Sankaran Kovil.

Only senior police officers were there to lay wreaths on his body.

The nationwide outrage over the incident seems to have had little effect on Health Minister Paneer Selvam and sports Minister P P Mounideen Khan.

They could have at least been with the family in their time of grief.

The two ministers were travelling in a convoy when they saw the injured and bleeding policeman crying out for help. The convoy did stop but failed to provide any real assistance until it was just too late.
And three days after the incident, the Tamil Nadu government is yet to announce a compensation for the family of the policeman who died while on duty.

The Tamil Nadu Assembly did not take any note of the incident on Friday.












The same may happen to any one of us in future... beware...

The discussion in NDTV portal regarding this incident is quite more different...

visit this link..

IT employee job satisfaction falls to all-time low

0

Posted by Jagadeesh VP | Posted in

Bangalore: With the increasing number of dissatisfied IT employees, many employment experts have raised concerns that key employees may leave current jobs as soon as they get what they perceive is a better offer, reports Computerworld.

In 2007, about 12 percent of the IT employees fit into the category of 'highly engaged' workers, but that has since fallen to four percent. According to the mid-2009 job satisfaction survey conducted by the Corporate Executive Board (CEB), a Washington-based advisory firm that counts many Fortune 500 firms among its clients, the IT employee dissatisfaction is on the rise. The firm surveys 150,000 workers each quarter, asking a battery of behavioral questions about their jobs. About 10,000 of the surveyed people work in the IT field, board officials said.



Also, the CEB's latest survey found that the willingness of IT employees to "exert high levels of discretionary effort" put in extra hours to solve a problem, make suggestions for improving processes, and generally seek to play a key role in an organization, has plummeted to its lowest levels since the survey was launched 10 years ago. "These are literally the most critical employees," said Jaime Capella, a Managing Director in CEB's information technology practice. Moreover, such critical workers are 2.5 times more likely than the average employee to be looking for new opportunities.

Similarly, the Conference Board, a non-profit research group, said that occupants of 45 percent of 5,000 U.S. households it surveyed last year were satisfied with their jobs; down from 61 percent in 1987, the first year the survey was conducted. "When the economy starts to head in the right direction, the employees are going to vote with their feet," said Mike Hagan, a Vice President of Infrastructure at a health insurance firm he asked not to be identified. He is also a Co-author of Achieving IT Service Quality - The Opposite of Luck (Synergy Books, Nov. 2009).

Hagan said that the recession has resulted in unnaturally low attrition levels. To keep key employees, he said that IT managers must find ways to engage employees, and offer them a "line of sight to the corporate vision." It's important that IT managers create jobs that have a purpose, he added.

Also Capella said, in order to keep employees, they are advising to take performance reviews very seriously, work on motivating teams and communicating more consistently and openly, as well as give employees more of a say in the jobs they want. If employees don't believe that companies aren't being honest, they are more likely to get disaffected, he said. If managers are frank with their employees they can "accumulate enough good will" to offset the negative impacts.