[JBoss Seam] - Yeah!
by atleprange
This looks excellent!
I used a different approach. I modified the seam antlr grammer so it would recognize the macros, and replaced it with a home made injection tag (<wiki:inject name="macroname" factory="wiki.macroname('param1','param2')" />)
I then run the facelet compiler over the content, leaving it to create the components. The inject tag works just as a normal UI:include: It includes a facelet with the same name as the macro, but it additionaly calls a factory method on a seam component named 'wiki.', which creates a java bean that is then passed to the included facelet. That way i can have a different bean for each macro, based on the params the user supplies. (The params are supplied to the factory as strings)
My approach has several obvious downsides:
Compiling the text every time is time consuming
No form submits, since the components disappear after they have been rendered (i think)
The pros: I can back every macro with a bean, which is created based on macro parameters.
Next i am thinking of implementing markers, that can give text some semantic meaning that is a bit more advanced than the normal tags.
The beauty of seam is that it just makes it so easy to implement!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038636#4038636
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038636
19 years
[JBoss Seam] - Re: SelectOne
by KoniKoni
<h:outputText value="#{kfz.hersteller.bezeichnung}" />
The output here is correct, but in follow code, the value does not set:
<h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true" converter="#{bearbkfz.herconverter}">
| <s:selectItems value="#{herstellersList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
| reRender="modelsel" />
| </h:selectOneMenu>
Here is entire code:
<ui:define name="main">
| <h:outputText value="Fabrikat: "/>
| <h:outputText value="#{kfz.hersteller.bezeichnung}" />
| <s:div style="margin-top:5px">
| <a4j:form>
|
| <s:validateAll>
|
| <rich:panel>
| <h:panelGroup id="frms">
| <h:panelGrid columns="2">
| <h:outputText value="FNr: "/> <h:outputText value="#{kfz.id}"/>
| </h:panelGrid>
| <h:outputText value="Fabrikat:"/>
| <h:outputText value="Fabrikat:"/>
| <h:panelGrid columns="3">
|
| <h:outputText value="Fabrikat: "/>
|
| <h:panelGroup style="display:block">
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true" converter="#{bearbkfz.herconverter}">
| <s:selectItems value="#{herstellersList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
| reRender="modelsel" />
| </h:selectOneMenu>
| </a4j:region>
| </h:panelGroup>
| <h:message for="hrs" />
|
| <h:outputText value="Modell:" />
| <h:panelGroup style="display:block" id="modelsel" >
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu value="#{kfz.kfzmodel}" required="true" converter="#{searchkfz.modconverterKfz}">
| <s:selectItems value="#{kfz.hersteller.kfzmodel}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| </h:selectOneMenu>
| </a4j:region>
| </h:panelGroup>
| <h:message for="modelsel" />
|
| <h:outputText value="Filiale:" />
| <h:selectOneMenu id="fillsel" value="#{kfz.filliale}" required="true" converter="#{standortverw.fillconverter}">
| <s:selectItems value="#{fillList}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| </h:selectOneMenu>
| <h:message for="fillsel" />
|
| </h:panelGrid>
| </h:panelGroup>
|
| </rich:panel>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038625#4038625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038625
19 years
[JBoss Seam] - Portlet problems
by thalerion
Hi!
I am starting out with seam and I managed to get the Registration example to run under jboss-4.0.5 with EJB3 profile.
I then installed the jboss portal.sar with no problems and then started to convert the Registration example into a Portlet. I have managed to deploy the Registration example as a portlet in the Jboss Portal as the example in "Jboss Portal Reference Guide(My first portlet)".
But when I try to submit the User I get a:
javax.naming.NameNotFoundException: Lookup UserTransaction threw IllegalStateException: JNDI properties not initialized, Seam was not started correctly'
Is this because I am using an ear file to deploy the portlet so that the injected Registration.war portlet can´t find the EJB3:s?
How do I manage to apply the correct JNDI naming pattern in the components.xml to find the EJB:s?
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038622#4038622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038622
19 years
[JBossWS] - wsconsume and IllegalStateException
by bypaik
hi,
i'm running jboss 4.0.5.GA along with jbossws 1.2.1.GA. i'm attempting to use wsconsume on a generated wsdl. however, i'm getting the following error:
Exception in thread "main" java.lang.IllegalStateException: Could not load provider:org.jboss.ws.tools.jaxws.impl.WSContractConsumerFactoryImpl
at org.jboss.ws.tools.jaxws.api.Locator.locate(Locator.java:55)
at org.jboss.ws.tools.jaxws.api.WSContractConsumer.newInstance(WSContractConsumer.java:68)
at org.jboss.ws.tools.jaxws.api.WSContractConsumer.newInstance(WSContractConsumer.java:56)
at org.jboss.ws.tools.jaxws.command.wsconsume.importServices(wsconsume.java:170)
at org.jboss.ws.tools.jaxws.command.wsconsume.main(wsconsume.java:76)
i went through and looked for any other posts regarding this issue and found that jbossws-wsconsume-impl.jar needed to be added to the classpath. i 1.2.1's wsconsume.bat adds this jar to the classpath.
i did add jbossretero-rt.jar to the classpath as well because i was getting a ClassNotFoundException on JBossStringBuilder
i'm running everything locally on winxp.
any help is greatly appreciated
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038620#4038620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038620
19 years