Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4045088
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:22:31+00:00 2026-05-20T13:22:31+00:00

i have the following action class: package com.pendulum.web; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest;

  • 0

i have the following action class:

package com.pendulum.web;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.pendulum.dao.DocumentoDAO;
import com.pendulum.domain.Documento;
import com.pendulum.domain.DocumentoPK;

public class DocumentoAction extends ActionSupport implements ModelDriven<Documento>{

    private static final long serialVersionUID = 8757127171831894323L;
    private Documento documento = new Documento();
    private List<Documento> documentList = new ArrayList<Documento>();
    private DocumentoDAO documentoDAO = new DocumentoDAO();
    private Documento currDocument = new Documento(); 
    private DocumentoPK documentoPK = new DocumentoPK();

    @Override
    public Documento getModel() {
        return documento;
    }

    public Documento getDocumento() {
        return documento;
    }

    public void setDocumento(Documento documento) {
        this.documento = documento;
    }

    public List<Documento> getDocumentList() {
        return documentList;
    }

    public void setDocumentList(List<Documento> documentList) {
        this.documentList = documentList;
    }

    public String listDocument()
    {
        HttpServletRequest request = (HttpServletRequest) ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);
        documentList = documentoDAO.listDocumentsByCreditId(request.getParameter("creditId"));
        if (documentList.size()>0) {
            currDocument = documentList.get(0);
            documentoPK = currDocument.getDocumentoPK();
        }

        System.err.println(documentList.size());
        System.err.println(currDocument.getDocumentoPK().getCreditoId());
        System.err.println(currDocument.getOrigenId());
        return SUCCESS;
    }

    public DocumentoDAO getDocumentoDAO() {
        return documentoDAO;
    }

    public void setDocumentoDAO(DocumentoDAO documentoDAO) {
        this.documentoDAO = documentoDAO;
    }

    public Documento getCurrDocument() {
        return currDocument;
    }

    public void setCurrDocument(Documento currDocument) {
        this.currDocument = currDocument;
    }

    public DocumentoPK getDocumentoPK() {
        return documentoPK;
    }

    public void setDocumentoPK(DocumentoPK documentoPK) {
        this.documentoPK = documentoPK;
    }


}

My problem is that in my view (.jsp) i can get the properties from currDocument, but i am unable to get the properties inside DocumentoPK.

DocumentoPK is a hibernate composite key declared on its own class, and instantiated on each Documento bean, however… in my jsp i have:

<table class="userTable" cellpadding="5px">
        <tr class="even">
            <td><s:property value="currDocument.origenId"/></td>
            <td><s:property value="documentoPK.creditId"/></td>
            <td><s:property value="currDocument.documentoPK.creditId"/></td>
            <td><s:property value="creditId"/></td>
        </tr>
</table>

but only the value on the first is rendered… and don’t know if im missing something obvious.
Any help greatly appreciated!
Jhurtado

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:22:32+00:00Added an answer on May 20, 2026 at 1:22 pm

    Since the getter on DocumentoPK is getCreditoId(), shouldn’t the OGNL property be named creditoId in:

    <td><s:property value="documentoPK.creditId"/></td>
    <td><s:property value="currDocument.documentoPK.creditId"/></td>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Stripes ActionBean: package myapp; import net.sourceforge.stripes.action.*; public class WelcomeActionBean extends
Hello I have the following proble: I have the action class of a view
I have the following action servlet and was wondering if I should create a
I have the following controller action and test. I'm new to testing with Shoulda
I have the following route defined routes.MapRoute( ItemName, {controller}/{action}/{projectName}/{name}, new { controller = Home,
I have the following Action Method: [HandleFtmsError] public ActionResult PerformanceChart(ChartViewModel chart) { var x
I have the following nested viewmodel class... public class CustomerModel { public string name;
quick symfony / propel question. I have the following propel collection route: api_offer: class:
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following string String str = replace :) :) with some other string;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.