Rev 1310 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
package jomm.web.utils;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.ArrayList;
/**
* @author Jorge Machado
* @date 6/Mar/2008
* @time 17:53:36
* @see jomm.web.utils
*/
public class TopNav
{
private 1.5.0/docs/api/java/lang/String.html">String title
;
List
<NavPlace
> navPlaces =
new ArrayList
<NavPlace
>();
protected TopNav
(HttpServletRequest request,
1.5.0/docs/api/java/lang/String.html">String key
)
{
request.
setAttribute(key,
this);
}
public List
<NavPlace
> getNavPlaces
()
{
return navPlaces
;
}
public NavPlace addNavPlace
(1.5.0/docs/api/java/lang/String.html">String url,
1.5.0/docs/api/java/lang/String.html">String messageKey
)
{
NavPlace n =
new NavPlace
(url,messageKey,navPlaces.
size());
navPlaces.
add(n
);
return n
;
}
public NavPlace addNavPlace
(1.5.0/docs/api/java/lang/String.html">String url,
1.5.0/docs/api/java/lang/String.html">String messageKey,
1.5.0/docs/api/java/lang/String.html">String arg
)
{
NavPlace n =
new NavPlace
(url,messageKey,navPlaces.
size(),arg
);
navPlaces.
add(n
);
return n
;
}
public NavPlace addNavPlace
(1.5.0/docs/api/java/lang/String.html">String url,
1.5.0/docs/api/java/lang/String.html">String messageKey,
1.5.0/docs/api/java/lang/String.html">String arg0,
1.5.0/docs/api/java/lang/String.html">String arg1
)
{
NavPlace n =
new NavPlace
(url,messageKey,navPlaces.
size(),arg0,arg1
);
navPlaces.
add(n
);
return n
;
}
public 1.5.0/docs/api/java/lang/String.html">String getTitle
() {
return title
;
}
public void setTitle
(1.5.0/docs/api/java/lang/String.html">String title
) {
this.
title = title
;
}
}