[JBoss Seam] - Re:
by smithbstl
I don't understand where the value for dataTransferScheme is supposed to come from.
Typically you should be using a s:selectItems/f:selectItem/f:selectItems to get a list of values for your menu. Then menu then chooses one and passes that value to your backing bean.
<f:view>
| <s:validateAll>
| <h:form>
| <h:panelGrid columns="2">
| .....
|
| SRB DataTransferScheme *
| <h:selectOneMenu id="dataTransferCombobox" value="#{loginBean.dataTransferScheme}"
| <a4j:support event="onchange" action="#{loginBean.setAuthFields(scheme)}"
| ajaxSingle="true" immediate="true"/>
| <s:selectItems label="#{scheme}" value="#{schemes}"
| var="scheme"/>
| </h:selectOneMenu>
| </h:panelGrid>
| .....
|
| <h:commandButton value="Login" action="#{login.login}"/>
| </s:validateAll>
| </h:form>
|
| //LoginBean.java: [the Backing bean]
|
| //system.out.println is ugly, use Seam's logger support
| @Logger
| Log log;
|
| @Out
| private List<String> schemes;
|
| @Factory("schemes")
| public void fillSchemes() {
| //Fill your list here
| }
|
|
| public void setAuthFields(String dataTransferScheme)
| {
| log.info("dataTransferScheme : "+dataTransferScheme);
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066796#4066796
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066796
18Â years, 9Â months
[Microcontainer] - Re: Emulating ServiceMBeanSupport
by genman
anonymous wrote : You can always check the current execution stack. :-)
|
This feels like a hack, hence the smiley ...
I might be better off creating a central service controller that users would use to stop/start services by name. Exposing stop/start as MBean operations seems logical, but if there isn't a clean way to detect who's calling stop(), I probably should avoid this approach.
Could you point me to some examples on how to construct a method interceptor in the -beans.xml format, for beans marked with annotations? In case I change my mind again.
| <inject fromContext="getState" />
|
Also: Is there a way to inject "beaninfo" using annotations? I'd rather not have to copy the same injection XML for every declaration. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066789#4066789
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066789
18Â years, 9Â months