I did not find anything internal for this. I did write a separate class for this which automates navigation based on Struts actions. I am thinking about releasing this Open Source. I call it NavObjects and it allows you to create button navigation displays. I am still working on JSP tags for this but you can implement the rendering of links with in a JSP using a scriptlet.

xml navigation file looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<buttons>
<button-data level="root" name="Welcome" path="/Welcome" roles="owner,store,engineer"/> <button-data level="root" name="Switch Group" path="/SwitchCity" roles="owner,engineer"/> <button-data level="root" name="Group Maintenance" path="/GroupMaintenance" roles="owner"/> <button-data level="root" name="Inventory" path="/Inventory" roles="owner,store,engineer"/> <button-data level="root" name="Admin" path="/Admin" roles="admin"/> <button-data level="root" name="Logon" path="/Logon" roles="any"/>
   <button-data level="root" name="Logoff" path="/Logoff" roles="any"/>
<button-data level="/Admin" name="User Administration" path="/AdminUsers" roles="admin"/> <button-data level="/Admin" name="Owner Administration" path="/AdminOwners" roles="admin"/> <button-data level="/Admin" name="AdminUserEditSubmit" path="/AdminUserEditSubmit" roles="admin" display="0"/> <button-data level="/AdminUsers" name="User Edit" path="/AdminUserEdit" roles="admin"/>

<button-data level="/SwitchCity" name="Switch City" path="/SwitchCityAction" roles="owner,engineer" display="0"/> <button-data level="/GroupMaintenance" name="Devices" path="/Devices" roles="owner"/> <button-data level="/Devices" name="DeviceEdit" path="/DeviceEdit" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceEditSubmit" path="/DeviceEditSubmit" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceEditAttribute" path="/DeviceEditAttribute" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceEditAttributeSubmit" path="/DeviceEditAttributeSubmit" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceAttributes" path="/DeviceAttributes" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceAddAttributeAction" path="/DeviceAddAttributeAction" roles="owner" display="0"/> <button-data level="/Devices" name="DeviceRemoveAttributeAction" path="/DeviceRemoveAttributeAction" roles="owner" display="0"/> <button-data level="/Inventory" name="Status" path="/InventoryStatus" roles="owner,store,engineer"/> <button-data level="/Inventory" name="Add Device" path="/InventoryAdd" roles="owner,store,engineer"/> <button-data level="/Inventory" name="Edit Device" path="/InventoryEdit" roles="owner,store,engineer"/> <button-data level="/InventoryAdd" name="/InventoryAddDetails" path="/InventoryAddDetails" roles="owner,store,engineer" display="0"/> <button-data level="/InventoryAdd" name="/InventoryAddSubmit" path="/InventoryAddSubmit" roles="owner,store,engineer" display="0"/>
</buttons>

Scriptlet:

<%
Navobjs navo = new Navobjs();
ArrayList buttons = navo.button_set(0, (String) session.getAttribute("app_path"), false, (String) session.getAttribute("role"));
%>
<table>
   <%
   Iterator iter = buttons.iterator();
   while (iter.hasNext())
   {
       DynaBean bean = (DynaBean)iter.next();
       %>
       <tr>
       <td width="5">
           <%
           if (bean.get(Navobjs.BD_HOT).equals("1"))
           {
out.print("!"); } if (bean.get(Navobjs.BD_WARM).equals("1"))
           {
out.print("*"); }
           %>

       </td>

       <td><a href=/Inventory<%=bean.get(Navobjs.BD_PATH)%>.do >
       <%=bean.get(Navobjs.BD_NAME)%>
       </a></td></tr>
       <%
   }

%>
</table>

----

Internally the system tracks the complete path taken to get to a position within the site. It then also the highlighting of selected buttons, and a warm state for buttons that were clicked to get to the current position.

If you are looking for something like this I'd be happy to release the jars so that you could see if it met your needs.

HFC





Archer wrote:
Hi.
    I am using struts 1.3.8 along with struts menu 2.4.3. I want to show
the navigation to the user where he is in for the present page like
mainpage>review>edit... or thing of that sort that can show the user where
he is in.  I want to know whether there is any struts inbulit thing for
this. Can any one please help me regarding this.


--
Henry F. Camacho Jr.
Unplugged Cities, LLC
800 Washington Ave No
Suite 501
Minneapolis, MN 55401
Fridley, MN  55432

763-235-3005 (Office)
763-257-6898 (Cell)
tknightowl (Skype)
[EMAIL PROTECTED] (email)
www.unpluggedcities.com (www)
KC0KUS (Amateur Radio)


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

Reply via email to