Nice writeup Joel and good to have for a quick reference.
Thomas, I know your question was about JSP functions, but I just
wanted to mention that for the actual example you mentioned, you
can probably get Stripes to do the work for you.
Something along the lines of:
<stripes:select multiple="multiple"
name="item.scoringCategories">
<stripes:options-collection
collection="${actionBean.someProperty}"
value="id" label="name"/>
</stripes:select>
If item.scoringCategories does not contain the values to render
as selected, you can also use the value= attribute of
<stripes:select>.
Cheers,
Freddy
On Sat, 02 Apr 2011 14:05 -0600, "Joel Weight"
<[email protected]> wrote:
The linked documentation is good. If you need more, I wrote a
blog entry about this subject just 2 weeks ago.
[1]http://digitaljoel.nerd-herders.com/2011/03/17/how-to-create-a
-custom-taglib-containing-an-el-function-for-jsp/
Joel
On Sat, Apr 2, 2011 at 12:41 PM, Janne Jalkanen
<[2][email protected]> wrote:
You can create EL functions:
[3]http://download.oracle.com/javaee/5/tutorial/doc/bnahq.html
#bnaiq
/Janne
On Apr 2, 2011, at 20:43 , Thomas Menke wrote:
> Hi @ll,
>
> in one of my JSP files I want to do somthing that looks like
this
> (simplified):
>
> <stripes:select multiple="multiple"
name="item.scoringCategories">
> <c:forEach items="${actionBean.someProperty}" var="p">
> <option value="${[4]p.id}" <c:if
>
test="actionBean.isSelected(p)">selected="selected</c:if>>${fn:es
capeXml([5]p.name)}</option>
> </c:forEach>
> </stripes:select>
>
> As you can see I am trying to call the isSelected method which
is as I
> know (and as far as error messages and google tell me) not
possible in
> EL. But how to deal with this then? I guess that it is not such
a seldom
> requirement to call methods in the way I am trying to, is it?
Do I
> really have to create my own tag library for anything like
that? Or is
> there something "better"?
>
> Thanks,
>
> Thomas
>
>
-----------------------------------------------------------------
-------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. [6]http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Stripes-users mailing list
> [7][email protected]
> [8]https://lists.sourceforge.net/lists/listinfo/stripes-users
-----------------------------------------------------------------
-------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. [9]http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Stripes-users mailing list
[10][email protected]
[11]https://lists.sourceforge.net/lists/listinfo/stripes-users
--------------------------------------------------------------------------
----
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users
References
1.
http://digitaljoel.nerd-herders.com/2011/03/17/how-to-create-a-custom-taglib-containing-an-el-function-for-jsp/
2. mailto:[email protected]
3. http://download.oracle.com/javaee/5/tutorial/doc/bnahq.html#bnaiq
4. http://p.id/
5. http://p.name/
6. http://p.sf.net/sfu/ms-webmatrix-sf
7. mailto:[email protected]
8. https://lists.sourceforge.net/lists/listinfo/stripes-users
9. http://p.sf.net/sfu/ms-webmatrix-sf
10. mailto:[email protected]
11. https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users