JSF + Trinindad using <tr:inputText> component using required attribute

StackOverflow https://stackoverflow.com/questions/12112872

  •  28-06-2021
  •  | 
  •  

سؤال

I'm using trinidad library, when the required attribute is set on tr:inputText component from the backing bean, the component shifts to the right.This causes the component to be out of alignment with other components enclosed within a panel box container.

Anyone know how to solve this issue?

Thanks, John.

هل كانت مفيدة؟

المحلول

I would solve it using CSS. If I am correct the <tr:inputText/> is rendered as a table with your styleClass set to inputStyle. Then the required indicator will be present in the first cell of the first row (even is the input is not required). So you can try something like:

.inputStyle tr:first-child td:first-child {
  width: 20px;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top