voyent
Messages posted by: mkat  XML
Profile for mkat -> Messages posted by mkat [86] Go to Page: 1, 2, 3, 4, 5, 6 Next 
Author Message
What about adding partialSubmit = "true"?
If you want to do something in the bean when the value is set, you could add a valueChangeListener.
Hi, if you've got say a string in your bean with a getter such as:

Code:
public String getImageName(){
 
 return "TheImage.jpg";
 
 }


On your page you would say, like in your example:

Code:
#{bean.imageName}


And it will call the getImageName to get imageName.

Does that help? I think with your code it was looking for a string called getImageName so it was looking for the getter getGetImageName, which is why it would give you PropertyNotFound, if I'm understanding what you are asking correctly.
You may find this post helpful: http://www.icefaces.org/JForum/posts/list/8549.page
You might try adding <redirect/> to your nav rule like:

<navigation-rule>
<navigation-case>
<from-outcome>next</from-outcome>
<to-view-id>/WEB-INF/POC/FirstBis.iface</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
If the table is loading a list, make the list a private variable, and set it's getter to only load the list if the list is null. That way, the table won't reload unless you want it to.
For reference, the lazy loading I ended up using was the way mentioned here: http://www.icefaces.org/JForum/posts/list/8549.page with the LazyLoadingList class and not the 'tutorial using JPA' which in my opinion is a more difficult method.

Hope this helps.
Based on your example, I think you'll need to loop through your packageLineTreeList and set each employee's selected to false.
Showing a dataTable with that many records at once is generally a bad idea because it is so very slow. Have you thought about implementing pagination w/ lazy loading? In a similar situation I did that so that showing a dataTable with thousands of records is very fast.
Set the value of your dataTable to a list of objects.

In the columns of your dataTable, put in your other components. Bind the value of your inputText, etc, to an attribute of your object, like say 'name'.

When you click Add Row, in that action, add a new object to your list of objects. That new row will appear in the dataTable.

And for a save to db, you could loop through the list of objects and save them to the db.
In some cases, methods in the backing get called multiple times.

From looking at your code, I am guessing that your problem is that selected_items is not being cleared out before your for loop in getSelectedItems.
Might be a scope problem. Are your pages in session scope or request? Putting in session instead may help.
I'm pretty sure you can only have 1 footer. To display several things in one footer, put in a panelGrid or other panel and put your other components inside.

Example:
Code:
<f:facet name="footer">
               <ice:panelGrid columns="1">
  					<ice:outputText value="gg" />
  								
  					<ice:outputText value="gg2" />
 
               </ice:panelGrid>
  </f:facet>


etc...
If you are not selecting the checkboxes seperately, you should be able to bind them to a boolean value. Checking one would then select all of them. I think.

If you want to select checkboxes seperately and a select all, as long as each Object in your list of values has a boolean attribute, bind each one of those to each checkbox for the current row. Then, for a select all bind the same value change listener to each checkbox. In the value change event method, loop through the list setting each objects boolean value to true (checked).
You fill the datatable with a List of objects. Say the object has a name and description.

dataTable has a var=, call that say var="current"

inside one column, you say
ice:outputText value="#{current.name}"

inside another column, you say like
ice:outputText value="#{current.description}"

And it will display as many rows as you have objects in your list.
 
Profile for mkat -> Messages posted by mkat [86] Go to Page: 1, 2, 3, 4, 5, 6 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team