private void saveToContext ( Context context , boolean updateSiteStructure ) { ParameterParser urlParamParser = context . getUrlParamParser ( ) ; ParameterParser formParamParser = context . getPostParamParser ( ) ; List < String > structParams = new ArrayList < String > ( ) ; List < StructuralNodeModifier > ddns = new ArrayList < StructuralNodeModifier > ( ) ; for ( StructuralNodeModifier snm : this . ddnTableModel . getElements ( ) ) { if ( snm . getType ( ) . equals ( StructuralNodeModifier . Type . StructuralParameter ) ) { structParams . add ( snm . getName ( ) ) ; } else { ddns . add ( snm ) ; } } if ( urlParamParser instanceof StandardParameterParser ) { StandardParameterParser urlStdParamParser = ( StandardParameterParser ) urlParamParser ; urlStdParamParser . setKeyValuePairSeparators ( this . getUrlKvPairSeparators ( ) . getText ( ) ) ; urlStdParamParser . setKeyValueSeparators ( this . getUrlKeyValueSeparators ( ) . getText ( ) ) ; urlStdParamParser . setStructuralParameters ( structParams ) ; context . setUrlParamParser ( urlStdParamParser ) ; urlStdParamParser . setContext ( context ) ; } if ( formParamParser instanceof StandardParameterParser ) { StandardParameterParser formStdParamParser = ( StandardParameterParser ) formParamParser ; formStdParamParser . setKeyValuePairSeparators ( this . getPostKvPairSeparators ( ) . getText ( ) ) ; formStdParamParser . setKeyValueSeparators ( this . getPostKeyValueSeparators ( ) . getText ( ) ) ; context . setPostParamParser ( formStdParamParser ) ; formStdParamParser . setContext ( context ) ; } context . setDataDrivenNodes ( ddns ) ; if ( updateSiteStructure ) { context . restructureSiteTree ( ) ; } }
Save the data from this panel to the provided context .