Re: Help with a design issue that I'm stumped by....

Vic Cekvenich <[email protected]> Thu, 08 May 2003 13:03:59 -0400
Newsgroups gmane.comp.java.mvc.devel
Organization baseBeans Engineering
Message-ID <[email protected]>
You need 2 beeans.
One is a search bean, that will capture the submit of the search screen. 
(deartment, name, etc.)
After submit, you pass values to employeeBean.populate(v_dept, 
v_firstName, etc.). This then display a list of employees.
Also, the select statment needs to be dynamic.

.V

Rick Reumann wrote:

>I'm trying to follow the Basic Portal approach but I'm curious how to
>accomplish what should be a simple task using the basic portal
>framework...
>
>
>Imagine a EmployeeBean set up in the same way a basic portal bean is set
>up. Now the first page I come to is a "search criteria" screen where I
>can select how I want to search for a list of employees. So you would
>have a from where you can select "department", "firstName", etc. Hit
>submit and then you would be returned a list of employees matching the
>above criteria selected. 
>
>The problem is I want to use the EmployeeBean to capture the data
>submitted from the form. However all of the setters are set up as:
>setValue("param",paramValue) which of course tries to set the _current
>HashMap inherited from BaseBean. The problem is this HashMap will always
>be null under this situation (as it makes sense since there really isn't
>a current row to populate for setting up search criteria).
>
>So what is the solution to this? Should I instantiate the _current
>HashMap in the EmployeeBean constructor? or is there some other solution
>that I'm not getting a grasp of? 
>
>Please help:) Thanks,
>
>  
>

-- 
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA

Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North East. 
Open Source <a href ="baseBeans.com">Content Management</a>  basic
Portal sofware
Best practice<a href ="baseBeans.com">Supported Struts v.1.1</a>
framework ScafflodingXPress