alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (example.vm)

This example Struts source code file (example.vm) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

back, characters, donald, he-man, mickey, north, north, please, please, select, select, title, title, toby

The Struts example.vm source code

<html>
<head>
    <title>UI Tags Example
    #shead()
    #sxhead()
</head>

<body>

#surl ("id=url" "value=index.jsp")
<a href="${url}">Back to index.jsp!


#sform ("action=exampleSubmitVelocity" "method=post" "enctype=multipart/form-data")
    #stextfield ("label=Name" "name=name")
    #sxdatetimepicker ("label=Birthday" "name=birthday")
    #sxdatetimepicker ("label=Wake up time" "name=wakeup" "type=time")
    #stextarea ("label=Biography" "name=bio" "cols=20" "rows=3")
    #sselect ("label=Favourite Color" "list={'Red', 'Blue', 'Green'}" "name=favouriteColor" "emptyOption=true" "headerKey=None" "headerValue=None")
    #sselect ("label=Favourite Language" "list=favouriteLanguages" "name=favouriteLanguage" "listKey=key" "listValue=description" "emptyOption=true" "headerKey=None" "headerValue=None")
    #scheckboxlist ("label=Friends" "list={'Patrick', 'Jason', 'Jay', 'Toby', 'Rene'}" "name=friends")
    #scheckbox ("label=Age 18+" "name=legalAge")
    #sdoubleselect ("label=State" "name=region" "list={'North', 'South'}" "value='North'" "doubleValue='Florida'" "doubleList=top == 'North' ? {'Oregon', 'Washington'} : {'Texas', 'Florida'}" "doubleName=state" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
    #sdoubleselect ("label=Favourite Vehical" "name=favouriteVehicalType" "list=vehicalTypeList" "listKey=key" "listValue=description" "value='MotorcycleKey'" "doubleValue='YamahaKey'" "doubleList=vehicalSpecificList" "doubleListKey=key" "doubleListValue=description" "doubleName=favouriteVehicalSpecific" "headerKey=-1" "headerValue=---------- Please Select ----------" "emptyOption=true" )
    #sfile ("label=Picture" "name=picture")
    #soptiontransferselect ("label=Favourite Cartoons Characters" "name=leftSideCartoonCharacters" "leftTitle=Left Title" "rightTitle=Right Title" "list={'Popeye', 'He-Man', 'Spiderman'}" "multiple=true" "headerKey=headerKey" "headerValue=--- Please Select ---" "emptyOption=true" "doubleList={'Superman', 'Mickey Mouse', 'Donald Duck'}" "doubleName=rightSideCartoonCharacters" "doubleHeaderKey=doubleHeaderKey" "doubleHeaderValue=--- Please Select ---" "doubleEmptyOption=true" "doubleMultiple=true" )
    #ssubmit()
    #sreset()
#end

#sa("href=${url}")Back to index.jsp#end

</body>
</html>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts example.vm source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.