• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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
--------- ----------------------------------------------------------------
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic