-
1. Re: Create dynamic context menu without facelets
sergeysmirnov Jun 13, 2008 2:27 AM (in response to soumik.ghosh)Yes, it is not possible.
If you do not use facelets the only way is to create it from java code. -
2. Re: Create dynamic context menu without facelets
soumik.ghosh Jun 13, 2008 5:21 AM (in response to soumik.ghosh)That I know :)
But is there any other way... using rich tags !!!!
I have tried this code but the backing bean is not getting initialixed
any help on that
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%><%@taglib
uri="http://java.sun.com/jsf/html" prefix="h"%><%@taglib
uri="http://richfaces.org/a4j" prefix="a4j"%><%@taglib
uri="http://richfaces.org/rich" prefix="rich"%><%@taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="ajax"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Insert title here
<f:view>
<h:form>
<a4j:region>
<a4j:push id="push" reRender="out" interval="60000" eventProducer="#{pushBean.addListener}"></a4j:push>
</a4j:region>
<h:outputText id="out" value="static">
<rich:contextMenu submitMode="ajax" attached="true" event="oncontextmenu" >
<c:forEach items="#{bean.prop}" var="v">
<rich:menuItem value="#{v.prop}">
<a4j:actionparam assignTo="#{pushBean.text}" value="#{v.prop}"> </a4j:actionparam>
</rich:menuItem>
</c:forEach>
</rich:contextMenu>
</h:outputText>
</h:form>
</f:view>