ala alal

Greenhorn
+ Follow
since May 18, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by ala alal

I have a form with an a4j command button.
<a4j:commandButton/>

When I click the button it executes the validation of the form and if there is no validation error I would like to execute a javascript function.
How to do that? I tried with oncomplete property but it always executes the function also if there was a validation error.

Help?
15 years ago
JSF
I have a master detail that can be compiled many times with two buttons: one to save infos, and one to undo the operation and close the panel without save it.
With the commandLink "Insert new" I show the panel and the two buttons setting the variables rendoquadro=true and rendopulsanti=true.



The problem is: if I press Insert New, compile some fields and then press Undo, the press Insert New again the input fields keep old inserted values when I want to be them blank. When I press Save or Undo the backing method called create a new Object and assign it to the variable np_b.first_committente.
With the Save button (without immediate attribute) everything is fine: if I press Insert New, compile fields, Save and then i click Insert New again all fields are blank; that not happens with undo, problably because of immediate attribute that is the only difference between the two buttons.
How can I solve it?

Thanks,

Alessandro.
15 years ago
JSF
Hi all,
I wrote my own validation phase listener but I want to execute the method only when the request comes from the form submit and not from an Ajax request.
I've some fields with onblur validation and that cause the phaselistener to be called.
I just want it to be executed when I press the SUBMIT button.
Something like this:

afterPhase(PhaseEvent arg0) {
if (ajaxrequest)
return;
else {
....
.....
}
}

Some help?
15 years ago
JSF
No one as a solution for this problem?

I haven't found one yet.

Please tell me if I did not explained well my problem.

Is there a way to rerender elements firing the rerender event from another region?

Thanks,

Alessandro.
15 years ago
JSF
I've got a problem rerendering some regions in my page.
I've got two <a4j: outputPanel> A and B.
A menu from wich choose an options that may render A, B or both.

<h:selectOneMenu>
...
</h:selectOneMenu>

<a4j:region renderRegionOnly="true" id="r1">

<a4j:region renderRegionOnly="true" id="rA">
<a4j: outputPanel id="A" onchange="render_again()">
... ... ...
</a4j: outputPanel>
</a4j:region>


<a4j:region renderRegionOnly="true" id="rB">
<a4j: outputPanel id="B">
... ... ...
</a4j: outputPanel>
</a4j:region>

</a4j:region>

I've also got these two functions:
<a4j:jsFunction name="functionA" reRender="A"/>
<a4j:jsFunction name="functionB" reRender="B"/>

I need two distinct function so I can avoid rerendering a panel if I need to show it and it's already visible.
If I put these two function inside the region r1, when I call one of the two functions both A and B are rerendered because the nearest region is r1.
If I put the functions inside rA the first and rB the second nothing is rerendered.
I need to avoid rerendering a region already visible because it cause it to pass throw validation process and a lot of error messages below empty required fields appear.

Does anyone has a solution to my problem? I just need to skip validation for a panel already rendered and not rerendering it, seems to be the best solution to me.
Any other ideas?
15 years ago
JSF
I have a new problem. The problem appears during the rerendering of my custom component.
It keeps some children inside and during the restore it give me an ArrayIndexOutOfBoundException.
I solved with the solution posted here: LINK that I report here:


Why I need to remove children from the tree? Why they are duplicated? Does anyone has a better solution?
Thanks.
15 years ago
JSF
It was three days I was trying it and now that I posted the problem I solved it.
OK OK OK.
If someone else have my problem the component you are creating must extends UIInput. I solved with that.
Bye.
15 years ago
JSF
Hi all,
I would like to implement my custom component. It is basically an InputText with many other features.
I created it and all is ok but I can't add a tag <f:validator> inside cause it give me the error "Not nested in a tag of proper type."
What can I do?

Html code is that:
<myf:specialInput [...] >
<f:validator validatorId="myValidator">
</myf:specialInput>

the two class files are:
public class SpecialInputTag extends UIComponentTag (also deprecated...what I have to use??) : for the tag
public class SpecialInput extends UIPanel implements NamingContainer : for the renderer and component

Help me, thanks!

coorasse.


15 years ago
JSF