• Harald Klose
  • NEWBIE
  • 10 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Hello,

I have a VF Page with a PageBlockTable and some fields. Two of them are SelectLists, all other are normal Input or Outputfields. Please see these three fields:

<apex:column headerValue="Lager" >
               <apex:actionregion immediate="True">
                  <apex:selectList size="1" required="true" value="{!LP.selectedLagerStr}">
                   <apex:selectoptions value="{!LP.LagerSelectList}"/>
                  <apex:actionsupport action="{!changedLager}" event="onchange">
                  <apex:param name="LAG" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:selectList>
               </apex:actionregion>
              </apex:column>
              <apex:column headerValue="Versandpartner" >
                <apex:actionregion immediate="True">
                  <apex:selectList size="1" required="true" value="{!LP.selectedVSPartnerStr}">
                   <apex:selectoptions value="{!LP.VersandPArtnerSelectList}"/>
                  <apex:actionsupport action="{!changedVersandPartner}" event="onchange">
                  <apex:param name="VSP" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:selectList>
               </apex:actionregion>
              </apex:column>
<apex:column headerValue="HKZ">
               <apex:actionregion immediate="True">
                  <apex:inputfield value="{!LP.LieferPos.HKZ__c}">
                  <apex:actionsupport action="{!changedHKZ}" event="onchange" rerender="tabpanel,geliefert,Bedarfe,BedarfBlock,Page-Messages">
                  <apex:param name="HKZ" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:inputfield>
               </apex:actionregion>
              </apex:column>

If I first change one of the SelectList fields the parameter applyLiPoslfdNr is null. If I change then the last field, the parameter is set for this field and when changing now one of the other two fields the parameter is also set.
I checked the value field and that is not null. The method of the last field does nothing:

public PageReference changedHKZ() {
        if ( applyLiPoslfdNr != null ){
         system.debug ('########################### changed HKZ bei LiPos  ' + LiPosList_prop[applyLiPoslfdNr]);
        }
        return null;
    }.

Any ideas about this weird behaviour?

Thanks a lot
Harald
Hello,

is something wrong with system.debug? It is not showing new Debug logs. The lines that were entered
some time ago are still displayed. The lines that were entered yesterday are not showing. Here is the
Visualforce Page line whith the button I clicked:

<apex:commandButton action="{!BarVerkaufLieferungen_speichern}" value="Zuordnung speichern" onclick="return confirmCancel()" immediate="true" rendered="{!Sani_prop}"/>

Her is the controller code snippet:

line 5354  public PageReference BarVerkaufLieferungen_speichern() {
line 5355 system.debug(LoggingLevel.DEBUG,'################## LiPosList_prop ' + LiPosList_prop);

And here you see the debug log lines:

13:06:17.205 (205702000)|CODE_UNIT_STARTED|[EXTERNAL]|01pA0000002QLUm|BarVerkaufWizardController invoke(BarVerkaufLieferungen_speichern)
13:06:17.205 (205817000)|SYSTEM_MODE_ENTER|false
13:06:17.205 (205854000)|STATEMENT_EXECUTE|[5354]
13:06:17.205 (205871000)|STATEMENT_EXECUTE|[5355]
13:06:17.206 (206496000)|PUSH_TRACE_FLAGS|[5355]|01pA0000002QLUm|BarVerkaufWizardController|APEX_CODE,INFO;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
13:06:17.206 (206597000)|STATEMENT_EXECUTE|[128]
13:06:17.206 (206613000)|STATEMENT_EXECUTE|[2678]
13:06:17.206 (206625000)|STATEMENT_EXECUTE|[2679]

After this I can't find any lines with the hash in the debug log!

The debugs that were entered before, are still displaying.

Any ideas? Thanks!


Harald
Hello,

I have a Wrapper for a PageList. In this Wrapper there is a field called Versandpartner which is of type Account. In the VF page I cannot display the field {!lp.Versandpartner}, because then the system tells me "could not resolve the entity from apex inputfield value binding". I can display the field {!lp.Versandpartner.Name} but then it is only a pure text field and does not have the Metadata binding to Accounts. I could enter any string and don't have the magnifying glass. 
My wrapper looks like this:
public with sharing class BarVerkaufLieferPosWrapper {

    public Lieferscheinposition__c LieferPos {get; set;}  // the record being wrapped around
    public Integer LieflfdNr {get; set;}
    public string  stornostatus {get; set;}
    public Integer Lieferscheinnr {get; set;}
public string statisticTable = null;
public Account Versandpartner {get; set;}
public Lager__c Lager {get; set;}
public string Paragraph300_302 = null;

    // constructor for NEW Artikel records
    public BarVerkaufLieferPosWrapper(){
  LieflfdNr = 0;
  stornostatus = '';
        LieferPos = new Lieferscheinposition__c();
     Lieferscheinnr = 1;
  statisticTable = '<table><tr><td width=200>&nbsp;</td></tr></table>';
  Versandpartner = null;
  Lager = null;
  Paragraph300_302 = '300';
    }
   
    // constructor used for existing Arikel records
    public BarVerkaufLieferPosWrapper(Lieferscheinposition__c LP){
  LiefLfdNr = 0;
  stornostatus = '';
        Lieferpos = LP;
     Lieferscheinnr = 1;
   statisticTable = '<table border=1><tr><td width=200>&nbsp;</td></tr></table>';
  Versandpartner= null;
  Lager = null;
  Paragraph300_302 = '300';
    }
public string getStatisticTable () {
  return statisticTable;
}
}

and the lines in the VF Page:
<apex:column headerValue="Versandpartner">
                 <apex:actionregion immediate="True">
                  <apex:inputfield value="{!LP.Versandpartner.Name}">
                   <apex:actionsupport action="{!changedVersandpartner}" event="onchange" rerender="tabpanel,geliefert,Bedarfe,BedarfBlock,Page-Messages">
                  <apex:param name="VsPart" assignto="{!applyLiPoslfdNr}" value="{!LP.LieflfdNr}"/>
                  </apex:actionsupport>
                  </apex:inputfield>
                </apex:actionregion>
              </apex:column>

How can I change the behaviour, that this looks like a normal lookup for accounts?

Thanks in advance
Harald
Hello,

is something wrong with system.debug? It is not showing new Debug logs. The lines that were entered
some time ago are still displayed. The lines that were entered yesterday are not showing. Here is the
Visualforce Page line whith the button I clicked:

<apex:commandButton action="{!BarVerkaufLieferungen_speichern}" value="Zuordnung speichern" onclick="return confirmCancel()" immediate="true" rendered="{!Sani_prop}"/>

Her is the controller code snippet:

line 5354  public PageReference BarVerkaufLieferungen_speichern() {
line 5355 system.debug(LoggingLevel.DEBUG,'################## LiPosList_prop ' + LiPosList_prop);

And here you see the debug log lines:

13:06:17.205 (205702000)|CODE_UNIT_STARTED|[EXTERNAL]|01pA0000002QLUm|BarVerkaufWizardController invoke(BarVerkaufLieferungen_speichern)
13:06:17.205 (205817000)|SYSTEM_MODE_ENTER|false
13:06:17.205 (205854000)|STATEMENT_EXECUTE|[5354]
13:06:17.205 (205871000)|STATEMENT_EXECUTE|[5355]
13:06:17.206 (206496000)|PUSH_TRACE_FLAGS|[5355]|01pA0000002QLUm|BarVerkaufWizardController|APEX_CODE,INFO;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
13:06:17.206 (206597000)|STATEMENT_EXECUTE|[128]
13:06:17.206 (206613000)|STATEMENT_EXECUTE|[2678]
13:06:17.206 (206625000)|STATEMENT_EXECUTE|[2679]

After this I can't find any lines with the hash in the debug log!

The debugs that were entered before, are still displaying.

Any ideas? Thanks!


Harald