[JBoss Seam] - Re: Another conversation question: how to correctly begin on
by MSchmidke
Yes ... perhaps this is the problem. Until today I did not understand this page flow thing.
I've been a WebObjects developer for years, had the luck to skip Struts and "Seam-less" JSF.
In WebObjects, every html page is represented by a Java class, and directing to a particular page from an action method is done by instantiating and returning the corresponding Java object. No resource file names, no outcomes anywhere in the code (and especially no xml files). I got very accustomed to have _everything_ in Java code.
I was very glad when I found Seam which similarly allowed me to do everything in code (using absolute paths instead of outcomes as return values). I still do not understand why I should be snipping this part out of my code and putting it in a XML file, and so my pages.xml is really teeny-weeny.
Perhaps I should do some research and practice on this navigation rule thing (but this is a little off topic here), but for return to the topic: I feel that the way my persistence context should be handled (flushed manually or not) drastically affects the code I write, and so I think the best place is just exactly in company with that code.
And since I write many beans which rely on flushmode=MANUAL, I like to have a common base class which sets this for all of them. This is what I meant with DRY.
But I see that all of you does something else than me, and so I am thinking.
Marcus,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121651#4121651
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121651
18 years, 6 months
[JBoss Seam] - Re: expression language empty parameter
by EverlastX1
thx for this hint.
"You must ensure that the parameters are available not only when the page is rendered, but also when it is sub-
mittedIf the arguments can not be resolved when the page is submitted the action method will be called with
null arguments" --> Stateful bean, right?
I did read the chapter and adapted my program according to it. I didn't had any luck.
I changed my Project so it looks same like the booking example.
I dont see any difference in my code the the booking example. I am quite frustrated because i don't get any feedback from the system and I am trying all kind of combinations since 3 days now with no luck.
I have a list of results If the user clicks on an author from the list the page is redisplay according to the parameter passed in the function call searchByCreator();
|
| <h:form id="searchForm">
| <h:inputText id="value" required="false" value="#{searcher.searchString}" style=" width : 300px; "/>
| <h:commandButton id="search" value="search"
| action="#{searcher.search}" style="width : 50px; "/>
| </h:form>
|
|
| <h:dataTable var="resultElem" value="#{searchResult}">
| <h:column>
| <!-- Creator -->
| <h:form styleClass="subText" style="margin:auto;padding:auto; /*just for the IE*/">
| <ui:repeat var="a" value="#{resultElem.doc.creator}" >
| <h:commandLink value="[#{a}]," action="#{searcher.searchByCreator(a)}" />
| </ui:repeat>
| </h:form>
| </h:column>
| </h:dataTable>
|
| @Stateful
| @Name("searcher")
| public class SearchBean implements Search, Serializable {
|
| @DataModel
| private List<SearchResult> searchResult;
|
| public void searchByCreator(String creator){
| ....
| }
| ...
|
| @Destroy
| @Remove
| public void destroy() {}
|
|
if I use h:commandLink my function is never called the page is just rerendered
If I user s:link the function gets called but the parameter is empty!
If i put the h:command link outside the ui:repeat this makes no difference the result is the same like above.
If I use the in second loop a h:dataTable i have the same result as above
simplified system:
If i make a function call outside the DataTable id doesn't work always
| inside the search form
| <h:form id="searchForm">
| <h:inputText id="value" required="false" value="#{searcher.searchString}" style=" width : 300px; "/>
| <h:commandButton id="search" value="search"
| action="#{searcher.search}" style="width : 50px; "/>
| <h:commandLink styleClass="subText" value="#{searcher.searchString}," action="#{searcher.searchByKeyword(searcher.searchString)}" />
| Does work
| </h:form>
|
Two Forms
| <h:form id="searchForm">
| <h:inputText id="value" required="false" value="#{searcher.searchString}" style=" width : 300px; "/>
| <h:commandButton id="search" value="search"
| action="#{searcher.search}" style="width : 50px; "/>
| <h:commandLink styleClass="subText" value="#{searcher.searchString},"
| </h:form>
|
| <h:form>
| action="#{searcher.searchByKeyword(searcher.searchString)}" />
| don't work
| </h:form>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121650#4121650
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121650
18 years, 6 months
[Installation, Configuration & DEPLOYMENT] - Help! Migrating from tomcat to Jboss
by amol82
Hi,
We have a Struts-spring-hibernate application.
We just migrated to java 1.6 from 1.4
I am now doing a POC to migrate it to Jboss from Tomcat.
I am pretty new to Jboss.
We have a docbase and jdbc resource spedified in server.xml in tomcat.
So i specified docbase in server.xml in webdeploy directory in Jboss.(Correct me if there is any other way to specify the exploded code.)
The problem i am currently facing is the while loading application it is not able to find the datasource.
my jdbc datasource in tomcat looks like "jdbc/xxxx"
and in my application it is used as "comp/env/jdbc/xxxx"
But when i did the same in server.xml in jboss I am getting an error the it is not able to find "env"
I tried to make a seperate "oracle-ds.xml" but i am getting the same error.
I even tried to use "jdbc/xxxx" in my application code but then I am getting and error that jdbc is not found.
But when i remove the application path fr server.xml and use only oracle-ds.xml i am able to see the the entry in jms-console as well as datasourse name in jboss startup but jms-console is not available with application as there is error and also jdbc datasource entry in logs is not showing.
Thanks in advance,
Amol
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121649#4121649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121649
18 years, 6 months