On 1/24/07, Paul Spencer <[EMAIL PROTECTED]> wrote:
I would like to start a dialog from a menu. The following does not
appear to start the dialog:
<t:navigationMenuItem id="addVendor"
itemLabel="Add Vendor"
action="dialog:addVendor"
visibleOnUserRole="manager" />
For this to work, the logic in the "action" attribute (in the JSP tag) would
need to have the same special casing that the standard <h:commandButton> and
<h:commandLink> tags do ... if the expression is a literal string, return it
directly as an outcome; otherwise, treat it as a method binding to an action
method. It might be worth asking on the MyFaces list if it actually works
that way (failure to do so is a bug IMHO), and/or have a look at the code.
The following does start the dialog:
<h:commandButton action="dialog:addVendor" value="Add Vendor"/>
Can the dialog be started from a <t:navigationMenuItem>? How?
Worst case, you should be able to invoke a simple action method that returns
the outcome you want.
<t:navigationMenuItem ... action="#{mybean.startAddVendor}" .../>
public class MyBean {
...
public String startAddVendor() { return "dialog:addVendor"; }
...
}
Paul Spencer
Craig