ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Application Server » Accessing Smart databean using wcbase:usebean tag

Post new topic  Reply to topic
 Accessing Smart databean using wcbase:usebean tag « View previous topic :: View next topic » 
Author Message
MB Developer
PostPosted: Mon Apr 20, 2015 9:22 am    Post subject: Accessing Smart databean using wcbase:usebean tag Reply with quote

Disciple

Joined: 03 Feb 2014
Posts: 179

Hi all,

i want to access smart databean using wcbase:usebean tag in jsp page.after creating class i will getting error.

i will create own databean class

Code:
package com.catalog.catalogentrydatabean;

import com.ibm.commerce.beans.DataBeanManager;
import com.ibm.commerce.beans.SmartDataBeanImpl;
import com.ibm.commerce.catalog.objects.CatalogEntryAccessBean;

public class CatEntryDataBean extends SmartDataBeanImpl {

   private String catid;
   
   @Override
   public void populate() throws Exception {
      // TODO Auto-generated method stub
      
          CatalogEntryAccessBean entryAccessBean=new CatalogEntryAccessBean();
          entryAccessBean.setInitKey_catalogEntryReferenceNumber(getCatid());
       //entryAccessBean.setInitKey_catalogEntryReferenceNumber(catid.toString());
           entryAccessBean.refreshCopyHelper();
           entryAccessBean.getPartNumber();
          
   }

   public String getCatid() {
      return catid;
   }

   public void setCatid(String catid) {
      this.catid = catid;
   }
   
}



Tag:


Code:
<wcbase:useBean id="product" classname="com.ibm.commerce.catalog.beans.ProductDataBean" scope="request" />
<c:set var="type" value="product" />
<c:set var="catalogEntryID" value="${product.productID}" />
<c:out value="${catalogEntryID}"></c:out>


<wcbase:useBean id="catEntryBean" classname="com.catalog.catalogentrydatabean.CatEntryDataBean" scope="page" >
<c:set value="${catalogEntryID}" target="${catEntryBean}" property="catid" />
</wcbase:useBean>

<c:out value="${catEntryBean.PartNumber}"></c:out>





i am getting error
Code:
 The store has encountered a problem processing the last request. Try again later. If the problem persists, contact your site administrator.



please give me the solution for this.
_________________
Thanks....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Application Server » Accessing Smart databean using wcbase:usebean tag
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.