Max Cooper wrote:
Michael,

There is no issue with bookmarking. Where the app currently responds to:

/viewXXXdetail.jsp?scid=23

The Struts version will respond in the same way to:

/viewXXXdetail.do?scid=23

Even for viewing data, you will want to use an ActionForm. In the
example URL above, you'll want a property to hold the 'scid'. The same
ActionForm should also properties for all the detail information about
the item that will be shown by the JSP.

Max,
thanks for your help.
If I do not fetch the data directly in the JSP but do it in the Action to fill an ActionForm and then forward to a JSP (using a ActionMapping) how can I display the data from the ActionForm?


In the JSP for updating a record I currently have

<html:form action="/apSystemComplexAction">
  <html:hidden property="method" value="update" />
  <html:text property="abbreviation" styleClass="txtfield" />
... other properties ...
</html:form>

The method property is used for a DispatchAction.
If I just want to display values I do not need a html:form and html:text tags. What should I use instead?


Thanks
Michael


On Tue, 2004-02-17 at 15:18, Michael Steiger wrote:

Hello list,
this is my first Struts project, so I hope to get some answers and/or
hints for my problems. I already searched the web for some answers but
did not find the right ones.

I am trying to redesign a partly Struts-enabled application to be a
full-fledged Struts app. With partly I mean that there are some
entrypoints into the app which are JSPs. If I understand the current
design correctly the reason for this was to have the ability to bookmark
certain pages. The flow is:

If a data object (mostly a row in one db table, sometimes a bit more)
should be displayed, a viewXXXdetail.jsp is called with the ID as an
argument, e.g. viewXXXdetail.jsp?scid=23. This JSP fetches the data from
the backend and displays it. Struts is not involved.
To edit/delete this data object two buttons are included in this JSP.
The edit button looks like this:
<html:form action="/apSystemComplexActionLoad">
  <html:hidden property="method" value="load" />
  <html:hidden property="action" value="update" />
  <input type="hidden" name="scid" value="<%=sc.getSCID()%>">
  <input type="image" src="<c:url value="/pics/edit.gif"/>" alt="Edit">
</html:form>

In the corresponding action the data is fetched again from the backend
using the supplied scid as the key and the ActionForm is filled with the values from the backend object.


First of all I would like to get rid of the viewXXXdetail.jsp but the
user should be able to bookmark this detail page. Using the jsp there is
no problem doing that but I have not found a way to do this using only
Action classes/mappings.

Second, what is the "correct" way of fetching and displaying backend data either in read/only mode (no forms involved) or in update mode (form->ActionForm involved)?

Thanks in advance for any answer
Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to