voyent
Update an object's attribute in panelSeries using ice:inputTextarea  XML
Forum Index -> Components
Author Message
mredmundo

Joined: 17/Dec/2007 00:00:00
Messages: 7
Offline


Hi there,

I've done a search for this, and not found anything - but if this has been handled by previous posts then please point me in the right direction.

I'm trying to edit an object held in the backing bean, that has a varying number of items in a list. I can display the items fine, but when i call the action the updated content isn't reflected into the parameter. It seems to work fine for other input types that i've tried, just not Textarea.

Can anyone suggest a work around for this, or let me know if i'm doing something wrong...

Any help greatly appreciated, thanks. Ed.

This is in my xhtml file

Code:
 <ice:panelSeries var="item" value="#{backingBean.selectedContent.items}">
     <ice:panelGroup>
         <ice:outputLabel for="editField" value="#{item.title}:"/>
         <ice:selectOneMenu rendered="#{item.typeId == 2}" id="editField" value="#{item.content}">
             <f:selectItems value="#{content.optionsAsMap}"/>
         </ice:selectOneMenu>
         <ice:inputTextarea rendered="#{item.typeId == 3}" id="editField" value="#{item.content}" required="true"/>
         <ice:message for="editField"/>
     </ice:panelGroup>
 </ice:panelSeries>
 
 <ice:commandLink action="#{backingBean.updateSelectedContent}" title="update">
     <ice:outputText styleClass="submitButton" value="update"/>
 </ice:commandLink>
 



Then my bean has the following content in it:

Code:
 public String updateSelectedContent()
 {
     for(ItemVO item : selectedContent.getItems())
     {
         if (logger.isDebugEnabled()) logger.debug("updated item content is: " + item.getContent());
     }
 }
 



mredmundo

Joined: 17/Dec/2007 00:00:00
Messages: 7
Offline


Having investigated a bit further i think that this problem is a bug in the Textarea component.

The Text component works fine, and if i add a partial submit to the Textarea then it makes it work, but it doesn't work using a page level submit which is the one I need to use (as the whole form content needs to be submitted at once).

I'll leave this topic open incase anyone would like to comment. I'll raise this as a bug in a couple of days unless it's proved otherwise.

Thanks, Ed.
mredmundo

Joined: 17/Dec/2007 00:00:00
Messages: 7
Offline


Right - looks like the problem was simple after all.

I'd given both input fields the same id, as they could never be rendered at the same time, and they have a generic label and message associated with them - so made sense to have the same id.

It looks like that was causing the problem tho - if i give them different Id's then it works fine.

Hopefully this will help someone else who has made the same mistake.

Ed.
thorne

Joined: 10/Jun/2008 00:00:00
Messages: 12
Offline


Hi Ed,

I have a problem with a panelSeries component. I've embedded it into a panelStack as I have two different panelSeries that need to be displayed depending on the user's selection in the tree. The panelSeries is populated by a webservice that is called in the bean's constructor. The webservice returns a java.util.List object and this is used to add panels to the series. When there is another item added to the list on the other side of the webservice the item doesn't show up in the series?

Any ideas?

CT

All good things lead to more good things
[Email]
mredmundo

Joined: 17/Dec/2007 00:00:00
Messages: 7
Offline


Hi CT,

I'm only an ICEFaces novice, and I haven't used the panelStack components yet - so i'm not the best person to help you. I'd suggest creating a new topic in this section to give your post more exposure.

Good luck getting it sorted :)

Ed.
 
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team