<s:param name="politico"><s:property /></s:param>

should work.


2010/1/8 Chris Pratt <thechrispr...@gmail.com>:
> I'm not positive but you might try:
>
> <s:param name="politico" value="${this}"/>
>
>  (*Chris*)
>
> On Thu, Jan 7, 2010 at 4:09 PM, Sergio
> <killing-is-my-busin...@hotmail.com>wrote:
>
>> Sergio escribió:
>>
>>  Chris Pratt escribió:
>>>
>>>> You can refer to the DisplayTag documentation about what collections they
>>>> support, there are quite a few.  I usually use a java.util.List of
>>>> JavaBean's And yes, you'll have to use JDBC, JPA, Ibatis, Hibernate... to
>>>> get that data from the database into a structure that can be displayed.
>>>>
>>>> As for your other question, take a look at the last column in my example,
>>>> that's exactly what it does.
>>>>  (*Chris*)
>>>>
>>>> On Thu, Jan 7, 2010 at 1:05 AM, Sergio
>>>> <killing-is-my-busin...@hotmail.com>wrote:
>>>>
>>>>
>>>>
>>>>> but i don't understand the data structure to hold the users. When you
>>>>> get
>>>>> the ResultSet from mysql, how do you put it into the list? Without using
>>>>> hibernate or similar, i've tried with several collections, for example a
>>>>> <String >, Map <String><String>. The first string holds the name or user
>>>>> id,
>>>>> and the map holds attribute-value pair. No success, i think that is a
>>>>> bad
>>>>> solution.
>>>>>
>>>>> and another question: i need the user id be passed to another action as
>>>>> a
>>>>> parameter. I've tried with a s:form and a hidden field, something like
>>>>> <input type="hidden" value="<s:property>"> is the idea. It's about an
>>>>> online
>>>>> shop, and i'm having problems with:
>>>>>
>>>>> 1.- listing products from mysql
>>>>> 2.- adding products to the cart (from a mysql products list
>>>>>
>>>>> i'm a little newbie with struts.....
>>>>>
>>>>> regards
>>>>>
>>>>> --
>>>>> Sergio
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> wow, i think i got. I'll take a look.
>>>
>>> thank you very much
>>>
>>>  my point is that i have a property which is a String, and i need that
>> string in two ways: as a literal string and as a parameter to another
>> action. Using "s:property", something like this:
>>
>>    <table>
>>    <s:iterator value="#session.carrito">
>>        <tr>
>>            <td><s:property />
>>            </td>
>>            <td><s:url id="idResta" value="/Del.action">
>>                    <s:param name="politico" value="[0]"></s:param>
>>                </s:url>
>>                <sx:a accesskey="6" href="%{idResta}"
>> targets="secondaryContent" >Fuera</sx:a>
>>            </td>
>>        </tr>
>>    </s:iterator>
>>    </table>
>>
>> sessio.carrito is a String ArrayList and iterator works. Each of that
>> string must be passed to another action, say Action2, like a form with a
>> hidden field. During Action2 (which delete "politico" from session.carrito)
>> there's a *java.lang.ArrayIndexOutOfBoundsException: -1*
>>
>> I thought that "[0]" helds the actual value, same as "<s:property />". Into
>> "param" tag i've tried also with value="{ #this }" but i got that java
>> exception.
>>
>> Something like:
>>
>> <s:param name="politico" value="<s:property />"></s:param>
>>
>> is my literal desire :)
>>
>> My struts action has private String politico and getters y setters. I'm not
>> really sure if  "politco" is viewed by Action2.
>>
>>
>> regards
>> **
>>
>> --
>> Sergio
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to