I have a JSF/IceFaces application where there is a screen divided into 3 sections. Search fields, a grid and some details fields below. Currently if I enter some data into the search fields and click on a Search button (!) the grid shows the results and a certain method is called that puts the first result record's details into the backing beans of the details fields below the grid. This shows that there is no problem with the way I put data into the details fields.
However I have a gridclicklistener method as well that would like to change the detail fields according to the selection. After the click the same method gets called with the correct parameters that works well if invoked after the click on the Search button. The data is updated in the backing beans but the changes are not rendered even if I click the refresh button in the browser.
I found that if I click on the search button, the data-updating-method gets called from InvokeApplicationPhase.execute. When I get to this line after the grid click then it is from the ApplyRequestValuesPhase.
Do you have any ideas what could make this difference and how to get this work?
Update:
I can clearly see the updated value in the backing bean but it is not reflected on screen at all, even after F5.
I don't know what is causing your original problem.
With the icefaces push renderer however you could force an update:
http://wiki.icefaces.org/display/ICE/Getting+Started+with+ICEfaces+2#GettingStartedwithICEfaces2-icepush
Related
I'm currently developing a simple application which does crud operations on a few tables.
It looks like this:
I have a problem with the add item form, invoked by pressing the button saying "Nova jedinica mjere". It opens a popup containing an ADF form as follows:
As you can see it does a create insert operation on popup fetch event, creating an empty row. When I fill the form with data, and press OK(the ok button is handled in the bean, doing a commit operation), I get an empty error message as follows:
This only happens if the table is editable(consisting of input text elements). If it is set to click to edit, this problem does not occur. How can I make validation only occur on form fields?
If you need any more info, please let me know because I too am new to adf.
EDIT:
This is the page in question:(posted as a pastebin link to not take up much space).
http://pastebin.com/5TKyPxEs
The form in the popup is a static region from a task flow with a method call and a page:
http://pastebin.com/9h69fRW4
You mean to say that when you enter the value in the form and Click OK, it should be there in the Table,If so, the values are not getting displayed in Table. It means your Iterator is not fetching the values. You have to Refresh your Iterator, VO and Table Compoent through Bean. So that the values in the form once you click OK, it will be there in the Table.
I am able to use WindowsAccessBridge.dll to get access to java window (SwingSet2), and use the dll methods to interact with the controls.
I can iterate the tree (of java controls) using code shown here, and get information from the controls,
and I can do actions like SetText in Text box, or send click action to a button etc.
However, I am finding that the accessibility contexts are not consistent:
The SetText method works perfectly when I use the accessibility context got from the 'setMousePressedFP' method of the dll, after clicking on the text box.
However, I cant use the accessibility context got by iterating the control tree when trying to set text in a text box, although I verified that the other information e.g. size and other properties of the text box is same.
From this doc:
"The functions GetAccessibleContextAt and
GetAccessibleContextWithFocus retrieve an AccessibleContext object,
which is a magic cookie (really a Java Object reference) to an
Accessible object and a JVM cookie. "
However, the accessibility context differs everytime I click on the text box (without restarting the java program). The vmID matches eveytime.
If the AccessibleContext is really a Java Object reference, shouldnt I get the same AccessibleContext number everytime I click on the same control (without restarting the java window) ? and shouldnt that AccessibleContext number also be available in the tree?
Worst part is that the settext method doesnt work when I use the AccessibleContext got from iterating the control tree.
Edit to clarify the question further:
I am clicking on the same text box, so I would expect the windowsaccessdll function to return reference to the same control. As a long value the accessibeContext is different everytime I click, but its ok as the SetText method works everytime with the different long values and I can see the new text set in the text box.
The problem is when I iterate the control tree and the accessibility context got from the tree iteration doesnt work for the SetText method.
More specifically - how does the AccessibleContext compare to a c pointer - the c pointer would always be same when I get it for a specific control. The AccessibleContext appears to be a 8 digit long value that is different by few tens or hundreds based on where the mouse is clicked inside the text box.
Thanks in Advance.
I am a doing a project on Exam Suit in Netbeans swing java application. I have done all my work like login page, sign up page etc etc. But the main problem stick with exam page. I have inserted all the question and there choices with answer(not shown) in a database. I have designed one frame, 1 label for question and three radio buttons for choices and an OK button to select the choices and NEXT button to goto next question. I can easily get the data from database of only one row. But to get the other question I should keep the code in NEXT button, but this can be done only one time. I just want to change the data from table dynamically on click of NEXT button. I am unable to do this, Please help me. Thank You.....
Since your program acesses a database, I assume that you are using ResultSet from JDBC. You need to call ResultSet.next() each time the user clicks on the "Next" button. As long as you keep a reference to the ResultSet, you can call this method until you reach the end of the data set.
I created an application that communicates with AD and have a text field and TwinColSelect.
I type in the text field Mik (I use text change listener from Vaadin) and my listbuildier(TwinColSelect) should be populated with results that start from this sequence, it's not happening but when I delete all what I have entered it's repainted and shows the result.
And I'm sure that all my code is working properly I will just add that all that is happening in the webapp in a new window.
Has anyone encountered a similar problem and have some hints?
Other questions:
How do I delete only the left side of TwinColSelect and leave the right one intact?
How can I get all (not only selected) items from the right side?
We're using JSF 1.2 for our application. There is a selectBooleanCheckbox on on of the screens that represents a field in the backing bean. When loading the JSP, the value is shown correctly. There are three command buttons on the page; one calls a save function in the backing bean and then navigates to another screen. The other two are used to call utility methods in the backing bean before refreshing the screen. If the checkbox is unchecked, all three buttons function correctly. If the checkbox is checked, only the first functions as intended.
When the checkbox is selected, the backing bean is initialized but before the methods are called, a noSuchElementException is thrown from the generated servlet. The exception has a null message and no stack trace, so it's not incredibly helpful.
I've verified that the values of each field remain consistent with those that the screen is originally populated with. Dropdown inconsistencies are the only times I've ever seen this before, so any pointers on what else to check would be greatly appreciated. Unfortunately, I'm unable to post the code here but I will answer any questions if I am able.
Take a closer look at your buttons , and how is the working one being different from the non working ones.