Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PartialTrigger inside af:ForEach Component

Abraham NkomoAug 13 2019 — edited Aug 14 2019

When a value of SelectOneChoice component is changed it must update RichOutputFormatted component within af:ForEach Component but its not working . l want to change the price of an item when a user select the different size option ....Its only updating the first item and it ignore the rest ....Please help me

l am using JDeveloper 12.1.3.0.0 and weblogic server 12C .l am using Managed Bean to display data .

Below is a piece of jspx source code .Component in line 37 with ID name "ProductBrandSize******" must update the component in line 21 with ID name "Price" .....******

<af:forEach items="#{OSSHOP.shopingCartBean.products}"

                                                                                    var="row">

                                                                            \<af:panelGroupLayout id="panel"

                                                                                                 layout="vertical"

                                                                                                 valign="middle"

                                                                                                 halign="center">

                                                                                \<af:image id="i1"

                                                                                          inlineStyle="width:130px; height:130.0px;"

                                                                                          source="/productmasterservlet?id=#{row.OBJECT}&amp;&amp;select=#{ OSSHOP.shopingCartBean.displayCatalogImages.selected}"/>

                                                                                \<af:separator id="s6"

                                                                                              inlineStyle="width:167px; background-color:White;"/>

                                                                                \<af:commandLink id="Description"

                                                                                                inlineStyle="color:Navy;"

                                                                                                text="#{row.DESCRIPTION}"

                                                                                                action="#{OSSHOP.DisplayItemDetail}"

                                                                                                actionListener="#{OSSHOP.DisplayItemSelectionListner}"/>

                                                                                \<af:outputFormatted value="#{row.DISPLAYPARTNER.COMPANYNAME1}"

                                                                                                    id="Supplier"/>

                                                                                \<af:panelGroupLayout id="pgl96"

                                                                                                     layout="horizontal">

                                                                                    \<af:outputFormatted value="#{row.DISPLAYPRICE.VALUE}"

                                                                                                        id="Price"

                                                                                                        inlineStyle="color:Maroon;"

                                                                                                        partialTriggers="#{OSSHOP.productPriceUpdate}">

                                                                                        \<af:convertNumber pattern="#{OSDN.decimalFormat}"/>

                                                                                    \</af:outputFormatted>

                                                                                    \<af:spacer width="5" height="5"

                                                                                               id="sw141"/>

                                                                                    \<af:outputFormatted value="#{row.DISPLAYPRICE.CURRENCY}"

                                                                                                        id="owt64"

                                                                                                        inlineStyle="color:Maroon;"/>

                                                                                \</af:panelGroupLayout>

                                                                                \<af:outputFormatted value="#{row.STOCKAVAILABILITY.DISPLAYSTOCK}"

                                                                                                    id="StockQuantity"/>

                                                                                \<af:outputFormatted value="#{row.STOCKAVAILABILITY.DISPLAYLEADTIME}"

                                                                                                    id="DeliveryLeadTine"/>

                                                                                \<af:selectOneChoice label="Size"

                                                                                                        id="ProductBrandSize"

                                                                                                    rendered="#{row.PRODUCTFASHIONBRAND\[0\] != null}"

                                                                                                    autoSubmit="true"

                                                                                                    valueChangeListener="#{OSSHOP.fashionBrandSizeValueChangeListener}"

                                                                                                    immediate="true">

                                                                                        \<af:selectItem label=""

                                                                                                       id="si6"/>

                                                                                        \<af:forEach items="#{row.PRODUCTFASHIONBRAND}"

                                                                                                    var="item">

                                                                                            \<af:selectItem label="#{item.SIZE}"

                                                                                                           value="#{item.SIZE}"

                                                                                                           id="si12"/>

                                                                                        \</af:forEach>

                                                                                    \</af:selectOneChoice>

                                                                                \<af:spacer width="1" height="1"

                                                                                           id="s26"/>

                                                                                \<af:panelGroupLayout id="pgl43">

                                                                                \</af:panelGroupLayout>

                                                                                \<af:panelGroupLayout id="pgl31"

                                                                                                     layout="horizontal">

                                                                                    \<af:inputText label="Qty"

                                                                                                  id="ShoppingQty"

                                                                                                  columns="2"

                                                                                                  value="#{row.DISPLAYQUANTITY.value}">

                                                                                        \<af:convertNumber pattern="#{OSSHOP.decimalFormat}"/>

                                                                                    \</af:inputText>

                                                                                    \<af:spacer width="10"

                                                                                               height="10"

                                                                                               id="s40"/>

                                                                                    \<af:button text="Add to Cart"

                                                                                               id="cb2"

                                                                                               action="#{OSSHOP.AddToCart}"

                                                                                               actionListener="#{OSSHOP.AddToCartActionListner}"

                                                                                               partialSubmit="true"/>

                                                                                \</af:panelGroupLayout>

                                                                            \</af:panelGroupLayout>

                                                                        \</af:forEach>

**2019-08-13.png
**

This post has been answered by Abraham Nkomo on Aug 14 2019
Jump to Answer
Comments
Post Details
Added on Aug 13 2019
5 comments
211 views