| … | |
… | |
| 593 | warn "use $self->configuration instead of $self->config. Internally this string is ascii, not base64 encoded", join(' ', caller()); |
593 | warn "use $self->configuration instead of $self->config. Internally this string is ascii, not base64 encoded", join(' ', caller()); |
| 594 | # $self->{base64_config} = encode_base64($str) || $self->{base64_config}; # replace the current string if non-empty |
594 | # $self->{base64_config} = encode_base64($str) || $self->{base64_config}; # replace the current string if non-empty |
| 595 | # $self->{base64_config} =~ s/\n//g; |
595 | # $self->{base64_config} =~ s/\n//g; |
| 596 | # decode_base64($self->{base64_config}); |
596 | # decode_base64($self->{base64_config}); |
| 597 | } |
597 | } |
| 598 | sub state { |
598 | sub state { #deprecated |
| 599 | my $self = shift; |
599 | my $self = shift; |
| 600 | my $str = shift; |
600 | my $str = shift; |
| 601 | warn "use $self->initialState instead of $self->state. Internally this string is ascii, not base64 encoded", join(' ', caller()); |
601 | warn "use $self->initialState instead of $self->state. Internally this string is ascii, not base64 encoded", join(' ', caller()); |
| 602 | # $self->{base64_state} = encode_base64($str) ||$self->{base64_state}; # replace the current string if non-empty |
602 | # $self->{base64_state} = encode_base64($str) ||$self->{base64_state}; # replace the current string if non-empty |
| 603 | # $self->{base64_state} =~ s/\n//g; |
603 | # $self->{base64_state} =~ s/\n//g; |
| … | |
… | |
| 707 | |
707 | |
| 708 | |
708 | |
| 709 | ww_applet_list["$appletName"].code = "$code"; |
709 | ww_applet_list["$appletName"].code = "$code"; |
| 710 | ww_applet_list["$appletName"].codebase = "$codebase"; |
710 | ww_applet_list["$appletName"].codebase = "$codebase"; |
| 711 | ww_applet_list["$appletName"].appletID = "$appletID"; |
711 | ww_applet_list["$appletName"].appletID = "$appletID"; |
| 712 | ww_applet_list["$appletName"].base64_state = "$base64_initializationState"; |
712 | ww_applet_list["$appletName"].base64_state = "$base64_initialState"; |
| 713 | ww_applet_list["$appletName"].initialState = Base64.decode("$base64_initialState"); |
713 | ww_applet_list["$appletName"].initialState = Base64.decode("$base64_initialState"); |
| 714 | ww_applet_list["$appletName"].configuration = Base64.decode("$base64_configuration");; |
714 | ww_applet_list["$appletName"].configuration = Base64.decode("$base64_configuration");; |
| 715 | ww_applet_list["$appletName"].getStateAlias = "$getStateAlias"; |
715 | ww_applet_list["$appletName"].getStateAlias = "$getStateAlias"; |
| 716 | ww_applet_list["$appletName"].setStateAlias = "$setStateAlias"; |
716 | ww_applet_list["$appletName"].setStateAlias = "$setStateAlias"; |
| 717 | ww_applet_list["$appletName"].setConfigAlias = "$setConfigAlias"; |
717 | ww_applet_list["$appletName"].setConfigAlias = "$setConfigAlias"; |
| 718 | ww_applet_list["$appletName"].getConfigAlias = "$getConfigAlias"; |
718 | ww_applet_list["$appletName"].getConfigAlias = "$getConfigAlias"; |
| 719 | ww_applet_list["$appletName"].initializeActionAlias = "$initializeActionAlias"; |
719 | ww_applet_list["$appletName"].initializeActionAlias = "$initializeActionAlias"; |
| … | |
… | |
| 741 | my $width = $self->{width}; |
741 | my $width = $self->{width}; |
| 742 | my $height = $self->{height}; |
742 | my $height = $self->{height}; |
| 743 | my $applet_bgcolor = $self->{bgcolor}; |
743 | my $applet_bgcolor = $self->{bgcolor}; |
| 744 | my $javaParameters = ''; |
744 | my $javaParameters = ''; |
| 745 | my $flashParameters = ''; |
745 | my $flashParameters = ''; |
|
|
746 | if (PGcore::not_null($self->{parameter_string}) ) { |
|
|
747 | $javaParameters = $self->{parameter_string}; |
|
|
748 | $flashParameters = $self->{parameter_string}; |
|
|
749 | } else { |
| 746 | my %param_hash = %{$self->params()}; |
750 | my %param_hash = %{$self->params()}; |
| 747 | foreach my $key (keys %param_hash) { |
751 | foreach my $key (keys %param_hash) { |
| 748 | $javaParameters .= qq!<param name ="$key" value = "$param_hash{$key}">\n!; |
752 | $javaParameters .= qq!<param name ="$key" value = "$param_hash{$key}">\n!; |
| 749 | $flashParameters .= uri_escape($key).'='.uri_escape($param_hash{$key}).'&'; |
753 | $flashParameters .= uri_escape($key).'='.uri_escape($param_hash{$key}).'&'; |
| 750 | } |
754 | } |
| 751 | $flashParameters =~ s/\&$//; # trim last & |
755 | $flashParameters =~ s/\&$//; # trim last & |
|
|
756 | } |
| 752 | |
757 | |
| 753 | |
758 | |
| 754 | $objectText = $self->{objectText}; |
759 | $objectText = $self->{objectText}; |
| 755 | $objectText =~ s/(\$\w+)/$1/gee; |
760 | $objectText =~ s/(\$\w+)/$1/gee; |
|
|
761 | $objectText .=qq{<script language="javascript">ww_applet_list["$appletName"].visible = 1;</script>}; # don't submit things if not visible |
| 756 | return $objectText; |
762 | return $objectText; |
| 757 | } |
763 | } |
| 758 | |
764 | |
| 759 | |
765 | |
| 760 | ############################################################################################################### |
766 | ############################################################################################################### |
| … | |
… | |
| 889 | name = "$appletName" |
895 | name = "$appletName" |
| 890 | id = "$appletName" |
896 | id = "$appletName" |
| 891 | width = "$width" |
897 | width = "$width" |
| 892 | height = "$height" |
898 | height = "$height" |
| 893 | bgcolor = "$applet_bgcolor" |
899 | bgcolor = "$applet_bgcolor" |
| 894 | MAYSCRIPT |
900 | mayscript = "true"; |
| 895 | > |
901 | > |
| 896 | $javaParameters |
902 | $javaParameters |
| 897 | |
903 | |
| 898 | Sorry, the Applet could not be started. Please make sure that |
904 | Sorry, the Applet could not be started. Please make sure that |
| 899 | Java 1.4.2 (or later) is installed and activated. |
905 | Java 1.4.2 (or later) is installed and activated. |