简体   繁体   中英

javax.el.ELException: Failed to parse the expression [${ofn:storeLookup(${bundleDetailsMap['bundleStoreUnit']})}]

I am Trying to call a JSTL Function with El Expression parameter but it is throwing runtime exception,

enter code here<c:forEach var="bundleDetailsMap" items="${orderSummaryInfo.pickupBundleDetails}">
                            {
                                name: "${bundleDetailsMap['name']}",
                                price: "${bundleDetailsMap['price']}",

                                <c:set var="store" value="${ofn:storeLookup(${bundleDetailsMap['bundleStoreUnit']})}"  />
                                        storeName: "${store.storeName}",
                                        storeAddress: "${store.streetAddr}",
                                        storeCity: "${store.city}",
                                        storeState: "${store.state}",
                                        storeZip: "${store.zipForDisplay}",
                                        storeUnit: "${store.unit}",
                                        monFriHours: "${store.monHours}",
                                        satHours: "${store.satHours}",
                                        sunHours: "${store.sunHours}",
                                items: [
                                    <c:forEach var="bundleItem" items="${bundleDetailsMap['items']}">
                                        {
                                            src: "${bundleItem.imageDescription}",
                                            bundleName: "${bundleItem.itemName}",
                                            qty: "${bundleItem.quantity}",
                                            ashleyStoreUnit : "${bundleItem.ashleyStoreUnit}",
                                        },
                                    </c:forEach>
                                ],
                            },
                        </c:forEach>

in this is throwing parse error

I think the problem is in ${ofn:storeLookup(${bundleDetailsMap['bundleStoreUnit']})} .

I don't think you are allowed to make such complicated calls in EL.

You should try setting the EL variable in your controller, or try using scriptlets to acomplish this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM