Home >
Back-end > Excuse me each teacher error can't from the element type Object into the Field, how to solve th
Excuse me each teacher error can't from the element type Object into the Field, how to solve th
Public class PreGaugeResultPageModel extends PageModel
{
Public static final String TAG_ID="tag5243";
Protected void initPageMetaStruct ()
{
LfwView main=getPageMeta (.) getView (" main ");
It httpRequest=LfwRuntimeEnvironment. GetWebContext (.) getRequest ();
String pk_eva_appraiser=httpRequest. GetParameter (" pk ");
The int type=Integer. ParseInt (httpRequest. GetParameter (" type "));
AppLifeCycleContext. Current (). GetApplicationContext () addAppAttribute (" type ", an Integer. The valueOf (type));
String isShowTurnBack=null;
If (httpRequest. GetParameter (" isShowTurnBack ")!=null) {
IsShowTurnBack=httpRequest. GetParameter (" isShowTurnBack ");
}
If ((isShowTurnBack!=null) & amp; & (" N ". The equals (isShowTurnBack)))
{
ExtHandMethod (main);
}
Int schMode=initPage (main pk_eva_appraiser);
UIMeta um=(UIMeta) getUIMeta ();
UITabComp tabComp=(UITabComp) um. FindChildById (" tag5243 ");
The List itemList=tabComp. GetPanelList ();
If ((schMode==2) | | (schMode==3))
{
UITabItem tabGauge=(UITabItem) itemList. Get (0);
TabGauge. SetText (NCLangRes4VoTransl. GetNCLangRes () getStrByID (" c_pe - res ", "0 c_pe - res0133"));
TabGauge. SetI18nName (" 0 c_pe - res0133 ");
TabGauge. SetLangDir (" c_pe - res ");
ChangeGrid (main);
}
if (type !
=1){
If (type==2)
{
ItemList. Remove (0);
UIFlowvLayout flowvLayout=(UIFlowvLayout) um. FindChildById (" flowvlayout7333 ");
FlowvLayout. RemovePanel ((UIFlowvPanel) um. FindChildById (" panelv07333 "));
} else if (type==3)
{
ItemList. Remove (1);
}
}
Super. InitPageMetaStruct ();
}
Private void extHandMethod LfwView (main) {
The Dataset dsGaugeIndi=main getViewModels (.) getDataset (" dsGaugeIndi ");
The Dataset gridAppraiser=main getViewModels (.) getDataset (" dsAppraiser ");
The List fieldList=dsGaugeIndi. GetFieldSet (.) getFieldList ();
The List gridAppraiserFieldList=gridAppraiser. GetFieldSet (.) getFieldList ();
GridComp GridComp=(GridComp). The main getViewComponents () getComponent (
"GridGaugeIndi");
GridComp gridAppraiserComp=(GridComp). The main getViewComponents () getComponent (
"GridAppraiser");
GridComp. SetAutoRowHeight (Boolean. The valueOf (true));
The Map Map=new HashMap ();
The map. The put (" pk_indi_type_linkname ", an Integer. The valueOf (1));
The map. The put (" indiname ", an Integer. The valueOf (1));
The map. The put (" value_fact ", an Integer. The valueOf (1));
The Map map2=new HashMap ();
Map2. Put (" value_start ", an Integer. The valueOf (1));
Map2. Put (" value_challenge ", an Integer. The valueOf (1));
Map2. Put (" pk_guage_indi_standard ", an Integer. The valueOf (1));
For (Field Field: fieldList {
)String id=field. GetId ();
GridColumn score_column=gridComp. GetElementById (id);
If (score_column!=null) {
{if (map. Either containsKey (id))
If (score_column==null) {
continue;
}
Score_column. SetAutoExpand (true);
}
{if (map2. Either containsKey (id))
Score_column. SetVisible (true);
Score_column. SetAutoExpand (true);
If (id. Equals (" value_start ")) {
Score_column. SetI18nName (" ");
Score_column. SetText (" criteria ");
} else if (id) equals (" value_challenge ")) {
Score_column. SetI18nName (" ");
Score_column. SetText (" indicators norm ");
Score_column. SetAutoExpand (false);
}
}
Score_column. SetTextAlign (" center ");
}
}
For (Field Field: gridAppraiserFieldList {
)String id=field. GetId ();
GridColumn score_column=gridAppraiserComp. GetElementById (id);
If (score_column!=null) {
If (id. Equals (" appraiser_status ")) {
GridColumn zero_column=(GridColumn) gridAppraiserComp. GetColumn (0);
Int oldIndex=score_column. GetIndex ();
Score_column. SetIndex (0);
Zero_column. SetIndex (oldIndex);
}
Score_column. SetTextAlign (" center ");
Score_column. SetAutoExpand (true);
}
}
MenuItem item=new MenuItem ();
Item. SetEnabled (true);
Item. SetId (" update ");
Item. SetModifiers (2);
Item. The setText (" modify ");
Item. SetVisible (true);
EventConf event=MouseEvent. GetOnClickEvent ();
OnUpdate event. SetMethodName (" ");
Item. AddEventConf (event);
MenuItem item2=new MenuItem ();
Item2. SetEnabled (true);
Item2. SetId (" save ");
Item2. SetModifiers (2);
Item2. SetText (" save ");
Item2. SetVisible (true);
EventConf event2=MouseEvent. GetOnClickEvent ();
Event2. SetMethodName (" the save ");
EventSubmitRule rule=new EventSubmitRule ();
ViewRule wr=new ViewRule ();
Wr. SetId (main getId ());
DatasetRule DSR=new DatasetRule ();
The DSR. SetId (" dsGaugeIndi ");
The DSR. SetType (" ds_all_line ");
Wr. AddDsRule (DSR);
Rule. AddWidgetRule (wr);
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull