tomahawk JSF 구성 요소 확장 구성 요소(2)
List headerList = new ArrayList();
headerList.add(new ColumnHeader("Index","100",false));
headerList.add(new ColumnHeader("Type","200",true));
headerList.add(new ColumnHeader("Model","300",true));
columnHeaders = new ListDataModel(headerList);
List rowList = new ArrayList();
for (int i = 100; i <= 999; i++)
{
List colList = new ArrayList();
colList.add(new Integer(i));
colList.add("Car Type " + i);
colList.add((i%2==0) ? "blue" : "green");
rowList.add(colList);
}
data = new ListDataModel(rowList);
public void setColumnValue(Object value)
{
if (data.isRowAvailable() && columnHeaders.isRowAvailable())
{
((List)data.getRowData()).set(columnHeaders.getRowIndex(), value);
}
}
public String getColumnWidth()
{
String columnWidth = null;
if (data.isRowAvailable() && columnHeaders.isRowAvailable())
{
columnWidth = ((ColumnHeader)columnHeaders.getRowData()).getWidth();
}
return columnWidth;
}
<t:columns id="columns" value="#{openDataList.columnHeaders}"
var="columnHeader" style="width:#{openDataList.columnWidth}px">
<f:facet name="header">
<t:commandSortHeader columnName="#{columnHeader.label}" arrow="false" immediate="false">
<f:facet name="ascending">
<t:graphicImage value="images/ascending-arrow.gif" rendered="true" border="0"/>
</f:facet>
<f:facet name="descending">
<t:graphicImage value="images/descending-arrow.gif" rendered="true" border="0"/>
</f:facet>
<h:outputText value="#{columnHeader.label}" />
</t:commandSortHeader>
</f:facet>
<!-- row is also available -->
<h:inputText rendered="#{openDataList.valueModifiable}" value="#{openDataList.columnValue}" />
<h:outputText rendered="#{!openDataList.valueModifiable}" value="#{openDataList.columnValue}" />
</t:columns>
10.<t:panelTabbedPane bgcolor="#FFFFCC" >
<!-- tab panelTab -->
<f:verbatim><p></f:verbatim>
<h:outputText value="#{example_messages['tabbed_common']}"/>
<f:verbatim></p></f:verbatim>
<t:panelTab id="tab1" label="#{example_messages['tabbed_tab1']}"
rendered="#{tabbedPaneBean.tab1Visible}">
<h:selectBooleanCheckbox id="testCheckBox" value="#{testCheckBox.checked}"/>
<h:outputLabel for="testCheckBox" value="A checkbox"/>
<f:verbatim><br/><br/></f:verbatim>
<h:inputText id="inp1"/><f:verbatim><br></f:verbatim>
<h:inputText id="inp2" required="true" />
<h:message for="inp2" showSummary="false" showDetail="true" />
</t:panelTab>
<f:subview id="tab2" >
<jsp:include page="tab2.jsp"/>
</f:subview>
</t:panelTabbedPane>
11.js 날짜 팝 업 구성 요소<t:inputCalendar monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
currentDayCellClass="currentDayCell" value="#{calendarBean.secondDate}"
renderAsPopup="true" popupTodayString="#{example_messages['popup_today_string']}"
popupWeekString="#{example_messages['popup_week_string']}"
renderPopupButtonAsImage="true" />
12.jscookmenu 의 사용.<t:jscookMenu layout="hbr" theme="ThemeOffice">
<%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
*/%>
<t:navigationMenuItem id="nav_1"
itemLabel="#{example_messages['nav_Home']}" action="go_home" />
<t:navigationMenuItem id="nav_2"
itemLabel="#{example_messages['nav_Examples']}">
<t:navigationMenuItem id="nav_2_1"
itemLabel="#{example_messages['nav_Sample_1']}" action="go_sample1" />
</t:navigationMenuItem>
</t:jscookMenu>
13.<t:panelNavigation2 id="nav1" layout="list" itemClass="mypage"
activeItemClass="selected" openItemClass="selected" >
<t:commandNavigation2 value="#{example_messages['panelnav_products']}" action="" >
<t:commandNavigation2 action="go_panelnavigation_1" >
<f:verbatim>› </f:verbatim>
<t:outputText value="#{example_messages['panelnav_serach1']}" />
</t:commandNavigation2>
<t:commandNavigation2 action="go_panelnavigation_1" >
<f:verbatim>› </f:verbatim>
<t:outputText value="#{example_messages['panelnav_serach_acc1']}" />
</t:commandNavigation2>
<t:commandNavigation2 action="go_panelnavigation_1" >
<f:verbatim>› </f:verbatim>
<t:outputText value="#{example_messages['panelnav_search_adv1']}" />
</t:commandNavigation2>
</t:commandNavigation2>
<t:commandNavigation2 value="#{example_messages['panelnav_shop']}" action="" />
</t:panelNavigation2>
navigation MenuItem 을 동적 으로 생 성 할 수도 있 습 니 다.<t:panelNavigation2 id="nav1" layout="list" itemClass="mypage" activeItemClass="selected" openItemClass="selected" >
<t:navigationMenuItems value="#{navigationMenu.panelNavigationItems}" />
</t:panelNavigation2>
panelNavigationItems :
public List getPanelNavigationItems() {
List menu = new ArrayList();
// Products
NavigationMenuItem products = getMenuNaviagtionItem("#{example_messages['panelnav_products']}", null);
menu.add(products);
products.add(getMenuNaviagtionItem("#{example_messages['panelnav_serach']}", "#{navigationMenu.getAction2}"));
products.add(getMenuNaviagtionItem("#{example_messages['panelnav_serach_acc']}", "#{navigationMenu.getAction2}"));
NavigationMenuItem item = getMenuNaviagtionItem("#{example_messages['panelnav_search_adv']}", "#{navigationMenu.getAction2}");
item.setActive(true);
item.setOpen(true);
item.setTarget("_blank");
products.add(item);
// Shop
menu.add(getMenuNaviagtionItem("#{example_messages['panelnav_shop']}", "#{navigationMenu.getAction2}"));
// Corporate Info
NavigationMenuItem corporateInfo = getMenuNaviagtionItem("#{example_messages['panelnav_corporate']}", null);
menu.add(corporateInfo);
corporateInfo.add(getMenuNaviagtionItem("#{example_messages['panelnav_news']}", "#{navigationMenu.getAction2}"));
item = getMenuNaviagtionItem("#{example_messages['panelnav_investor']}", "#{navigationMenu.getAction3}");
//item.setIcon("images/arrow-first.gif");
item.setDisabled(true);
corporateInfo.add(item);
// Contact
menu.add(getMenuNaviagtionItem("#{example_messages['panelnav_contact']}", "#{navigationMenu.getAction2}"));
// External Link
item = getMenuNaviagtionItem("#{example_messages['panelnav_contact']}", null);
item.setExternalLink("#{example_messages['external_link']}");
item.setTarget("_blank");
menu.add(item);
return menu;
}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
JSP| EL (Experession Language)텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.