Messages posted by radu.jakab
[Logo]
ICEsoft.org Forums: ICEfaces, ICEmobile, ICEpdf
[Search] Search   [Recent Topics] Recent Topics   [Groups] Home Page | www.icesoft.org  [Login] Login 
Messages posted by: radu.jakab  XML
Profile for radu.jakab -> Messages posted by radu.jakab [240] Go to Page: 1, 2, 3  ...  14, 15, 16 Next 
Author Message
Hi,

If there's a relevant part in that log please bold it so we don't have to read the whole 10 pages.

As for the listener, it always runs after the file is already uploaded. Using ICEFaces' fileInput you cannot control the file being uploaded to the server. But you can copy it to another place and delete the old one in your listener.

If you want to make changes to the file before even being written to the disk, you'll have to create your own servlet for it.

Regards,
Radu
Hi,
Do you mean like having a button or command link for clearing the form?
Hi,

You're perfectly right about when the constructor is called; this is why you generally shouldn't have database operations in your constructors.

You should have a navigation method in bean A, like open() and do the loading there:
Code:
 public String open(){
 init(); // you reload from database here
 return NAVIGATION_CONSTANT;
 }
 


Then in your page you would tie this method on the command button / command link that navigates to the page.

Radu
This is not about saved views, it's more likely about object caching. Where do you currently populate the list? This should probably be done in the method that brings you to this page.

If you want to always have the latest DB items, even if you don't leave the page, you can also put the code to populate your list in the getter, but that's bad practice most of the times...
Hi,
Add immediate="true" to your back button. Make it an ice:commandButton.
Hi,
If you want to validate it only when the user just typed in it, put your validation inside a ValueChangeListener.
Try adding this to your tag:
Code:
value="#{mybean.seleccion}"
And this to your bean:
Code:
private String seleccion="-1";
, with setters & getters.

Just as a side-note, that's pretty bad JSF coding...
Radu
Hi,

I saw a post recently that said if you use ice:setEventPhase to change the event phase instead of doing this in the listener, the method would be run on the correct node, so this is a lot easier than caching the current node when the listener first runs...

I haven't personally tested this though.
Regards,
Radu
Hi,
In your page you have something like

Code:
 <ice:selectOneMenu value="#{Bean.selectedItem}" ... >
 <f:selectItems ... >
 </ice:selectOneMenu>
 


If selectedItem's value is not "-1" since you build the page, but some random value, like "" or null, which is not in the list, then when the form submits, its value actually changes to "-1" which makes the listener run.

Is this the case?
Hi,
What is the initial value of the attribute binded to the ice:selectOneMenu? Is that value available in the selectOneMenu's options list?

Regards,
Radu
Should be doable using panelGrid/dataTable together with selectOneRadio. The trick is to get them grouped by lines. I haven't tried this, but it should be possible.

It's easier if the option list is fixed-size and not dynamic - panelGrid.
If the list is dynamic, either using a dataTabel or a c:for maybe...

Good luck
Hi Hali,
I knew of this problem, used to fix it by 'caching' the real node when the listener first ran, before requeuing for INVOKE_APPLICATION.

This is a nicer fix though, thanks!
Radu
Hi Alex,

This is perfectly normal. Your listener's event initially has a PhaseId of PhaseId.ANY_PHASE, which makes it run before APPLY_REQUEST_VALUES.

Then, in APPLY_REQUEST_VALUES, that value is overwritten with the one from the page.

To avoid this, add the following code to the beginning of your listener method:
Code:
if (!vce.getPhaseId().equals(PhaseId.INVOKE_APPLICATION)) {
   	vce.setPhaseId(PhaseId.INVOKE_APPLICATION);
   	vce.queue();
   	return;	
   }
Where vce is your event.

Regards,
Radu
Hi,

Yes, in web hitting the tab key isn't normally an action. You can 'hack' this by adding javascript that makes a partialSubmit when the tab key is pressed in that inputText.

But then again, you should use partialSubmit="true" and a valueChangeListener to handle this situation.

Radu
Hi,
The commandLink tag does not support a 'target' attribute; don't expect it to be on the resulting html just because you've added it to your tag.

If you want to open a new window, adding javascript with an onclick attribute is probably one way to do it... but I'd strongly recommend you use ice:panelPopup instead.

Radu
 
Profile for radu.jakab -> Messages posted by radu.jakab [240] Go to Page: 1, 2, 3  ...  14, 15, 16 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team