[JBoss Seam] - Re: Problem with immediate=
by petemuir
"anescu" wrote : If I remove the anonymous wrote : immediate="true" part, then I find myself in another problem, the form validation is performed and the page is not sent to the server.
Placing immediate=true on a commandButton causes the action to be run during the APPLY_REQUEST_VALUES phase, resulting in the model update not occuring.
anonymous wrote : I also tried to use an anonymous wrote : s:link instead, that would have sent me to the same page, but then I lost all the modifications I have already done.
s:link doesn't submit the form.
anonymous wrote : Is this a known problem with Seam? Or any other solution/workaround.
This is really a JSF issue. Try also putting immediate=true on your checkbox, the model should then be updated (for that component only) during APPLY_REQUEST_VALUES. A better solution is to use more than one form (one for your hide/show, another for the data entry), then you don't need to use the immediate hack on the JSF lifecycle.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053508#4053508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053508
18Â years, 10Â months
[JBoss Seam] - seam Facelets Value not correctly initialised ?
by dreuzel
Using the examples, i verified the HTML source code and notice strange code in value="...."
Where is this comming from FUnction ???
look after "//--><input type="hidden" name="jsf_tree_64" id="jsf_tree_64" value=""
<a href="#" onclick="clear__5Fid16();document.forms['_id16'].elements['_id16:_link_hidden_'].value='_id16:_id28';if(document.forms['_id16'].onsubmit){var result=document.forms['_id16'].onsubmit(); if( (typeof result == 'undefined') || result ) {document.forms['_id16'].submit();}}else{document.forms['_id16'].submit();}return false;" id="_id16:_id28">Create new Account
<a href="#" onclick="clear__5Fid16();document.forms['_id16'].elements['_id16:_link_hidden_'].value='_id16:_id31';if(document.forms['_id16'].onsubmit){var result=document.forms['_id16'].onsubmit(); if( (typeof result == 'undefined') || result ) {document.forms['_id16'].submit();}}else{document.forms['_id16'].submit();}return false;" id="_id16:_id31">Create new customer
<!--
function clear__5Fid16() {
var f = document.forms['_id16'];
f.elements['_id16:_link_hidden_'].value='';
f.target='';
}
clear__5Fid16();
//-->
//<![CDATA[
function faceletsDebug(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');"); };var faceletsOrigKeyup = document.onkeyup; document.onkeyup = function(e) { if (window.event) e = window.event; if (String.fromCharCode(e.keyCode) == 'D' & e.shiftKey & e.ctrlKey) faceletsDebug('/dvd/home.seam?facelets.ui.DebugOutput=1181644165046'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); };
//]]>
<h1>Welcome to the DVD Store</h1>
Welcome to the JBoss DVD Store Demo. The DVD Store is a simple storefront
application written using the latest JBoss technologies: EJB3, Seam and jBPM.
<h2>How to use the DVD Store</h2>
You can enter the store DVD immediately by clicking on
the shopping link below. However, in order to complete
a purchase, you'll need to first log in as a customer.
There are 5 customer accounts: user
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053505#4053505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053505
18Â years, 10Â months
[JBoss Portal] - Re: What is the format of renderURLs in 2.4?
by nollie
(Everything that follows can be verified in org.jboss.portal.portlet.impl.PortletRequestDecoder. I was reading code from the head of development, but everything I learned worked against my 2.4.1 installation)
Here are some example parameters I've found within my own application.
action=6&mode=view
action=a&windowstate=normal
6, a? What does action mean?
Action isn't just any old parameter, its value is actually a hexidecimal number built from masks found in the PortletRequestDecoder. The first bit, if on, indicates an actionURL. The second bit, if on, indicates a renderURL. The third bit, if on, indicates the URL has a mode parameter. The fourth bit, if on, indicates the URL has a windowstate parameter. Finally the fifth bit is used for the opaque mask, which we haven't figure out yet. So, what does that give us?
Let's take look at the action=6 of the first parameter string. 6 in hex equals 110 in binary. According to the bit assignments above that gives us:
| 1 1 0
| |_|_|_|_|_|
| o w m r a
| p i o e c
| a n d n t
| q d e d i
| u o e o
| e w r n
|
Therefore this URL is a renderURL with a mode parameter. Looking above the parameter string has a mode parameter equal to view.
Now let's look at the action=a of second parameter string. A in hex equals 1010
| 1 0 1 0
| |_|_|_|_|_|
| o w m r a
| p i o e c
| a n d n t
| q d e d i
| u o e o
| e w r n
|
Therefore this URL is also a renderURL, but this time with a windowstate parameter. Looking above the example indeed has a windowstate parameter, but does not have a mode parameter.
What would the action need to be if we wanted to specify both mode and windowstate parameters?
| 1 1 1 0
| |_|_|_|_|_|
| o w m r a
| p i o e c
| a n d n t
| q d e d i
| u o e o
| e w r n
|
Binary 1110 is e in hex, so the URL would end something like this: action=e&mode=help&windowstate=normal.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053498#4053498
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053498
18Â years, 10Â months
[JNDI/Naming/Network] - PROJECTNAME/FooBean/remote JNDI naming?
by maroy
I'm having the following issue. An application written for JBoss tries to refer to its beans when locating them through JNDI using the following pattern:
| ctx = new InitialContext(System.getProperties());
| ctx.addToEnvironment("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
| ctx.addToEnvironment("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
| ctx.addToEnvironment("java.naming.provider.url", "localhost:1099");
| FooBean = (FooBean) ctx.lookup("PROJECTNAME/FooBean/remote");
|
and the bean is not found. if I reset the last call to:
| FooBean = (FooBean) ctx.lookup("FooBean/remote");
|
it finds it without problems.
on startup, JBoss initializes all beans automagically according to the log:
| 14:10:13,159 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.stateless.StatelessContainer
| 14:10:13,168 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=PROJECTNAME.jar,name=FooBean,service=EJB3 with dependencies:
| 14:10:13,342 INFO [EJBContainer] STARTED EJB: com.foo.bar.FooBean ejbName: FooBean
|
how can I make the code work as in the original setup, i.e. make the JDNI refer to these objects by the name "PROJECTNAME/FooBean/remote"?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053496#4053496
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053496
18Â years, 10Â months
[JBoss Seam] - Problem with immediate="true" and refresh page display
by anescu
Hi,
I have this situation:
It's a Seam-gen application (1.2.1). On one screen (Got entity Abc, managed by AbcHome), I added a checkbox:
<h:selectBooleanCheckbox value="#{abcHome.instance.useExisting}" onclick="doRefresh()">
| </h:selectBooleanCheckbox>
| <h:commandButton id="submitter" style="visibility:hidden;" action="#{abcHome.refresh}" immediate="true">
| </h:commandButton>
|
| <script language="javascript">
| function doRefresh(){
| document.getElementById("abc:submitter").click();
| }
| </script>
So, i have some fields that are rendered or hidden based on the #{abcHome.instance.useExisting} value. I added the anonymous wrote : refresh() method in the AbcHome class:
public String refresh()
| {
| return "refresh";
| }
The code works almost ok, I mean if I change any of the fields that are displayed the first time and click the checkbox the values are kept, but the page is not rerendered (meaning all field hidden remain hidden, all field that should become hidden remain visible).
If I remove the anonymous wrote : immediate="true" part, then I find myself in another problem, the form validation is performed and the page is not sent to the server.
I also tried to use an anonymous wrote : s:link instead, that would have sent me to the same page, but then I lost all the modifications I have already done.
Any idea what is wrong? Is this a known problem with Seam? Or any other solution/workaround.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053494#4053494
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053494
18Â years, 10Â months