svnno****@sourc*****
svnno****@sourc*****
2007年 7月 16日 (月) 08:30:38 JST
Revision: 266 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=266 Author: shinsuke Date: 2007-07-16 08:30:37 +0900 (Mon, 16 Jul 2007) Log Message: ----------- initial code(currently, depends on teeda..). Added Paths: ----------- libraries/jsf4portlet/trunk/.classpath libraries/jsf4portlet/trunk/.project libraries/jsf4portlet/trunk/.settings/ libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.core.prefs libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.ui.prefs libraries/jsf4portlet/trunk/pom.xml libraries/jsf4portlet/trunk/src/ libraries/jsf4portlet/trunk/src/main/ libraries/jsf4portlet/trunk/src/main/java/ libraries/jsf4portlet/trunk/src/main/java/jp/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/JsfConstants.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlFileUploadRenderer.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUpload.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUploadTag.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFile.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileConverter.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultFileImpl.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultImplBase.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultMemoryImpl.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ExtensionsPortletFilter.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartPortletRequestWrapper.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequest.java libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequestWrapper.java libraries/jsf4portlet/trunk/src/main/resources/ libraries/jsf4portlet/trunk/src/main/resources/META-INF/ libraries/jsf4portlet/trunk/src/main/resources/META-INF/faces-config.xml libraries/jsf4portlet/trunk/src/main/resources/META-INF/jsf4portlet.tld -------------- next part -------------- Added: libraries/jsf4portlet/trunk/.classpath =================================================================== --- libraries/jsf4portlet/trunk/.classpath 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/.classpath 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,24 @@ +<classpath> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="src" path="src/main/resources"/> + <classpathentry kind="output" path="target/classes"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar" sourcepath="M2_REPO/junit/junit/3.8.1/junit-3.8.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/seasar/teeda/teeda-ajax/1.0.8-RC1/teeda-ajax-1.0.8-RC1.jar" sourcepath="M2_REPO/org/seasar/teeda/teeda-ajax/1.0.8-RC1/teeda-ajax-1.0.8-RC1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/seasar/teeda/teeda-extension/1.0.8-RC1/teeda-extension-1.0.8-RC1.jar" sourcepath="M2_REPO/org/seasar/teeda/teeda-extension/1.0.8-RC1/teeda-extension-1.0.8-RC1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.3/servlet-api-2.3-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/portlet-api/portlet-api/1.0/portlet-api-1.0.jar"/> + <classpathentry kind="var" path="M2_REPO/poi/poi/2.5.1-final-20040804/poi-2.5.1-final-20040804.jar"/> + <classpathentry kind="var" path="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2.jar" sourcepath="M2_REPO/javax/servlet/jstl/1.1.2/jstl-1.1.2-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/portals/bridges/portals-bridges-portletfilter/1.0.3/portals-bridges-portletfilter-1.0.3.jar"/> + <classpathentry kind="var" path="M2_REPO/org/seasar/container/s2-framework/2.4.13/s2-framework-2.4.13.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.1.1/commons-fileupload-1.1.1.jar"/> + <classpathentry kind="var" path="M2_REPO/org/seasar/container/s2-extension/2.4.13/s2-extension-2.4.13.jar"/> + <classpathentry kind="var" path="M2_REPO/ognl/ognl/2.6.7/ognl-2.6.7.jar"/> + <classpathentry kind="var" path="M2_REPO/org/seasar/teeda/teeda-core/1.0.8-RC1/teeda-core-1.0.8-RC1.jar" sourcepath="M2_REPO/org/seasar/teeda/teeda-core/1.0.8-RC1/teeda-core-1.0.8-RC1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar" sourcepath="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.1/commons-io-1.1-sources.jar"/> + <classpathentry kind="var" path="M2_REPO/jboss/javassist/3.4.ga/javassist-3.4.ga.jar"/> +</classpath> \ No newline at end of file Property changes on: libraries/jsf4portlet/trunk/.classpath ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/.project =================================================================== --- libraries/jsf4portlet/trunk/.project 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/.project 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,14 @@ +<projectDescription> + <name>jsf4portlet</name> + <comment/> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments/> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> \ No newline at end of file Property changes on: libraries/jsf4portlet/trunk/.project ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.core.prefs =================================================================== --- libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.core.prefs 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.core.prefs 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,256 @@ +#Sun Jul 15 21:42:28 JST 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true Added: libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/.settings/org.eclipse.jdt.ui.prefs 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,4 @@ +#Sun Jul 15 21:42:28 JST 2007 +eclipse.preferences.version=1 +formatter_profile=_PAL +formatter_settings_version=11 Added: libraries/jsf4portlet/trunk/pom.xml =================================================================== --- libraries/jsf4portlet/trunk/pom.xml 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/pom.xml 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>jp.sf.pal</groupId> + <artifactId>jsf4portlet</artifactId> + <packaging>jar</packaging> + <version>0.1-SNAPSHOT</version> + <name>jsf4portlet</name> + <dependencies> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>portlet-api</groupId> + <artifactId>portlet-api</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.portals.bridges</groupId> + <artifactId>portals-bridges-portletfilter</artifactId> + <version>1.0.3</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.seasar.teeda</groupId> + <artifactId>teeda-core</artifactId> + <version>1.0.8-RC1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.seasar.teeda</groupId> + <artifactId>teeda-extension</artifactId> + <version>1.0.8-RC1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>commons-fileupload</groupId> + <artifactId>commons-fileupload</artifactId> + <version>1.1.1</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>1.1</version> + </dependency> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.0.4</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> Property changes on: libraries/jsf4portlet/trunk/pom.xml ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/JsfConstants.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/JsfConstants.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/JsfConstants.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,9 @@ +package jp.sf.pal.jsf; + +public interface JsfConstants extends org.seasar.teeda.core.JsfConstants { + // -- attribute -- + String STORAGE_ATTR = "storage"; + + String FILE_ATTR = "file"; + +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/JsfConstants.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlFileUploadRenderer.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlFileUploadRenderer.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlFileUploadRenderer.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,164 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import java.io.IOException; +import java.util.Map; + +import javax.faces.component.UIComponent; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.faces.context.ResponseWriter; +import javax.faces.convert.ConverterException; +import javax.faces.internal.IgnoreAttribute; +import javax.servlet.ServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +import jp.sf.pal.jsf.JsfConstants; +import jp.sf.pal.jsf.multipart.MultipartRequestWrapper; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.seasar.teeda.core.render.AbstractInputRenderer; +import org.seasar.teeda.core.util.RendererUtil; +import org.seasar.teeda.core.util.ValueHolderUtil; + +public class HtmlFileUploadRenderer extends AbstractInputRenderer { + private static final Log log = LogFactory + .getLog(HtmlFileUploadRenderer.class); + + private final IgnoreAttribute ignoreComponent = new IgnoreAttribute(); + { + ignoreComponent.addAttributeName(JsfConstants.ID_ATTR); + ignoreComponent.addAttributeName(JsfConstants.NAME_ATTR); + ignoreComponent.addAttributeName(JsfConstants.TYPE_ATTR); + ignoreComponent.addAttributeName(JsfConstants.VALUE_ATTR); + ignoreComponent.addAttributeName(JsfConstants.STYLE_CLASS_ATTR); + } + + public void encodeEnd(FacesContext context, UIComponent component) + throws IOException { + assertNotNull(context, component); + if (!component.isRendered()) { + return; + } + encodeHtmlInputFileUploadEnd(context, (HtmlInputFileUpload) component); + } + + protected void encodeHtmlInputFileUploadEnd(FacesContext context, + HtmlInputFileUpload htmlInputFileUpload) throws IOException { + ResponseWriter writer = context.getResponseWriter(); + writer.startElement(JsfConstants.INPUT_ELEM, htmlInputFileUpload); + RendererUtil.renderAttribute(writer, JsfConstants.TYPE_ATTR, + JsfConstants.FILE_ATTR); + RendererUtil.renderIdAttributeIfNecessary(writer, htmlInputFileUpload, + getIdForRender(context, htmlInputFileUpload)); + RendererUtil.renderAttribute(writer, JsfConstants.NAME_ATTR, + htmlInputFileUpload.getClientId(context)); + UploadedFile value = (UploadedFile) ValueHolderUtil + .getValue(htmlInputFileUpload); + if (value != null) { + if (value.getName() != null) { + writer.writeAttribute(JsfConstants.VALUE_ATTR, value.getName(), + null); + } + } + RendererUtil.renderAttribute(writer, JsfConstants.AUTOCOMPLETE_ATTR, + htmlInputFileUpload.getAutocomplete()); + renderStyleClass(context, htmlInputFileUpload, writer); + renderRemainAttributes(htmlInputFileUpload, writer, ignoreComponent); + writer.endElement(JsfConstants.INPUT_ELEM); + } + + protected void renderStyleClass(FacesContext context, + HtmlInputFileUpload htmlInputFileUpload, ResponseWriter writer) + throws IOException { + final String styleClass = htmlInputFileUpload.getStyleClass(); + RendererUtil.renderAttribute(writer, JsfConstants.STYLE_CLASS_ATTR, + styleClass); + } + + public void decode(FacesContext facesContext, UIComponent uiComponent) { + super.decode(facesContext, uiComponent); //check for NP + + Object request = facesContext.getExternalContext().getRequest(); + if (!(request instanceof ServletRequest)) { + ExternalContext externalContext = facesContext.getExternalContext(); + Map fileItems = (Map) externalContext.getRequestMap().get( + MultipartRequestWrapper.UPLOADED_FILES_ATTRIBUTE); + FileItem fileItem = null; + if (fileItems != null) { + String paramName = uiComponent.getClientId(facesContext); + fileItem = (FileItem) fileItems.get(paramName); + } + if (fileItem != null) { + try { + UploadedFile upFile; + String implementation = ((HtmlInputFileUpload) uiComponent) + .getStorage(); + if (implementation == null + || ("memory").equals(implementation)) + upFile = new UploadedFileDefaultMemoryImpl(fileItem); + else + upFile = new UploadedFileDefaultFileImpl(fileItem); + ((HtmlInputFileUpload) uiComponent) + .setSubmittedValue(upFile); + ((HtmlInputFileUpload) uiComponent).setValid(true); + } catch (IOException ioe) { + log.error(ioe); + } + } + return; + } + if (facesContext.getExternalContext().getRequest() instanceof ServletRequest) { + ServletRequest multipartRequest = (ServletRequest) facesContext + .getExternalContext().getRequest(); + while (multipartRequest != null + && !(multipartRequest instanceof MultipartRequestWrapper)) { + if (multipartRequest instanceof HttpServletRequestWrapper) { + multipartRequest = ((HttpServletRequestWrapper) multipartRequest) + .getRequest(); + } else { + multipartRequest = null; + } + } + + if (multipartRequest != null) { + MultipartRequestWrapper mpReq = (MultipartRequestWrapper) multipartRequest; + + String paramName = uiComponent.getClientId(facesContext); + FileItem fileItem = mpReq.getFileItem(paramName); + if (fileItem != null) { + try { + UploadedFile upFile; + String implementation = ((HtmlInputFileUpload) uiComponent) + .getStorage(); + if (implementation == null + || ("memory").equals(implementation)) + upFile = new UploadedFileDefaultMemoryImpl(fileItem); + else + upFile = new UploadedFileDefaultFileImpl(fileItem); + ((HtmlInputFileUpload) uiComponent) + .setSubmittedValue(upFile); + ((HtmlInputFileUpload) uiComponent).setValid(true); + } catch (IOException ioe) { + log.error(ioe); + } + } + } + } + } + + public Object getConvertedValue(FacesContext context, + UIComponent component, Object submittedValue) + throws ConverterException { + if (submittedValue instanceof UploadedFile) { + UploadedFile file = (UploadedFile) submittedValue; + + if (file.getName() != null && file.getName().length() > 0) { + return file; + } + } + + return null; + } +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlFileUploadRenderer.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUpload.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUpload.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUpload.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,74 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import javax.faces.component.ComponentUtil_; +import javax.faces.component.html.HtmlInputText; +import javax.faces.context.FacesContext; + +import jp.sf.pal.jsf.JsfConstants; + +public class HtmlInputFileUpload extends HtmlInputText { + public static final String COMPONENT_TYPE = "jp.sf.pal.jsf.HtmlInputFileUpload"; + + public static final String DEFAULT_RENDERER_TYPE = "jp.sf.pal.jsf.FileUpload"; + + public static final String SIZE_LIMIT_MESSAGE_ID = "jp.sf.pal.jsf.FileUpload.SIZE_LIMIT"; + + private String _accept = null; + + private String _storage = null; + + public HtmlInputFileUpload() { + setRendererType(DEFAULT_RENDERER_TYPE); + } + + public void setUploadedFile(UploadedFile upFile) { + setValue(upFile); + } + + public UploadedFile getUploadedFile() { + return (UploadedFile) getValue(); + } + + public String getStorage() { + if (_storage != null) { + return _storage; + } + return ComponentUtil_.getValueBindingValueAsString(this, + JsfConstants.STORAGE_ATTR); + } + + public void setStorage(String string) { + _storage = string; + } + + public void setAccept(String accept) { + _accept = accept; + } + + public String getAccept() { + if (_accept != null) { + return _accept; + } + return ComponentUtil_.getValueBindingValueAsString(this, + JsfConstants.ACCEPT_ATTR); + } + + public boolean isRendered() { + return super.isRendered(); + } + + public Object saveState(FacesContext context) { + Object values[] = new Object[5]; + values[0] = super.saveState(context); + values[1] = _accept; + values[2] = _storage; + return ((Object) (values)); + } + + public void restoreState(FacesContext context, Object state) { + Object values[] = (Object[]) state; + super.restoreState(context, values[0]); + _accept = (String) values[1]; + _storage = (String) values[2]; + } +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUpload.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUploadTag.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUploadTag.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUploadTag.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,167 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import javax.faces.component.UIComponent; + +import jp.sf.pal.jsf.JsfConstants; + +import org.seasar.teeda.core.taglib.html.InputTagBase; + +public class HtmlInputFileUploadTag extends InputTagBase { + + public String getComponentType() { + return HtmlInputFileUpload.COMPONENT_TYPE; + } + + public String getRendererType() { + return HtmlInputFileUpload.DEFAULT_RENDERER_TYPE; + } + + private String _accesskey; + + private String _align; + + private String _alt; + + private String _datafld; + + private String _datasrc; + + private String _dataformatas; + + private String _disabled; + + private String _maxlength; + + private String _onblur; + + private String _onchange; + + private String _onfocus; + + private String _onselect; + + private String _readonly; + + private String _size; + + private String _tabindex; + + private String _accept; + + private String _storage; + + public void release() { + super.release(); + _accesskey = null; + _align = null; + _alt = null; + _datafld = null; + _datasrc = null; + _dataformatas = null; + _disabled = null; + _maxlength = null; + _onblur = null; + _onchange = null; + _onfocus = null; + _onselect = null; + _readonly = null; + _size = null; + _tabindex = null; + _accept = null; + _storage = null; + } + + protected void setProperties(UIComponent component) { + super.setProperties(component); + + setComponentProperty(component, JsfConstants.ACCESSKEY_ATTR, _accesskey); + setComponentProperty(component, JsfConstants.ALIGN_ATTR, _align); + setComponentProperty(component, JsfConstants.ALT_ATTR, _alt); + setComponentProperty(component, JsfConstants.DATAFLD_ATTR, _datafld); + setComponentProperty(component, JsfConstants.DATASRC_ATTR, _datasrc); + setComponentProperty(component, JsfConstants.DATAFORMATAS_ATTR, + _dataformatas); + setComponentProperty(component, JsfConstants.DISABLED_ATTR, _disabled); + setComponentProperty(component, JsfConstants.MAXLENGTH_ATTR, _maxlength); + setComponentProperty(component, JsfConstants.ONBLUR_ATTR, _onblur); + setComponentProperty(component, JsfConstants.ONCHANGE_ATTR, _onchange); + setComponentProperty(component, JsfConstants.ONFOCUS_ATTR, _onfocus); + setComponentProperty(component, JsfConstants.ONSELECT_ATTR, _onselect); + setComponentProperty(component, JsfConstants.READONLY_ATTR, _readonly); + setComponentProperty(component, JsfConstants.SIZE_ATTR, _size); + setComponentProperty(component, JsfConstants.TABINDEX_ATTR, _tabindex); + + setComponentProperty(component, JsfConstants.ACCEPT_ATTR, _accept); + setComponentProperty(component, "storage", _storage); + + } + + public void setStorage(String storage) { + _storage = storage; + } + + public void setAccesskey(String accesskey) { + _accesskey = accesskey; + } + + public void setAlign(String align) { + _align = align; + } + + public void setAlt(String alt) { + _alt = alt; + } + + public void setDatafld(String datafld) { + _datafld = datafld; + } + + public void setDatasrc(String datasrc) { + _datasrc = datasrc; + } + + public void setDataformatas(String dataformatas) { + _dataformatas = dataformatas; + } + + public void setDisabled(String disabled) { + _disabled = disabled; + } + + public void setMaxlength(String maxlength) { + _maxlength = maxlength; + } + + public void setOnblur(String onblur) { + _onblur = onblur; + } + + public void setOnchange(String onchange) { + _onchange = onchange; + } + + public void setOnfocus(String onfocus) { + _onfocus = onfocus; + } + + public void setOnselect(String onselect) { + _onselect = onselect; + } + + public void setReadonly(String readonly) { + _readonly = readonly; + } + + public void setSize(String size) { + _size = size; + } + + public void setTabindex(String tabindex) { + _tabindex = tabindex; + } + + public void setAccept(String accept) { + _accept = accept; + } + +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/HtmlInputFileUploadTag.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFile.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFile.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFile.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,39 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import java.io.IOException; +import java.io.InputStream; +import java.io.Serializable; + +public interface UploadedFile extends Serializable { + + /** + * Answer the uploaded file contents. + * + * @return file contents + */ + byte[] getBytes() throws IOException; + + /** + * Answer the uploaded file contents input stream + * + * @throws IOException + * @return InputStream + */ + InputStream getInputStream() throws IOException; + + /** + * @return Returns the _contentType. + */ + String getContentType(); + + /** + * @return Returns the _name. + */ + String getName(); + + /** + * Answer the size of this file. + * @return long + */ + long getSize(); +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFile.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileConverter.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileConverter.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileConverter.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,22 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; + +public class UploadedFileConverter implements Converter { + public Object getAsObject(FacesContext facescontext, + UIComponent uicomponent, String s) throws ConverterException { + return null; + } + + public String getAsString(FacesContext facescontext, + UIComponent uicomponent, Object obj) throws ConverterException { + if (obj instanceof UploadedFile) { + return ((UploadedFile) obj).getName(); + } else { + return null; + } + } +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileConverter.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultFileImpl.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultFileImpl.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultFileImpl.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,49 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import org.apache.commons.fileupload.FileItem; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class UploadedFileDefaultFileImpl extends UploadedFileDefaultImplBase { + private static final long serialVersionUID = -6401426361519246443L; + + private transient FileItem fileItem = null; + + public UploadedFileDefaultFileImpl(FileItem fileItem) throws IOException { + super(fileItem.getName(), fileItem.getContentType()); + this.fileItem = fileItem; + } + + /** + * Answer the uploaded file contents. + * + * @return file contents + */ + public byte[] getBytes() throws IOException { + byte[] bytes = new byte[(int) getSize()]; + if (fileItem != null) + fileItem.getInputStream().read(bytes); + return bytes; + } + + /** + * Answer the uploaded file contents input stream + * + * @return InputStream + * @throws IOException + */ + public InputStream getInputStream() throws IOException { + return fileItem != null ? fileItem.getInputStream() + : new ByteArrayInputStream(new byte[0]); + } + + /** + * Answer the size of this file. + * @return long + */ + public long getSize() { + return fileItem != null ? fileItem.getSize() : 0; + } +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultFileImpl.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultImplBase.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultImplBase.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultImplBase.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,51 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import java.io.IOException; +import java.io.InputStream; + +public abstract class UploadedFileDefaultImplBase implements UploadedFile { + + private String _name = null; + + private String _contentType = null; + + protected UploadedFileDefaultImplBase(String name, String contentType) { + _name = name; + _contentType = contentType; + } + + /** + * Answer the uploaded file contents. + * + * @return file contents + */ + public abstract byte[] getBytes() throws IOException; + + /** + * Answer the uploaded file contents input stream + * + * @return InputStream + * @throws IOException + */ + public abstract InputStream getInputStream() throws IOException; + + /** + * @return Returns the _contentType. + */ + public String getContentType() { + return _contentType; + } + + /** + * @return Returns the _name. + */ + public String getName() { + return _name; + } + + /** + * Answer the size of this file. + * @return long + */ + public abstract long getSize(); +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultImplBase.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultMemoryImpl.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultMemoryImpl.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultMemoryImpl.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,50 @@ +package jp.sf.pal.jsf.custom.fileupload; + +import org.apache.commons.fileupload.FileItem; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class UploadedFileDefaultMemoryImpl extends UploadedFileDefaultImplBase { + private static final long serialVersionUID = -6006333070975059090L; + + private byte[] bytes; + + public UploadedFileDefaultMemoryImpl(FileItem fileItem) throws IOException { + super(fileItem.getName(), fileItem.getContentType()); + int sizeInBytes = (int) fileItem.getSize(); + bytes = new byte[sizeInBytes]; + fileItem.getInputStream().read(bytes); + + } + + /** + * Answer the uploaded file contents. + * + * @return file contents + */ + public byte[] getBytes() { + return bytes; + } + + /** + * Answer the uploaded file contents input stream + * + * @return InputStream + * @throws IOException + */ + public InputStream getInputStream() throws IOException { + return new ByteArrayInputStream(bytes); + } + + /** + * Answer the size of this file. + * @return long + */ + public long getSize() { + if (bytes == null) + return 0; + return bytes.length; + } +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/custom/fileupload/UploadedFileDefaultMemoryImpl.java ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ExtensionsPortletFilter.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ExtensionsPortletFilter.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ExtensionsPortletFilter.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,200 @@ +/* + * Copyright 2005-2006 Portal Application Laboratory project. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.jsf.filter; + +import java.io.IOException; + +import javax.portlet.ActionRequest; +import javax.portlet.ActionResponse; +import javax.portlet.PortletConfig; +import javax.portlet.PortletException; +import javax.portlet.RenderRequest; +import javax.portlet.RenderResponse; + +import jp.sf.pal.jsf.multipart.MultipartPortletRequestWrapper; + +import org.apache.commons.fileupload.portlet.PortletFileUpload; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.portals.bridges.portletfilter.PortletFilter; +import org.apache.portals.bridges.portletfilter.PortletFilterChain; +import org.apache.portals.bridges.portletfilter.PortletFilterConfig; + +public class ExtensionsPortletFilter implements PortletFilter { + private static final Log log = LogFactory + .getLog(ExtensionsPortletFilter.class); + + private static final String UPLOAD_REPOSITORY_PATH = "uploadRepositoryPath"; + + private static final String UPLOAD_THRESHOLD_SIZE = "uploadThresholdSize"; + + private static final String UPLOAD_MAX_FILE_SIZE = "uploadMaxFileSize"; + + private static final String MULTIPART_ENCODING = "multipartEncoding"; + + private int uploadMaxFileSize = 100 * 1024 * 1024; // 10 MB + + private int uploadThresholdSize = 1 * 1024 * 1024; // 1 MB + + private String uploadRepositoryPath = null; // standard temp directory + + private String multipartEncoding = null; + + private PortletConfig portletConfig; + + /** + * Called by init method of Portlet to initialize this portlet + * filter. + * + * @param filterConfig + * @throws PortletException + */ + public void init(PortletFilterConfig filterConfig) throws PortletException { + if (log.isDebugEnabled()) + log.debug("Initializing ExtensionsPortletFilter."); + + setPortletConfig(filterConfig.getPortletConfig()); + + // for inputFileUpload + String param = filterConfig.getInitParameter(UPLOAD_MAX_FILE_SIZE); + + uploadMaxFileSize = resolveSize(param, uploadMaxFileSize); + + param = filterConfig.getInitParameter(UPLOAD_THRESHOLD_SIZE); + + uploadThresholdSize = resolveSize(param, uploadThresholdSize); + + uploadRepositoryPath = filterConfig + .getInitParameter(UPLOAD_REPOSITORY_PATH); + + multipartEncoding = filterConfig.getInitParameter(MULTIPART_ENCODING); + + if (log.isDebugEnabled()) { + log.debug("uploadMaxFileSize=" + uploadMaxFileSize); + log.debug("uploadThresholdSize=" + uploadThresholdSize); + log.debug("uploadRepositoryPath=" + uploadRepositoryPath); + log.debug("multipartEncoding=" + multipartEncoding); + // log.debug("mimeType=" + mimeType); + } + } + + /** + * Called by render method of Portlet to put tags, such as + * <style>, into <head>. + * + * @param request + * @param response + * @param chain + * PortletFilterChain instance + * @throws PortletException + */ + public void renderFilter(RenderRequest request, RenderResponse response, + PortletFilterChain chain) throws PortletException, IOException { + if (log.isDebugEnabled()) { + log.debug("called renderFilter."); + } + + chain.renderFilter(request, response); + } + + /** + * Called by render method of Portlet to wrap the request when + * it has a multipart content. + * + * @param request + * @param response + * @param chain + * PortletFilterChain instance + * @throws PortletException + */ + public void processActionFilter(ActionRequest request, + ActionResponse response, PortletFilterChain chain) + throws PortletException, IOException { + if (log.isDebugEnabled()) { + log.debug("called processActionFilter."); + } + // Check multipart/form-data + if (PortletFileUpload.isMultipartContent(request)) { + if (log.isDebugEnabled()) + log.debug("ActionRequest is multipart content."); + if (multipartEncoding != null) { + if (log.isDebugEnabled()) + log.debug("Mutlipart encoding is " + multipartEncoding); + request.setCharacterEncoding(multipartEncoding); + } + request = new MultipartPortletRequestWrapper(request, + uploadMaxFileSize, uploadThresholdSize, + uploadRepositoryPath); + } + + // call next processActionFilter + chain.processActionFilter(request, response); + } + + /** + * Called by destroy method of Portlet to destroy this portlet + * filter. + */ + public void destroy() { + } + + private int resolveSize(String param, int defaultValue) { + int numberParam = defaultValue; + + if (param != null) { + param = param.toLowerCase(); + int factor = 1; + String number = param; + + if (param.endsWith("g")) { + factor = 1024 * 1024 * 1024; + number = param.substring(0, param.length() - 1); + } else if (param.endsWith("m")) { + factor = 1024 * 1024; + number = param.substring(0, param.length() - 1); + } else if (param.endsWith("k")) { + factor = 1024; + number = param.substring(0, param.length() - 1); + } + + numberParam = Integer.parseInt(number) * factor; + } + return numberParam; + } + + /** + * @return Returns the portletConfig. + */ + public PortletConfig getPortletConfig() { + return portletConfig; + } + + /** + * @param portletConfig + * The portletConfig to set. + */ + public void setPortletConfig(PortletConfig portletConfig) { + this.portletConfig = portletConfig; + } + + public boolean isValidContentType(String contentType) { + return contentType.startsWith("text/html") + || contentType.startsWith("text/xml") + || contentType.startsWith("application/xhtml+xml") + || contentType.startsWith("application/xml"); + } + +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/filter/ExtensionsPortletFilter.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartPortletRequestWrapper.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartPortletRequestWrapper.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartPortletRequestWrapper.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,553 @@ +/* + * Copyright 2005-2006 Portal Application Laboratory project. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.jsf.multipart; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.security.Principal; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import javax.portlet.ActionRequest; +import javax.portlet.PortalContext; +import javax.portlet.PortletMode; +import javax.portlet.PortletPreferences; +import javax.portlet.PortletSession; +import javax.portlet.WindowState; + + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadBase; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.portlet.PortletFileUpload; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * This class handles multipart/form-date request for Portlet. It will be called + * if the request is multipart/form-data. + * + */ +public class MultipartPortletRequestWrapper implements ActionRequest, + MultipartRequest { + private static Log log = LogFactory + .getLog(MultipartPortletRequestWrapper.class); + + ActionRequest request = null; + + HashMap parametersMap = null; + + PortletFileUpload fileUpload = null; + + HashMap fileItems = null; + + int maxSize; + + int thresholdSize; + + String repositoryPath; + + public MultipartPortletRequestWrapper(ActionRequest request, int maxSize, + int thresholdSize, String repositoryPath) { + this.request = request; + this.maxSize = maxSize; + this.thresholdSize = thresholdSize; + this.repositoryPath = repositoryPath; + } + + private void parseRequest() { + DiskFileItemFactory diskFileItemFactory = new DiskFileItemFactory(); + + diskFileItemFactory.setSizeThreshold(thresholdSize); + + if (repositoryPath != null && repositoryPath.trim().length() > 0) + diskFileItemFactory.setRepository(new File(repositoryPath)); + + fileUpload = new PortletFileUpload(); + fileUpload.setFileItemFactory(diskFileItemFactory); + fileUpload.setSizeMax(maxSize); + + String charset = request.getCharacterEncoding(); + fileUpload.setHeaderEncoding(charset); + + List requestParameters = null; + try { + requestParameters = fileUpload.parseRequest(request); + } catch (FileUploadBase.SizeLimitExceededException e) { + + // TODO: find a way to notify the user about the fact that the + // uploaded file exceeded size limit + + if (log.isInfoEnabled()) + log + .info( + "user tried to upload a file that exceeded file-size limitations.", + e); + + requestParameters = Collections.EMPTY_LIST; + + } catch (FileUploadException fue) { + log.error("Exception while uploading file.", fue); + requestParameters = Collections.EMPTY_LIST; + } + + parametersMap = new HashMap(requestParameters.size()); + fileItems = new HashMap(); + + for (Iterator iter = requestParameters.iterator(); iter.hasNext();) { + FileItem fileItem = (FileItem) iter.next(); + + if (fileItem.isFormField()) { + String name = fileItem.getFieldName(); + + // The following code avoids commons-fileupload charset problem. + // After fixing commons-fileupload, this code should be + // + // String value = fileItem.getString(); + // + String value = null; + if (charset == null) { + value = fileItem.getString(); + } else { + try { + value = new String(fileItem.get(), charset); + } catch (UnsupportedEncodingException e) { + value = fileItem.getString(); + } + } + + addTextParameter(name, value); + } else { // fileItem is a File + if (fileItem.getName() != null) { + fileItems.put(fileItem.getFieldName(), fileItem); + } + } + } + + // Add the query string paramters + for (Iterator it = request.getParameterMap().entrySet().iterator(); it + .hasNext();) { + Map.Entry entry = (Map.Entry) it.next(); + String[] valuesArray = (String[]) entry.getValue(); + for (int i = 0; i < valuesArray.length; i++) { + addTextParameter((String) entry.getKey(), valuesArray[i]); + } + } + } + + private void addTextParameter(String name, String value) { + if (!parametersMap.containsKey(name)) { + String[] valuesArray = { value }; + parametersMap.put(name, valuesArray); + } else { + String[] storedValues = (String[]) parametersMap.get(name); + int lengthSrc = storedValues.length; + String[] valuesArray = new String[lengthSrc + 1]; + System.arraycopy(storedValues, 0, valuesArray, 0, lengthSrc); + valuesArray[lengthSrc] = value; + parametersMap.put(name, valuesArray); + } + } + + public Enumeration getParameterNames() { + if (parametersMap == null) + parseRequest(); + + return Collections.enumeration(parametersMap.keySet()); + } + + public String getParameter(String name) { + if (parametersMap == null) + parseRequest(); + + String[] values = (String[]) parametersMap.get(name); + if (values == null) + return null; + return values[0]; + } + + public String[] getParameterValues(String name) { + if (parametersMap == null) + parseRequest(); + + return (String[]) parametersMap.get(name); + } + + public Map getParameterMap() { + if (parametersMap == null) + parseRequest(); + + return parametersMap; + } + + // Hook for the x:inputFileUpload tag. + public FileItem getFileItem(String fieldName) { + if (fileItems == null) + parseRequest(); + + return (FileItem) fileItems.get(fieldName); + } + + /** + * Provides a way to handle the uploaded files. + */ + public Map getFileItems() { + if (fileItems == null) + parseRequest(); + + return fileItems; + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getAttribute(java.lang.String) + */ + public Object getAttribute(String arg0) { + if (arg0.equals(MultipartRequestWrapper.UPLOADED_FILES_ATTRIBUTE)) { + return getFileItems(); + } + return request.getAttribute(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getAttributeNames() + */ + public Enumeration getAttributeNames() { + return request.getAttributeNames(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getAuthType() + */ + public String getAuthType() { + return request.getAuthType(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getContextPath() + */ + public String getContextPath() { + return request.getContextPath(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getLocale() + */ + public Locale getLocale() { + return request.getLocale(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getLocales() + */ + public Enumeration getLocales() { + return request.getLocales(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPortalContext() + */ + public PortalContext getPortalContext() { + return request.getPortalContext(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPortletMode() + */ + public PortletMode getPortletMode() { + return request.getPortletMode(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPortletSession() + */ + public PortletSession getPortletSession() { + return request.getPortletSession(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPortletSession(boolean) + */ + public PortletSession getPortletSession(boolean arg0) { + return request.getPortletSession(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPreferences() + */ + public PortletPreferences getPreferences() { + return request.getPreferences(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getProperties(java.lang.String) + */ + public Enumeration getProperties(String arg0) { + return request.getProperties(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getProperty(java.lang.String) + */ + public String getProperty(String arg0) { + return request.getProperty(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getPropertyNames() + */ + public Enumeration getPropertyNames() { + return request.getPropertyNames(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getRemoteUser() + */ + public String getRemoteUser() { + return request.getRemoteUser(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getRequestedSessionId() + */ + public String getRequestedSessionId() { + return request.getRequestedSessionId(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getResponseContentType() + */ + public String getResponseContentType() { + return request.getResponseContentType(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getResponseContentTypes() + */ + public Enumeration getResponseContentTypes() { + return request.getResponseContentTypes(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getScheme() + */ + public String getScheme() { + return request.getScheme(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getServerName() + */ + public String getServerName() { + return request.getServerName(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getServerPort() + */ + public int getServerPort() { + return request.getServerPort(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getUserPrincipal() + */ + public Principal getUserPrincipal() { + return request.getUserPrincipal(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#getWindowState() + */ + public WindowState getWindowState() { + return request.getWindowState(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#isPortletModeAllowed(javax.portlet.PortletMode) + */ + public boolean isPortletModeAllowed(PortletMode arg0) { + return request.isPortletModeAllowed(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#isRequestedSessionIdValid() + */ + public boolean isRequestedSessionIdValid() { + return request.isRequestedSessionIdValid(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#isSecure() + */ + public boolean isSecure() { + return request.isSecure(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#isUserInRole(java.lang.String) + */ + public boolean isUserInRole(String arg0) { + return request.isUserInRole(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#isWindowStateAllowed(javax.portlet.WindowState) + */ + public boolean isWindowStateAllowed(WindowState arg0) { + return request.isWindowStateAllowed(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#removeAttribute(java.lang.String) + */ + public void removeAttribute(String arg0) { + request.removeAttribute(arg0); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.PortletRequest#setAttribute(java.lang.String, + * java.lang.Object) + */ + public void setAttribute(String arg0, Object arg1) { + request.setAttribute(arg0, arg1); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#getCharacterEncoding() + */ + public String getCharacterEncoding() { + return request.getCharacterEncoding(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#getContentLength() + */ + public int getContentLength() { + return request.getContentLength(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#getContentType() + */ + public String getContentType() { + return request.getContentType(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#getPortletInputStream() + */ + public InputStream getPortletInputStream() throws IOException { + return request.getPortletInputStream(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#getReader() + */ + public BufferedReader getReader() throws UnsupportedEncodingException, + IOException { + return request.getReader(); + } + + /* + * (non-Javadoc) + * + * @see javax.portlet.ActionRequest#setCharacterEncoding(java.lang.String) + */ + public void setCharacterEncoding(String arg0) + throws UnsupportedEncodingException { + request.setCharacterEncoding(arg0); + } + +} Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartPortletRequestWrapper.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequest.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequest.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequest.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,33 @@ +/* + * Copyright 2005-2006 Portal Application Laboratory project. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package jp.sf.pal.jsf.multipart; + +import java.util.Map; + +import org.apache.commons.fileupload.FileItem; + +/** + * This interface handles the multpart request for inputFileUpload components. + * + * @author <a href="mailto:shins****@yahoo*****">Shinsuke Sugaya</a> + */ +public interface MultipartRequest { + + public abstract FileItem getFileItem(String fieldName); + + public abstract Map getFileItems(); + +} \ No newline at end of file Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequest.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequestWrapper.java =================================================================== --- libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequestWrapper.java 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequestWrapper.java 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,201 @@ +package jp.sf.pal.jsf.multipart; + +import java.io.UnsupportedEncodingException; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +import org.apache.commons.fileupload.DefaultFileItemFactory; +import org.apache.commons.fileupload.DiskFileUpload; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.FileUploadBase; +import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class MultipartRequestWrapper extends HttpServletRequestWrapper { + private static Log log = LogFactory.getLog(MultipartRequestWrapper.class); + + public static final String UPLOADED_FILES_ATTRIBUTE = "jp.sf.pal.jsf.uploadedFiles"; + + public static final String WWW_FORM_URLENCODED_TYPE = "application/x-www-form-urlencoded"; + + HttpServletRequest request = null; + + HashMap parametersMap = null; + + DiskFileUpload fileUpload = null; + + HashMap fileItems = null; + + int maxSize; + + int thresholdSize; + + String repositoryPath; + + public MultipartRequestWrapper(HttpServletRequest request, int maxSize, + int thresholdSize, String repositoryPath) { + super(request); + this.request = request; + this.maxSize = maxSize; + this.thresholdSize = thresholdSize; + this.repositoryPath = repositoryPath; + } + + private void parseRequest() { + fileUpload = new DiskFileUpload(); + fileUpload.setFileItemFactory(new DefaultFileItemFactory()); + fileUpload.setSizeMax(maxSize); + + fileUpload.setSizeThreshold(thresholdSize); + + if (repositoryPath != null && repositoryPath.trim().length() > 0) + fileUpload.setRepositoryPath(repositoryPath); + + String charset = request.getCharacterEncoding(); + fileUpload.setHeaderEncoding(charset); + + List requestParameters = null; + try { + requestParameters = fileUpload.parseRequest(request); + } catch (FileUploadBase.SizeLimitExceededException e) { + + if (log.isInfoEnabled()) + log + .info( + "user tried to upload a file that exceeded file-size limitations.", + e); + + requestParameters = Collections.EMPTY_LIST; + + } catch (FileUploadException fue) { + log.error("Exception while uploading file.", fue); + requestParameters = Collections.EMPTY_LIST; + } + + parametersMap = new HashMap(requestParameters.size()); + fileItems = new HashMap(); + + for (Iterator iter = requestParameters.iterator(); iter.hasNext();) { + FileItem fileItem = (FileItem) iter.next(); + + if (fileItem.isFormField()) { + String name = fileItem.getFieldName(); + + String value = null; + if (charset == null) { + value = fileItem.getString(); + } else { + try { + value = new String(fileItem.get(), charset); + } catch (UnsupportedEncodingException e) { + value = fileItem.getString(); + } + } + + addTextParameter(name, value); + } else { + if (fileItem.getName() != null) { + fileItems.put(fileItem.getFieldName(), fileItem); + } + } + } + + for (Iterator it = request.getParameterMap().entrySet().iterator(); it + .hasNext();) { + Map.Entry entry = (Map.Entry) it.next(); + + Object value = entry.getValue(); + + if (value instanceof String[]) { + String[] valuesArray = (String[]) entry.getValue(); + for (int i = 0; i < valuesArray.length; i++) { + addTextParameter((String) entry.getKey(), valuesArray[i]); + } + } else if (value instanceof String) { + String strValue = (String) entry.getValue(); + addTextParameter((String) entry.getKey(), strValue); + } else if (value != null) + throw new IllegalStateException("value of type : " + + value.getClass() + " for key : " + entry.getKey() + + " cannot be handled."); + + } + } + + private void addTextParameter(String name, String value) { + if (!parametersMap.containsKey(name)) { + String[] valuesArray = { value }; + parametersMap.put(name, valuesArray); + } else { + String[] storedValues = (String[]) parametersMap.get(name); + int lengthSrc = storedValues.length; + String[] valuesArray = new String[lengthSrc + 1]; + System.arraycopy(storedValues, 0, valuesArray, 0, lengthSrc); + valuesArray[lengthSrc] = value; + parametersMap.put(name, valuesArray); + } + } + + public Enumeration getParameterNames() { + if (parametersMap == null) + parseRequest(); + + return Collections.enumeration(parametersMap.keySet()); + } + + public String getParameter(String name) { + if (parametersMap == null) + parseRequest(); + + String[] values = (String[]) parametersMap.get(name); + if (values == null) + return null; + return values[0]; + } + + public String[] getParameterValues(String name) { + if (parametersMap == null) + parseRequest(); + + return (String[]) parametersMap.get(name); + } + + public Map getParameterMap() { + if (parametersMap == null) + parseRequest(); + + return parametersMap; + } + + public FileItem getFileItem(String fieldName) { + if (fileItems == null) + parseRequest(); + + return (FileItem) fileItems.get(fieldName); + } + + public Map getFileItems() { + if (fileItems == null) + parseRequest(); + return fileItems; + } + + public Object getAttribute(String string) { + if (string.equals(UPLOADED_FILES_ATTRIBUTE)) { + return getFileItems(); + } + return super.getAttribute(string); + } + + public String getContentType() { + return WWW_FORM_URLENCODED_TYPE; + } +} \ No newline at end of file Property changes on: libraries/jsf4portlet/trunk/src/main/java/jp/sf/pal/jsf/multipart/MultipartRequestWrapper.java ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/resources/META-INF/faces-config.xml =================================================================== --- libraries/jsf4portlet/trunk/src/main/resources/META-INF/faces-config.xml 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/resources/META-INF/faces-config.xml 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> +<faces-config xmlns="http://java.sun.com/JSF/Configuration"> + + <component> + <component-type>jp.sf.pal.jsf.HtmlInputFileUpload</component-type> + <component-class>jp.sf.pal.jsf.custom.fileupload.HtmlInputFileUpload</component-class> + </component> + + <render-kit> + + <render-kit-id>HTML_BASIC</render-kit-id> + + <renderer> + <component-family>javax.faces.Input</component-family> + <renderer-type>jp.sf.pal.jsf.FileUpload</renderer-type> + <renderer-class>jp.sf.pal.jsf.custom.fileupload.HtmlFileUploadRenderer</renderer-class> + </renderer> + + </render-kit> + +</faces-config> Property changes on: libraries/jsf4portlet/trunk/src/main/resources/META-INF/faces-config.xml ___________________________________________________________________ Name: svn:eol-style + native Added: libraries/jsf4portlet/trunk/src/main/resources/META-INF/jsf4portlet.tld =================================================================== --- libraries/jsf4portlet/trunk/src/main/resources/META-INF/jsf4portlet.tld 2007-07-15 23:14:16 UTC (rev 265) +++ libraries/jsf4portlet/trunk/src/main/resources/META-INF/jsf4portlet.tld 2007-07-15 23:30:37 UTC (rev 266) @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Copyright 2004-2006 the Seasar Foundation and the Others. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language + * governing permissions and limitations under the License. +--> +<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> +<taglib> + <tlib-version>1.0</tlib-version> + <jsp-version>1.2</jsp-version> + <short-name>pal</short-name> + <uri>http://pal.sourceforge.jp/jsf4portlet</uri> + <description> + Tag library for the PALab implementation. + </description> + <tag> + <name>inputFileUpload</name> + <tag-class>jp.sf.pal.jsf.custom.fileupload.HtmlInputFileUploadTag</tag-class> + <body-content>JSP</body-content> + <description> + You must enable the MultiPart Filter to make this component + work (see web.xml). Also, don't forget to set the form's attribute + "enctype" to "multipart/form-data". + See "examples/web/fileupload.jsp" for an example! + + Unless otherwise specified, all attributes accept static values or EL expressions. + </description> + <attribute> + <name>id</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + The developer-assigned ID of this component. The ID must be unique + within the scope of the tag's enclosing naming container (e.g. + h:form or f:subview). This value must be a static value. + </description> + </attribute> + <attribute> + <name>binding</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + Identifies a backing bean property (of type UIComponent or appropriate + subclass) to bind to this component instance. This value must be an + EL expression. + </description> + </attribute> + <attribute> + <name>rendered</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A boolean value that indicates whether this component should be rendered. + Default value: true. + </description> + </attribute> + <attribute> + <name>value</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>The initial value of this component.</description> + </attribute> + <attribute> + <name>converter</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + An expression that specifies the Converter for this component. + If the value binding expression is a String, the String is used + as an ID to look up a Converter. If the value binding expression + is a Converter, uses that instance as the converter. + + The value can either be a static value (ID case only) or an EL expression. + </description> + </attribute> + <attribute> + <name>immediate</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A boolean value that identifies the phase during which value change + events should fire. During normal event processing, value change + events are fired during the "invoke application" phase of request + processing. If this attribute is set to "true", these methods are + fired instead at the end of the "apply request values" phase. + </description> + </attribute> + <attribute> + <name>required</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A boolean value that indicates whether an input value is required. + If this value is true, and no input value is provided, the error + message javax.faces.component.UIInput.REQUIRED is posted. + </description> + </attribute> + <attribute> + <name>validator</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A method binding EL expression, accepting FacesContext, UIComponent, + and Object parameters, and returning void, that validates the + component's local value. + </description> + </attribute> + <attribute> + <name>valueChangeListener</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + A method binding EL expression, accepting a ValueChangeEvent parameter + and returning void. The specified method is invoked if this component + is modified. The phase that this handler is fired in can be controlled + via the immediate attribute. + </description> + </attribute> + <attribute> + <name>dir</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: The direction of text display, either 'ltr' (left-to-right) or 'rtl' (right-to-left).</description> + </attribute> + <attribute> + <name>lang</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: The base language of this document.</description> + </attribute> + <attribute> + <name>style</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: CSS styling instructions.</description> + </attribute> + <attribute> + <name>title</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: An advisory title for this element. Often used by the user agent as a tooltip.</description> + </attribute> + <attribute> + <name>styleClass</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>The CSS class for this element. Corresponds to the HTML 'class' attribute.</description> + </attribute> + <attribute> + <name>onclick</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the element is clicked.</description> + </attribute> + <attribute> + <name>ondblclick</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the element is double-clicked.</description> + </attribute> + <attribute> + <name>onmousedown</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the pointing device is pressed over this element.</description> + </attribute> + <attribute> + <name>onmouseup</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the pointing device is released over this element.</description> + </attribute> + <attribute> + <name>onmouseover</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the pointing device is moved into this element.</description> + </attribute> + <attribute> + <name>onmousemove</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the pointing device is moved while it is in this element.</description> + </attribute> + <attribute> + <name>onmouseout</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when the pointing device is moves out of this element.</description> + </attribute> + <attribute> + <name>onkeypress</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when a key is pressed over this element.</description> + </attribute> + <attribute> + <name>onkeydown</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when a key is pressed down over this element.</description> + </attribute> + <attribute> + <name>onkeyup</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Script to be invoked when a key is released over this element.</description> + </attribute> + <attribute> + <name>accesskey</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Sets the access key for this element.</description> + </attribute> + <attribute> + <name>align</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <description>HTML: Specifies the horizontal alignment of this element. Deprecated in HTML 4.01.</description> + </attribute> + <attribute> + <name>alt</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies alternative text that can be used by a browser that can't show this element.</description> + </attribute> + <attribute> + <name>disabled</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: When true, this element cannot receive focus.</description> + </attribute> + <attribute> + <name>onblur</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies a script to be invoked when the element loses focus.</description> + </attribute> + <attribute> + <name>onfocus</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies a script to be invoked when the element receives focus.</description> + </attribute> + <attribute> + <name>onchange</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies a script to be invoked when the element is modified.</description> + </attribute> + <attribute> + <name>onselect</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies a script to be invoked when the element is selected.</description> + </attribute> + <attribute> + <name>readonly</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description> + HTML: When true, indicates that this component cannot be modified by the user. + The element may receive focus unless it has also been disabled. + </description> + </attribute> + <attribute> + <name>tabindex</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: Specifies the position of this element within the tab order of the document.</description> + </attribute> + <attribute> + <name>maxlength</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: The maximum number of characters allowed to be entered.</description> + </attribute> + <attribute> + <name>size</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + <type>java.lang.String</type> + <description>HTML: The initial width of this control, in characters.</description> + </attribute> + <attribute> + <name>accept</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + </attribute> + <attribute> + <name>storage</name> + <required>false</required> + <rtexprvalue>false</rtexprvalue> + </attribute> + </tag> +</taglib> Property changes on: libraries/jsf4portlet/trunk/src/main/resources/META-INF/jsf4portlet.tld ___________________________________________________________________ Name: svn:eol-style + native