• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Could you please tell me?

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm a beginner in Java as well as struts.
Could you please tell me what does these lines of code for?


List<GroupInfo> groupInfoList = groupInfoManager.getGroupInfos();
List<LabelValueBean> groupInfoBean = LableValueBeanFactory.create (groupInfoList, "groupName", "id", GroupInfo.class, null);
request.getSession().setAttribute(Constants.GROUP_INFO_BEAN, groupInfoBean);


Here GroupInfo is the Form.
I read, <LabelValueBean> is used when some values has to be displayed to the enduser and a value has to be returned to the server. But I want to know more clearly...

Please tell me.

...
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
---------------------------------------------------------------------------
List<GroupInfo> groupInfoList = groupInfoManager.getGroupInfos();

The above statement creates a list object which consists of group information.
---------------------------------------------------------------------------
List<LabelValueBean> groupInfoBean = LableValueBeanFactory.create (groupInfoList, "groupName", "id", GroupInfo.class, null);

This statement creates groupInfoBean Object from factory class
--------------------------------------------------------------------------
request.getSession().setAttribute(Constants.GROUP_INFO_BEAN, groupInfoBean);

This statement retrieving a session object, storing the groupInfoBean Object in Constants.GROUP_INFO_BEAN
--------- ----------------------------------------------------------------
 
reply
    Bookmark Topic Watch Topic
  • New Topic