ActionSupport未被触发

时间:2014-03-07 17:59:32

标签: visualforce apex

当我将其放入我的VF页面时,我的动作支持根本没有被触发。我看了类似的问题并改变了事件,但似乎没有什么可以做的。

//假设我的对象叫做coffecup。这是一个通用代码,虽然可能不是问题,但可能存在小的语法错误.rerender属性在包含coffecupSize和coffecupshape字段的pageblock表上重新渲染coloumns。调试日志显示setCoffeeCupSizeSize和Shape方法根本没有输入 VF

<apex:column rendered="{!ifaccesible}">
                  <apex:facet name="header">Coffee Cup Colours</apex:facet>
                  <apex:outputField value="{!coffecup.colours}">  //A lookup field on the custom object
                            <apex:actionSupport event="onchange" action="{!setCoffeeCupSizeandShape}" rerender="coffecupSize, coffecupShape" />   
                            <apex:inlineEditSupport /> 
                  </apex:outputField>
</apex:column> 

控制器

public void setCoffeeCupSizeandShape
{
        if (coffecup.colour == red) 
            CoffeeCupSize = large;
            coffeeCupShape = round; 

}

1 个答案:

答案 0 :(得分:0)

from __future__ import print_function import csv with open('comp.csv', 'r') as f_input: csv_input = csv.reader(f_input) header = next(csv_input) scores_start_idx = 2 for row in csv_input: organization_name = row[1] organization_scores = row[scores_start_idx:] for score_idx, score_text in enumerate(organization_scores): print(organization_name + ',' + header[score_idx + scores_start_idx], end='') for line in score_text.splitlines(): score = line.split(':')[-1].strip() print(',' + score, end='') print() 没有onchange事件支持。您需要使用Snap Election,Score 1,3,3,4,4,3,4,4,4,3,4,3,4,4,3,4,3,4,3,2,1,4,4 Snap Election,Score 2,3,3,4,4,3,4,4,4,3,4,3,4,4,3,4,3,4,3,2,1,4,4 Rental Hotspots Ltd,Score 1,1 ... 。 如果您需要apex:outputField,请查看this answer