form with an embedded id

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

form with an embedded id

Joaquin Valdez-2
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Rick Grashel
Hi Joaquin,

If the ID of the user (being edited?) is already known, you can just use a regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:

<input type="hidden" name="user" value="${actionBean.user.id}"/>

This presumes that you have a type converter you are using which will load the user object when the parameters.  My experience with <s:input> tags has been varied.  Sometimes it seems to work and in other situations it does not behave as expected.  So in situations like the one you described, I will generally stick with a regular <input> tag.

-- Rick

On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Joaquin Valdez-2
Thanks Rick!

The model class I am using doesn’t contain a field called ID as the key.  I wish it did.

Here is a snippet from the model :


@Entity
public class FreeShippings implements Serializable {

    private static final long serialVersionUID = 1L;
  
   @EmbeddedId
    protected FreeShippingsPK freeShippingsPK;
    ……
}
 

Where FreeShippingsPK is defined as:

@Embeddable
public class FreeShippingsPK implements Serializable {

    @Basic(optional = false)
    @NotNull
    @Column(name = "StartDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date startDate;

    @Basic(optional = false)
    @NotNull
    @Column(name = "EndDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDate;

   // getters and setters...
}

How would I reference this type of Primary key in the hiddent INPUT tag?

Thanks!

Joaquin Valdez
[hidden email]

On Apr 16, 2016, at 11:55 AM, Rick Grashel <[hidden email]> wrote:

Hi Joaquin,

If the ID of the user (being edited?) is already known, you can just use a regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:

<input type="hidden" name="user" value="${actionBean.user.id}"/>

This presumes that you have a type converter you are using which will load the user object when the parameters.  My experience with <s:input> tags has been varied.  Sometimes it seems to work and in other situations it does not behave as expected.  So in situations like the one you described, I will generally stick with a regular <input> tag.

-- Rick

On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Rick Grashel
Joaquin,

Is this a PK for a domain object?  The domain object is called "FreeShippings"?  If so, add the following two methods like the following to your PK class.  (I have put brute force code here.  You should probably do error-checking) :

public String getCombinedId() {
   return this.startDate.getTime() + "|" + this.endDate.getTime();
}

// This presumes a delimiter of pipe
public String setCombinedId( String combinedId ) {
   String[] dates = combinedId.split( "|" );
   this.startDate = new Date( Long.parseLong( dates[ 0 ] ) );
   this.endDate = new Date( Long.parseLong( dates[ 1 ] ) );
}

Then, in your form, you do this:

<input type="hidden" name="freeShippingsPK" value=${actionBean.freeShippingsPK.combinedId}"/>

If you want, you can also use a TypeConverter to do domain object loading and manipulation.

When I am dealing with composite primary keys, I almost always have a pseudo single-field setter/getter for convenience and Type conversion.

-- Rick


On Sat, Apr 16, 2016 at 1:16 PM, Joaquin Valdez <[hidden email]> wrote:
Thanks Rick!

The model class I am using doesn’t contain a field called ID as the key.  I wish it did.

Here is a snippet from the model :


@Entity
public class FreeShippings implements Serializable {

    private static final long serialVersionUID = 1L;
  
   @EmbeddedId
    protected FreeShippingsPK freeShippingsPK;
    ……
}
 

Where FreeShippingsPK is defined as:

@Embeddable
public class FreeShippingsPK implements Serializable {

    @Basic(optional = false)
    @NotNull
    @Column(name = "StartDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date startDate;

    @Basic(optional = false)
    @NotNull
    @Column(name = "EndDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDate;

   // getters and setters...
}

How would I reference this type of Primary key in the hiddent INPUT tag?

Thanks!

Joaquin Valdez
[hidden email]

On Apr 16, 2016, at 11:55 AM, Rick Grashel <[hidden email]> wrote:

Hi Joaquin,

If the ID of the user (being edited?) is already known, you can just use a regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:

<input type="hidden" name="user" value="${actionBean.user.id}"/>

This presumes that you have a type converter you are using which will load the user object when the parameters.  My experience with <s:input> tags has been varied.  Sometimes it seems to work and in other situations it does not behave as expected.  So in situations like the one you described, I will generally stick with a regular <input> tag.

-- Rick

On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Joaquin Valdez-2
Thanks! I will try that.  I had thought of doing just that, but wanted to see if there was another way.  

Joaquin

On Apr 16, 2016, at 12:37 PM, Rick Grashel <[hidden email]> wrote:

Joaquin,

Is this a PK for a domain object?  The domain object is called "FreeShippings"?  If so, add the following two methods like the following to your PK class.  (I have put brute force code here.  You should probably do error-checking) :

public String getCombinedId() {
   return this.startDate.getTime() + "|" + this.endDate.getTime();
}

// This presumes a delimiter of pipe
public String setCombinedId( String combinedId ) {
   String[] dates = combinedId.split( "|" );
   this.startDate = new Date( Long.parseLong( dates[ 0 ] ) );
   this.endDate = new Date( Long.parseLong( dates[ 1 ] ) );
}

Then, in your form, you do this:

<input type="hidden" name="freeShippingsPK" value=${actionBean.freeShippingsPK.combinedId}"/>

If you want, you can also use a TypeConverter to do domain object loading and manipulation.

When I am dealing with composite primary keys, I almost always have a pseudo single-field setter/getter for convenience and Type conversion.

-- Rick


On Sat, Apr 16, 2016 at 1:16 PM, Joaquin Valdez <[hidden email]> wrote:
Thanks Rick!

The model class I am using doesn’t contain a field called ID as the key.  I wish it did.

Here is a snippet from the model :


@Entity
public class FreeShippings implements Serializable {

    private static final long serialVersionUID = 1L;
  
   @EmbeddedId
    protected FreeShippingsPK freeShippingsPK;
    ……
}
 

Where FreeShippingsPK is defined as:

@Embeddable
public class FreeShippingsPK implements Serializable {

    @Basic(optional = false)
    @NotNull
    @Column(name = "StartDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date startDate;

    @Basic(optional = false)
    @NotNull
    @Column(name = "EndDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDate;

   // getters and setters...
}

How would I reference this type of Primary key in the hiddent INPUT tag?

Thanks!

Joaquin Valdez
[hidden email]

On Apr 16, 2016, at 11:55 AM, Rick Grashel <[hidden email]> wrote:

Hi Joaquin,

If the ID of the user (being edited?) is already known, you can just use a regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:

<input type="hidden" name="user" value="${actionBean.user.id}"/>

This presumes that you have a type converter you are using which will load the user object when the parameters.  My experience with <s:input> tags has been varied.  Sometimes it seems to work and in other situations it does not behave as expected.  So in situations like the one you described, I will generally stick with a regular <input> tag.

-- Rick

On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Stan Broné
In reply to this post by Rick Grashel
I am not super active in Stripes development right now, but wouldn't  
creating a typeconverter that can convert a String into a  
FreeShippingsPK, and a Formatter that does the reverse work just as  
well?

Or am I simplifying too much?


Citeren Rick Grashel <[hidden email]>:

> Joaquin,
>
> Is this a PK for a domain object?  The domain object is called
> "FreeShippings"?  If so, add the following two methods like the following
> to your PK class.  (I have put brute force code here.  You should probably
> do error-checking) :
>
> public String getCombinedId() {
>    return this.startDate.getTime() + "|" + this.endDate.getTime();
> }
>
> // This presumes a delimiter of pipe
> public String setCombinedId( String combinedId ) {
>    String[] dates = combinedId.split( "|" );
>    this.startDate = new Date( Long.parseLong( dates[ 0 ] ) );
>    this.endDate = new Date( Long.parseLong( dates[ 1 ] ) );
> }
>
> Then, in your form, you do this:
>
> <input type="hidden" name="freeShippingsPK"
> value=${actionBean.freeShippingsPK.combinedId}"/>
>
> If you want, you can also use a TypeConverter to do domain object loading
> and manipulation.
>
> When I am dealing with composite primary keys, I almost always have a
> pseudo single-field setter/getter for convenience and Type conversion.
>
> -- Rick
>
>
> On Sat, Apr 16, 2016 at 1:16 PM, Joaquin Valdez <[hidden email]>
> wrote:
>
>> Thanks Rick!
>>
>> The model class I am using doesn?t contain a field called ID as the key.
>> I wish it did.
>>
>> Here is a snippet from the model :
>>
>>
>> @Entity
>> public class FreeShippings implements Serializable {
>>
>>     private static final long serialVersionUID = 1L;
>>
>> *   @EmbeddedId*
>> *    protected FreeShippingsPK freeShippingsPK;*
>>     ??
>> }
>>
>>
>> Where FreeShippingsPK is defined as:
>>
>> @Embeddable
>> public class FreeShippingsPK implements Serializable {
>>
>>     @Basic(optional = false)
>>     @NotNull
>>     @Column(name = "StartDate")
>>     @Temporal(TemporalType.TIMESTAMP)
>>     private Date startDate;
>>
>>     @Basic(optional = false)
>>     @NotNull
>>     @Column(name = "EndDate")
>>     @Temporal(TemporalType.TIMESTAMP)
>>     private Date endDate;
>>
>>    // getters and setters...
>> }
>>
>> How would I reference this type of Primary key in the hiddent INPUT tag?
>>
>> Thanks!
>>
>> Joaquin Valdez
>> [hidden email]
>>
>> On Apr 16, 2016, at 11:55 AM, Rick Grashel <[hidden email]> wrote:
>>
>> Hi Joaquin,
>>
>> If the ID of the user (being edited?) is already known, you can just use a
>> regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:
>>
>> <input type="hidden" name="user" value="${actionBean.user.id
>> <http://actionbean.user.id/>}"/>
>>
>> This presumes that you have a type converter you are using which will load
>> the user object when the parameters.  My experience with <s:input> tags has
>> been varied.  Sometimes it seems to work and in other situations it does
>> not behave as expected.  So in situations like the one you described, I
>> will generally stick with a regular <input> tag.
>>
>> -- Rick
>>
>> On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]
>> > wrote:
>>
>>> Hello!
>>>
>>> I am trying to build a form for a table containing records that has an
>>> embedded Primary Key.  How is that done?  Typically I just do this in the
>>> form tag:
>>>
>>> <s:form beanclass=??.?>
>>> <s:hidden name=?user?/>
>>> ?.
>>> </s:form>
>>>
>>> Currently I have it set up as I mentioned and when I try to retrieve the
>>> user record, it comes back NULL.
>>>
>>> Thanks!
>>> Joaquin Valdez
>>> [hidden email]
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Find and fix application performance issues faster with Applications
>>> Manager
>>> Applications Manager provides deep performance insights into multiple
>>> tiers of
>>> your business applications. It resolves application problems quickly and
>>> reduces your MTTR. Get your free trial!
>>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>>> _______________________________________________
>>> Stripes-users mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>>
>>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>> Manager
>> Applications Manager provides deep performance insights into multiple
>> tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>>
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>> Manager
>> Applications Manager provides deep performance insights into multiple
>> tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Stripes-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/stripes-users
>>
>>
>


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: form with an embedded id

Joaquin Valdez-2
In reply to this post by Rick Grashel
Thanks Rick.  Once I escaped the “|” all worked just fine.  Thanks for the idea and help.

   String[] dates = combinedId.split( “<a href="smb://|" class="">\\|" );

Joaquin Valdez
[hidden email]

On Apr 16, 2016, at 12:37 PM, Rick Grashel <[hidden email]> wrote:

Joaquin,

Is this a PK for a domain object?  The domain object is called "FreeShippings"?  If so, add the following two methods like the following to your PK class.  (I have put brute force code here.  You should probably do error-checking) :

public String getCombinedId() {
   return this.startDate.getTime() + "|" + this.endDate.getTime();
}

// This presumes a delimiter of pipe
public String setCombinedId( String combinedId ) {
   String[] dates = combinedId.split( "|" );
   this.startDate = new Date( Long.parseLong( dates[ 0 ] ) );
   this.endDate = new Date( Long.parseLong( dates[ 1 ] ) );
}

Then, in your form, you do this:

<input type="hidden" name="freeShippingsPK" value=${actionBean.freeShippingsPK.combinedId}"/>

If you want, you can also use a TypeConverter to do domain object loading and manipulation.

When I am dealing with composite primary keys, I almost always have a pseudo single-field setter/getter for convenience and Type conversion.

-- Rick


On Sat, Apr 16, 2016 at 1:16 PM, Joaquin Valdez <[hidden email]> wrote:
Thanks Rick!

The model class I am using doesn’t contain a field called ID as the key.  I wish it did.

Here is a snippet from the model :


@Entity
public class FreeShippings implements Serializable {

    private static final long serialVersionUID = 1L;
  
   @EmbeddedId
    protected FreeShippingsPK freeShippingsPK;
    ……
}
 

Where FreeShippingsPK is defined as:

@Embeddable
public class FreeShippingsPK implements Serializable {

    @Basic(optional = false)
    @NotNull
    @Column(name = "StartDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date startDate;

    @Basic(optional = false)
    @NotNull
    @Column(name = "EndDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDate;

   // getters and setters...
}

How would I reference this type of Primary key in the hiddent INPUT tag?

Thanks!

Joaquin Valdez
[hidden email]

On Apr 16, 2016, at 11:55 AM, Rick Grashel <[hidden email]> wrote:

Hi Joaquin,

If the ID of the user (being edited?) is already known, you can just use a regular <INPUT> tag.  No need to use a <s:hidden> tag.  So like this:

<input type="hidden" name="user" value="${actionBean.user.id}"/>

This presumes that you have a type converter you are using which will load the user object when the parameters.  My experience with <s:input> tags has been varied.  Sometimes it seems to work and in other situations it does not behave as expected.  So in situations like the one you described, I will generally stick with a regular <input> tag.

-- Rick

On Sat, Apr 16, 2016 at 12:49 PM, Joaquin Valdez <[hidden email]> wrote:
Hello!

I am trying to build a form for a table containing records that has an embedded Primary Key.  How is that done?  Typically I just do this in the form tag:

<s:form beanclass=“….”>
<s:hidden name=“user”/>
….
</s:form>

Currently I have it set up as I mentioned and when I try to retrieve the user record, it comes back NULL.

Thanks!
Joaquin Valdez


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Stripes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users