You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Oscar <os...@gmail.com> on 2010/04/19 19:00:23 UTC

OGNL to define readonly of form fields

Hi to all, i have a doubt. I want to define via ognl if fields are normal or
read only. To do that i do this:

1. In my action i set a request parameter named readonlyFields in this way:

requestMap.put("readonlyFields", "true");

And in my jsp i have this (inside form):

<s:select name="codprv" id="codprv" readonly="%{#request.readonlyFields}"
                      list="#request.lstProveedores"
                      listKey="codprv"
                      listValue="nombre" cssStyle="width:100%;" />
<s:select name="numtda" id="numtda" readonly="#request.readonlyFields"
                      list="#request.lstTiendas"
                      listKey="idtda"
                      listValue="descripcion" cssStyle="width:100%;" />

But none of the 2 ways work, only prints the select like this:

<select readonly="%{#request.readonlyFields}" style="width: 100%;"
id="codprv" name="codprv">
    <option value="190">SOMETHING</option>
    ...
</select>

<select readonly="#request.readonlyFields" style="width: 100%;" id="numtda"
name="numtda">
    <option value="190">SOMETHING</option>
    ...
</select>

Is not possible to define that via OGNL?

Regards.

---------- Forwarded message ----------
From: Griffith, Michael * <Mi...@fda.hhs.gov>
Date: 2010/4/19
Subject: RE: Struts2 on Websphere portal 6.1.0.0
To: Struts Users Mailing List <us...@struts.apache.org>


The problem is the URI parameter in your display tag table. This is how
DT invokes the action/HTTP request that originally got the request for
the table in the table. It should be something like:
requestURI="search.action" where the value is the action of the page.

MG

-----Original Message-----
From: Prabahar [mailto:Prabahar.Duraisamy@lntinfotech.com]
Sent: Monday, April 19, 2010 3:17 AM
To: user@struts.apache.org
Subject: Re: Struts2 on Websphere portal 6.1.0.0


I am facing an issue with Struts 2 portlet which uses Display Tag. I
have implemented a code to display a list using Display Table and also
implemented Sorting option. It is working fine with IBM WAS 7.0 and the
same code is not working with IBM Portal Server 6.1

It is displaying the data, but when i click on the pagination link
(First, Last, Next..) and the column header (to sort) then i am getting
page can not be found.

I have even mentioned page cotext, but still i am facing this issue. I
have also added the display tag portlet support jar
(displaytag-portlet-1.2.jar) along with displaytag-1.2.jar and its
supporting jars.

<display:table name="searchResultList" id="user" sort="list"
defaultsort="2"
pagesize="2" requestURI="">
               <display:column sortable="true"
property="name"></display:column>
               <display:column property="address"></display:column>
       </display:table>

I have a doubt in the requestURI parameter... what exactly i should give
to that parameter. I have also used requestURIContext as well, but no
improvement.



Nils-Helge Garli wrote:
>
> Thanks for the summary, although I disagree with your conclusion ;)
>
> Nils-H
>
> On Fri, Aug 1, 2008 at 2:21 AM, Struts Two <st...@yahoo.ca> wrote:
>> I am running Struts2.0.11.1 on Websphere 6.1.0.17 NOT THE WEBSPHERE
>> PORTAL. You need to keep the followings in mind:
>> 1- You need to have at least fixpack 13 or 15 ( I am not sure which
>> one, otherwise you CAN NOT RUN STRUTS 2 ON WAS)
>> 2- Struts 2.0.11.2 has problems running on Websphere 6.1 (it is
>> missing a patch), so you need to downgrade to 2.0.11.1 till next
>> release (2.0.11.3 or 2.0.12)
>> 3- Once the above you are done with above steps, you need to set the
>> following custom property for WAS server:
>> com.ibm.ws.webcontainer.invokefilterscompatibility   =  true
>> If you do not set the above property, you can not run struts 2 on WAS

>> as well.
>> However; I did a project using struts on Websphere portal 6.0. IBM
>> provides its own customized struts that works with portal (which is
>> based on struts1), and it is pretty good. I recommend use the IBM's
>> struts that comes with Portal server as you would have a hard time
>> using struts 2 with websphere portal.
>> Hope this helps,
>>
>>
>>
>> ----- Original Message ----
>> From: Dinesh Narayanan <nd...@gmail.com>
>> To: user@struts.apache.org
>> Sent: Thursday, July 31, 2008 3:26:20 PM
>> Subject: Struts2 on Websphere portal 6.1.0.0
>>
>> Has Anybody tried Struts2 (Struts-2.0.11.2) on Websphere portal
6.1.0..0?
>> I
>> am running into issues when I tried  a very simple JSR168 example.
>> Any help would be appreciated. Is there some example of struts2
>> sample in websphere portal 6.1?
>>
>> A) My portlet.xml contains the following entries <init-param>
>>             <name>viewNamespace</name>
>>             <value>/view</value>
>>         </init-param>
>>
>>   <!-- The default action to invoke in view mode. -->
>>   <init-param>
>>             <name>defaultViewAction</name>
>>             <value>index</value>
>>   </init-param>
>>
>>
>> B) My struts.xml is
>> <struts>
>> <package name="view" extends="struts-portlet-default"
namespace="/view">
>>     <action name="index" class="com.myCompany.proj1.ExampleAction">
>>         <result name="success">/WEB-INF/view/index.jsp</result>
>>     </action>
>> </package>
>> </struts>
>>
>>
>> Thanks
>> Dinesh
>>
>>
>>
>>
>> __________________________________________________________________
>> Be smarter than spam. See how smart SpamGuard is at giving junk email

>> the boot with the All-new Yahoo! Mail.  Click on Options in Mail and
>> switch to New Mail today or register for free at http://mail.yahoo.ca
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>

--
View this message in context:
http://old.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-tp18761735p282
87622.html<http://old.nabble.com/Struts2-on-Websphere-portal-6.1.0.0-tp18761735p282%0A87622.html>
Sent from the Struts - User mailing list archive at Nabble.com.


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


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




-- 
Oscar Calderon
SCJP 6
http://www.javahowto.net/