Hello all,
first, I know that this is not the mailing list for the additional
<layout>-taglib, that there is an own, but my question is of a more
general kind. I also guess that I make quite a stupid error, being
relatively new to Struts and to programming Java. Thus forgive me, and
please share your advice with me ... :-)
Ok, here we go: let's say I have a frameset with two frames. In the left
there is a treeview filled with links calling an action then happening
in the right.
Here's the declaration of the frameset:
<frameset cols='50%,*' border='0'>
<frame src='/menuTreeview.do' name='tree'>
<frame src='right_frame.jsp' name='liste'>
</frameset>
As you see there is an action called Treeview that fills the treeview
with its elements, saves them in a repository, and, if successful,
forwards to the view.
Here is the snippet of the 'struts-config.xml':
<action path='/menuTreeview' type='menu.TreeviewAction' validate='false'
scope='session'>
<forward name='tree' path='/linker_frame.jsp' />
</action>
This works quite succesfully, the action is processed succesful, and the
page opens showing all the right mainmenu-items. But now, if I try to
open a submenu, then I receive the error 'No mapping available for
treeview'. To my understanding the action is not called again, but the
view simply has to get some data from the repository (with the help of
some 'javascript') and open the clicked submenu (which is already saved
in the 'memory' before opening the page).
The action looks like this:
public class TreeviewAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
//---Men�eintr�ge erstellen, sofern noch kein Men� intialisiert
ist---
if
(request.getSession().getAttribute(MenuRepository.MENU_REPOSITORY_KEY)==
null) {
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
.
.
.
ServletContext context = servlet.getServletContext();
DataSource DataSource =
(DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
MenuRepository repository = new
MenuRepository();
.
.
.
repository.addMenu(mainMenu);
request.getSession().setAttribute(MenuRepository.MENU_REPOSITORY_KEY,
repository);
return (mapping.findForward("tree"));
Anyone, please, where is the problem with this construction. I probably
misunderstood the basics of mapping ...
Thanks in advance,
Andr� Michel
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>