• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Specifying multiple targets for hx:behaviour does not work

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I have two panelGroups in my page as shown below and a command button. On click of the button, I am trying to update both the panels. Which is not happening now.
If I give only one panel in the TargetAction of behaviour, it works fine but not with both the panel ids.
Can any one let me know why if there is anything obvious I am missing?
Thank you.




- Veera
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You;ll have to RTFM, I'm afraid. I don't know anything about that tagset.

Most likely you're using the wrong separator character between target names on your targetAction attribute, but since there's not only no standard for stuff like that, but cases I've seen where the standard varies depending on what you're working with....

All you can do is read the vendor's documentation.
 
Veera Velisetti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim,

What does RTFM mean?
I am using IBM provided tagset for JSF. I am developing using RAD 7.5.4 , application running on IBM WebSphere Portal 6.1.2.

About the seperator, I have tried using comma, semi colon and space. None of them work.

If you have any pointers please suggest.

Thank you.

- Veera
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RTFM is geek speak for Read The Fine Manual - or sometimes a less polite variation, but this is the JavaRanch.

Your use of IDE or appserver doesn't have any significance for this problem. The only thing that matters is that you use the hx tagset properly. And for that, you really will have to read the vendor docs, since I've never used it and don't know anything about it. So the only way I could answer would be if I RTFM'd.
 
Veera Velisetti
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I got this working now. The following is the piece of code that works. The changes I did are highlighted in bold.

<h:panelGroup styleClass="panelGroup" id="summaryGroup">
<h:selectOneListbox styleClass="selectOneListbox" id="listSummaryAddresses">
<f:selectItems value="#{pc_AdContentCaptureView.addressList}"/>
</h:selectOneListbox>
</h:panelGroup>
<hx:ajaxRefreshRequest target="summaryGroup" id="ajaxRefreshRequest1"></hx:ajaxRefreshRequest>

<h:panelGroup styleClass="panelGroup" id="addressGroup">
<h:selectOneRadio disabledClass="selectOneRadio_Disabled"
enabledClass="selectOneRadio_Enabled" styleClass="selectOneRadio"
id="radioAddressList" value="#{pc_AdContentCaptureView.selectedAddress}" layout="pageDirection">
<f:selectItems value="#{pc_AdContentCaptureView.addressList}" />
</h:selectOneRadio>
<hx:ajaxRefreshSubmit target="addressGroup" id="ajaxRefreshSubmit1"></hx:ajaxRefreshSubmit>

<h:commandButton id="addNewAddr" type="button" action="#{pc_AdContentCaptureView.doButton2Action}" value="New">

<hx:behavior event="onclick" id="behavior2" behaviorAction="get;get"
targetAction="addressGroup;summaryGroup"></hx:behavior>
</h:commandButton>


If we are mentioning more than one targetAction's then we should mention the same numbr of behaviourActions. And also, only the first targetAction needs to be sumbitted to refresh the panel addressGroup, the other just needs to be refreshed to update the summaryGroup panel so the change of ajax request from submit to refresh.
Hope this helps to somebody over there.

- Veera

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Veera,

Your solution is correct, works for me. Thanks for saving me an hour tryting to find the relevant documentation!
 
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic